[Xorp-hackers] Route with bad next-hop added with OSPF with redundant-link configuration.

Ben Greear greearb at candelatech.com
Tue Oct 23 22:54:04 PDT 2007


I think this problem may be triggered by the high latency, as another 
team tried to reproduce
this on two separate machines configured similarly and connected with 
fast ethernet, but it
worked for them.  Full logs with lots of debug enabled are available if 
you want them.  This
problem is 100% reproducible on my system, so I can also enable more 
debugging and
generate new logs if that helps.

I have two (virtual) routers, each with 3 interfaces.   Two pairs 
connect to each other, the other pair connects
to an external network (not running OSPF).  The interfaces are named as 
A.B.C

Router 1                                                                
                  Router 2
1.3.1 IP: 99.1.1.1/24  { high latency (1.5s RTT) network }   2.3.2 IP: 
99.1.1.2/24
1.2.1 IP: 10.1.2.1/24            { 15ms RTT }                            
1.2.2 IP: 10.1.2.2/24
eth1 IP: 10.1.1.1/24                -- not connected 
--                    eth2 IP: 10.2.2.2/24

The routing tables for router 2 use the 1.2.2 interface's IP as next 
hop, instead of 1.2.1 on the peer:

Router-1 table looks OK:
[root at lf1016-55 lanforge]# ip route show table 10001
99.1.1.0/24 dev 1.3.1  scope link
10.2.2.0/24 via 10.1.2.2 dev 1.2.1  proto xorp  metric 2 notify
10.1.1.0/24 dev eth1  scope link
10.1.2.0/24 dev 1.2.1  scope link
unreachable default  proto xorp  metric 1 notify
[root at lf1016-55 lanforge]#

Router-2 uses wrong next-hop for the xorp route:
[root at lf1016-55 lanforge]# ip route show table 10002
99.1.1.0/24 dev 2.3.2  scope link
10.2.2.0/24 dev eth2  scope link
10.1.1.0/24 via 10.1.2.2 dev 1.2.2  proto xorp  metric 2 notify
10.1.2.0/24 dev 1.2.2  scope link
unreachable default  proto xorp  metric 1 notify
[root at lf1016-55 lanforge]#


Config files at end of email.


Logs leading up to where I think the problem lies:

[ 6317 +5582 area_router.cc routing_router_lsaV2 ] Vertex OSPFv2 Router 
127.1.0.1(0x7f010001) 0.0.0.0(0)
Router-LSA:
LS age    1 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x1 Link 
State ID 127.1.0.1 Advertising Router 127.1.0.1 LS sequence number 
0x80000002 LS checksum 0x7cb1 length 60
        bit Nt false
        bit V false
        bit E false
        bit B false
        Type 2 Transit network IP address of Designated router 99.1.1.2 
Routers interface address 99.1.1.1 Metric 10
        Type 3 Stub network Subnet number 10.1.1.0 Mask 255.255.255.0 
Metric 1
        Type 2 Transit network IP address of Designated router 10.1.2.2 
Routers interface address 10.1.2.1 Metric 1
[ 6317 +5562 area_router.cc update_edge ] src OSPFv2 Router 
127.1.0.1(0x7f010001) 0.0.0.0(0) metric 10 dst OSPFv2 Network 
99.1.1.2(0x63010102) 0.0.0.0(0)
[ 6317 +5562 area_router.cc update_edge ] src OSPFv2 Network 
99.1.1.2(0x63010102) 0.0.0.0(0) metric 0 dst OSPFv2 Router 
127.1.0.1(0x7f010001) 0.0.0.0(0)
[ 6317 +5562 area_router.cc update_edge ] src OSPFv2 Router 
127.1.0.1(0x7f010001) 0.0.0.0(0) metric 1 dst OSPFv2 Network 
10.1.2.2(0xa010202) 0.0.0.0(0)
[ 6317 +5562 area_router.cc update_edge ] src OSPFv2 Network 
10.1.2.2(0xa010202) 0.0.0.0(0) metric 0 dst OSPFv2 Router 
127.1.0.1(0x7f010001) 0.0.0.0(0)
[ 6317   +51 routing_table.cc begin ] area 0.0.0.0
[ 6317  +675 routing_table.cc clear_area ] Clearing area 0.0.0.0
[ 6317   +72 routing_table.cc begin ] ire Area: 0.0.0.0 RouteEntry: 
Network Address 10.1.1.0 Area 0.0.0.0 intra area cost 11 nexthop 
99.1.1.1 advertising router 127.1.0.1 Network-LSA:
LS age    0 Options    0 DC: 0 EA: 0 N/P: 0 MC: 0 E: 0 LS type 0x2 Link 
State ID 10.1.1.0 Advertising Router 127.1.0.1 LS sequence number 
0x80000001 LS checksum 0 length 0
        Network Mask 0xffffff00  winner
[ 6317   +81 routing_table.cc begin ] empty ire  only this area was present
[ 6317   +72 routing_table.cc begin ] ire Area: 0.0.0.0 RouteEntry: 
Network direct Address 10.1.2.2 Area 0.0.0.0 intra area cost 1 nexthop 
10.1.2.2 advertising router 127.1.0.2 Network-LSA:
LS age    1 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x2 Link 
State ID 10.1.2.2 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0x665e length 32
        Network Mask 0xffffff00
        Attached Router 127.1.0.2
        Attached Router 127.1.0.1  winner
[ 6317   +81 routing_table.cc begin ] empty ire  only this area was present
[ 6317   +72 routing_table.cc begin ] ire Area: 0.0.0.0 RouteEntry: 
Network direct Address 10.2.2.0 Area 0.0.0.0 intra area cost 1 nexthop 
0.0.0.0 advertising router 127.1.0.2 Network-LSA:
LS age    0 Options    0 DC: 0 EA: 0 N/P: 0 MC: 0 E: 0 LS type 0x2 Link 
State ID 10.2.2.0 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0 length 0
        Network Mask 0xffffff00  winner
[ 6317   +81 routing_table.cc begin ] empty ire  only this area was present
[ 6317   +72 routing_table.cc begin ] ire Area: 0.0.0.0 RouteEntry: 
Network direct Address 99.1.1.2 Area 0.0.0.0 intra area cost 10 nexthop 
99.1.1.2 advertising router 127.1.0.2 Network-LSA:
LS age    0 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x2 Link 
State ID 99.1.1.2 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0xe784 length 32
        Network Mask 0xffffff00
        Attached Router 127.1.0.2
        Attached Router 127.1.0.1  winner
[ 6317   +81 routing_table.cc begin ] empty ire  only this area was present
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 10.2.2.255(0xa0202ff) 0.0.0.0(0)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 99.1.1.2(0x63010102) 99.1.1.2(0x2010163)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Router 127.1.0.1(0x7f010001) 99.1.1.1(0x1010163)
[ 6317  +751 ../libproto/spt.hh dijkstra ] Previous: OSPFv2(Origin) 
Router 127.1.0.2(0x7f010002) 0.0.0.0(0)
[ 6317  +755 ../libproto/spt.hh dijkstra ] Permanent: OSPFv2 Network 
10.2.2.255(0xa0202ff) 0.0.0.0(0) distance 1 next hop OSPFv2 Network 
10.2.2.255(0xa0202ff) 0.0.0.0(0)
[ 6317  +751 ../libproto/spt.hh dijkstra ] Previous: OSPFv2(Origin) 
Router 127.1.0.2(0x7f010002) 0.0.0.0(0)
[ 6317  +755 ../libproto/spt.hh dijkstra ] Permanent: OSPFv2 Network 
10.1.2.2(0xa010202) 10.1.2.2(0x202010a) distance 1 next hop OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Router 127.1.0.1(0x7f010001) 99.1.1.1(0x1010163)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: 
OSPFv2(Origin) Router 127.1.0.2(0x7f010002) 0.0.0.0(0)
[ 6317  +751 ../libproto/spt.hh dijkstra ] Previous: OSPFv2 Network 
10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +755 ../libproto/spt.hh dijkstra ] Permanent: OSPFv2 Router 
127.1.0.1(0x7f010001) 99.1.1.1(0x1010163) distance 1 next hop OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 10.1.1.255(0xa0101ff) 0.0.0.0(0)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Network 99.1.1.2(0x63010102) 99.1.1.2(0x2010163)
[ 6317  +751 ../libproto/spt.hh dijkstra ] Previous: OSPFv2 Router 
127.1.0.1(0x7f010001) 99.1.1.1(0x1010163)
[ 6317  +755 ../libproto/spt.hh dijkstra ] Permanent: OSPFv2 Network 
10.1.1.255(0xa0101ff) 0.0.0.0(0) distance 2 next hop OSPFv2 Network 
10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +751 ../libproto/spt.hh dijkstra ] Previous: OSPFv2(Origin) 
Router 127.1.0.2(0x7f010002) 0.0.0.0(0)
[ 6317  +755 ../libproto/spt.hh dijkstra ] Permanent: OSPFv2 Network 
99.1.1.2(0x63010102) 99.1.1.2(0x2010163) distance 10 next hop OSPFv2 
Network 99.1.1.2(0x63010102) 99.1.1.2(0x2010163)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: OSPFv2 
Router 127.1.0.1(0x7f010001) 99.1.1.1(0x1010163)
[ 6317  +907 ../libproto/spt.hh set_adjacent_weights ] Node: 
OSPFv2(Origin) Router 127.1.0.2(0x7f010002) 0.0.0.0(0)
[ 6317 +3919 area_router.cc routing_total_recomputeV2 ] Add route: Node: 
OSPFv2 Network 10.1.1.255(0xa0101ff) 0.0.0.0(0) -> Nexthop OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +231 routing_table.cc lookup_entry ] 10.1.1.0/24
[ 6317   +96 routing_table.cc add_entry ] area 0.0.0.0 10.1.1.0/24 
RouteEntry: Network Address 10.1.1.0 Area 0.0.0.0 intra area cost 2 
nexthop 10.1.2.2 advertising router 127.1.0.1 Network-LSA:
LS age    0 Options    0 DC: 0 EA: 0 N/P: 0 MC: 0 E: 0 LS type 0x2 Link 
State ID 10.1.1.0 Advertising Router 127.1.0.1 LS sequence number 
0x80000001 LS checksum 0 length 0
        Network Mask 0xffffff00  msg: void 
AreaRouter<A>::routing_total_recomputeV2() [with A = IPv4]
[ 6317 +3919 area_router.cc routing_total_recomputeV2 ] Add route: Node: 
OSPFv2 Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a) -> Nexthop OSPFv2 
Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 6317  +231 routing_table.cc lookup_entry ] 10.1.2.0/24
[ 6317   +96 routing_table.cc add_entry ] area 0.0.0.0 10.1.2.0/24 
RouteEntry: Network direct Address 10.1.2.2 Area 0.0.0.0 intra area cost 
1 nexthop 10.1.2.2 advertising router 127.1.0.2 Network-LSA:
LS age    1 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x2 Link 
State ID 10.1.2.2 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0x665e length 32
        Network Mask 0xffffff00
        Attached Router 127.1.0.2
        Attached Router 127.1.0.1  msg: void 
AreaRouter<A>::routing_total_recomputeV2() [with A = IPv4]
[ 6317 +3919 area_router.cc routing_total_recomputeV2 ] Add route: Node: 
OSPFv2 Network 10.2.2.255(0xa0202ff) 0.0.0.0(0) -> Nexthop OSPFv2 
Network 10.2.2.255(0xa0202ff) 0.0.0.0(0)
[ 6317  +231 routing_table.cc lookup_entry ] 10.2.2.0/24
[ 6317   +96 routing_table.cc add_entry ] area 0.0.0.0 10.2.2.0/24 
RouteEntry: Network direct Address 10.2.2.0 Area 0.0.0.0 intra area cost 
1 nexthop 0.0.0.0 advertising router 127.1.0.2 Network-LSA:
LS age    0 Options    0 DC: 0 EA: 0 N/P: 0 MC: 0 E: 0 LS type 0x2 Link 
State ID 10.2.2.0 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0 length 0
        Network Mask 0xffffff00  msg: void 
AreaRouter<A>::routing_total_recomputeV2() [with A = IPv4]
[ 6317 +3919 area_router.cc routing_total_recomputeV2 ] Add route: Node: 
OSPFv2 Network 99.1.1.2(0x63010102) 99.1.1.2(0x2010163) -> Nexthop 
OSPFv2 Network 99.1.1.2(0x63010102) 99.1.1.2(0x2010163)
[ 6317  +231 routing_table.cc lookup_entry ] 99.1.1.0/24
[ 6317   +96 routing_table.cc add_entry ] area 0.0.0.0 99.1.1.0/24 
RouteEntry: Network direct Address 99.1.1.2 Area 0.0.0.0 intra area cost 
10 nexthop 99.1.1.2 advertising router 127.1.0.2 Network-LSA:
LS age    0 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x2 Link 
State ID 99.1.1.2 Advertising Router 127.1.0.2 LS sequence number 
0x80000001 LS checksum 0xe784 length 32
        Network Mask 0xffffff00
        Attached Router 127.1.0.2
        Attached Router 127.1.0.1  msg: void 
AreaRouter<A>::routing_total_recomputeV2() [with A = IPv4]
[ 6317 +3919 area_router.cc routing_total_recomputeV2 ] Add route: Node: 
OSPFv2 Router 127.1.0.1(0x7f010001) 99.1.1.1(0x1010163) -> Nexthop 
OSPFv2 Network 10.1.2.2(0xa010202) 10.1.2.2(0x202010a)
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] Checking for virtual 
links V2, count(rid): 0 Router-LSA:
LS age    1 Options  0x2 DC: 0 EA: 0 N/P: 0 MC: 0 E: 1 LS type 0x1 Link 
State ID 127.1.0.1 Advertising Router 127.1.0.1 LS sequence number 
0x80000002 LS checksum 0x7cb1 length 60
        bit Nt false
        bit V false
        bit E false
        bit B false
        Type 2 Transit network IP address of Designated router 99.1.1.2 
Routers interface address 99.1.1.1 Metric 10
        Type 3 Stub network Subnet number 10.1.1.0 Mask 255.255.255.0 
Metric 1
        Type 2 Transit network IP address of Designated router 10.1.2.2 
Routers interface address 10.1.2.1 Metric 1
[ 6317  +276 routing_table.cc end ]
[ 6317  +442 routing_table.cc replace_route ] REPLACE ROUTE area 0.0.0.0 
10.1.1.0/24
[ 6317  +417 routing_table.cc delete_route ] DELETE ROUTE area 0.0.0.0 
10.1.1.0/24 filtered false
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] Delete route Net 10.1.1.0/24
[ 6317  +389 routing_table.cc add_route ] ADD ROUTE area 0.0.0.0 net 
10.1.1.0/24 nexthop 10.1.2.2 metric 2
[ 6317  +522 routing_table.cc do_filtering ] [OSPF] Running filter: 
Import on route: 10.1.1.0/24
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] [OSPF] Running filter: 
Import on route: 10.1.1.0/24
[ 6317  +540 routing_table.cc do_filtering ] [OSPF] Running filter: 
Export-SourceMatch on route: 10.1.1.0/24
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] [OSPF] Running filter: 
Export-SourceMatch on route: 10.1.1.0/24
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] Add route Net 10.1.1.0/24 
Nexthop 10.1.2.2 metric 2 equal false discard false policy
[ 2007/10/23 21:39:47 TRACE xorp_ospfv2 OSPF ] Interface 2.3.2 Vif 2.3.2 
dst 224.0.0.5 src 99.1.1.1 data 0x8394730 len 88


router-1 config:

/* For Virtual-Router: Router-1 */

interfaces {
    interface my_discard {
        unreachable: true
        vif my_discard {
        }
    }

    interface 1.3.1 {
        vif 1.3.1 {
            address 99.1.1.1 {
                prefix-length: 24
            }
        }
    }

    interface eth1 {
        vif eth1 {
            address 10.1.1.1 {
                prefix-length: 24
            }
        }
    }

    interface 1.2.1 {
        vif 1.2.1 {
            address 10.1.2.1 {
                prefix-length: 24
            }
        }
    }

}

fea {
    unicast-forwarding4 {
        disable: false
        table-id: 10001
    }
}

protocols {
    static {
        interface-route 0.0.0.0/0 {
            next-hop-interface: "my_discard"
            next-hop-vif: "my_discard"
        }
    }

    ospf4 {
        router-id: 127.1.0.1
        area 0.0.0.0 {
            interface 1.3.1 {
                vif 1.3.1 {
                    address 99.1.1.1 {
                       interface-cost: 10
                    }
                }
            }

            interface eth1 {
                vif eth1 {
                    address 10.1.1.1 {
                       interface-cost: 1
                    }
                }
            }

            interface 1.2.1 {
                vif 1.2.1 {
                    address 10.1.2.1 {
                       interface-cost: 1
                    }
                }
            }

        }
        traceoptions {
            flag all {
                disable: false
            }
        }
    }
}

 /* End of Config File */


router-2 config:

/* For Virtual-Router: Router-2 */

interfaces {
    interface my_discard {
        unreachable: true
        vif my_discard {
        }
    }

    interface 2.3.2 {
        vif 2.3.2 {
            address 99.1.1.2 {
                prefix-length: 24
            }
        }
    }

    interface eth2 {
        vif eth2 {
            address 10.2.2.2 {
                prefix-length: 24
            }
        }
    }

    interface 1.2.2 {
        vif 1.2.2 {
            address 10.1.2.2 {
                prefix-length: 24
            }
        }
    }

}

fea {
    unicast-forwarding4 {
        disable: false
        table-id: 10002
    }
}

protocols {
    static {
        interface-route 0.0.0.0/0 {
            next-hop-interface: "my_discard"
            next-hop-vif: "my_discard"
        }
    }

    ospf4 {
        router-id: 127.1.0.2
        area 0.0.0.0 {
            interface 2.3.2 {
                vif 2.3.2 {
                    address 99.1.1.2 {
                       interface-cost: 10
                    }
                }
            }

            interface eth2 {
                vif eth2 {
                    address 10.2.2.2 {
                       interface-cost: 1
                    }
                }
            }

            interface 1.2.2 {
                vif 1.2.2 {
                    address 10.1.2.2 {
                       interface-cost: 1
                    }
                }
            }

        }
        traceoptions {
            flag all {
                disable: false
            }
        }
    }
}

 /* End of Config File */


-- 
Ben Greear <greearb at candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com




More information about the Xorp-hackers mailing list