Andal
Posts: 13
Joined: Fri Sep 28, 2018 6:31 pm

Why is my bridge br0 only IPv6??

Sun Nov 04, 2018 7:44 pm

Hello community,

I think I'm experiencing a buggy thing over here with my bridging-config.
Here's my bridge-config of my Raspberry 1 B in /etc/network/interfaces:

Code: Select all

auto br0
iface br0 inet dhcp
   pre-up ip link add br0 type bridge
   pre-up ip link set tap0 up
   pre-up ip link set tap0 master br0
   pre-up ip link set eth0 down
   pre-up ip addr flush eth0
   pre-up ip link set eth0 up
   pre-up ip link set eth0 master br0
   pre-up ip link set br0 up
   post-down ip link delete br0
   hwaddress ether 63:6F:11:DB:7B:38
   bridge_ports eth0 tap0
iface br0 inet6 auto
The problem is, that I'm only getting IPv6-addresses and no IPv4.
Even if I leave the last line, it's not getting an IPv4.
Under Debian Stretch it's correctly working with IPv4 also.

Of course I did in /etc/dhcpcd.conf:

Code: Select all

denyinterfaces br0 tap0 eth0
What am I missing in Raspbian?

Thank you in advance.

epoch1970
Posts: 3781
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Why is my bridge br0 only IPv6??

Mon Nov 05, 2018 10:38 am

Why so complicated?

Normally the bridge takes the MAC address of one of its member interfaces. Here, you're forcing an address into it and in addition to a multicast address. Is this really required?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Why is my bridge br0 only IPv6??

Mon Nov 05, 2018 11:05 am

In /etc/network/interfaces you have this

Code: Select all

iface br0 inet dhcp
...then in /etc/dhcpcd.conf you have this

Code: Select all

denyinterfaces br0 tap0 eth0
You should use the denyinterfaces with members of the bridge, not the bridge.

Andal
Posts: 13
Joined: Fri Sep 28, 2018 6:31 pm

Re: Why is my bridge br0 only IPv6??

Mon Nov 05, 2018 6:34 pm

epoch1970 wrote:
Mon Nov 05, 2018 10:38 am
Why so complicated?

Normally the bridge takes the MAC address of one of its member interfaces. Here, you're forcing an address into it and in addition to a multicast address. Is this really required?
Well, I had the problem if I won't address it manually, it'll get some random addresses at my Debian server and spams my router's log full of IP-changes, so I thought it would be the same on Raspbian. Also I want to let it get automatically it's IP, so I can just handle all IPs from my devices in my router.
SurferTim wrote:
Mon Nov 05, 2018 11:05 am
In /etc/network/interfaces you have this

Code: Select all

iface br0 inet dhcp
...then in /etc/dhcpcd.conf you have this

Code: Select all

denyinterfaces br0 tap0 eth0
You should use the denyinterfaces with members of the bridge, not the bridge.
Hmm.. I tried it just with tap0 and eth0 but I'm also getting no IPv4 on br0.
The exactly same config is working on two Raspi 3, that's why I'm confused..
Last edited by Andal on Tue Nov 06, 2018 2:05 pm, edited 1 time in total.

epoch1970
Posts: 3781
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Why is my bridge br0 only IPv6??

Mon Nov 05, 2018 8:26 pm

Andal wrote:
Mon Nov 05, 2018 6:34 pm
Well, I had the problem if I won't address it manually, it'll get some random addresses at my Debian server and spam my routers log full of IP-changes, so I thought it would be the same on Raspbian. Also I want to let it get automatically it's IP, so I can just handle all IPs from my devices in my router.
So. By default, a bridge adopts the lowest MAC address (00:xxx is lower than FE:xxx) among its members.
Set your tap0 to a MAC address such as FE:xxx and your bridge will then take the MAC address of eth0 (b8:27:eb:xxx) which will be the lowest one.
(and again, use an even value for the MAC address on tap0: FE, not FF.)

Still, your config file is complicated. You don't need to "set master" if you "bridge_ports", setting br0 up in pre-up makes no sense, you can flush without down, etc.
Execute these commands manually one by one and you will see which are superfluous and which are actually harmful.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Andal
Posts: 13
Joined: Fri Sep 28, 2018 6:31 pm

Re: Why is my bridge br0 only IPv6??

Tue Nov 06, 2018 3:10 pm

Have you maybe got a hint for me how to set for the tap device a mac address properly?

I just had thinking errors at the part with the MACs first octet. :oops:
Now I understood it and it also makes sense to me. Thank you for clearify that. At very first I thought MACs are just random addresses, I didn't even know that there's so much behind it. Just set the first 2 hex. to 62 and here you go, I've got an IPv4 address. :idea:

The other things you said about my config. Like I wrote in my other thread, I'm very new to all this network stuff in Linux and how to set it up properly, so I just googled and get there my stuff together and if it works without errors, I assume it's the best way to work. I'll try your advices and again try to minimize the overlaps.
I'm very glad you all have so much encourage to help me to get things done right.

Andal
Posts: 13
Joined: Fri Sep 28, 2018 6:31 pm

Re: Why is my bridge br0 only IPv6??

Tue Nov 13, 2018 11:48 pm

Additionally what I've tried to minimize in the config ran in Raspbian, but didn't work backways in Debian.
Well, that's pretty annoying that even at those similar builds, the differences are pretty big.

Return to “Troubleshooting”