Page 2 of 3

Re: Fibre connections VLAN

Posted: Tue Nov 28, 2023 5:44 pm
by ispyisail
I'm getting there

You can't really see the internet and phone lights but they are now green. (green is good, red is bad) I can now plug the phone into any internet connection and it will work.

I used this how-to, you only need about half of the instructions

https://xdeb.org/post/2020/unifi-edgero ... -iot-vlan/

I need to transfer this to an OpenWRT router now

I've now created an ISP simulator using and Edgerouter x

Image

Image

Image

Re: Fibre connections VLAN

Posted: Wed Nov 29, 2023 8:21 pm
by ispyisail
I haven't tested yet

https://openwrt.org/docs/guide-user/net ... ew_zealand

Does look like Fibre is a big thing in Australia?

https://openwrt.org/docs/guide-user/net ... #australia

Re: Fibre connections VLAN

Posted: Wed Nov 29, 2023 8:58 pm
by ispyisail
both DSA and older style
It appears that the C7 is the older style

Re: Fibre connections VLAN

Posted: Thu Nov 30, 2023 5:28 am
by Lantis
Some of the providers here do, but my RSP doesn’t require any VLANs so I’ve not had to figure it out.

Re: Fibre connections VLAN

Posted: Thu Nov 30, 2023 9:49 pm
by ispyisail
I've now got openwrt 19.07 working on the WAN side.

IPv4 is confirmed, IPv6 is a guess

Code: Select all

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

config globals 'globals'
	option ula_prefix 'fd4b:c87f:4f70::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.9.1'

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

config interface 'wan6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option ifname 'eth0.10'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '10'
	option ports '6t 1t'

Re: Fibre connections VLAN

Posted: Thu Nov 30, 2023 9:51 pm
by ispyisail
Image

Image

Re: Fibre connections VLAN

Posted: Fri Dec 01, 2023 2:11 am
by ispyisail
OpenWrt 22.x

Code: Select all

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 'fd8a:6535:a452::/48'

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

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 interface 'wan'
	option proto 'dhcp'
	option device 'eth0.10'

config interface 'wan6'
	option proto 'dhcpv6'
	option device 'eth0.10'
	option reqaddress 'try'
	option reqprefix 'auto'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '6t 1t'
	option vid '10'
	option description 'VLAN10'

Re: Fibre connections VLAN

Posted: Fri Dec 01, 2023 4:00 am
by ispyisail
Image

Re: Fibre connections VLAN

Posted: Fri Dec 01, 2023 4:09 am
by ispyisail
Yep that worked

Image

Code: Select all

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

config interface 'wan6'
					   
	option proto 'dhcpv6'
	option device 'eth0.10'
	option reqaddress 'try'
	option reqprefix 'auto'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '6t 1t'
	option vid '10'
	option description 'VLAN10'

Re: Fibre connections VLAN

Posted: Sat Dec 02, 2023 6:22 am
by ispyisail
After much testing flashing and many failures, this is my best solution.

I still haven't tried it in the real world yet as I don't have fibre at home.

WAN connection has to be VLAN 10

LAN is either normal or VLAN 10

Network

Code: Select all

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 'fd31:645d:4fa1::/48'

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

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

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

config interface 'wan6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option device 'eth0.10'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '10'
	option description 'VLAN10'
	option ports '0t 6t 2t 3t 4t 5t 1t'

config device
	option type 'bridge'
	option name 'VLAN10'
	list ports 'eth1.10'

config interface 'VLAN10'
	option device 'VLAN10'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '10.10.50.1'
DHCP

Code: Select all

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'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

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

config dhcp 'VLAN10'
	option interface 'VLAN10'
	option start '100'
	option limit '150'
	option leasetime '12h'