Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

static ip route will not work

cisco 2651XM router

the above router is my current gateway to the internet for a small lan of PC's. The lan is on 172.16.1.xx and it connects to f0/0 which is set at 172.16.1.30. The internet is via an adsl wic card which is Dialer0.

I originally used sdm to do the route which set it dynamically as:

ip route 0.0.0.0 0.0.0.0 Dialer0 and the internet works with this.

I've tried to alter it to a static route but when I do the internet goes off.

ip route 172.16.0.0 255.255.0.0 Dialer0 doesn't work

ip route 172.16.0.0 255.255.255.255 Dialer0 doesn't work.

I don't understand why setting a static route makes the internet go down when this looks like the correct route.

Thanks for any pointers.

4 REPLIES
Cisco Employee

Re: static ip route will not work

There is a difference between the 2 commands.

ip route 0.0.0.0 0.0.0.0 Dialer0

This command means that let's say a packet is heading for 4.2.2.2. The router obviously does not have a route for it, hence the packet would be thrown to the gateway of last resaort which is Dialer0.

ip route 172.16.0.0 255.255.0.0 Dialer0

This command means that to go to the 172.16.0.0/16 network go to Dialer0. So it does not talks about any other traffic. This route would match only the traffic going to 172.16.0.0/16 while the 0.0.0.0 route would match traffic to any destination which the router does not has a route for.

Hope that helps !!

Re: static ip route will not work

Hello Anthony,

Simple route entries like you issue are "destination network" specific, not source network. So the way you think "I want 172.16.0.0 network originated traffic to be routed to Dialer0" is wrong. "I want ...... destined traffic to be routed to Dialer0" is the correct statement.

If you want to be more specific and say "I want x network sourced traffic routed to this gateway" or "I want x network sourced traffic and destined to y network, to be routed to that gateway" you need PBR (Policy Based Routing). You can achieve this by using route-maps

Regards

Hall of Fame Super Gold

Re: static ip route will not work

Tarun got it exactly right and deserves the rating that I gave. to route by source address will require Policy Based Routing. Normal routing is based on destination addresses.

HTH

Rick

Community Member

Re: static ip route will not work

ok thanks for your response. I still find it confusing but I suppose that's because I'm a beginner to cisco routers. It's hard to grasp how this router 'thinks' so I expect more reading and study is called for.

588
Views
5
Helpful
4
Replies
CreatePlease to create content