this is somewhat a continuation of my previous post(s): (Yet Another Dual/Multi ISP Question)...
i learned a bit on MWAN3 on assigning a specific interface to a specific wan/isp on this post: (Mwan3 rule to specific interface), yet i decided to stick to 'manual' mode for now for the sake of 'learning'...
i have a number of interfaces to serve my network..., some use isp-A exclusively, others use isp-B, while a few wanting whatever is available, thus, a 'failover instance' is added to the mix, lets just assume this is isp-X (yet another OpenWRT instance utilizing MWAN3 failover)
also, each 'lan' interface(s) are not allowed to talk to each other (unless otherwise specified)
so my source interface are as follows:
'globe' interface (wan-A / isp-A) assigned to table tglobe
'pldt' interface (wan-B / isp-B) assigned to table tpldt
'multi' interface (wan-X / isp-X) assigned to table tmulti
all the above interface does not utilize "Use default gateway", thus, the main table is not used
this is how i utilized the tables with what i've learned from the links i posted..., created for each individual 'wan' that i have
(is it possible to use 1 table for 2 or more wan/gateway?)
since i also mentioned multiple OpenWRT instance, we'll focus on the "main" one, the others are irrelevant
noted on this, please disregard that particular phrase for now, thank you for the info!
i am unsure why it is working, it might be with the 'clone' feature or such, but unsure...
i now removed the gateway part in vlan10, rebooted both OpenWRT device & PC & gladly, internet still works.
below is the full config
/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 'fd60:e67d:3640::/48'
option packet_steering '2'
config device
option type 'bridge'
option name 'x'
list ports 'eth0'
list ports 'eth4'
list ports 'eth5'
config bridge-vlan
option device 'x'
option vlan '1'
list ports 'eth0:u*'
list ports 'eth4:u*'
list ports 'eth5:u*'
config interface 'management'
option proto 'static'
option device 'x.1'
option ipaddr '172.30.1.254'
option netmask '255.255.255.0'
option defaultroute '0'
option delegate '0'
config interface 'globe'
option proto 'dhcp'
option device 'eth1'
option defaultroute '0'
option ip4table 'tglobe'
option ip6table 'tglobe'
config bridge-vlan
option device 'x'
option vlan '10'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'vlan10'
option proto 'static'
option device 'x.10'
option ipaddr '172.30.10.254'
option netmask '255.255.255.0'
option defaultroute '0'
option ip4table 'tglobe'
option ip6table 'tglobe'
config route
option target '0.0.0.0'
option netmask '0.0.0.0'
option gateway '192.176.1.254'
option table 'tglobe'
option interface 'globe'
config route
option target '0.0.0.0'
option netmask '0.0.0.0'
option gateway '192.176.1.254'
option table 'tw1globe'
option interface 'globe'
config rule
option in 'vlan71'
option priority '999'
option lookup 'tw1globe'
config rule
option in 'vlan10'
option priority '1000'
option lookup 'tglobe'
config bridge-vlan
option device 'x'
option vlan '47'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'APinternet'
option proto 'static'
option device 'x.47'
option ipaddr '172.30.47.254'
option netmask '255.255.255.240'
option defaultroute '0'
option ip4table 'tglobe'
option delegate '0'
config rule
option priority '999'
option in 'vlan72'
option lookup 'tw1pldt'
config rule
option priority '1000'
option in 'vlan20'
option lookup 'tpldt'
config rule
option priority '1000'
option in 'vlan69'
option lookup 'tmulti'
config rule
option priority '4000'
option in 'APinternet'
option lookup 'tglobe'
config interface 'pldt'
option proto 'dhcp'
option device 'eth2'
option defaultroute '0'
option ip4table 'tpldt'
option ip6table 'tpldt'
config bridge-vlan
option device 'x'
option vlan '20'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'vlan20'
option proto 'static'
option device 'x.20'
option ipaddr '172.30.20.254'
option netmask '255.255.255.0'
option defaultroute '0'
option ip4table 'tpldt'
option ip6table 'tpldt'
config route
option interface 'pldt'
option target '0.0.0.0/0'
option gateway '192.176.2.254'
option table 'tpldt'
config route
option interface 'pldt'
option target '0.0.0.0/0'
option gateway '192.176.2.254'
option table 'tw1pldt'
config bridge-vlan
option device 'x'
option vlan '69'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'vlan69'
option proto 'static'
option device 'x.69'
option ipaddr '172.30.69.254'
option netmask '255.255.255.0'
option defaultroute '0'
option ip4table 'tmulti'
option ip6table 'tmulti'
config bridge-vlan
option device 'x'
option vlan '99'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config bridge-vlan
option device 'x'
option vlan '86'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'vlan86'
option proto 'static'
option device 'x.86'
option ipaddr '172.30.86.254'
option netmask '255.255.255.240'
option defaultroute '0'
option delegate '0'
config bridge-vlan
option device 'x'
option vlan '71'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config bridge-vlan
option device 'x'
option vlan '72'
list ports 'eth0:t'
list ports 'eth4:t'
list ports 'eth5:t'
config interface 'vlan71'
option proto 'static'
option device 'x.71'
option ipaddr '172.30.71.254'
option netmask '255.255.255.248'
option defaultroute '0'
option ip4table 'tw1globe'
option ip6table 'tw1globe'
option delegate '0'
config interface 'vlan72'
option proto 'static'
option device 'x.72'
option ipaddr '172.30.72.254'
option netmask '255.255.255.248'
option defaultroute '0'
option ip4table 'tw1pldt'
option ip6table 'tw1pldt'
option delegate '0'
config interface 'multi'
option proto 'dhcp'
option device 'eth3'
option defaultroute '0'
option ip4table 'tmulti'
option ip6table 'tmulti'
config rule
option in 'vlan10'
option lookup 'ttest'
option priority '5000'
config rule
option in 'vlan69'
option lookup 'ttest'
option priority '5000'
config route
option interface 'multi'
option target '0.0.0.0/0'
option gateway '192.176.3.254'
option table 'tmulti'
/etc/config/firewall
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
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'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
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'
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'
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'
config zone
option name 'zvlan20'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan20'
config zone
option name 'zvlan72'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan72'
config zone
option name 'zvlan10'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan10'
config zone
option name 'zvlan71'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan71'
config zone
option name 'zapinternet'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'APinternet'
config zone
option name 'zvlan69'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan69'
config zone
option name 'zmanagement'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'management'
config zone
option name 'zglobe'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'globe'
config forwarding
option src 'zvlan10'
option dest 'zglobe'
config zone
option name 'zpldt'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'pldt'
config forwarding
option src 'zapinternet'
option dest 'zglobe'
config forwarding
option src 'zvlan20'
option dest 'zpldt'
config zone
option name 'zmulti'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'multi'
config zone
option name 'zvlan86'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'vlan86'
config zone
option name 'zvlan99'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config forwarding
option src 'zvlan71'
option dest 'zglobe'
config forwarding
option src 'zvlan72'
option dest 'zpldt'
config forwarding
option src 'zvlan69'
option dest 'zmulti'
config rule
option name 'test'
option family 'ipv4'
list proto 'tcp'
option src 'zvlan10'
option src_port '50080'
option dest 'zapinternet'
option dest_port '80'
option target 'ACCEPT'
list dest_ip '172.30.47.246'
option enabled '0'
config redirect
option dest 'zvlan69'
option target 'DNAT'
option name 'test'
option family 'ipv4'
list proto 'tcp'
option src 'zvlan10'
option src_dport '50080'
option dest_ip '172.30.69.252'
option dest_port '80'
to circle back..., i have a test web server located in 'APinternet' & is accessible via 'vlan10' since i think both intarface is referencing the 'tglobe' table (& w/ the help of the static route/rule)....
now, if i try to move the test web server to 'vlan69', i am not able to access it from 'vlan10' since 'vlan69' uses 'tmulti' table & 'vlan10' is using 'tglobe' table