hello there!
i just migrated from vyatta to vyos this weekend, main driver was support for policy based routing. my vyos box is connected to three ISP (ADSL pppoe, CABLE, FIBER). issue i had with vyatta for years is router is accessible from outside (internet) only on one of these three interfaces.
i figure out it is because default route (there can be only one) due to which router will always try to send traffic to outside via one wan interface.
policy based routing was supposed to fix scenarios as this one, but i was not successful last two days.
these are my interfaces:
ethernet eth0 {
description "WAN with ADSL"
duplex auto
hw-id 00:0c:29:39:c7:44
pppoe 5 {
default-route none
mtu 1492
name-server auto
password xxxxxxxxxx73
policy {
route ADSL-IN
}
user-id xxxxxxxxxxxxx3@xxxxxxxxxxx
}
smp_affinity auto
speed auto
}
ethernet eth1 {
address 192.168.1.9/24
description LAN
duplex auto
hw-id 00:0c:29:39:c7:58
smp_affinity auto
speed auto
}
...
...
...
ethernet eth5 {
description FIBER-Internet
duplex auto
hw-id 00:0c:29:39:c7:76
smp_affinity auto
speed auto
vif 315 {
address FF.FFF.FFF.FFF/30
policy {
route FIBER-IN
}
}
}
...
ethernet eth7 {
address dhcp
description CABLE
disable
duplex auto
hw-id 00:0c:29:39:c7:8a
mac 00:1d:7e:4b:5d:99
policy {
route CABLE-IN
}
smp_affinity auto
speed auto
}
loopback lo {
}
these are my policies:
route ADSL-IN {
rule 10 {
destination {
address AAA.AA.AA.AAA
}
protocol all
set {
table 1
}
source {
address 0.0.0.0/0
}
state {
established enable
new enable
related enable
}
}
}
route CABLE-IN {
enable-default-log
rule 10 {
destination {
address CC.CCC.CCC.CCC
}
log enable
protocol all
set {
table 3
}
source {
address 0.0.0.0/0
}
state {
established enable
new enable
related enable
}
}
}
route FIBER-IN {
rule 10 {
set {
table 2
}
}
}
and my protocols:
static {
route 192.168.3.0/24 {
next-hop 192.168.33.4 {
distance 50
}
}
table 1 {
interface-route 0.0.0.0/0 {
next-hop-interface pppoe5 {
distance 200
}
}
}
table 2 {
route 0.0.0.0/0 {
next-hop FG.FGG.FGG.FGG {
distance 50
}
}
}
table 3 {
route 0.0.0.0/0 {
next-hop CG.CGG.CGG.CGG {
distance 50
}
}
}
}
run show ip route (and tables)
vyos@vyos-yang# run show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
C>* 127.0.0.0/8 is directly connected, lo
C>* 192.168.1.0/24 is directly connected, eth1
C>* 192.168.2.0/24 is directly connected, eth2
S>* 192.168.3.0/24 [50/0] via 192.168.33.4, eth6.316
C>* 192.168.33.0/24 is directly connected, eth6.316
C>* 192.168.55.0/24 is directly connected, eth3
C>* AGG.AGG.AGG.AG/32 is directly connected, pppoe5
[edit]
vyos@vyos-yang# run show ip route table 1
table 1:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
S>* 0.0.0.0/0 [200/0] is directly connected, pppoe5
[edit]
vyos@vyos-yang# run show ip route table 2
table 2:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
S 0.0.0.0/0 [50/0] via FG.FGG.FGG.FGG inactive
[edit]
vyos@vyos-yang# run show ip route table 3
table 3:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
S 0.0.0.0/0 [50/0] via CG.CGG.CGG.CGG inactive
[edit]
legend:
AAA.AA.AA.AAA - ADSL static address (pppoe)
CC.CCC.CCC.CCC - CABLE static address, assigned via dhcp
FF.FFF.FFF.FFF/30 - FIBER static address, on vlan 315
AGG.AGG.AGG.AG - ADSL gateway
CG.CGG.CGG.CGG - CABLE gateway
FG.FGG.FGG.FGG - FIBER gateway
i disabled eth7 (CABLE) connection to force route via ADSL in my troubleshooting effort but i was not successful. In this setup when eth7 is enabled default route appear and router is reachable from the outside of course only on CABLE interface.
examples i have found are for edgemax and vyatta mostly for outgoing traffic. my needs are completely opposite - i just want possibility to reach router from internet via any of ISP interfaces.