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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

Hi ,

Can someone explain about the below mentioned command ?

ip route 0.0.0.0 0.0.0.0 x.x.x.x(Nxt Hop IP)  fa0/1

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

Hi,

is there something in particular you want to know?

Static routes, in your case the default route, can be configured to point to a numerical next hop (IP address), an exit-interface, or -like your example shows- both:

ip route

ip route

ip route

The differences are explained in this document:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml

Dinesh Kumar Mariappan:

This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.

This is true as long as no more specific route for the destination exists.

Hope that helps

Rolf

Re: ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

There are situations, where the combination of exit-int and numerical next-hop is desired.

Let me give you an example.

Lets say you have an AS and use the IP address range 192.168.0.0/16.

Your default route points to 192.168.12.2

ip route 0.0.0.0 0.0.0.0 192.168.12.2

Now imagine that there's another route to the next-hop address 192.168.12.2, e.g. a discard route (just an example):

ip route 192.168.0.0 255.255.0.0 Null0

Do you know what happens when you disable the interface connecting 192.168.12.2 (say Fa0/0)?

interface FastEthernet0/0

      ip address 192.168.12.1 255.255.255.0

      shutdown

Because of the recursive nature of the this type of routes, there's still a valid route to 192.168.12.2:

R1#show ip route 192.168.12.2

Routing entry for 192.168.0.0/16, supernet

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

* directly connected, via Null0

R1#show ip route

S*   0.0.0.0/0 [1/0] via 192.168.12.2

S    192.168.0.0/16 is directly connected, Null0

So the link is down, however, the default-route is still there.

This behavior changes if you add the exit-interface:

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 192.168.12.2

ip route 192.168.0.0 255.255.0.0 Null0

R1#show ip route

S    192.168.0.0/16 is directly connected, Null0

Hope that helps

Rolf

6 REPLIES

ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.

Re: ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

Hi,

is there something in particular you want to know?

Static routes, in your case the default route, can be configured to point to a numerical next hop (IP address), an exit-interface, or -like your example shows- both:

ip route

ip route

ip route

The differences are explained in this document:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml

Dinesh Kumar Mariappan:

This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.

This is true as long as no more specific route for the destination exists.

Hope that helps

Rolf

New Member

ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

What is the advantage of this comment ..? is there any specific name is there for this commend other than defauls route or static route ????

as per your reply , it will forward the packets to the default gateway, then why we needs to mention the next hop ip as well exit interface ???

Re: ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

There are situations, where the combination of exit-int and numerical next-hop is desired.

Let me give you an example.

Lets say you have an AS and use the IP address range 192.168.0.0/16.

Your default route points to 192.168.12.2

ip route 0.0.0.0 0.0.0.0 192.168.12.2

Now imagine that there's another route to the next-hop address 192.168.12.2, e.g. a discard route (just an example):

ip route 192.168.0.0 255.255.0.0 Null0

Do you know what happens when you disable the interface connecting 192.168.12.2 (say Fa0/0)?

interface FastEthernet0/0

      ip address 192.168.12.1 255.255.255.0

      shutdown

Because of the recursive nature of the this type of routes, there's still a valid route to 192.168.12.2:

R1#show ip route 192.168.12.2

Routing entry for 192.168.0.0/16, supernet

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

* directly connected, via Null0

R1#show ip route

S*   0.0.0.0/0 [1/0] via 192.168.12.2

S    192.168.0.0/16 is directly connected, Null0

So the link is down, however, the default-route is still there.

This behavior changes if you add the exit-interface:

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 192.168.12.2

ip route 192.168.0.0 255.255.0.0 Null0

R1#show ip route

S    192.168.0.0/16 is directly connected, Null0

Hope that helps

Rolf

New Member

ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

Hi Rolf,

Thanks for your reply .. its make me clear ...

So its like TRACK feature ?? Am i right ?

ip route 0.0.0.0 0.0.0.0 x.x.x.x fa0/1

Your're welcome! Thanks for rating and marking as resolved.

So its like TRACK feature ?? Am i right ?

Well, tracking gives you much more options, but yes, I think you could say that.

The point is that packets are routed through a certain interface without having an undesirable growth of the ARP table.

Regards

Rolf

1775
Views
0
Helpful
6
Replies