cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
21795
Views
0
Helpful
11
Replies

Configuring a Route for one host

gkonheiser
Level 1
Level 1

This is probably something very easy so sorry for posting here but how can I confure a route for a specific host? ie I have 2 WAN links out to the internet, the default route is one of  them and I would think one host to use the other?

11 Replies 11

cadet alain
VIP Alumni
VIP Alumni

Hi,

eg for a host route to 192.168.2.1/24: ip route 192.168.2.1 255.255.255.255

But don't forget the router will always use the specific match to forward to a destination so in your case the host route on the other WAN link, I suppose this is what you want to achieve.

Regards.

Alain.

Don't forget to rate helpful posts.

Thanks for all your help. so ie:-

ip route 192.168.1.73 255.255.255.255 62.2.34.42

so all trafic to and from 192.168.1.73 will route thou 62.2.34.42, not sure what you mean about " the router will always use the specific match to forward to a destination"

You can use two route statement for two different ISP

Bhadresh

Will the static route have a higher metric then my default route? ie it will take this route above my default route?

Both has the same metric, you can write both default route.

Bhadresh

Hi,

i can try this way,

access-list 101 permit ip host 192.168.2.1 any

access-list 102 deny ip host 192.168.2.1 any

access-list 102 permit ip any any

ip nat inside source-list 101 interface gi0/0 overload

ip nat inside source-list 102 interface gi0/1 overload

where gi0/0 and gi0/1 have different ISP.

Thanks, this  is a good way of doing it instead of using ip route,

This wont interfere with my current access-list and routing?

Hi,

so all trafic to and from 192.168.1.73 will route thou 62.2.34.42, not  sure what you mean about " the router will always use the specific match  to forward to a destination"

This entry in the routing table will be used for traffic to the prefix in the static route, routing is always about destination IP not source.

When the router has multiple entries it could use to forward traffic to a destination it will always use the entry with the longest match that is which has the most bits in common with the destination IP.

Then if it has equal longest matches it will use either metric if these routes were learned from the same protocol or Administrative Distance if it was learned from different protocols and each time the lowest value wins.

Now what do you want to do exactly? NAT is not Routing and routing is done first before NAT so you can do NAT overload on your WAN interfaces but if you don't have a route going the second link then you won't NAT on this one.

Alain.

Don't forget to rate helpful posts.

Sorry for the delay. So I have two ISPs going into my 1841, eventual I will  get them configured for either load balancing  or Failover but for now  I would just like to test one of the links, witch has just been upgraded. To do this I wanted one client, ie one of my PCs, to just use that link/interface as its route out to the internet.  I tryed the this :-

access-list 101 permit ip host 192.168.2.1 any

access-list 102 deny ip host 192.168.2.1 any

access-list 102 permit ip any any

ip nat inside source-list 101 interface gi0/0 overload

ip nat inside source-list 102 interface gi0/1 overload

But it didnt work with my current config. SO I am still thinking about how to best go about it or just to go ahead and configer for load balancing? 

Regards

Gordon

If you let me know your current configuration I can assist you better.

But make sure you have the route toward ISP including the following configuration.

Review Cisco Networking for a $25 gift card