Hi, I am new in using Vyos using it first time . I have 2 host H1,H2 i have connect H1 and H2 to Router R1(vyos) . The connection is working as i am able to ping form each host to router , but i am not able to ping H1 from H2 and vice versa .
my structure is like this
H1(10.0.1.2/27)------eth0(10.0.1.3/27) Router(R1) eth1(10.0.2.11/27) ---------H2(10.0.2.10/25)
show ip router result
C> *10.0.1.0/27 is directly connected, eth0, 00:42:38
C>* 10.0.2.0/27 is directly connected, eth1, 00:35:38
I know that i need to use
set protocols static route 10.0.2.0/27(Destination Network) next-hop IP_OF_GATEWAY
i have tried IP_OF_GATEWAY with different values but i don’t know what value it should be
Can you please let me know the command I need to give for router configuration.
I want to connect the two host using the router.
Given that R1 has 10.0.1.0/27 & 10.0.2.0/27 directly, no additional static routes are required on R1.
What are the default gateways on H1 & H2? For this to work, they would need to be respectively 10.0.1.3 & 10.0.2.11
They don’t necessarily need to be default gateways, a regular static route configured on each host would suffice.
I will be adding more router . so, i want to know how static routes will work with two host . after i am able to connect the host , i will add a router and then again try to connect the host. It will be like
H1----R1------R2------H2
My host are ubuntu server. I want to apply changes only on the router
Can you suggest what i need to do in router??
I hope I have understood the question correctly.
If R! & R2 are not the default gateway, then static routes will need either to go on the Ubuntu hosts or perhaps on the default gateway router as an alternative.
1 Like
What @matthewr is saying is that how do the hosts themselves know about the subnet on the other side of the VyOS router if VyOS is not the default gateway? The hosts only know to send to the default gateway by default, hence the name.
If you’re realistically only using specific services between the two hosts, you could create NAT rules for those services on VyOS.
So VyOS R1 is the default gateway for H1 and H2 ? If you set the H1 and H2 with the Gateway R1(vyos), then enable static routing or OSPF routing or RIP. The 2 networks can connect with each other.