cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1192
Views
0
Helpful
4
Replies

#show ip route !!!

mohammed.dawwas
Level 1
Level 1

Hi,

I don't understand why it shows 2 lines (C & L) for each network, and each one with different mask !

Router interface which connected to network is set to be 192.168.1.1/24 and the network is in the same range ! so why it shows 192.168.1.1/32  not /24 ?!

Router#show ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route



Gateway of last resort is not set



192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0

L 192.168.1.1/32 is directly connected, GigabitEthernet0/0

192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.2.0/24 is directly connected, GigabitEthernet0/1

L 192.168.2.1/32 is directly connected, GigabitEthernet0/1

Router#show int g0/0

GigabitEthernet0/0 is up, line protocol is up (connected)

Hardware is CN Gigabit Ethernet, address is 0002.1688.5843 (bia 0002.1688.5843)

Internet address is 192.168.1.1/24
4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

I don't understand why it shows 2 lines (C & L) for each network, and each one with different mask !

Starting with 15.0 IOSes, each directly connected network results in two entries in the routing table as you have observed yourself.

The 'C' entry describes the entire directly connected network, and simply contains its IP network address and netmask taken from the interface where the network is connected.

The 'L' entry describes the particular router's own IP address in that network, and always uses a netmask of /32. These 'L' entries were always shown in IPv6 routing tables and have been apparently backported into IPv4 routing tables as well.

The 'L' entries makes sure that packets directed to the router's own IP address never get routed anywhere else, which is kind of obvious, given its contents. I also heard a more plausible explanation, unfortunately, I do not remember the details: Someone told me that without these 'L' entries, a possible race condition was created in the way the CEF contents were constructed, possibly creating an entry for the router's own IP address pointing to another neighbor and causing the router to forward packets for itself toward another neighbor.

For every recent IOS, the behavior of creating a 'C' entry for the true directly connected IP network and netmask, and an 'L' entry for the router's own IP address with a /32 netmask is normal.

Best regards,
Peter

How are your routing statements set?

From my understanding it's just letting you know that the connected network is the /24, but the host (/32) is on that interface listed.

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

I have just found this article - it is relevant to your question. Perhaps my comment regarding the race condition was not correct so please don't take my word on it for granted yet.

http://www.cisco.com/c/en/us/support/docs/ip/ip-routing/116264-technote-ios-00.html

Best regards,
Peter

mohammed.dawwas
Level 1
Level 1

Hi Peter,

Thanks a lot for your comments below.

As you mentioned below and in the article, it is the behavior of the router.

 

Best Regards.

Review Cisco Networking for a $25 gift card