Router not routing


#1

Hello,

So I have been trying to get the Vyos router, to route between two different subnets.

Now it should do this out of the box, but nothing I do will make it work!

I have two hosts, one on a 10.10.5.x network and another on 10.10.6.x network.

The IP address of host 1 is 10.10.5.2 with its default gateway set to 10.10.5.1

The IP address of host 2 is 10.10.6.2 with its default gateway set to 10.10.6.1

The Vyos has two ethernet connections. eth0 -> 10.10.5.1 and eth1 -> 10.10.6.1

Unless I have done something very stupid I cant see out of annoyance. Why cant I ping host1 from host2? It should work!!!


#2

Hi,
that is windows boxes on 10.10.5.2/10.10.6.2 ?
if so, they don’t allow ping by default


#3

They are Windows 8 boxes (VMs via Hyper-v)

So I have turned off the firewalls at both ends and and it still isn’t working. So its not a windows firewall issue.

When I do a tracecrt it finds the default gateway, but then fails, timing out of the other 29 hops.


#4

Hi,
Have you added static routes to each of your VMs.
VM1:

VM2:

10.10.5.0 mask 255.255.255.0 10.10.6.1 -p

By default you wont be able to ping VMs on different subnets unless they both have a route.

Cheers


#5

Use tcpdump on eth0 and eth1 , and see if ping packets make it through the firewall.
Post your VyOS config


#6

Use tcpdump on eth0 and eth1 , and see if ping packets make it through the firewall.
Post your VyOS config


#7

So this is my configuration

I am now trying to get this to work in my production environment.

Eth0 IP address - 10.210.2.20
Eth1 IP address - 10.210.4.1

VM1 environment - 10.210.2.x
VM2 environment - 10.210.4.x

Its still not routing between 10.210.4.x to 10.210.2.x and its driving me crazy!

interfaces {
ethernet eth0 {
address dhcp
duplex auto
hw-id 00:15:5d:02:1d:34
smp_affinity auto
speed auto
}
ethernet eth1 {
address dhcp
duplex auto
hw-id 00:15:5d:02:1d:35
smp_affinity auto
speed auto
}
ethernet eth2 {
duplex auto
hw-id 00:15:5d:02:1d:36
smp_affinity auto
speed auto
}
loopback lo {
}
}
protocols {
static {
route 10.210.4.0/24 {
next-hop 10.210.2.20 {
distance 1
}
}
}
}


#8

You don’t need to add the static route on the Vyos, the Vyos will route between interfaces without adding the routes.
Set Static IP addresses for the interfaces on the Vyos and then set the Gateway for you VMs to to corresponding IP of the interface on the Vyos.
Add a route to each other subnet from each VM as mentioned earlier.

If this doesn’t work you have a issue with underlying network setup, so test that you can ping from the vyos to each VM, test that each VM can ping its gateway interface.