Hi,

I've made some tests on ldpd and found some problems/strange things with the
following configuration:

2 hosts (v 5.0)
 - core3 (loopback 10.0.0.7)
 - core1 (loopback 10.0.0.9)

2 links between these 2 hosts:
 - vlan211 (on em9)
     core3 IP: 10.0.0.125
     core1 IP: 10.0.0.126
 - vlan212 (on em5)
     core3 IP: 10.0.0.121
     core1 IP: 10.0.0.122

I've keeped only interesting part in command results (there some other ospf
neighbors and interfaces). Sorry for this long post, I wanted to reproduce a
problem I've got one time but failed to get it again (see a the end of this
email). 

ospf is running on both hosts:
core3:
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:34 10.0.0.122  vlan212   00:24:38
10.0.0.9    1   FULL/DR      00:00:34 10.0.0.126  vlan211   00:23:27

core1:
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:31 10.0.0.121  vlan212   00:24:50
10.0.0.7    1   FULL/BCKUP   00:00:31 10.0.0.125  vlan211   00:23:40

ldpd.conf on core3:
<<
router-id 10.0.0.7

distribution independent
retention liberal
advertisement unsolicited

interface vlan212
interface vlan211
>>
same on core1 except that router-id is 10.0.0.9

--------------------------------
I start ldpd on 2 hosts:

core3 logs:
Sep  8 14:04:59 core3 ldpd[5529]: startup
Sep  8 14:05:00 core3 ldpd[5529]: mpath route not found
Sep  8 14:05:05 core3 ldpd[30289]: Connection attempt from unknown neighbor
10.0.0.126: NO HELLO

core1 logs:
Sep  8 14:04:54 core1 ldpd[8601]: startup
Sep  8 14:04:55 core1 ldpd[17310]: received notification from neighbor
10.0.0.7: Session Rejected, No Hello

ldpd seems confused by notification received from same host on different
links.


root@core3:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.9    OPERATIONAL/ACTIVE 10.0.0.126  vlan211   00:00:09

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    OPERATIONAL/ACTIVE 10.0.0.125  vlan211   00:00:13


===> First problem: only routes from one interface are tagged:

root@core1:etc$ ldpctl sh l
Destination          Nexthop           Local Label    Remote Label   In Use
....
10.200.0.176/29     10.0.0.121    56             33             yes
10.200.0.176/29     10.0.0.125    56             Untagged       yes
10.100.0.0/24       10.0.0.121    62             39             yes
10.100.0.0/24       10.0.0.125    62             Untagged       yes

Tagged interface correspond to interface in fib:

root@core1:etc$ route -n get 10.100.0.1
   route to: 10.100.0.1
destination: 10.100.0.0
       mask: 255.255.255.0
    gateway: 10.0.0.121
  interface: vlan212
 if address: 10.0.0.122
 mpls label: PUSH 39
   priority: 32 (ospf)
      flags: <UP,GATEWAY,DONE,MPATH,MPLS>
     use       mtu    expire
      72         0         0

--------------------------------
Now I shutdown vlan211 on core1 with "ifconfig vlan211 down"

No logs on core3

on core1:
Sep  8 14:15:03 core1 ldpd[17310]: interface vlan211 down
Sep  8 14:15:03 core1 ospfd[23127]: send_packet: error sending packet on
interface vlan211: Network is down
Sep  8 14:15:03 core1 ospfd[23127]: interface vlan211 down
Sep  8 14:15:07 core1 ldpd[17310]: send_packet: error sending packet on
interface vlan211: Network is down


root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:36 10.0.0.122  vlan212   00:37:17
10.0.0.9    1   DOWN/OTHER   00:00:54 10.0.0.126  vlan211   -


root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:33 10.0.0.121  vlan212   00:37:08
10.0.0.7    1   DOWN/DOWN    00:01:18 10.0.0.125  vlan211   -

root@core3:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.9    OPERATIONAL/ACTIVE 10.0.0.126  vlan211   00:11:40

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    OPERATIONAL/DOWN   10.0.0.125  vlan211   00:11:35


--------------------------------
Next I restore vlan211 with "ifconfig vlan211 up"

no logs on core3

on core1:
Sep  8 14:17:45 core1 ldpd[17310]: interface vlan211 up
Sep  8 14:17:45 core1 ospfd[23127]: interface vlan211 up

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:37 10.0.0.122  vlan212   00:39:06
10.0.0.9    1   FULL/DR      00:00:37 10.0.0.126  vlan211   00:00:23

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:34 10.0.0.121  vlan212   00:39:28
10.0.0.7    1   FULL/BCKUP   00:00:34 10.0.0.125  vlan211   00:00:45

--------------------------------
and shut down vlan212 on core1 with "ifconfig vlan212 down"


Sep  8 14:19:09 core1 ospfd[23127]: interface vlan212 down
Sep  8 14:19:09 core1 ldpd[17310]: interface vlan212 down
Sep  8 14:19:12 core1 ldpd[17310]: send_packet: error sending packet on
interface vlan212: Network is down

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   DOWN/OTHER   00:00:01 10.0.0.122  vlan212   -
10.0.0.9    1   FULL/DR      00:00:39 10.0.0.126  vlan211   00:01:51

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   DOWN/DOWN    00:00:58 10.0.0.121  vlan212   -
10.0.0.7    1   FULL/BCKUP   00:00:39 10.0.0.125  vlan211   00:02:11


root@core3:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.9    OPERATIONAL/ACTIVE 10.0.0.126  vlan211   00:16:02

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    OPERATIONAL/ACTIVE 10.0.0.125  vlan211   00:15:53

--------------------------------
next restore vlan212 with "ifconfig vlan212 up"


Sep  8 14:21:59 core1 ospfd[23127]: interface vlan212 up
Sep  8 14:21:59 core1 ldpd[17310]: interface vlan212 up

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:38 10.0.0.122  vlan212   00:00:31
10.0.0.9    1   FULL/DR      00:00:38 10.0.0.126  vlan211   00:04:42

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:36 10.0.0.121  vlan212   00:00:23
10.0.0.7    1   FULL/BCKUP   00:00:36 10.0.0.125  vlan211   00:04:33


--------------------------------
now shutdown vlan211 on core1 with "ifconfig vlan211 down"


Sep  8 14:23:08 core1 ospfd[23127]: send_packet: error sending packet on
interface vlan211: Network is down
Sep  8 14:23:08 core1 ospfd[23127]: interface vlan211 down
Sep  8 14:23:12 core1 ldpd[17310]: send_packet: error sending packet on
interface vlan211: Network is down

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:37 10.0.0.122  vlan212   00:02:02
10.0.0.9    1   DOWN/OTHER   00:00:23 10.0.0.126  vlan211   -

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:30 10.0.0.121  vlan212   00:01:49
10.0.0.7    1   DOWN/DOWN    00:00:47 10.0.0.125  vlan211   -

--------------------------------
and kill ldpd on core1


Sep  8 14:24:36 core1 ldpd[17310]: if_leave_group: error IP_DROP_MEMBERSHIP,
interface vlan211 address 224.0.0.2: Can't assign requested address
Sep  8 14:24:36 core1 ldpd[30241]: label decision engine exiting
Sep  8 14:24:36 core1 ldpd[17310]: if_act_reset: error leaving group
224.0.0.2, interface vlan211
Sep  8 14:24:36 core1 ldpd[17310]: ldp engine exiting
Sep  8 14:24:36 core1 ospfd[7111]: mpath route not found
Sep  8 14:24:36 core1 ospfd[7111]: alien OSPF route 10.0.0.120/30
Sep  8 14:24:37 core1 ldpd[8601]: kernel routing table decoupled
Sep  8 14:24:37 core1 ldpd[8601]: terminating


--------------------------------
now restart ldpd on core1

core3 logs:
Sep  8 14:25:33 core3 ldpd[30289]: Connection attempt from unknown neighbor
10.0.0.122: NO HELLO
Sep  8 14:25:48 core3 ldpd[5529]: send_rtmsg: action 3, AF 2, prefix
10.0.0.124/30: No such process

core1 logs:
Sep  8 14:25:18 core1 ldpd[30027]: startup
Sep  8 14:25:23 core1 ldpd[11155]: received notification from neighbor
10.0.0.7: Session Rejected, No Hello

root@core3:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.9    OPERATIONAL/ACTIVE 10.0.0.122  vlan212   00:00:41

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    OPERATIONAL/ACTIVE 10.0.0.121  vlan212   00:00:54

--------------------------------
next do a "ifconfig vlan211 up" on core1:

core3 logs: nothing 

core1 logs
Sep  8 14:27:30 core1 ldpd[11155]: interface vlan211 up
Sep  8 14:27:30 core1 ospfd[23127]: interface vlan211 up

--------------------------------
And now "ifconfig em5 down" on core1 (em5 is vlan212 parent interface)

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   DOWN/OTHER   00:00:24 10.0.0.122  vlan212   -
10.0.0.9    1   FULL/DR      00:00:36 10.0.0.126  vlan211   00:01:44

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   DOWN/OTHER   00:00:37 10.0.0.121  vlan212   -
10.0.0.7    1   FULL/BCKUP   00:00:34 10.0.0.125  vlan211   00:01:55


root@core3:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.11   OPERATIONAL/ACTIVE 10.0.0.49   vlan208   00:23:59
10.0.0.12   OPERATIONAL/ACTIVE 10.0.0.106  vlan216   00:24:12

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime

===> lpdctl say there's no more neighbor but ldpd table still have
taggued routes:

core1: ldpctl sh l
Destination          Nexthop           Local Label    Remote Label   In Use
...
10.200.0.176/29     10.0.0.125    57             33             yes
10.100.0.0/24       10.0.0.125    63             39             yes

root@core1:etc$ route -n get 10.100.0.1
   route to: 10.100.0.1
destination: 10.100.0.0
       mask: 255.255.255.0
    gateway: 10.0.0.125
  interface: vlan211
 if address: 10.0.0.126
 mpls label: PUSH 39
   priority: 32 (ospf)
      flags: <UP,GATEWAY,DONE,MPLS>
     use       mtu    expire
       0         0         0
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA,SRC>

I've verified: packets from core 1 to 10.100.0.1 are well pushed on vlan211
with mpls label 39.

--------------------------------
Next "ifconfig em5 up" on core1

core3 logs:
Sep  8 14:36:57 core3 ldpd[30289]: Connection attempt from unknown neighbor
10.0.0.122: NO HELLO
Sep  8 14:37:13 core3 ospfd[15426]: mpath route not found
Sep  8 14:37:13 core3 ospfd[15426]: alien OSPF route 10.0.0.124/30

core1 logs:
Sep  8 14:36:48 core1 ldpd[11155]: received notification from neighbor
10.0.0.7: Session Rejected, No Hello

root@core3:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.9    1   FULL/DR      00:00:38 10.0.0.122  vlan212   00:01:21
10.0.0.9    1   FULL/DR      00:00:37 10.0.0.126  vlan211   00:10:34

root@core1:etc$ ospfctl sh nei
ID              Pri State        DeadTime Address         Iface     Uptime
10.0.0.7    1   FULL/BCKUP   00:00:36 10.0.0.121  vlan212   00:01:34
10.0.0.7    1   FULL/BCKUP   00:00:34 10.0.0.125  vlan211   00:10:46


root@core3:etc$ ldpctl show nei
ID              State              Address         Iface     Uptime
10.0.0.9    OPERATIONAL/ACTIVE 10.0.0.122  vlan212   00:00:49

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    OPERATIONAL/ACTIVE 10.0.0.121  vlan212   00:00:39

root@core1:etc$ ldpctl sh 
Destination          Nexthop           Local Label    Remote Label   In Use
...
10.200.0.176/29     10.0.0.125    57             33             yes
10.200.0.176/29     10.0.0.121    57             33             yes
10.100.0.0/24       10.0.0.125    63             39             yes
10.100.0.0/24       10.0.0.121    63             39             yes

==> now both interfaces are tagged !


The problem I've try to reproduce was:
ldpd on core3 is using vlan212 to contact ldpd on core1 but core1 is doing
the same thing on the other vlan (vlan211). So ldp sessions can't be
establisehed. In the case ldpdctl sh nei diplayed something like:

root@core3:etc$ ldpctl show nei
ID              State              Address         Iface     Uptime
10.0.0.9    --Can't remember--     10.0.0.126      vlan212   -

root@core1:etc$ ldpctl sh nei
ID              State              Address         Iface     Uptime
10.0.0.7    --Can't remember--     10.0.0.121      vlan211   -

with each host logs saying Connection attempt from unknown neighbor
... NO HELLO

Manuel 

Reply via email to