LAN Routing
1753797 Members
6932 Online
108805 Solutions
New Discussion юеВ

routes for certain subnet

 
robkwild
Frequent Advisor

routes for certain subnet

hi all,

in the screenshot below is my route table on our procurve switch

atm all out networks are going out via our tmg router (0.0.0.0/0 172.16.24.65) but i want to make a particular network go out via our other router pfsense (10.8.0.0/24 10.10.20.254)

now if i do this will it mess up with the routes because atm the 10.8.0.0/24 has a gateway on the switch and so do all the other networks, so will all the other networks try to go out via the pfsense instead of the tmg which obviously i dont want to do

thanks so much

rob

5 REPLIES 5
Michael Patmon
Trusted Contributor

Re: routes for certain subnet

Hello.  What platform?  A classifier & policy based route would do it, but depends on the hardware.

robkwild
Frequent Advisor

Re: routes for certain subnet

its a hp procurve 8212zl (j9091a)

 

but cant i just change the route for that one subnet to

 

ip route 10.8.0.0/24 10.10.20.254, will this work, if it does my question is it WONT effect all the other networks going to the tmg firewall ie 0.0.0.0/0 172.16.24.65?

Michael Patmon
Trusted Contributor

Re: routes for certain subnet

Yes, it will apply to all sources.  10.8.0.0/24 in "ip route 10.8.0.0/24 10.10.20.254" is the destination network.  Any source going to 10.8.0.0/24 will be sent to the 10.10.20.254 next hop.  

 

What version modules do you have (show modules)?  For PBR to work in this case you'll need v2 modules.

 

 

robkwild
Frequent Advisor

Re: routes for certain subnet

but the 10.8.0.0/24 has already got a gateway on the switch of 10.8.0.254, is it ok to make a static route to route to 10.10.20.254, and this wont affect my other networks going to the tmg firewall?

 

EDIT - all my modules are v1

Michael Patmon
Trusted Contributor

Re: routes for certain subnet

Ah, I didn't see the connected route there already.  Adding "ip route 10.8.0.0/24 10.10.20.254" will just add a less preferred route (distance = 1) such that if the current connected route (distance = 0) were to become unavailable the static route would become active.   It would cause no change in the current routing table.

 

HP-8212zl(config)# show ip route

IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
0.0.0.0/0 128.44.120.1 1 static 250 1
10.8.0.0/24 VLAN100 100 connected 1 0
10.10.20.0/23 VLAN200 200 connected 1 0

 

HP-8212zl(config)# ip route 10.8.0.0/24 10.10.20.254

 

HP-8212zl(config)# show ip route

IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
0.0.0.0/0 128.44.120.1 1 static 250 1
10.8.0.0/24 VLAN100 100 connected 1 0
10.10.20.0/23 VLAN200 200 connected 1 0

 

HP-8212zl(config)# int c1 dis
I 10/29/15 18:18:31 00077 ports: AM1: port C1 is now off-line
I 10/29/15 18:18:31 00002 vlan: AM1: VLAN100 virtual LAN disabled

 

HP-8212zl(config)# show ip route

IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
0.0.0.0/0 128.44.120.1 1 static 250 1
10.8.0.0/24 10.10.20.254 200 static 1 1
10.10.20.0/23 VLAN200 200 connected 1 0

 

 

Removing or disabling routing on the VPN VLAN would have the same effect, but it would leave hosts on that VLAN stranded.