| Summary: | vlan multiple default gateway not working as expected | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Oliver Welter <gentoo> |
| Component: | [OLD] baselayout | Assignee: | Roy Marples (RETIRED) <uberlord> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | 2005.1 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
I have a NIC with two vlans on it vlans_eth0="3 4"; vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" ); config_vlan3=( "82.XX.XX.XX netmask 255.255.255.0" ); routes_vlan3=("default via 82.XX.XX.XX"); config_vlan4=( "212.XX.XX.XX/26" ); routes_vlan4=("default via 212.XX.XX.XX"); After setting up the netwok I have two vlans that are working "inside" the network itsself, but routing outside works only for the first network. The scripts setup the default gateway without using source routing, so there are two gateway's and even packets coming in on the vlan4 address are seem to be routed out through gateway on vlan3 so they dont get to its target... Using this little script for source based routing on vlan4 solves the issue. ip route add 212.18.24.192/26 dev vlan4 table 104 ip route add default via 212.18.24.193 dev vlan4 table 104 ip rule add from 212.18.24.192/26 table 104 So, I exepct that routes_vlan4=("default via 212.18.24.193"); adds the route "source based"... Oliver