How to Ping Loopback Without Interface IP Address

ciscointerfaceip addressloopbackrouter

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

Best Answer

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