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

Adding static Route on Switch while supernet route is there

Hi Everyone,

In order to fix the some routing issue i  added the stati route of S1

S1#ip route 172.24.36.0 255.255.255.0 172.24.240.1  *************************

This is next hop i put here.

When I  check sh  route to  172.24.36.0 it still shows

S1#         sh ip route 172.24.36.0

Routing entry for 172.16.0.0/12, supernet

  Known via "static", distance 1, metric 0

  Routing Descriptor Blocks:

  * 172.20.110.3

      Route metric is 0, traffic share count is 1

So it is not taking the new static route is that because it has whole supernet 172.16.0.0?

Regards

Mahesh

2 ACCEPTED SOLUTIONS

Accepted Solutions
VIP Purple

Re: Adding static Route on Switch while supernet route is there

Hi Mahesh,

Pls post "show ip route 172.24.240.0" output & "show run interface x" where x is the interface configured with 172.24.240.y IP in this switch.

If 172.24.240.0 is not directly connected you cannot configure it as a next hop.

Rasika

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

So my question is if some next hop IP is used inside the VRF then can we able to use that next hop ip in the

global routing table?

By default the answer is no, remember, the route tables are separated.  You can create static router within the global or vrf and not vrf to global or global to vrf.  But, there is way that you can leak the global and vrf together.  For that refer to this document:

http://www.cisco.com/en/US/tech/tk436/tk832/technologies_configuration_example09186a0080231a3e.shtml

Thanks,

Reza

16 REPLIES
VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

Your static route is pointing to a completely different network. You are pointing it to 172.24.240.1 while the original one is 172.16.0.0

Can you explain/clarify?

Thanks,

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Reza,

Issue was that the destination Subnet which is 172.24.36.0 currently the switch is learning this route via

172.20.110.3.

So when on S1 i do sh ip route  172.24.36.0  it shows

S1#         sh ip route 172.24.36.0

Routing entry for 172.16.0.0/12, supernet

  Known via "static", distance 1, metric 0

  Routing Descriptor Blocks:

  * 172.20.110.3

      Route metric is 0, traffic share count is 1

So i want to reach the destination 172.24.36.0  it should go via 172.24.240.1

So i added the static route on s1

S1#ip route 172.24.36.0 255.255.255.0 172.24.240.1 

Now when i do sh ip route 172.24.36.0 it shows

S1#         sh ip route 172.24.36.0

Routing entry for 172.16.0.0/12, supernet

  Known via "static", distance 1, metric 0

  Routing Descriptor Blocks:

  * 172.20.110.3

      Route metric is 0, traffic share count is 1

Hope it make sense.

Regards

Mahesh

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

After you add the new static route did you delete the old one?

Is 172.24.240.1 a valid next hop?

here is example below:

I have a static router to 20.20.20.20 (lo0 interface) and the next hop is 172.16.100.2

ip route 20.20.20.20 255.255.255.255 192.168.100.2

sw1#sh ip route 20.20.20.20
Routing entry for 20.20.20.20/32
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 192.168.100.2
      Route metric is 0, traffic share count is 1

sw1#

I can ping 20.20.20.20

sw1#ping 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/5/17 ms
sw1#

No issue so far right?

now I add a second invalid static route without deleting the old one and as you can see the route table still shows the old one.

sw1#sh run | inc ip route
no ip route-cache cef
no ip route-cache
ip route 20.20.20.20 255.255.255.255 172.24.240.1
ip route 20.20.20.20 255.255.255.255 192.168.100.2
sw1#sh ip route 20.20.20.20
Routing entry for 20.20.20.20/32
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 192.168.100.2
      Route metric is 0, traffic share count is 1

sw1#

HTH

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Reza,

Yes 172.24.240.1 is valid route.

My problem is old route which is there

ip route 172.16.0.0 255.240.0.0 172.20.110.3

is used by s1 for some other routing .

So i can see my new route in the running config but not in routing table.

i was thinking if we add more precise route with longer subnet mask then routing table should use that e.g

172.16.0.0 255.240.0.0

172.24.36.0 255.255.255.0

As we can see here to reach destination 172.24.36.0 it should use 172.24.36.0 subnet as it has bigger subnet mask as

compare to 172.16.0.0  which has subnet mask of 12.

Regards

Mahesh

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

Can you please post sh run?

Thanks,

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Reza,

For  some reasons i can not put sh run output here.

But next hop IP 172.24.240.1 is used by VRF say x by the same switch.

So is this the reason if next Hop IP 172.24.240.1 is used by vrf on same switch then that next hop can not be used by

same switch?

Regards

MAhesh

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

That is correct.  If the route is being used inside a vrf, than you can't view it in the global routing table.  You need to use the vrf name. sh ip route vrf [vrf name]

example

sh ip route vrf test

HTH

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Reza,

This i know if route is used inside the VRF  then it can not be viewed in global routing table.

So static route which i am adding is not inside the VRF  it is for global routing table.

So my question is if some next hop IP is used inside the VRF  then can we able to use that next hop ip in the

global routing table?

Hope it make sense.

Regards

Mahesh

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

So my question is if some next hop IP is used inside the VRF then can we able to use that next hop ip in the

global routing table?

By default the answer is no, remember, the route tables are separated.  You can create static router within the global or vrf and not vrf to global or global to vrf.  But, there is way that you can leak the global and vrf together.  For that refer to this document:

http://www.cisco.com/en/US/tech/tk436/tk832/technologies_configuration_example09186a0080231a3e.shtml

Thanks,

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Reza,

so learned something new today.

For now we used some different IP as next hop which is not in any VRF  routing of switch.

For me it took some time to figure this out.

Now at least i know why route was no tin global routing table.

Everyday you learn something new.

Best regards

MAhesh

VIP Super Bronze

Adding static Route on Switch while supernet route is there

Hi Mahesh,

Absolutely true.  We all learn something new every day from each other.

That is beuty of this community.

Thanks,

Reza

New Member

Adding static Route on Switch while supernet route is there

Hi Mahesh ,

S1#ip route 172.24.36.0 255.255.255.0 172.24.240.1  *************************

Are you adding this static route on privileged mode or on global config. mode ??

Please post below show command :

show runn | i ip route

Majed

New Member

Adding static Route on Switch while supernet route is there

Hi Majed,

I am adding this in global config mode.

here is output of sh run | i ip route command

172.16.0.0 255.240.0.0 172.20.110.3

172.24.36.0 255.255.255.0  172.24.240.1

I can see my route in running config but not in routing table .

Routing table still shows to reach destination 172.24.36.0  use next hop as 172.20.110.3

Regards

Mahesh

VIP Purple

Re: Adding static Route on Switch while supernet route is there

Hi Mahesh,

Pls post "show ip route 172.24.240.0" output & "show run interface x" where x is the interface configured with 172.24.240.y IP in this switch.

If 172.24.240.0 is not directly connected you cannot configure it as a next hop.

Rasika

New Member

Adding static Route on Switch while supernet route is there

Many thanks Rasika issue is fixed now

New Member

Adding static Route on Switch while supernet route is there

Hi ,

Are you able to ping 172.24.240.1 ?? . Please post traceroute 172.24.240.1 ..

Majed

723
Views
0
Helpful
16
Replies
CreatePlease login to create content