Modify

Opened 3 years ago

Last modified 14 months ago

#18488 new defect

Override mac address doesn't work on wan

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Override mac Cc:

Description

Hi. Using latest trunk on my router (WDR4900v2 WR741N WHR-1166D) I can't no longer override the wan mac address, as for WDR4900v2 board the mac is hardcoded as D8:14:6D:FE:32:8C. On lan interface it gets overriden.
Here's the config:

config interface 'wan'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.22'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '8.8.8.8'
        option delegate '0'
        option macaddr '15:AA:69:44:B2:17'

root@OpenWrt:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr D8:14:6D:FE:32:8C  
          inet addr:192.168.1.22  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::da15:dff:fefe:322b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8750142 errors:0 dropped:609 overruns:0 frame:0
          TX packets:5168786 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2975322119 (2.7 GiB)  TX bytes:550739622 (525.2 MiB)
          Interrupt:4

root@OpenWrt:~# cat /etc/openwrt_version
r43514

root@OpenWrt:~# uci show network.wan
network.wan=interface
network.wan.ifname=eth0
network.wan.proto=static
network.wan.ipaddr=192.168.1.22
network.wan.netmask=255.255.255.0
network.wan.gateway=192.168.1.1
network.wan.dns=8.8.8.8
network.wan.macaddr=15:AA:69:44:B2:17

root@OpenWrt:~# ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether d8:14:6d:fe:32:8c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.22/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::da15:dff:fefe:322b/64 scope link
       valid_lft forever preferred_lft forever

Attachments (0)

Change History (21)

comment:1 Changed 3 years ago by anonymous

I can confirm this behavior, came here by Google.

comment:2 Changed 3 years ago by anonymous

Override mac address doesn't work on wan

comment:3 Changed 3 years ago by anonymous

Same problem here.
Also tried setting the same option macaddr for wan6, but no difference.
But the change does work for the wan interface if I delete the wan6 interface

comment:4 Changed 3 years ago by anonymous

Same problem here.

comment:5 Changed 3 years ago by anonymous

Same as TL-WDR4300 v1 with Barrier Breaker 14.07. The WAN MAC override doesn't work.

comment:6 Changed 3 years ago by jhshi89@…

Same problem as in TP-LINK WDR3500 with latest trunk. Here is a temp fix using init scripts.

http://jhshi.me/2015/01/19/fix-mac-address-clone-in-openwrt/

comment:7 Changed 2 years ago by rmu@…

same here TL-WR1043ND with Barrier Breaker 14.07 and current trunk (r44541), cloned mac address is not configured - works if done manually.

comment:8 Changed 2 years ago by pavel.odintsov@…

Hello, folks!

Same issue:
cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='Bleeding Edge'
DISTRIB_REVISION='r44634'
DISTRIB_CODENAME='chaos_calmer'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer r44634'
DISTRIB_TAINTS=

Tp-Link WR740N ver 4.27

comment:9 Changed 2 years ago by d.zelenov@…

Same issue.
CHAOS CALMER (Bleeding Edge, r44797)
TP-Link TL-MR3420 hw ver.2
Thanks for http://jhshi.me/2015/01/19/fix-mac-address-clone-in-openwrt/

comment:10 Changed 2 years ago by anonymous

I just want to confirm another case:

This problem do NOT happen for wireless wan interface and wifi (wwan client or ap).

comment:11 Changed 2 years ago by jhshi89@…

Problem seems to be fixed in Chaos Calmer 15.05 (r46767).

comment:12 follow-up: Changed 2 years ago by sttats

I have a problem

We have a router in our building which is a hotspot for the residents to connect to the internet. Our mac addresses are port binded to the ISP.

I have a router with openwrt. I use it to connect to the hotspot(building router). My home router is connected to two wired desktop PCs.

I have configured home router in client mode to connect the hotspot. The router creates a new interface in the interface section called "WWAN". When i enter its edit page and type a clone MAC add in the override section and click save, the router breaks.

After this, I cannot enter 192.168.1.1. I have to do a hard reset to bring back the router to life.

Router is tp link wr941 v9

comment:13 in reply to: ↑ 12 Changed 2 years ago by anonymous

Replying to sttats:

Router is tp link wr941 v9

Correction: The router is tp link wr841n v9

comment:14 Changed 22 months ago by sparomba@…

There still seems to be a problem with this in Chaos Calmer 15.05.

The 5 Ghz radio0 of my router (Archer C7) is configured to be a wifi-client. I added a secondary wan-interface (wan2, dhcp client) and under physical settings connected it with the wifi-client. It works fine, the wifi-client connects to the network and the wan2-interface receivies an IP. But when I try to override the mac address of the wan2-interface, the changed mac address won't appear in LuCi. Under Network->Interfaces it says for wan2:

MAC-Address: 00:00:00:00:00:00

Even though it's configured properly in /etc/config/wireless

option macaddr 'AA:11:BB:22:CC:33'

comment:15 follow-up: Changed 21 months ago by anonymous

Hello, my guess is that problem with '15:AA:69:44:B2:17' is that it has multicast bit set (first byte, bit 0). With '14:AA:69:44:B2:17' it should work.

comment:16 Changed 19 months ago by anonymous

https://dev.openwrt.org/changeset/46767 this is for ramips. What about ar71xx? I have the same problem with TP-Link TL-WA901ND v2.3

comment:17 Changed 19 months ago by anonymous

There is a simple way to test it:

ifconfig wlan0 down
ifconfig wlan0 hw ether 14:AA:69:44:B2:17
ifconfig wlan0 up

And it will works perfect with new mac. Than edit /etc/config/network

option interface wan

option macaddr '14:AA:69:44:B2:17'
option ifname wlan0
option proto dhcp

Than you can do "/etc/init.d/network restart" or just reboot the router - default mac addr will be used.

comment:18 Changed 19 months ago by anonymous

The last ticket https://dev.openwrt.org/ticket/11526 about this issue has been fixed by upgrading version of netifd. So maybe this bug is related to netifd too.

comment:19 in reply to: ↑ 15 Changed 14 months ago by anonymous

Replying to anonymous:

Hello, my guess is that problem with '15:AA:69:44:B2:17' is that it has multicast bit set (first byte, bit 0). With '14:AA:69:44:B2:17' it should work.

I get it !

thank you!

comment:20 Changed 14 months ago by anonymous

Still doesn't work on ar71xx. Is there any workaround this? When I put a mac change in init script (start=94) it gets overriden anyways.

comment:21 Changed 14 months ago by anonymous

Any way to make this fucking peace of shit c code change the mac address? How could you fuck such basic thing up? Christ.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.