OpenWrt Forum Archive

Topic: Trying to remove switched ports

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I've got a WRTSL54GS v1.1 and am trying to make it into a simple 5 port router. (No switch)

The problem is that when I reboot with the configuration below, I end up with a device with 4 switched ports on 192.168.1.1, but with the new MAC address from eth0_1.

I know I'm missing something simple; I just can't see it. 

Here is the config:

config 'switch' 'eth0'
        option 'enable' '1'

config 'switch_vlan' 'eth0_0'
        option 'device' 'eth0'
        option 'vlan' '0'
        option 'ports' '0 1 2 3 4 5u'

config 'switch_vlan' 'eth0_1'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '3 5'
                       
config 'switch_vlan' 'eth0.2'
        option 'device' 'eth0'
        option 'vlan' '2'
        option 'ports' '2 5'
                       
config 'switch_vlan' 'eth0_3'
        option 'device' 'eth0'
        option 'vlan' '3'
        option 'ports' '1 5'
                       
config 'switch_vlan' 'eth0_4'
        option 'device' 'eth0'
        option 'vlan' '4'
        option 'ports' '0 5'
                       
config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

#config 'interface' 'lan'
#       option 'type' 'bridge'
#       option 'ifname' 'eth0.1'
#       option 'macaddr' '00:18:39:C5:51:27'
#       option 'proto' 'static'
#       option 'ipaddr' '192.168.1.1'
#       option 'netmask' '255.255.255.0'

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'macaddr' '00:18:39:c5:51:28'
        option 'proto' 'dhcp'
        option 'dns' '208.67.220.220 208.67.222.222'

config 'interface' 'eth0_1'
        option 'ifname' 'eth0.1'
        option 'macaddr' 'BA:DC:AF:E0:00:01'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'dns' '208.67.220.220 208.67.222.222'

config 'interface' 'eth0_2'
        option 'ifname' 'eth0.2'
        option 'macaddr' 'BA:DC:AF:E0:00:02'
        option 'proto' 'static'
        option 'ipaddr' '192.168.2.1'
        option 'netmask' '255.255.255.0'
        option 'dns' '208.67.220.220 208.67.222.222'

config 'interface' 'eth0_3'
        option 'ifname' 'eth0.3'
        option 'macaddr' 'BA:DC:AF:E0:00:03'
        option 'proto' 'dhcp'
        option 'dns' '208.67.220.220 208.67.222.222'

config 'interface' 'eth0_4'
        option 'ifname' 'eth0.4'
        option 'macaddr' 'BA:DC:AF:E0:00:04'
        option 'proto' 'dhcp'
        option 'dns' '208.67.220.220 208.67.222.222'

Make port 5 tagged in all vlans.

When I change one of the paragraphs to look like the one below, I get no connectivity at all:

config 'switch_vlan' 'eth0.2'
        option 'device' 'eth0'
        option 'vlan' '2'
        option 'ports' '2 5t'

Did I misunderstand what you meant?

You also must make the identifiers unique. Using eth0_2 twice will not work. You could call the vlan "vlan_2" and the iface "eth0_2"

You are the man!  It's working perfectly, now.  Thanks.

The discussion might have continued from here.