3

I am new to networking, and currently studying about how router learn different routes. One of my lecture slides shows the following,

First of all, please have a look at this network,

enter image description here

I know that link local is created in the routing table when interface is configured, and connected is created when an interface is active.

Now, I tried the same scenario in Packet Tracer and here is what I got when i type show ip route command,

Router#show ip route 
Codes: C - connected, S - static, I - IGRP, 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

C    192.168.10.0/24 is directly connected, FastEthernet0/0

My question is,

  • If the interface is active why there is still two entries (C and L) in routing table (in the photo), and just single C entry in my network ?
  • How come the diagram shows the ip address for link local with subnet mask of 32 because when I tried assigning ip address with /32 subnet mask to this interfacce, I got bad mask error ?

2 Answers 2

2

Assigning a /32 to an interface that connects to something else doesn't make any sense. You can assign the /32 to a loopback interface:

interface Loopback0
 ip address 192.168.1.1 255.255.255.255

If you want to assign the 192.168.10.1 address to the GigabitEthernet0/0 interface which uses 192.168.10.0/24:

interface GigabitEthernet0/0
 ip address 192.168.10.1 255.255.255.0

This results in the network 192.168.10.0/24 entry in the routing table as a connected route (C). I suppose it depends on the IOS version, but you can also get a local (not link local which is something else, entirely) route to the specific (/32) address assigned to an interface in your router. My IOS does this. The version you have doesn't show the L in the codes, whereas mine does as the first entry:

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
       i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

`

3

May can answer your question.

If the interface is active why there is still two entries (C and L) in routing table (in the photo), and just single C entry in my network ?

Prior to IOS release 15, local routing did not appear in routing tables

How come the diagram shows the ip address for link local with subnet mask of 32 because when I tried assigning ip address with /32 subnet mask to this interfacce, I got bad mask error ?

I think you can not assign directly /32 to cisco router interface.

2
  • You can certainly assign /32 addresses to loopback interfaces in a Cisco device. This is a very common practice.
    – Ron Maupin
    Sep 18, 2015 at 12:31
  • thank you for your correction, never done it though in cisco loopback. but often does it on linux machine :).
    – dchochan
    Sep 19, 2015 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.