OpenWrt Forum Archive

Topic: Several VLans one one port?!

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

Hi all!

I have a tricky problem with my Siemens SE505 V2 Router. I have defined five VLans. On every port one Vlan and everythink worked fine. As I started to play with arptables/ebtables/iptables I need from now on SEVERAL VLans on ONE port. Is that possible with OpenWRT? With my configuration showed below is does NOT work. Vlan0 still works but from Vlan5 I can't ping any other machine on the network. With tcpdump on the other machine I see that nothing is received. What can I do?

Thanks!

Here are some of my NVRAM variables:

nvram set vlan0hwname=et0                   nvram set vlan5hwname=et0
nvram set vlan0ports="0 5*"                 nvram set vlan5ports="0 5"
nvram set vlan0_ifname=vlan0                nvram set vlan5_ifname=vlan5
nvram set vlan0_hwaddr=00:10:4B:E3:63:00    nvram set vlan5_hwaddr=00:10:4B:E3:63:05
nvram set vlan0_proto=static                nvram set vlan5_proto=static
nvram set vlan0_ipaddr=192.168.0.1          nvram set vlan5_ipaddr=192.168.1.1

And ifconfig shows for vlan0 and vlan5:

vlan0     Link encap:Ethernet  HWaddr 00:10:4B:E3:63:00
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:364 (364.0 B)  TX bytes:398 (398.0 B)

vlan5     Link encap:Ethernet  HWaddr 00:10:4B:E3:63:05
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:138 (138.0 B)

(Last edited by roterstern on 20 Mar 2006, 16:58)

roterstern wrote:

I need from now on SEVERAL VLans on ONE port. Is that possible with OpenWRT?

Yes this (vlan trunking) works, at least with Linksys wrt54g - I'm doing it on a number of units.

- DL

Can you send me your nvram settings? E.g.

nvram show | grep vlanX

What is the failure in my config? I don't know... :-/

I am trunking vlan3 and vlan10 on the wan port (0).

root@hotspotNInorth:~# nvram show|grep vlan|sort
size: 1764 bytes (31004 left)
lan_ifname=vlan3
lan_ifnames=vlan0 eth1 eth2
vlan10hwname=et0
vlan10ports=0 5
vlan3hwname=et0
vlan3ports=0 1 2 3 4 5*
wan_ifname=vlan10
root@hotspotNInorth:~#

but because this is RC3 I have to run a startup script also:

root@hotspotNInorth:/etc/init.d# cat S41mynetwork
robocfg vlan 3 ports "0 1 2 3 4 5t"
robocfg vlan 10 ports "0t 5t"
vconfig add eth0 10
ifconfig vlan10 10.10.11.59 netmask 255.255.255.0
ifup vlan10
route add default gw 10.10.11.1

brctl addbr br10
brctl addif br10 eth1
brctl addif br10 vlan10
ifconfig br10 192.168.3.1
ifup br10

I haven't tried it but I believe with RC4 I could dispense with the startup script.

- DL

dl wrote:

I am trunking vlan3 and vlan10 on the wan port (0).

root@hotspotNInorth:~# nvram show|grep vlan|sort
size: 1764 bytes (31004 left)
lan_ifname=vlan3
lan_ifnames=vlan0 eth1 eth2
vlan10hwname=et0
vlan10ports=0t 5
vlan3hwname=et0
vlan3ports=0t 1 2 3 4 5*
wan_ifname=vlan10
root@hotspotNInorth:~#

With this "t" modification you don't need extra script. Tested on RC2 and RC4

- DL

The discussion might have continued from here.