Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Set MAC for network bridge fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gaebb3r
n00b
n00b


Joined: 22 Oct 2007
Posts: 58
Location: 48°31′N, 9°3′E

PostPosted: Tue May 14, 2013 8:17 pm    Post subject: Set MAC for network bridge fails Reply with quote

Hi together,

I am desperately trying to find out why my Cisco E3200 router doesn't assign the IP address 10.0.0.10 to my network interface via DHCP as bound to the MAC address in the router config.
On my system I have defined a bridge built of eth0 and eth1, see my /etc/conf.d/net:
Code:
agph ~ # cat /etc/conf.d/net
config_eth0="null"
config_eth1="null"
bridge_br0="eth0 eth1"
mac_br0="00:1B:21:03:37:BD"
modules_br0="ifconfig dhcpcd"
config_br0="dhcp"
dhcpcd_br0="-t 2"
dns_servers_br0="10.0.0.1"
brctl_br0="stp off"

dns_domain="home.net"



To check the MAC address that is communicating with the router I took a look into the DHCP log of the router:
Code:
Tue, 14 May 2013 22:00:47 received REQUEST from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 sending NAK to 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 received REQUEST from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 sending NAK to 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 received REQUEST from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 sending NAK to 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 received REQUEST from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 sending NAK to 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:47 received DISCOVER from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:48 sending OFFER to 255.255.255.255 with 10.0.0.100
Tue, 14 May 2013 22:00:48 received REQUEST from 2e:65:c7:7d:d5:d3
Tue, 14 May 2013 22:00:48 sending ACK to 10.0.0.100
Tue, 14 May 2013 22:00:55 received DISCOVER from 00:1b:21:03:37:bd
Tue, 14 May 2013 22:00:55 sending OFFER to 255.255.255.255 with 10.0.0.10
Tue, 14 May 2013 22:00:59 received DISCOVER from 00:1b:21:03:37:bd
Tue, 14 May 2013 22:00:59 sending OFFER to 255.255.255.255 with 10.0.0.10
Tue, 14 May 2013 22:01:07 received DISCOVER from 00:1b:21:03:37:bd
Tue, 14 May 2013 22:01:07 sending OFFER to 255.255.255.255 with 10.0.0.10


Checking my network specs shows something strange:
Code:
agph ~ # ifconfig
br0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 10.0.0.100  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 00:1b:21:03:37:bd  txqueuelen 0  (Ethernet)
        RX packets 144320  bytes 312933856 (298.4 MiB)
        RX errors 0  dropped 18  overruns 0  frame 0
        TX packets 98764  bytes 5621292 (5.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1c:c0:b1:c7:5b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xd1200000-d1220000 

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.54.91  netmask 255.255.0.0  broadcast 169.254.255.255
        ether 00:1b:21:03:37:bd  txqueuelen 1000  (Ethernet)
        RX packets 248588  bytes 366444901 (349.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 120872  bytes 8643153 (8.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0xd1120000-d1140000



First, I need to know why does br0 send a DHCP REQUEST with MAC address 2e:65:c7:7d:d5:d3 (which is being created randomly, restarting net.br0 shows another MAC requesting an address in the router's log)?
The next question is, why does eth1 get a zeroconf address as it is set to "null" in /etc/conf.d/net? Should look like eth0 (where I have no cable connected to)...

Is anybody able to help me out?
Thanks a lot, guys.
_________________
AMD Threadripper 2920X - X399 Designaire - 16384 MB
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue May 14, 2013 10:24 pm    Post subject: Reply with quote

first of all, I would test both ethernet cards by plugging in an ethernet cable to both.

169.254.x.x is indicative of a hardware failure
Assigning a random bridge MAC ensures no devices will be knocked off the net because eth1 is receiving the 169.address, therefore the bridge cant be set until restarting it...
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 509
Location: North~Sea~Coa~s~~t~~~

PostPosted: Wed May 15, 2013 6:45 am    Post subject: Reply with quote

Hi,

The MAC address of your old lease is used first, unless you delete it manually in /var/lib/dhcpcd (or drop the old lease with a dhcpcd option?).

Because you're connecting to another bridge (the router), it might help to turn "spanning tree protocol" on, and to try different values for forward delay.

(2 lines, to make 2 values work)
Code:
brctl_br0="setfd 1
stp on"

For some reason, putting "setfd" before "stp" works best, to prevent it getting ignored.

Code:
# man brctl
Back to top
View user's profile Send private message
gaebb3r
n00b
n00b


Joined: 22 Oct 2007
Posts: 58
Location: 48°31′N, 9°3′E

PostPosted: Mon May 20, 2013 8:44 pm    Post subject: Reply with quote

Thank you guys,

I have split up the bridge and tested the interfaces separately.
Seems as if eyoung100 is right with the assumption that the card might have gone as eth0 (onboard Intel e1000e) works absolutely fine.

But what is very strange - I don't have any problems with the non-working card on Windows 7... Best to buy a newer one as the PRO/1000 PT is rather old.

Thank you very much.
_________________
AMD Threadripper 2920X - X399 Designaire - 16384 MB
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum