Is it possible to rename the network device?

Hi.
Router Linksys EA8500.
Is it possible to change the name of the device on my own, or is it defined at a lower level and when it is changed in the configuration files, the correspondence between the hardware network device and the config will be lost?
Here is the part of my etc/config/network:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd59:3e6c:ea9a::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1.1'

config device
        option name 'eth1.1'
        option macaddr '14:91:82:7b:8a:82'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.1'

config device
        option name 'eth0.2'
        option macaddr '14:91:82:7b:8a:82'

config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 0t'

config device
        option type 'bridge'
        option name 'br-guest'

config interface 'guest'
        option proto 'static'
        option device 'br-guest'
        option ipaddr '192.168.5.1'
        option netmask '255.255.255.0'

Is it possible to just replace eth1.1 with eth0.1 in this config?

The difference between the eth0 and eth1 designations is the fact that the cpu has 2 ports that connect to the switch chip (which in turn connects to the physical Ethernet ports).

So yes and no. You can’t simply “replace”, but you can adjust the config.

In your swconfig statements, eth0 is logical port 0, and eth1 is logical port 6.

If you want to change the lan to use eth0.1, you should change the swconfig stanza to match:

You would remove ‘6t’ and add ‘0t’

But what is your goal? Why do you want to change them?

You can declare eth0.2 and eth1.1 explicitly, then assign them any desired name.

config device
  option type 8021q
  option ifname eth0
  option vid 2
  option name wanport
  option macaddr '14:91:82:7b:8a:82'

config device
  option type 8021q
  option ifname eth1
  option vid 1
  option name lanport
  option macaddr '14:91:82:7b:8a:82'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lanport' 

config interface 'wan'
        option device 'wanport'
        option proto 'dhcp'

etc…

2 Likes