2

So I have a weird issue. If I configure a /30 ip on an ethernet interface, for example 10.10.10.1/30 on Router1 and 10.10.10.2/30 on an ethernet interface on Router2, I can ping each other fine...no issues with OSPF (adjacency is formed, etc)

However, if I remove those configs and assign each ip to the loopback0 interface on each router, I'm unable to ping them and no adjacency is formed.

I have OSPF configured and the interfaces are added to area 0. I'm not sure why this is happening. If you need any configs/output from me, please let me know.

Router 1 - with private ip configured on ethernet interface as ptp link comes up fine.
---------
#sho ip ospf neighbor

Port          Address         Pri State      Neigh Address   Neigh ID        Ev
8/21-8/22     10.10.10.1      1   FULL/OTHER 10.10.10.2      10.10.10.2    5

ethernet 8/21-8/22,OSPF enabled
     IP Address 10.10.10.1, Area 0
     OSPF state ptr2ptr, Pri 1, Cost 1, Options 2, Type pt-2-pt Events 3

Router 2
---------
#sh ip ospf neighbor

Port        Address         Pri State      Neigh Address   Neigh ID        Ev
5/1-5/2     10.10.10.2      1   FULL/OTHER 10.10.10.1      10.10.10.1    14

If I switch to the loopbacks with the publicly routable ip, here is the output:

Router 1
--------
No ospf neighbor formation

lb2,OSPF enabled
     IP Address 111.111.111.1, Area 0
     OSPF state DR, Pri 1, Cost 0, Options 2, Type broadcast Events 5
     Timers(sec): Transit 1, Retrans 5, Hello 10, Dead 40
     DR:  Router ID 111.111.111.1      Interface Address 111.111.111.1
     BDR: Router ID 0.0.0.0           Interface Address 0.0.0.0
     Neighbor Count = 0, Adjacent Neighbor Count= 0

#sh ip route 111.111.111.0
Total number of IP routes: 262007, avail: 137 (out of max 262144)
        Destination     NetMask         Gateway         Port       Cost   Type
        111.111.111.0    255.255.255.252 0.0.0.0         lb2        1      D

Router 2
--------
No ospf neighbor formation

lb1,OSPF enabled
     IP Address 111.111.111.2, Area 0
     OSPF state DR, Pri 1, Cost 0, Options 2, Type broadcast Events 11
     Timers(sec): Transit 1, Retrans 5, Hello 10, Dead 40
     DR:  Router ID 111.111.111.2      Interface Address 111.111.111.2
     BDR: Router ID 0.0.0.0           Interface Address 0.0.0.0
     Neighbor Count = 0, Adjacent Neighbor Count= 0

#sh ip route 111.111.111.0
Total number of IP routes: 262119, avail: 21 (out of max 262144)
        Destination     NetMask         Gateway         Port       Cost   Type
        111.111.111.0    255.255.255.252 0.0.0.0         lb1        1      D
3
  • 1
    What are the addresses you're using on the ethernet interfaces after swapping addresses? This question is still confusing. What platform are you running ospf on? Why do you only have ospf enabled on the loobacks after the addressing swap? Jul 25 '13 at 16:48
  • I'm working on foundry sx's. ospf is enabled on the other interfaces as well, not only on the loopbacks. i only pasted the int output for the loopbacks because that's what I thought you wanted. Jul 25 '13 at 16:50
  • 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
    Aug 8 '17 at 14:17
7

Router1 and Router2 have a connected route when you configure the interfaces.

When you configure the loopback that connected route isn't related to the ethernet interface for L3 to pass over.

3
  • thanks for the explanation. in my case, i'm using publicly routable ip's so on the ethernet interfaces when they are bound, I can access the ip's over the internet. Shouldn't the ip's when bound to the loopbacks also come up fine? Jul 25 '13 at 14:48
  • 2
    The other thing is, if you configuring the loopbacks with one prefix from the same /30 you now have a discontinuous network. Your routing table will include a route to the /30 network but the route is going to be a directly connected route to the local loopback interface rather than the ethernet interface. Jul 25 '13 at 15:26
  • This almost looks like an anycast config :)
    – netdad
    Jul 29 '13 at 21:34
0

When you assign the IP to the ethernet interface as a /30, The router sends out an ARP query for the MAC address of the neighbouring IP since it's on-link and thus requires a known MAC address in order to actually send packets.

If you move the IP to loopback, obviously that is an internal, virtual interface that is not neighbouring anything and thus, nothing happens.

You could get around this by creating a manual ARP entry and route for the neighbour IP, but there really isn't a sensible reason to do this.

Also, consider using a /31 rather than a /30 - make sure that both devices are happy with it (most are) and you'll have saved yourself a couple of addresses.

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.