Basic LAN setup


#1

Hi there,

Very new to VyOS and attempting to set up basic static routing using VMware virtual machines. Please forgive my terrible lack of understanding I have just been kinda dropped in this with no experience using virtual routers or vmware.

At this stage all I am trying to do is ping between one client to another client box on different subnets via 2 routers and 3 distributed port groups/switches.

I think my issue is the next-hop settings as I can ping between client 1 and router 1 and client 2 and router 2 but cannot ping between the 2 routers or two clients.

Client one is on IP 192.168.1.2, router1 eth0 is 192.168.1.1 and eth1 192.168.2.1

Router 2 eth1 is 192.168.3.1 and eth0 192.168.4.1 with client 2 on 192.168.4.2

Both client NICs are plugged into their own distributed port group with router 1 and 2 plugged into these switches as well as an intermediary switch linking it all together.

I have attached a basic network diagram showing this done in visio but I am not sure how best to share this as I cannot attach it due to the file type?

My question is where do I go from here? Most guides/questions relate to outside gateway issues where as I havent even got that far yet as my internal network is not even configured properly.

I think my issue is definitely occurring at the intermediary switch (switch .32) as the routers will not ping each other and thus the clients cannot either. Shouldnt I be able to ping between eth1 of router 1 and eth1 of router 2 as they are both plugged into the same switch?

For testings sake I have also tried the same setup but all on the same 192.168.1.0 subnet and I get the exact same results

Please let me know what more info you need as I am sure I have missed lots out and I apologise again if my post is unclear etc.

Thanks for any help!


#2

router 1 and router 2 do not lie on the same subnet. so they would need a router in order to ping each other as it is configured. give eth1 on both routers an address in the same subnet.

something like this:

client1 (192.168.1.2) ==== (192.168.1.1) eth0 - rtr1 - eth1 (192.168.2.1) ==== (192.168.2.2) eth1 - rtr2 - eth0 (192.168.4.1) ==== client2 (192.168.4.2)

rtr1 needs a static route telling it to send traffic bound for 192.168.4.0/24 via rtr2 192.168.2.2
rtr2 needs a static route telling it to send traffic bound for 192.168.1.0/24 via rtr1 192.168.2.1


#3

Thanks for your reply, as it turns out there was an issue where VMs on different hosts could not communicate with each other which has since been sorted so that solved the mystery why my two routers could not ping each other despite being directly connected to the same switch.

I am now having difficulty understanding static routing. So if I want client 1 on 192.168.1.2 to ping router 2 on 192.168.2.2 how would I set up the static route in the router 1 config? I have tried:

set protocols static route 0.0.0.0/0 next-hop 192.168.2.2 distance 1

and

set protocols static route 192.168.1.0/24 next-hop 192.168.2.2 distance 1

but no luck, I am really just guessing here and there doesnt seem to be sufficient documentation any where that actually explains this.

Thanks again!


#4

I assume that rtr1 can now ping rtr2? IP routing decisions (unless you use policy based or source routing) are based on the destination address. If the router is not directly attached to the subnet of the destination host, it must be told where to send traffic. Your routers need information about how to reach subnets that they are not directly attached to. For example rtr1 needs to know how to reach 192.168.4.0/24, and rtr02 needs to know how to reach 192.168.1.0/24. Assuming the IPs from the diagram above:

on rtr1 set protocols static route 192.168.4.0/24 next-hop 192.168.2.2
on rtr2 set protocols static route 192.168.1.0/24 next-hop 192.168.2.1

the clients must also have their default routes set to rtr1 and rtr2 respectively


#5

Thank you so much for your help! I was clearly thinking about things somewhat backwards. My basic network is all working as it should now. Now add to my servers, dhcp and active directory on my domain controller!