Routing – Static routes between 3 windows routers and vyatta

linuxrouterrouting

Hi for a school project I have to build a network this is the current situation:

Situation

I can ping between 172.16.0.0/19, 172.16.32.0/19 and 172.16.64.0/19. I can ping from my router (172.16.128.15) to those 3 networks and I can ping from 172.16.32.0 and 64.0 to the router on 172.16.128.15. However, I can't ping from 172.16.32.0/19 and 172.16.64/19 to the DMZ and internet.

Rules on Firewall/Router:

Static routes: 
route 172.16.0.0/19 next-hop 172.16.128.101 
route 172.16.32.0/19 next-hop 172.16.128.101 
route 172.16.64.0/19 next-hop 172.16.128.101 
route 172.16.96.0/19 next-hop 172.16.96.1
route 172.16.128.0/19 next-hop 172.16.128.15 
route 172.16.160.0/19 next-hop 172.16.128.101

nat rule: 
outbound-interface eth0 source address 0.0.0.0 type masquerade

The following static routes I have on my router in 172.16.32.0/19 subnet

172.16.0.0 mask 255.255.224.0 172.16.160.6
172.16.32.0 mask 255.255.224.0 172.16.32.3
172.16.64.0 mask 255.255.224.0 172.16.160.7
172.16.128.0 mask 255.255.224.0 172.160.6

Yes indeed router 2 and router 3 are missing 172.16.96.0 mask 255.255.224.0 172.16.128.15 and 0.0.0.0 mask 0.0.0.0 172.16.128.15. But when I add those it still doesn't work. So where can it go wrong?

On DC1 and router1 everything works fine towards the outside.

How can I access the internet from subnet 172.16.32.0 and 172.16.64.0?

Best Answer

Yes indeed router 2 and router 3 are missing 172.16.96.0 mask 255.255.224.0 172.16.128.15 and 0.0.0.0 mask 0.0.0.0 172.16.128.15. But when I add those it still doesn't work. So where can it go wrong?

The routes you proposed are incorrect according to the diagram you provided, the routes you need to configure on R2 and R3 are

0.0.0.0 0.0.0.0 172.16.160.6
172.16.96.0 255.255.224.0 172.16.160.6 (you don't need this route actually but I'm including it anyway).

The reason for this is that R2 and R3 do not have an interface connected to the 172.16.128.1/19 network, only R1 does. Since that network is not directly connected to R2 or R3, you cannot use it as a "next hop" for your static routes - it is not the next hop. R2 and R3 would have to forward traffic to R1 to reach the internet first, so it must be configured as the gateway for the default routes on R2 and R3.

Related Topic