It actually work in LEDE. Can you try use same MAC in wan and the device under br-lan.
Hi BoringCat
I don’t think we can use the same MAC address for both wan and br-lan, this may cause switch chip doesn’t work fine.
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
3: wan@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
4: lan0@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
5: lan1@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
6: lan2@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
7: lan3@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:fc:de:ad:be:ef brd ff:ff:ff:ff:ff:ff
$ cat /etc/udev/rules.d/00-static-mac-address.rules
ACTION=="add", SUBSYSTEM=="net", KERNELS=="1b100000.ethernet", RUN+="/sbin/ip link set dev %k address ae:fc:de:ad:be:ef"
I hate this solution, But …
?? what do you want to say me?
that all interfaces are the same mac? it’s because currently only 1 gmac is used between mt7530 (switch) and CPU
see thread about the second GMAC
I @you because the your solution(BPI-R2 Ethernet MAC address) might not work well for the linux kernel from your github repos.
currently in debian stretch with my kernel i do it that way:
iface lan0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.5
# pre-up ip link set $IFACE up
pre-up ip link set $IFACE address 02:01:02:03:04:08 up
but good to know that there is a udev-way to do that
it is ok because lan and wan are different subnet and we only need to make sure the mac address is unique for one subnet.
Yes it is. But just on “Network Layer”. Because all Ethernet port on R2 is actually a mt7530 switch. The switch works on “Data Link Layer”. So If there are two devices have same MAC. It’s chip will not work fine.