2

I have two routers attached directly and both of them has loopback address. The interface has no IP address, I have just connected R1 g0/0 to R5 g0/0. If I put IP address on the g0/0 interface of both routers then I can ping between loopback addresses but if I remove the IP addresses from the g0/0 then I cannot ping. Does loopback need interface with IP address to ping one another? image

sh ip route of R1

    Gateway of last resort is not set

         10.0.0.0/32 is subnetted, 1 subnets
 C       10.1.1.1/32 is directly connected, Loopback1

sh ip route of R5

      Gateway of last resort is not set

         10.0.0.0/32 is subnetted, 1 subnets
 C       10.1.1.5/32 is directly connected, Loopback5

sh run

       version 15.1
       no service timestamps log datetime msec
       no service timestamps debug datetime msec
       no service password-encryption
       !
       hostname R5
       !
       ip cef
       no ipv6 cef
       !
       license udi pid CISCO2911/K9 sn FTX15246RHB
       !
       spanning-tree mode pvst
       !
       interface Loopback5
        ip address 10.1.1.5 255.255.255.255
       !
       interface GigabitEthernet0/0
        no ip address
        duplex auto
        speed auto
       !
       interface GigabitEthernet0/1
        no ip address
        duplex auto
        speed auto
        shutdown
       !
       interface GigabitEthernet0/2
        no ip address
        duplex auto
        speed auto
        shutdown
       !
       interface Vlan1
        no ip address
        shutdown
       !
       ip classless
       ip route 10.1.1.1 255.255.255.255 GigabitEthernet0/0 
       !
       ip flow-export version 9
       !
       line con 0
       !
       line aux 0
       !
       line vty 0 4
        login
       !
       end
3
  • it all depends on how you route the loopback IP addresses. You need to post at a minimum the routing table of both routers, and preferably the whole (sanitized) configuration.
    – JFL
    Mar 16, 2018 at 10:01
  • @JFL Hi thanks for quick reply, i have added the configuration details
    – shakAttack
    Mar 16, 2018 at 10:17
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Apr 1, 2018 at 23:02

2 Answers 2

3

On a point-to-point link, you don't always need an IP address on the router's interface but you must inform the router of this fact, using the ip unnumbered command

Setting

interface GigabitEthernet0/0
   ip unnumbered loopback 5

will borrow the loopback 5 IP address to use it on the GigabitEthernet0/0 interface as a next hop for the neighbor router. Doing so on both router will allow you to ping each other loopback address (and run a routing protocol).

More information on this Cisco page

1
interface GigabitEthernet0/0
 no ip address

means that the interface will not be considered for any IP protocol activity (i.e. sending and receiving IP packets)

2
  • 1
    I always thought loopback does not need the interface with IP address as long as devices are connected.
    – shakAttack
    Mar 16, 2018 at 10:43
  • That should read "...as long as the devices are connected to each other over IP-enabled interfaces". And an interface with "no ip address" is not considered an IP-enabled interface.
    – mere3ortal
    Mar 16, 2018 at 10:56

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.