Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10194 closed defect (worksforme)

VLANs are not created if there's no active connections

Reported by: kost@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Backfire 10.03.1 RC5
Keywords: Cc:

Description

WNDR3700 router with OpenWRT Backfire 10.03.1RC5

If valid ethernet cables are not connected to the switch ports, vlan interfaces will not be created (i.e. eth0.4 eth0.5 so on).

Of course, swconfig shows correct config in both cases with following command:
swconfig dev rtl8366s show

But there are no eth0.4 , eth0.5 .... interfaces if switch ports are not connected with ethernet to other valid side during boot (even if I try /etc/init.d/network restart when I connect cables, interfaces will not show up). Later, when I connected them - they are still not created. I have to restart whole router to actually bring up eth0.4 or eth0.5 interfaces... that leads me to conclusion that's VLAN interfaces are only created during boot and if valid cables are connected.

Relevant configuration from /etc/config/network

config interface lan
	option ifname	eth0.1
	option type	bridge
	option proto	static
	option ipaddr	192.168.1.1
	option netmask	255.255.255.0

config interface conn
	option ifname   eth0.4
	option proto    static
	option ipaddr   192.168.2.1        
	option netmask	255.255.255.0

config interface conn
	option ifname   eth0.5
	option proto    static
	option ipaddr   192.168.5.1        
	option netmask	255.255.255.0


config switch_vlan 
	option device	rtl8366s
	option vlan	0
	option ports	"5*"

config switch_vlan
	option device	rtl8366s
	option vlan 	1
	option ports	"0 1 5t"
	
config switch_vlan
	option device   rtl8366s
	option vlan	4
	option ports 	"3 5t"
	
config switch_vlan
	option device	rtl8366s
	option vlan 5
	option ports	"2 5t"

Attachments (0)

Change History (7)

comment:1 Changed 6 years ago by anonymous

Both your extra interface names are the same, maybe this is an issue..

If you want to up an interface, you could use "ifup lan". Rebooting should not be necessary.

Because the created interfaces are subinterfaces on a switch, removing or inserting a network cable will not trigger ifup/ifdown events... The layer3 interface will always be up.

comment:2 Changed 6 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

Correct, duplicate interface names lead to undefined results. Besides that, plugging cables or not has absolutely no influence on the creation of vlan interfaces. Correlation != causation.

comment:3 Changed 6 years ago by Pilot6 <hanipouspilot@…>

The problem is here
config switch_vlan

option device rtl8366s
option vlan 0
option ports "5*"

There is no need in this vlan. It is not connected anywhere. That may cause any kind of problems.

comment:4 Changed 6 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Tried, and it happens even with different name interferences:

config interface lan
	option ifname	eth0.1
	option type	bridge
	option proto	static
	option ipaddr	192.168.1.1
	option netmask	255.255.255.0

config interface cona
	option ifname   eth0.4
	option proto    static
	option ipaddr   192.168.2.1        
	option netmask	255.255.255.0

config interface conb
	option ifname   eth0.5
	option proto    static
	option ipaddr   192.168.5.1        
	option netmask	255.255.255.0

comment:5 Changed 6 years ago by anonymous

@Pilot6, such configuration is recommended here:

http://wiki.openwrt.org/toh/netgear/wndr3700

Check Switch Ports (for VLANs) section and example

comment:6 Changed 6 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

I cannot reproduce this issue with or without cables, with or without corresponding vlan setup, neither in 10.03.1-rc6 nor trunk. Also at no point is link state detection involved in the bringup of software vlan interfaces within the OpenWrt network scripts.

I suppose your setup is simply broken somewhere - maybe due to blocking init scripts, hanging hotplug handlers or esotheric kernel configuration. If I copy-paste the configuration above into my /etc/config/network and reboot I end up with eth0.1, eth0.4 and eth0.5, all with IP in UP RUNNING state.

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.