networkop / docker-topo

Docker topology builder for network simulations
BSD 3-Clause "New" or "Revised" License
139 stars 41 forks source link

Valid MAC address for MLAG #34

Closed freedge closed 4 years ago

freedge commented 4 years ago

Netlink gives us by default, MAC addresses with the "locally administered bit" on.

However MLAG actually uses this bit (see also https://github.com/dainok/unetlab/issues/1)

networkop commented 4 years ago

thanks!

freedge commented 4 years ago

fyi to complete the "mlag" support, one should create a bond interface in a similar fashion on the hosts

ns.create(ifname="bond1", kind="bond", mode=4).commit()
networkop commented 4 years ago

that's interesting. do you have a working image the does that? i used to do modify alpine image and do LAG with teamd

freedge commented 4 years ago

concretely, I'm doing it that way: https://github.com/freedge/docker-topo/commit/64b23e8cfdd03df37bff489a6f0b836281221f41

(setting 1 interface on a specific host...) then configuring the bond like that:

docker exec -ti -u root evpn_host1 sh
ifconfig eth0 down
ifconfig eth1 down
ip link set eth0 master bond1
ip link set eth1 master bond1
ifconfig bond1 up 192.168.42.11
head /proc/net/bonding/bond1

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

(eth0 and eth1 use veth driver, connecting to 2 different switches). I'm just creating these using the alpine-host image you provide.

Also I'm only doing some basic configuration here :) the host does not immediately detect that one of the switches it is connected to is not responding (above polling interval not configured certainly...)

Thank you for this project! It's very nice to be able to run a network topology in docker containers.