First thing to do is make swconfig is set, so we have eth0.1 and eth0.2, according the next picture (web-gui):
eth0.1 = LAN
eth0.2 = WAN
Default, the vlan mac addressing is not ok. Although 'br-lan' has the right 'lan' mac of the box!
There is 1 mac address (00:11:22:33:44:55) for eth0, eth0.1 and eth0.2:
Code: Select all
~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether cc:d5:4e:a0:97:f8 brd ff:ff:ff:ff:ff:ff
5: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
6: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
Although the web-gui shows the right mac address on the 'lan' interface (br-lan), according command 'ip link' eth0.1 is still 00:11:22:33:44:55 !!
To overcome this use the following, just after interface 'lan' definition within /etc/config/network:
Code: Select all
config device 'lan_dev'
option name 'eth0.1'
option macaddr 'xx:11:22:33:yy:zz'
This will set the right mac address for 'lan'.
MAC addressing vlan - wan
If 'wan' is used static, adjust in web-gui wan6 (default) and set the static address.
wan6 and wan are by firewall both used as 'wan' interface, this will work normally.
Just after interface 'wan' definition within /etc/config/network you can add (almost-again):
Code: Select all
config device 'wan_dev'
option name 'eth0.2'
option macaddr 'xx:11:22:44:yy:zz'
Don't use the same mac address for 'lan' and 'wan', as this will go back to the 'old' situation.
If 'wan' is set to DHCP within web-gui (wan6), you can use option Override MAC address in Advanced Settings.
This will set wan interface correctly, also on cli command 'ip link'. Check this!
Why add 2? Well, the P-2812HNU-F1 has 8 reserved addresses in the following -HEX- order:
Mac address overview (HEX!)
Default mac address of LAN on P-2812HNU-F1 ends always on '0' or '8'!
Code: Select all
mac = lan (on the box itself)
mac +01hex = ptm0
mac +02hex = wan
mac +03hex = nas0
mac +04hex = wlan0 (adjust RT3062.eeprom file!)
mac +05hex = wlan1
mac +06hex = wlan2
mac +07hex = wlan3
I ones had this after switching lan & wan according firewall, after which i tried to set it back, with no luck!
Only way to change this back, is to load an older saved config
MAC addressing vlan - wlan
Next the right mac address for wlan.
I already mentioned how to adjust somewhere else ... not found, here again
Adjust -HEX- the RT3062.eeprom file, which should be in folder /lib/firmware.
Take the first 11 characters of the mac address of the box, followed by a '4' or a c' (mac +04hex) and adjust RT3062.eeprom:
Save RT3062.eeprom back to /lib/firmware folder and reboot the box.
Now all mac addresses should be fine.
After any change on LAN or WAN interface, check on putty session command 'ip link' if all mac addresses stay correct!
DG.
Next ...
- Rename this test box LEDE5 (config, system, wlan?)
- Make a 'default' LEDE5 Config file (TOR disabled?)
- Make a Config file with TOR
- test update tor_0.3.1.8-1
- build with LEDE v17.01.4 ?
- build with snapshot?