1

I have a Router1 with a loopback 0 connected to the Router2:

the interface brief is bellow:

Router1>show ip interface brief 
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0/0   10.0.12.1       YES manual up                    up 
GigabitEthernet0/0/1   unassigned      YES unset  administratively down down 
Loopback0              1.1.1.1         YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

the ip route is bellow:

Router1#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

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1/32 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.0.12.0/24 is directly connected, GigabitEthernet0/0/0
L       10.0.12.1/32 is directly connected, GigabitEthernet0/0/0

I have a question, what's the logic relationship of Router1 and its loopback0?

if we regard the loopback0 as its a logic router interface, the route 1.1.1.1/32 should be L, because the Gig0/0/0's ip is L.

if we regard the loopback0 as a independent Server(because its relationship is connected), it should have something to connect the loopback0, right?

5

Loopback interfaces are virtual interfaces that are considered directly connected interfaces. Your Loopback0 interface is defined with a /32 network, which, by definition, is a local route. How you are seeing it when you show the routes is how the /32 is reported. If you had addressed it with a longer mask, you would also get a Local route (the /32 address).

Your GigabitEthernet0/0/0 interface is a physical interface directly connected to the 10.0.12.0/24 network, and its Local address on that network is 10.0.12.1.

I tested this.

First, with a /32 network on the loopback:

Router1(config)#int lo12345
Router1(config-if)#ip address 10.11.12.13 255.255.255.255
Router1(config-if)#do sh ip int br                       
Interface                  IP-Address      OK? Method Status                Protocol
  ...
Loopback12345              10.11.12.13     YES manual up                    up      
  ...
DFW-Router1(config-if)#do sh 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
       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, p - overrides from PfR

Gateway of last resort is x.x.x.x to network 0.0.0.0

  ...
      10.0.0.0/32 is subnetted, 1 subnets
C        10.11.12.13 is directly connected, Loopback12345
  ...

Next, with a /24 network on the loopback:

Router1(config-if)#ip address 10.11.12.13 255.255.255.0
Router1(config-if)#do sh ip int br
  ...
Loopback12345              10.11.12.13     YES manual up                    up      
  ...
Router1(config-if)#do sh 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
       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, p - overrides from PfR

Gateway of last resort is x.x.x.x to network 0.0.0.0

  ...
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.11.12.0/24 is directly connected, Loopback12345
L        10.11.12.13/32 is directly connected, Loopback12345
  ...

It seems that if the interface address is the network address, you do not get a sparate Local address in the routing table for that network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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