ona icon indicating copy to clipboard operation
ona copied to clipboard

option `Allow duplicate MAC addresses` is deprecated / distinguish between `interface` and `network address`

Open raabf opened this issue 10 years ago • 5 comments

There is a Allow duplicate MAC addresses option if you adding or edit an interface address. Things have changed since IPv6. The Ipv6 standard requires that the interfaces must now support multiple addresses. So there is no need anymore for this option.

Of Course there are still some people who want this feature for their IPv4 only networks. So perhaps you can at least add an option which allow that Allow duplicate MAC addresses is ticked by deafault. It's quite annoying constantly tick Allow duplicate MAC addresses if you have an IPv6 network.

Also the Associated interfaces caption of the Work Space: display_host: is not completely correct, because it is a list of network addresses not a list of interfaces. It would also be nice to sort after the interfaces

raabf avatar May 15 '14 16:05 raabf

The Allow duplicate option is intended to be a database wide restriction, not a per host restriction. The issue I believe you are running into is more related to the distinction of a network address versus an interface.

You are most correct in your description of the Associated interfaces. They are really addresses. I have contemplated changing this around to reflect what it really should be. My problem is that this naming is systemic through the whole of the code and would require a lot of effort to change. Thus far I have not felt the desire to take that on. (maybe when I get around to doing real internationalization I will).

The way I currently manage what I believe you are trying to manage is this:

  • add an interface with an IP, mac and a name such as eth0
  • add a second interface with a new IP and no MAC. It would have a name of eth0:secondary
  • add more interfaces as needed. 3rd, 4th etc

So even though each IP address is all associated with the same MAC and physical interface I only store it with the 'primary' interface.

Hope that clears up what is going on. It will take a bit of work to clean up the naming as it should be. I'd also actually like to design it so a host/device can have many interfaces and those interfaces would have one or more addresses. The table structure is not this way currently.

mattpascoe avatar May 16 '14 23:05 mattpascoe

Yes of course you are right. I start this issue writing with the idea that i do not always want to tick the Allow duplicate MAC addresses option, because I have a minimum of four addresses for each host and this is like I said a bit click work.

I also noticed over night that I pointed out something other. Since in IPv4 times every interface had only a single address, the terms interface, MAC-Address and Network Address means quite the same until yet. I have already thought that this is a design problem and means a lot of work for you^^

Actually it looks like this on ONA (copy and paste). I simply always tick the Allow duplicate MAC addresses option, so that ONA will allow me to add the interface

Interface MAC Name Description
192.168.123.4 /24 00:0A:E4:8B:70:23 br0 Bridge: eth0, tap0
2a01:1e8:e100:82c3::4 /64 00:0A:E4:8B:70:23 br0 Bridge: eth0, tap0
2a01:01e8:e100:82c3:020a:e4ff:fe8b:7023 /64 00:0A:E4:8B:70:23 br0 Bridge: eth0, tap0
fd07:c75d:40e2:1::4 /64 00:0A:E4:8B:70:23 br0 Bridge: eth0, tap0
fd07:c75d:40e2:0001:020a:e4ff:fe8b:7023 /64 00:0A:E4:8B:70:23 br0 Bridge: eth0, tap0
fe80::20a:e4ff:fe8b:7023 /64 00:0A:E4:8B:70:23 eth0
fe80::9cf3:69ff:fe80:caf8 /64 9E:F3:69:80:CA:F8 tap0

I am actually prefer this method, but of your idea is also legit. I think your method face that there is 1. the existance of a 'primary' ~~interface~~ address, which is not the case and 2. something like eth0:secondary looks like a aliased or virtual interface. But anyone as they wish ...

A further slight refinement I notice: ONA will sometimes remove leading zeros and sometimes not like you see in the table obove.

Well a new datatype interface I think will solve the poblem, but of course you can also manage it like we said obove. If you are really able to redesign ONA at any time, it would also be nice if you also implement a representation of the internal interface structure (eg. Bridges) of a host. Bridges could be complecated on some routers ... If it is simple structure I write it in the Desription like you see in the table, but on complicated ones I perhaps make a graph picture.

This will also allow you (distant future idea) to draw topology of the host and the entire network with a graph tool.

Edit Of course I mean 'primary' address, not 'primary' interface

raabf avatar May 17 '14 14:05 raabf

If at all possible I would like to see the output of an 'ip addr' command on one of the boxes you have defined above. This will help me to more completely understand your set up. it looks like I'll need to do some work to properly support a bridged network like this.

One other thought I have is that duplicate MAC addresses on the same host is a valid thing and should probably not cause a warning. Duplicate MACs associated with different hosts is an issue.

mattpascoe avatar Jun 02 '14 04:06 mattpascoe

Mhmm I think the only thing you had to save in the database are the members of the bridge. not more like brctl show shows ... OK some examples:

VPN Server (Layer 2)

This is the example above ...

netztopologie-es

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP qlen 1000
    link/ether 00:0a:e4:8b:70:23 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20a:e4ff:fe8b:7023/64 scope link
       valid_lft forever preferred_lft forever
3: tap0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP qlen 100
    link/ether 6e:87:17:77:11:35 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::6c87:17ff:fe77:1135/64 scope link
       valid_lft forever preferred_lft forever
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 00:0a:e4:8b:70:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.123.4/24 brd 192.168.123.255 scope global br0
    inet6 2a01:1e8:e100:82c3::4/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fd07:c75d:40e2:1::4/64 scope global
       valid_lft forever preferred_lft forever
    inet6 2a01:1e8:e100:82c3:20a:e4ff:fe8b:7023/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fd07:c75d:40e2:1:20a:e4ff:fe8b:7023/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::20a:e4ff:fe8b:7023/64 scope link
       valid_lft forever preferred_lft forever

Internet Router

This could be a simple Internet Router with two wLANs, a lan and a wan interface and a tunnel to another network. (The arrows are directed to the more physical interfaces). Well wan is in that case not a bridge but is considered as wan interface and tunnelled through the physical wan interface. mhmm perhaps this graph needs some improvements in its representation ...

netztopologie-fb

Duplicate MACs

Great thing, thank you :-)

raabf avatar Jun 02 '14 19:06 raabf

Hello everyone

I dunno if its a similar problem, but I have something to add to ONA that got me here on this issue;

Problem is; we have a notebook for events, that is used in two different switches, but on the same vlan.

For now Im using the fields on each interface "name" and "description" to add the phisical wall jack connector number, and the switch/ port that its in.

2019-05-24_17-08

So, I wish to add a new interface so I can add the other port on the switch that is configured on the switch port security feature.

Maybe its not the right approach, or even adding two interfaces wont help, since ona dont allow me to create two interfaces with the same ip / macs, but I still have to note somewhere which port on the switchs are connected the hosts.

Any suggetions? can I add another interface with duplicated infos but different names? where else should I note those infos about the port numbers?

crlsgms avatar May 24 '19 20:05 crlsgms