Vlan configuration nanopi R2S

hi,
i am trying to setup vlan on my nanopi R2S openwrt compiled from snapshot.
i followed this example NanoPI R2S is a great OpenWrt device - #134 by jayanta525 from @jayanta525

But there my original configuration vari from jayanta525 config.

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

config globals 'globals'
        option ula_prefix 'fd4c:60a5:6755::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'

config device 'lan_eth1_dev'
        option name 'eth1'
        option macaddr 'e2:43:21:ff:c2:88'

config interface 'wan'
        option ifname 'eth0'
        option proto 'pppoe'
        option username 'user'
        option password 'password'
        option ipv6 'auto'

config device 'wan_eth0_dev'
        option name 'eth0'
        option macaddr 'e2:43:21:ff:c2:87'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'

as soon as i change the config i lose communication with the R2s.
I have tried:
-replace option ifname 'eth0' with option ifname 'eth0.1'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'

-replace on both

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'

config device 'lan_eth1_dev'
        option name 'eth1.1'
        option macaddr 'e2:43:21:ff:c2:88'

-I tried also to remove device 'lan_eth1_dev' add the mac adresse on lan

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'
        option macaddr 'e2:43:21:ff:c2:88'

-I tried also the wiki example:

config interface 'lan'
        option type 'bridge'
        option ifname 'vlan1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.1'

config device 'lan_eth1_dev'
        option type '8021q'
	option ifname 'eth1'
	option vid '1'
	option name 'vlan1'
        option macaddr 'e2:43:21:ff:c2:88'

I have no console port to logon on and check the log after the change.
Do i need to change others file ?

eth1.1, or VLAN 1 is the default VLAN.

I know it's the default vlan.
Do you mean it's implicit and we can not configure vlan 1 explicit way for software vlan?
I need to configure multiple vlan and I try first with vlan 1, because no need to configure a switch to check if the configuration is working.

Since you have eth1.1 as your interface, VLAN 1 is tagged, and you need a switch / or an network interface in your PC that supports VLAN ID.

1 Like

Ok thanks I think, I understand.
I have to put the interface on vlan 1 in my switch config.
I am thinking that even we configure eth1.1 we do not need to specify anything on the switch because it's the default vlan.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.