Modify

Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#6428 closed defect (fixed)

RouterStation Pro Lan MAC Address Changes with Wifi MAC

Reported by: cmarsot@… Owned by: abyrne
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: MAC changes from LAN to Wifi Cc:

Description

Hi,
I am using a routerstation pro with a bridge with eth0 and eth1 (named LAN).
When RouterStation Pro boots, I can see correct MAC Address on ARP tables on a wired connected station.
When wifi comes up (connected on network LAN), MAC address saw on my arp table changes from the real one to the one of wireless card.

Here is the MAC address before wifi comes up: 00-15-6d-c1-c8-48
Here is the MAC address after wifi comes up: 00-0c-42-61-19-46

I am using Kamikaze r18909 (from trunk version).

Here is my network configuration:

config interface lan
        option ifname   'eth0 eth1'
        option type     bridge
        option proto    static
        option ipaddr   192.168.0.253
        option netmask  255.255.255.0
        option gateway  192.168.0.254
        option dns      '192.168.0.254 8.8.8.8 8.8.4.4'

Here is my wireless configuration:

config 'wifi-device'  'radio0'
        option 'type'     'mac80211'
        option 'phy'    'phy0'
        option 'channel'  '10'
        option 'hwmode' '11ng'
        option 'disabled' '0'
        option 'diversity' '1'
        list 'ht_capab' 'HT40-'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'

config 'wifi-iface'
        option 'device'   'radio0'
        option 'network'  'lan'
        option 'mode'     'ap'
        option 'ssid'     'ssid'
        option 'encryption' 'psk2+aes'
        option 'key'    'great_unrecoverable_key'
        option 'hidden' '1'
        option 'bgscan' '0'
        option 'wds'    '0'

#config wifi-device  'wifi1'
#       option 'type'     'mac80211'
#       option 'phy'    'phy1'
#       option 'channel'  '4'
#       option 'macaddr'        '00:0c:42:51:b1:ec'
#       option 'hwmode' '11ng'
#       option 'disabled' '0'
#       option 'diversity' '1'
#       list 'ht_capab' 'HT40-'
#       list 'ht_capab' 'SHORT-GI-40'
#       list 'ht_capab' 'DSSS_CCK-40'

#config wifi-iface
#       option device   wifi1
#       option network  lan
#       option mode     ap
#       option ssid     'another_ssid'
#       option encryption psk2+aes
#       option key      'great_another_key'
#       option hidden   1
#       option txpower  auto

Here is my ifconfig:

br-lan    Link encap:Ethernet  HWaddr 00:0C:42:61:19:46  
          inet addr:192.168.0.253  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16766 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10453 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1279493 (1.2 MiB)  TX bytes:2082739 (1.9 MiB)

eth0      Link encap:Ethernet  HWaddr 00:15:6D:C1:C8:48  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24613 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18608 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:11466991 (10.9 MiB)  TX bytes:3298723 (3.1 MiB)
          Interrupt:4 

eth1      Link encap:Ethernet  HWaddr 00:15:6D:C1:C8:49  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8723 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8486 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1320064 (1.2 MiB)  TX bytes:9991063 (9.5 MiB)
          Interrupt:5 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

mon.wlan0 Link encap:UNSPEC  HWaddr 00-0C-42-61-19-46-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1976 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:174401 (170.3 KiB)  TX bytes:0 (0.0 B)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:192.168.20.17  P-t-P:192.168.20.18  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:798 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8556 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:107104 (104.5 KiB)  TX bytes:651528 (636.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0C:42:61:19:46  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:9564 (9.3 KiB)

wlan1     Link encap:Ethernet  HWaddr 00:0C:42:51:B1:EC  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by abyrne

I experienced the same problem. I resolved it by adding a macaddr option to my lan interface configuration (with macaddr being my eth1 interface's mac address).

I don't know what causes this issue though (whether it's some of the config scripts, or an intrinsic part of the bridge software).

comment:2 Changed 8 years ago by KanjiMonster

I can confirm abyrne's idea on irc that br-lan takes the "lowest" mac address of wlan0 and eth1 by experimenting with my wifi card's mac:

eth1 mac = 00:15:6D:C1:xx:xx, wlan0 mac = 00:18:F3:84:xx:xx => br-lan mac == eth1 mac
eth1 mac = 00:15:6D:C1:xx:xx, wlan0 mac = 00:10:F3:84:xx:xx => br-lan mac == wlan0 mac

comment:3 Changed 8 years ago by abyrne

  • Owner changed from developers to abyrne
  • Status changed from new to accepted

Link that confirms lowest MAC address is always used by the bridge - http://lists.openwall.net/netdev/2008/06/17/168

The kernel was patched in 2.6.27, such that if you manually specify a MAC address for the bridge, it will retain that MAC address as other interfaces are added.

On my RS Pro, having the MAC address of the bridge being that of my wlan0 card, meant I experienced random packet loss on the bridge whenever the ar8316 switch was enabled. When the switch was disabled, there was no packet loss.

After manually specifying the bridge MAC address, I experience no packet loss across the bridge regardless of the status of the switch.

The solution to this problem is either:

  1. RS Pro owners should manually add the macaddr option to their bridge if they have a wireless interface with a lower MAC address

or, if this affects many others

  1. The OpenWrt network scripts could be updated to automatically assign the MAC address of the bridge as that of the specified ifname.

I'll prepare a patch and submit for consideration.

comment:4 Changed 7 years ago by abyrne

Forgot about this ticket. Can anyone confirm if this has been fixed by [21577]?

comment:5 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from accepted to closed

fixed in r26990

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.