Sunday, December 14, 2014

openwrt vlan

BEFORE:

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

config interface 'wan6'
        option ifname '@wan'
        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 5t'

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

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

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
# allow vlan numbers greater 15 (dir320 doesn't support this, tp-link 1043nd does):
        option enable_vlan4k '1'

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

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

config switch_vlan
        option device 'switch0'
        option ports '0t 4'
        option vlan '16'

config interface 'iptv'
        option proto 'none'
        option ifname 'eth0.16'

No comments:

Post a Comment