Hello!,
So currently I'm using a Mochabin as modem which is connected to a 24-port tp-link SG1016DE switch.
Now I know that this switch isn't always reliable and also sometimes have its quircks.
now my issue what I have is:
On the switch port 1 is the dedicated port to Mochabin, and Mochabin supplies the internet, on port 2-3 on the switch I run vlans with different dhcps other than br-lan.
What sometimes happens when I restart the lan interface, the switch decides to use port 2 as wan and joins a completely wrong subnet, well this is kinda expected since switches can do that but that is not what I want.
How can I make it so that the switch always recognize it should be port 1?, I thought authoritative dhcp would do that no?
heres my config
network:
click to open
thanks you for the help :)
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 packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan0'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
option ipv6 '0'
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '10.234.53.1'
option device 'br-lan.24'
option defaultroute '0'
option delegate '0'
config device
option name 'br-wan'
option type 'bridge'
list ports 'eth0'
list ports 'eth2'
option ipv6 '0'
config interface 'wan'
option proto 'dhcp'
option device 'eth2.300'
option force_link '1'
option ipv6 '1'
option delegate '0'
config device
option type 'bridge'
option name 'br-iptv'
option bridge_empty '1'
option igmp_snooping '1'
option ipv6 '0'
option macaddr '<snip>'
list ports 'eth2.640'
config interface 'iptv'
option proto 'dhcp'
option device 'br-iptv'
option delegate '0'
option defaultroute '0'
option force_link '1'
config device
option name 'eth2.300'
option type '8021q'
option ifname 'eth2'
option vid '300'
option macaddr '<snip>'
config bridge-vlan
option device 'br-lan'
option vlan '24'
list ports 'lan0:t*'
list ports 'lan1:t*'
list ports 'lan2:t*'
list ports 'lan3:u*'
config bridge-vlan
option device 'br-lan'
option vlan '50'
config bridge-vlan
option device 'br-lan'
option vlan '51'
config bridge-vlan
option device 'br-lan'
option vlan '52'
list ports 'lan0:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
config bridge-vlan
option device 'br-lan'
option vlan '53'
list ports 'lan0:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
config bridge-vlan
option device 'br-lan'
option vlan '49'
list ports 'lan0:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
config interface 'wlan0'
option proto 'static'
option ipaddr '10.234.80.1'
option netmask '255.255.255.0'
option defaultroute '0'
option device 'br-wlan0'
option delegate '0'
config device
option type 'bridge'
option name 'br-zigbee'
option ipv6 '0'
option igmp_snooping '1'
option bridge_empty '1'
list ports 'br-lan.52'
list ports '@trunk.52'
option multicast '1'
config device
option type 'bridge'
option name 'br-tvnet'
list ports 'br-lan.53'
option bridge_empty '1'
option ipv6 '0'
config interface 'pcnet'
option proto 'static'
option device 'br-pcnet'
option ipaddr '10.34.79.1'
option netmask '255.255.255.0'
option delegate '0'
option defaultroute '0'
config device
option type 'bridge'
option name 'br-pcnet'
list ports 'br-lan.49'
option ipv6 '0'
option igmp_snooping '1'
config interface 'wlan1'
option proto 'static'
option ipaddr '10.234.81.1'
option netmask '255.255.255.0'
option defaultroute '0'
option device 'br-wlan1'
option type 'bridge'
config interface 'zigbee'
option proto 'static'
option device 'br-zigbee'
option ipaddr '10.33.77.1'
option netmask '255.255.255.0'
option defaultroute '0'
option delegate '0'
config interface 'wgclient'
option proto 'wireguard'
option delegate '0'
option route_allowed_ips '0'
option private_key '<snip>'
option force_link '1'
list addresses '<snip>/32'
option metric '10'
option mtu '1420'
option dns_metric '0'
list dns '10.64.0.1'
option defaultroute '0'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
option endpoint_host '<snip>'
option endpoint_port '51820'
option persistent_keepalive '25'
list allowed_ips '0.0.0.0/0'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config wireguard_wgclient
option description 'mullvad_<snip>'
option public_key '<snip>'
list allowed_ips '0.0.0.0/0'
option endpoint_host '<snip>'
option endpoint_port '51820'
option disabled '1'
config interface 'steamcache'
option proto 'none'
option device 'br-81dc207e2a7b'
option defaultroute '0'
option force_link '1'
option delegate '0'
config device
option type 'bridge'
option name 'br-81dc207e2a7b'
option ipv6 '0'
option bridge_empty '1'
config interface 'wgserver'
option proto 'wireguard'
option force_link '1'
option metric '5'
option delegate '0'
option private_key '<snip>'
option listen_port '51820'
list addresses '10.14.0.1/24'
option defaultroute '0'
config bridge-vlan
option device 'br-lan'
option vlan '54'
list ports 'lan0:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
config device
option type 'bridge'
option name 'br-neko'
list ports 'br-lan.54'
config interface 'tvnet'
option proto 'static'
option device 'br-tvnet'
option ipaddr '172.18.33.1'
option netmask '255.255.255.0'
option delegate '0'
option defaultroute '0'
config wireguard_wgserver
option description 'android'
option persistent_keepalive '0'
option public_key '<snip>'
list allowed_ips '10.14.0.3/32'
config device
option name 'wgserver'
option multicast '1'
config device
option type 'bridge'
option name 'br-wlan0'
option bridge_empty '1'
option ipv6 '0'
list ports '@trunk.50'
option igmp_snooping '1'
config device
option type 'bridge'
option name 'br-wlan1'
option bridge_empty '1'
list ports '@trunk.51'
config interface 'docker'
option device 'docker0'
option proto 'none'
option auto '0'
option force_link '1'
option defaultroute '0'
option delegate '0'
config device
option type 'bridge'
option name 'docker0'
option bridge_empty '1'
config ipset
option name 'rockstargames'
option match 'src_net'
option enabled '1'
config device
option name 'phy0-ap0'
option ipv6 '0'
config interface 'trunk'
option proto 'gretap'
option force_link '1'
option peeraddr '10.234.53.3'
option ipaddr '10.234.53.1'
option df '0'
option defaultroute '0'
option delegate '0'
option metric '10'
option multicast '1'
config device
option type 'bridge'
option name 'br-pb'
option bridge_empty '1'
option ipv6 '0'
list ports '@trunk.90'
config interface 'wlan0_gaming'
option proto 'static'
option device 'br-pb'
option ipaddr '172.20.79.1'
option netmask '255.255.255.0'
option defaultroute '0'
config bridge-vlan
option device 'br-lan'
option vlan '90'
list ports 'lan0:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
and dhcp config:
click to open
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '0'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option cachesize '1000'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
option dnsforwardmax '1024'
list notinterface 'wan'
list notinterface 'iptv'
config dhcp 'lan'
option interface 'lan'
option start '2'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
option start '100'
option limit '150'
option leasetime '12h'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config dhcp 'wlan0'
option interface 'wlan0'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'wlan1'
option interface 'wlan1'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'zigbee'
option interface 'zigbee'
option start '2'
option limit '150'
option leasetime '12h'
option force '1'
config dhcp 'tvnet'
option interface 'tvnet'
option start '2'
option limit '10'
option leasetime '12h'
option force '1'
config dhcp 'pcnet'
option interface 'pcnet'
option start '100'
option limit '150'
option leasetime '12h'
option force '1'
config host
option name 'TL-SG1016DE'
option ip '10.234.53.10'
option mac '<snip>'
config host
option name 'TL-SG108E'
option mac '<snip>'
option ip '10.234.53.20'
config host
option name 'GL-AX1800'
option ip '10.234.53.3'
option mac '<snip>'
config domain
option name 'aria.local'
option ip '172.17.0.2'
config host
option name 'miclock'
option dns '1'
option mac '<snip>'
option ip '10.33.77.4'
config dhcp 'wlan0_gaming'
option interface 'wlan0_gaming'
option start '2'
option limit '5'
option leasetime '12h'
edit I add a screenshot for vlan 24 the default lan on the switch side: