Possible AVM BUG--How to configure simple vlan

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	list ra_flags 'none'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

cat /etc/config/firewall
config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option src_ip		fc00::/6
	option dest_ip		fc00::/6
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
	option name		Support-UDP-Traceroute
	option src		wan
	option dest_port	33434:33689
	option proto		udp
	option family		ipv4
	option target		REJECT
	option enabled		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	xxxxxxxxxxxxxxx
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		192.168.16.235
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	xxxxxxxxxxxxxxx
#	option src_port	80
#	option dest		wan
#	option dest_ip	xxxxxxxxxxxxxxx
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	xxxxxxxxxxxxxxx
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	xxxxxxxxxxxxxxx
#	option dest_port	120
#	option proto	tcp

cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	list ra_flags 'none'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

Great! I'll leave you to the experts.

@psherman @RuralRoots @eduperez @tmomas @slh thanks a lot. I did not know that's what was being asked. I suppose what I said earlier about putting all 4 outputs in a single </> makes sense now that I have all the same 4 separated into their own </>. I hope the experts help me soon. I'm always grateful to them. Vlan needs a university :slight_smile:

I'm not sure what you're trying to do. The default configuration which you posted has one of the Ethernet ports for the wan network (to plug into a cable modem etc when not using the internal DSL modem) and the other three are the LAN. These three are both hardware switched with each other and software bridged to the br-lan lan bridge (which includes the wifi AP) via eth0.1

If you're running the web interface, the Network->Switch page makes this clear. A common situation with many devices is that the numbers marked on the outside of the case don't match the software port numbering. You can investigate this by plugging and unplugging one Ethernet cable at a time and watching the connection icons on the Switch page change. Make sure you understand the software numbers of each port.

@mk24 Thanks, Mike. What I'm trying to do is use the other Ethernet ports that currently if I plug a network cable into them and the other end of that cable to a computer, I do not get connection; that is, no access to the Internet is possible. So, now, there are only two Ethernet ports that are 'active' or work. The first one, which is WAN, and the second one. Ports 3 and 4 are not working. I'm aware about matching hardware ports to vlan ports. I'm not there yet, first, I must get ports 3 and 4 'active.' This is the main challenge now. Thanks a lot.

Looks like thia is a DSL modem/router (with no ethernet WAN port), and you need to use one of the LAN ports as WAN, right?

From your config files, I found a bit weird that the LAN pot seem to correspond with ports 0, 1, 2, 4 on the switch. Are you sure about this? Which device is this, exactly?

@eduperez thanks a lot. @psherman had helped me 'convert' one of the LAN ethernet ports as WAN. This is because the router does not have a dedicated WAN port. It is as you say a " DSL modem/router".

The only configuration I have done is the help @psherman gave me earlier, as described above.

I am at a loss what to do. But I know what I want: to be able to use Ethernet ports 3 and 4 on the device so that I can plug an Ethernet cable in them and the other end of that cable I can plug into a computer and get access to the Internet. Presently, there is no Internet connection on either of those ports.

Here is the link to that help earlier from @psherman Peter. Link

Thanks a lot.

What is upstream of the router you're having trouble with?
What IP address do you see in the IPv4 upstream (just post the fist 2 octets in bold for the moment aaa.bbb.ccc.ddd)?

@ Peter, thanks a lot. The Openwrt router is now connected to the WAN port of my ISP's router. This is how it will be connected when done with configuration. This is done now by connecting an Ethernet cable to the LAN/Ethernet port that you helped me re-purpose as a WAN port on the Openwrt router. Previously, it was connected to a switch with Internet access.

Again restating the problem: ports 3 and 4 of the openwrt router do not work. That means when i connect an ethernet cable to them, I do not get an IP address. But when I do so on port 2, I do. So, it's like ports 3 and 4 are not 'active' and may need to be configured in the vlan, for which I need help. That's my diagnosis, however.

I have taken a picture and shared here, perhaps words don't well express the technical bits. These pictures are from the 'overview' page of Luci:

Thanks a lot.

You don't need to redact RFC1918 addresses (i.e. anything in the 192.168.x.x, 10.x.x.x, 172.16.x.x-172.30.x.x ranges).

I'm going to take a guess that the gateway address there (under your redaction) is 192.168.1.1.

Your network file (posted here) indicates that your OpenWrt router has a LAN defined as 192.168.1.1.

From the earlier thread, @mk24 had advised the following:

I'm guessing you missed that... If my hunch is correct, you need to change your LAN address, then renew your computer's IP address and you should be able to get online.

@psherman I have since changed that to 10.0.1.1.

ok... please post your current network file.

The Openwrt router address is presently: 10.0.1.1. Again, I'm able to go online using hardware Ethernet port 2 on the openwrt router, but not ports 3 and 4, when I connect a cable to these hardware ports.

Let's review your network file again... I want to look at exactly what is running on your device now.

@psherman Thanks, Peter. Here the result from cat /etc/config/network:

Again, please note, the IP is no longer 192.168.x.x

cat /etc/config/network
config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix ''xxxxxxxxxxxx'::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option tone 'av'
	option ds_snr_offset '0'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config device
	option name 'eth0.1'
	option macaddr ''xxxxxxxxxxxx''

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'dsl0'
	option macaddr 'xxxxxxxxxxxx'

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

config interface 'wan6'
	option device '@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 vid '1'
	option ports '0 1 2 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option ports '4 6t'

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

According to the file you just posted, it is still 192.168.1.1.

OK. I have done a new one. That was the old file but was pointing out that as regards the IP, it had changed. For example, as you can see WIFI is still not yet set up. That's for another day :slight_smile: Thanks for your patience, I must say!

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

config globals 'globals'
	option ula_prefix 'fdad:7158:cc26::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option tone 'av'
	option ds_snr_offset '0'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config device
	option name 'eth0.1'
	option macaddr ''

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '10.0.1.1'

config device
	option name 'dsl0'
	option macaddr ''

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

config interface 'wan6'
	option device '@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 vid '1'
	option ports '0 1 2 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option ports '4 6t'

Thank you. Next thing to look at ...

your device appears to have 2 100Mbps ports, and 2 1000Mbps ports. Let's verify that the ports are physically up.

You clearly have 2 ports working (the upstream port and the computer that you're using on that router) -- correct? Take a look at the switch page on LuCI and verify that both of those ports indicate an active link. Then take another ethernet device and connect it to each of the other two ports in turn. Does the port indicate a physical link has become active on each of those ports?