Discussion:
[quagga-dev 3800] problem to link two ospf neighbors (wrong src-ip for hello packets)
Jan Wagner
2005-11-06 14:16:22 UTC
Permalink
Hi there!

I have the problem to get a link between 2 OSPF neighbors, maybe there is any
idea:

router1:

playground# sh ip ospf interface
eth0 is up
Internet Address 192.168.20.2/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.2, Interface Address 192.168.20.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:09
Neighbor Count is 0, Adjacent neighbor count is 0
eth1 is up
Internet Address 10.35.42.21/24, Broadcast 10.255.255.255, Area 0.0.0.0
Router ID 192.168.20.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State Backup, Priority 1
Designated Router (ID) 10.35.42.23, Interface Address 10.35.42.23
Backup Designated Router (ID) 192.168.20.2, Interface Address 10.35.42.21
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 1

playground# sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
RXmtL RqstL DBsmL
10.35.42.23 1 Full/DR 00:00:31 10.35.42.23
eth1:10.35.42.21 0 0 0

playground# sh ip ospf interface eth0
eth0 is up
Internet Address 192.168.20.2/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.2, Interface Address 192.168.20.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Neighbor Count is 0, Adjacent neighbor count is 0

-----------------------
router 2:

gremlin# sh ip ospf interface
eth0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
OSPF not enabled on this interface
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.1, Interface Address 192.168.20.1
No backup designated router on this network
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 0

gremlin# sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
RXmtL RqstL DBsmL
192.168.20.2 1 Init/DROther 00:00:34 192.168.20.2
eth1:192.168.20.1 0 0 0

gremlin# sh ip ospf interface eth1
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.1, Interface Address 192.168.20.1
No backup designated router on this network
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 1, Adjacent neighbor count is 0

--------
on router1:

playground:~# tethereal -i eth0
Capturing on eth0
0.000000 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
7.762431 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet <= wrong src-ip
10.000268 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
17.762010 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet
20.000754 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
27.761618 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet

playground:~# tail -f /var/log/quagga/ospfd.log
2005/11/06 13:52:59 OSPF: Packet from [10.42.1.65] received on link eth0 but
no ospf_interface <= wrong src-ip (192.168.20.1 expected i think)
2005/11/06 13:53:09 OSPF: Packet from [10.42.1.65] received on link eth0 but
no ospf_interface
2005/11/06 13:53:19 OSPF: Packet from [10.42.1.65] received on link eth0 but
no ospf_interface
2005/11/06 13:53:29 OSPF: Packet from [10.42.1.65] received on link eth0 but
no ospf_interface

playground:~# cat /etc/quagga/ospfd.conf
[...]
interface eth0
!
interface eth1
[...]
!
router ospf
ospf router-id 192.168.20.2
compatible rfc1583
redistribute kernel route-map static
redistribute connected route-map static
redistribute static route-map static
passive-interface eth0
network 10.35.42.0/24 area 0.0.0.0
network 192.168.20.0/24 area 0.0.0.0
!
access-list static permit 10.42.0.0/16
access-list static permit 10.35.8.0/24
access-list static deny any

playground:~# cat /etc/debian_version
3.1
playground:~# uname -a
Linux playground 2.6.8-1-386 #1 Thu Nov 11 12:18:43 EST 2004 i686 GNU/Linux
playground:~# /usr/lib/quagga/ospfd -v
ospfd version 0.98.3
Copyright 1996-2005 Kunihiro Ishiguro, et al.

-------
on router2:

gremlin:~# tail -f /var/log/quagga/ospfd.log
2005/11/06 04:50:57 OSPF: OSPFd 0.99.1 starting: ***@2604
2005/11/06 04:50:57 OSPF: interface 192.168.20.1 join AllSPFRouters Multicast
group.
2005/11/06 04:51:37 OSPF: DR-Election[1st]: Backup 192.168.20.1
2005/11/06 04:51:37 OSPF: DR-Election[1st]: DR 192.168.20.1
2005/11/06 04:51:37 OSPF: DR-Election[2nd]: Backup 0.0.0.0
2005/11/06 04:51:37 OSPF: DR-Election[2nd]: DR 192.168.20.1
2005/11/06 04:51:37 OSPF: interface 192.168.20.1 join AllDRouters Multicast
group.
2005/11/06 04:56:17 OSPF: DR-Election[1st]: Backup 10.42.1.65
2005/11/06 04:56:17 OSPF: DR-Election[1st]: DR 10.42.1.65
2005/11/06 04:56:17 OSPF: DR-Election[2nd]: Backup 0.0.0.0
2005/11/06 04:56:17 OSPF: DR-Election[2nd]: DR 10.42.1.65

gremlin:~# cat /etc/quagga/ospfd.conf
[...]
interface eth0
!
interface eth1
!
interface eth2
[...]
!
router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 10.42.1.65/16 area 0.0.0.0
network 192.168.20.0/24 area 0.0.0.0

gremlin:~# cat /etc/debian_version
testing/unstable
gremlin:~# uname -a
Linux gremlin 2.6.12-1-686 #1 Tue Sep 27 12:52:50 JST 2005 i686 GNU/Linux
gremlin:~# /usr/lib/quagga/ospfd -v
ospfd version 0.99.1
Copyright 1996-2005 Kunihiro Ishiguro, et al.


Thanks for your help in advance. With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Andrew J. Schorr
2005-11-06 15:41:41 UTC
Permalink
Post by Jan Wagner
playground:~# tethereal -i eth0
Capturing on eth0
0.000000 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
7.762431 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet <= wrong src-ip
What's the output from "/sbin/ip addr ls"? And from zebra
"show interface"?

Regards,
Andy
Jan Wagner
2005-11-06 15:54:41 UTC
Permalink
Post by Andrew J. Schorr
Post by Jan Wagner
playground:~# tethereal -i eth0
Capturing on eth0
0.000000 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
7.762431 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet <= wrong src-ip
What's the output from "/sbin/ip addr ls"? And from zebra
"show interface"?
gremlin:~# /sbin/ip addr ls
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0d:87:5f:3f:d3 brd ff:ff:ff:ff:ff:ff
inet 10.42.1.65/16 brd 10.42.255.255 scope global eth0
inet6 fe80::20d:87ff:fe5f:3fd3/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:fc:70:ee:fc brd ff:ff:ff:ff:ff:ff
inet 192.168.20.1/24 brd 192.168.20.255 scope global eth1
inet6 2001:8d0:2017:0:250:fcff:fe70:eefc/64 scope global dynamic
valid_lft 2591591sec preferred_lft 604391sec
inet6 fe80::250:fcff:fe70:eefc/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ieee1394 00:00:0a:e6:ff:0b:c6:e2 brd ff:ff:ff:ff:ff:ff:ff:ff
5: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0

gremlin> sh int
Interface eth0 is up, line protocol detection is disabled
index 2 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:0d:87:5f:3f:d3
inet 10.42.1.65/16 broadcast 10.42.255.255
inet6 fe80::20d:87ff:fe5f:3fd3/64
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds
ND router advertisements live for 1800000 seconds
Hosts use stateless autoconfig for addresses.
1816847 input packets (0 multicast), 1317975248 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
937942 output packets, 98547187 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
Interface eth1 is up, line protocol detection is disabled
index 3 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:50:fc:70:ee:fc
inet 192.168.20.1/24 broadcast 192.168.20.255
inet6 2001:8d0:2017:0:250:fcff:fe70:eefc/64
inet6 fe80::250:fcff:fe70:eefc/64
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds
ND router advertisements live for 1800000 seconds
Hosts use stateless autoconfig for addresses.
179521 input packets (0 multicast), 26029105 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
254106 output packets, 256225821 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
Interface eth2 is down
index 4 metric 1 mtu 1500 <BROADCAST,MULTICAST>
HWaddr: 00:00:0a:e6:ff:0b:c6:e2
0 input packets (0 multicast), 0 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
0 output packets, 0 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
Interface lo is up, line protocol detection is disabled
index 1 metric 1 mtu 16436 <UP,LOOPBACK,RUNNING>
inet 127.0.0.1/8
inet6 ::1/128
10449 input packets (0 multicast), 877956 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
10449 output packets, 877956 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
Interface sit0 is down
index 5 metric 1 mtu 1480 <NOARP>
0 input packets (0 multicast), 0 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
0 output packets, 0 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions



playground:~# /sbin/ip addr ls
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:04:76:21:d7:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.20.2/24 brd 192.168.20.255 scope global eth0
inet6 2001:8d0:2017::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::204:76ff:fe21:d74d/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:01:02:9e:33:19 brd ff:ff:ff:ff:ff:ff
inet 10.35.42.21/24 brd 10.255.255.255 scope global eth1
inet6 2001:8d0:20ff::3/126 scope global
valid_lft forever preferred_lft forever
inet6 fe80::201:2ff:fe9e:3319/64 scope link
valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0

playground> sh int
Interface eth0 is up, line protocol detection is disabled
index 2 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:04:76:21:d7:4d
inet 192.168.20.2/24 broadcast 192.168.20.255
inet6 2001:8d0:2017::1/64
inet6 fe80::204:76ff:fe21:d74d/64
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds
ND router advertisements live for 1800 seconds
Hosts use stateless autoconfig for addresses.
input packets 124175659, bytes 2147483647, dropped 0, multicast packets 0
input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
output packets 128249608, bytes 2147483647, dropped 0
output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
collisions 0
Interface eth1 is up, line protocol detection is disabled
index 3 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:01:02:9e:33:19
inet 10.35.42.21/24 broadcast 10.255.255.255
inet6 2001:8d0:20ff::3/126
inet6 fe80::201:2ff:fe9e:3319/64
input packets 24368697, bytes 2147483647, dropped 0, multicast packets 0
input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
output packets 19493321, bytes 1565125826, dropped 0
output errors 0, aborted 0, carrier 1, fifo 0, heartbeat 0, window 0
collisions 0
Interface lo is up, line protocol detection is disabled
index 1 metric 1 mtu 16436 <UP,LOOPBACK,RUNNING>
inet 127.0.0.1/8
inet6 ::1/128
input packets 10151, bytes 675311, dropped 0, multicast packets 0
input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
output packets 10151, bytes 675311, dropped 0
output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
collisions 0
Interface sit0 is down
index 4 metric 1 mtu 1480 <NOARP>
input packets 0, bytes 0, dropped 0, multicast packets 0
input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
output packets 0, bytes 0, dropped 0
output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
collisions 0

With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-06 17:35:17 UTC
Permalink
Hi
Post by Jan Wagner
Hi there!
I have the problem to get a link between 2 OSPF neighbors, maybe
playground# sh ip ospf interface
eth0 is up
Internet Address 192.168.20.2/24, Broadcast 192.168.20.255, Area 0.0.0.0
eth1 is up
Internet Address 10.35.42.21/24, Broadcast 10.255.255.255, Area 0.0.0.0
Router ID 192.168.20.2, Network Type BROADCAST, Cost: 10
playground# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
RXmtL RqstL DBsmL
10.35.42.23 1 Full/DR 00:00:31 10.35.42.23
eth1:10.35.42.21 0 0 0
playground# sh ip ospf interface eth0
eth0 is up
Internet Address 192.168.20.2/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.2, Interface Address 192.168.20.2
Neighbor Count is 0, Adjacent neighbor count is 0
It sees nothing on this subnet.
Post by Jan Wagner
-----------------------
gremlin# sh ip ospf interface
eth0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
OSPF not enabled on this interface
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
gremlin# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
RXmtL RqstL DBsmL
192.168.20.2 1 Init/DROther 00:00:34 192.168.20.2
eth1:192.168.20.1 0 0 0
--------
playground:~# tethereal -i eth0
Capturing on eth0
0.000000 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
7.762431 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet <= wrong src-ip
Why do you think that? 10.42.1.65 isn't mentioned above anywhere,
what makes you think this packet is from either of the two routers
above? Looking down it seems 'gremlin' / router1 does have that
prefix, and it's enabled.

Try 'tcpdump -vvv -i eth1' on gremlin, i bet that shows it sending
Hellos from its 192.168.20/24 address.

Could the problem be that you have plugged gremlin's eth0 and eth1
interfaces into the wrong switch ports? :)
Post by Jan Wagner
gremlin:~# cat /etc/quagga/ospfd.conf
[...]
interface eth0
!
interface eth1
!
interface eth2
[...]
!
router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 10.42.1.65/16 area 0.0.0.0
And gremlin's interface to 10.42.1.65/16 is eth0, it sends hellos,
and playground sees those.
Post by Jan Wagner
network 192.168.20.0/24 area 0.0.0.0
Gremlin's interface on this subnet is eth1, but playground doesn't
see the Hellos.

Sounds like it could be a simple physical layer mixup ;)

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Most people's favorite way to end a game is by winning.
Jan Wagner
2005-11-06 19:08:17 UTC
Permalink
Hi Paul!
Post by Paul Jakma
Post by Jan Wagner
-----------------------
gremlin# sh ip ospf interface
eth0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
OSPF not enabled on this interface
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
gremlin# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface RXmtL RqstL DBsmL
192.168.20.2 1 Init/DROther 00:00:34 192.168.20.2
eth1:192.168.20.1 0 0 0
--------
playground:~# tethereal -i eth0
Capturing on eth0
0.000000 192.168.20.2 -> 224.0.0.5 OSPF Hello Packet
7.762431 10.42.1.65 -> 224.0.0.5 OSPF Hello Packet <= wrong src-ip
Why do you think that? 10.42.1.65 isn't mentioned above anywhere,
what makes you think this packet is from either of the two routers
above? Looking down it seems 'gremlin' / router1 does have that
prefix, and it's enabled.
gremlin> sh int eth0
Interface eth0 is up, line protocol detection is disabled
index 2 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:0d:87:5f:3f:d3
inet 10.42.1.65/16 broadcast 10.42.255.255
inet6 fe80::20d:87ff:fe5f:3fd3/64
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds
ND router advertisements live for 1800000 seconds
Hosts use stateless autoconfig for addresses.
1838524 input packets (0 multicast), 1319821214 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
941154 output packets, 98790097 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions

Its the Interface on gremlin on the "other side"
Post by Paul Jakma
Try 'tcpdump -vvv -i eth1' on gremlin, i bet that shows it sending
Hellos from its 192.168.20/24 address.
The dump is attached .. and there is also the src-ip 10.42.1.65
Post by Paul Jakma
Could the problem be that you have plugged gremlin's eth0 and eth1
interfaces into the wrong switch ports? :)
Nope .. look into the dump .. the echo pakets works well and with the correct
ips.
Post by Paul Jakma
Post by Jan Wagner
gremlin:~# cat /etc/quagga/ospfd.conf
[...]
interface eth0
!
interface eth1
!
interface eth2
[...]
!
router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 10.42.1.65/16 area 0.0.0.0
And gremlin's interface to 10.42.1.65/16 is eth0, it sends hellos,
and playground sees those.
It also doesnt work with:

router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 192.168.20.0/24 area 0.0.0.0
!
Post by Paul Jakma
Post by Jan Wagner
network 192.168.20.0/24 area 0.0.0.0
Gremlin's interface on this subnet is eth1, but playground doesn't
see the Hellos.
Sounds like it could be a simple physical layer mixup ;)
Nope ... on eth0 on gremlin arent any hello pakets. On eth1 there are hello
pakets send to mcast with the interface-ip of eth1 on gremlin. Thats my
problem. I can absolutly confirm, thats there isnt any physical layer
problem. The setup is working since years without OSPF. I also dumped on
eth0, see attachment.

Thanks for your help in advance. With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-06 21:58:49 UTC
Permalink
Post by Jan Wagner
The dump is attached .. and there is also the src-ip 10.42.1.65
Ok. That's weird. That IP is on eth0, but tcpdump of eth1 shows it
too? These different subnets must be on the same physical link then,
right?
Post by Jan Wagner
router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 192.168.20.0/24 area 0.0.0.0
This shouldn't make any difference at all to sending of hellos, but
remove the 'compatible rfc1583' statement please.
Post by Jan Wagner
Nope ... on eth0 on gremlin arent any hello pakets.
Ok, but you have 'passive interface eth0' set. So it shouldn't send
Hello packets on eth0.
Post by Jan Wagner
On eth1 there are hello pakets send to mcast with the interface-ip
of eth1 on gremlin.
But, that's correct, right? :)
Post by Jan Wagner
Thats my problem. I can absolutly confirm, thats there isnt any
physical layer problem. The setup is working since years without
OSPF. I also dumped on eth0, see attachment.
Ok, I think your problem then is simply the 'passive interface eth0'
line - remove it :).

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Since a politician never believes what he says, he is surprised
when others believe him.
-- Charles DeGaulle
Jan Wagner
2005-11-06 22:24:21 UTC
Permalink
Post by Paul Jakma
Post by Jan Wagner
The dump is attached .. and there is also the src-ip 10.42.1.65
Ok. That's weird. That IP is on eth0, but tcpdump of eth1 shows it
too? These different subnets must be on the same physical link then,
right?
Nope .. they arent ... the interfaces are connected to two different switches.
Post by Paul Jakma
Post by Jan Wagner
router ospf
ospf router-id 192.168.20.1
compatible rfc1583
passive-interface eth0
network 192.168.20.0/24 area 0.0.0.0
This shouldn't make any difference at all to sending of hellos, but
remove the 'compatible rfc1583' statement please.
done
Post by Paul Jakma
Post by Jan Wagner
Nope ... on eth0 on gremlin arent any hello pakets.
Ok, but you have 'passive interface eth0' set. So it shouldn't send
Hello packets on eth0.
Post by Jan Wagner
On eth1 there are hello pakets send to mcast with the interface-ip
of eth1 on gremlin.
But, that's correct, right? :)
I meant that on eth1 hello pakets with ip adress of eth0 interface.
Post by Paul Jakma
Post by Jan Wagner
Thats my problem. I can absolutly confirm, thats there isnt any
physical layer problem. The setup is working since years without
OSPF. I also dumped on eth0, see attachment.
Ok, I think your problem then is simply the 'passive interface eth0'
line - remove it :).
done .. and doesnt work:

gremlin:~# tail -6 /etc/quagga/ospfd.conf| head -4
router ospf
ospf router-id 192.168.20.1
network 192.168.20.0/24 area 0.0.0.0
!

gremlin:~# tcpdump -vvv -i eth1
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
23:21:54.479980 IP (tos 0xc0, ttl 1, id 40101, offset 0, flags [none],
proto: OSPF (89), length: 64) 192.168.20.2 > OSPF-ALL.MCAST.NET: OSPFv2,
Hello, length: 44
Router-ID: 192.168.20.2, Backbone Area, Authentication Type: none (0)
Options: [External]
Hello Timer: 10s, Dead Timer 40s, Mask: 255.255.255.0, Priority: 1
Designated Router 192.168.20.2
23:21:59.546551 IP (tos 0xc0, ttl 1, id 38829, offset 0, flags [none],
proto: OSPF (89), length: 68) 10.42.1.65 > OSPF-ALL.MCAST.NET: OSPFv2, Hello,
length: 48
Router-ID: 192.168.20.1, Backbone Area, Authentication Type: none (0)
Options: [External]
Hello Timer: 10s, Dead Timer 40s, Mask: 255.255.255.0, Priority: 1
Designated Router 192.168.20.1
Neighbor List:
192.168.20.2
23:22:04.481341 IP (tos 0xc0, ttl 1, id 40103, offset 0, flags [none],
proto: OSPF (89), length: 64) 192.168.20.2 > OSPF-ALL.MCAST.NET: OSPFv2,
Hello, length: 44
Router-ID: 192.168.20.2, Backbone Area, Authentication Type: none (0)
Options: [External]
Hello Timer: 10s, Dead Timer 40s, Mask: 255.255.255.0, Priority: 1
Designated Router 192.168.20.2


With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-07 00:29:00 UTC
Permalink
Post by Jan Wagner
I meant that on eth1 hello pakets with ip adress of eth0 interface.
Did you maybe rename the interfaces? Do you run a distro that tries
to bind interface names to MAC addresses (and does so by renaming
them as required as they're being brought up)?

If so, please try 0.99 - Andrew added the support for the above, but
I think that's a 0.99 feature.

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Iron Law of Distribution:
Them that has, gets.
Jan Wagner
2005-11-07 00:45:44 UTC
Permalink
Post by Paul Jakma
Post by Jan Wagner
I meant that on eth1 hello pakets with ip adress of eth0 interface.
Did you maybe rename the interfaces? Do you run a distro that tries
to bind interface names to MAC addresses (and does so by renaming
them as required as they're being brought up)?
I didnt rename the interface. I dont think, that the interface is tried to
bind to the if. I use Debian/sid with stock 2.6.12-1-686 kernel.
Post by Paul Jakma
If so, please try 0.99 - Andrew added the support for the above, but
I think that's a 0.99 feature.
gremlin:~# /usr/lib/quagga/zebra -v
zebra version 0.99.1
Copyright 1996-2005 Kunihiro Ishiguro, et al.

(which is the latest for sid)

Same trouble with 0.98.3 anyways.

*sigh*

Can you confirm, there is anywhere a bug? :-)

With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-07 00:51:49 UTC
Permalink
Post by Jan Wagner
I didnt rename the interface. I dont think, that the interface is
tried to bind to the if. I use Debian/sid with stock 2.6.12-1-686
kernel.
Can you confirm, there is anywhere a bug? :-)
Well "anywhere" - quite likely. But the behaviour you see (sending
hellos on one interface with source of another) I don't ever remember
being described before. Interface renaming is only thing that comes
to mind.

This still occurs if you restart ospfd presumably? It gets into this
state from start-up?

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Better by far you should forget and smile than that you should remember
and be sad.
-- Christina Rossetti
Jan Wagner
2005-11-07 01:01:38 UTC
Permalink
Post by Paul Jakma
This still occurs if you restart ospfd presumably? It gets into this
Yes.
Post by Paul Jakma
state from start-up?
And yes ...

Regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-07 00:52:54 UTC
Permalink
actually, could we see:

'show ip route connected' (zebra)

and:

'ip route' (Linux 'ip' utility)

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Argue for your limitations, and sure enough, they're yours.
-- Messiah's Handbook : Reminders for the Advanced Soul
Jan Wagner
2005-11-07 01:04:46 UTC
Permalink
Post by Paul Jakma
'show ip route connected' (zebra)
gremlin> show ip route connected
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route

C>* 10.42.0.0/16 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 192.168.20.0/24 is directly connected, eth1
gremlin> show ip route static
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route

S>* 10.35.42.0/24 [1/0] via 192.168.20.2, eth1
S>* 192.168.0.0/16 [1/0] via 192.168.20.2, eth1
Post by Paul Jakma
'ip route' (Linux 'ip' utility)
gremlin:~# ip route
192.168.20.0/24 dev eth1 proto kernel scope link src 192.168.20.1
10.35.42.0/24 via 192.168.20.2 dev eth1 proto zebra
10.42.0.0/16 dev eth0 proto kernel scope link src 10.42.1.65
192.168.0.0/16 via 192.168.20.2 dev eth1 proto zebra
default via 10.42.10.1 dev eth0

With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-07 01:11:52 UTC
Permalink
Post by Jan Wagner
gremlin:~# ip route
192.168.20.0/24 dev eth1 proto kernel scope link src 192.168.20.1
10.35.42.0/24 via 192.168.20.2 dev eth1 proto zebra
10.42.0.0/16 dev eth0 proto kernel scope link src 10.42.1.65
192.168.0.0/16 via 192.168.20.2 dev eth1 proto zebra
default via 10.42.10.1 dev eth0
Seems normal. Can we see:

ip mroute
ip maddr

(linux ip util), and then from ospfd 'show interface' again?

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
/* Remember: "Different name, same old buggy as shit hardware." */
linux-2.6.6/drivers/net/sunhme.c
Jan Wagner
2005-11-07 01:15:21 UTC
Permalink
Post by Paul Jakma
ip mroute
ip maddr
gremlin:~# ip mroute
gremlin:~# ip maddr
1: lo
inet 224.0.0.1
inet6 ff02::1
2: eth0
link 33:33:00:00:00:02
link 33:33:ff:5f:3f:d3
link 33:33:00:00:00:01
link 01:00:5e:00:00:01
inet 224.0.0.1
inet6 ff02::2
inet6 ff02::1:ff5f:3fd3
inet6 ff02::1
3: eth1
link 01:00:5e:00:00:06
link 01:00:5e:00:00:05
link 33:33:00:00:00:02
link 33:33:ff:70:ee:fc
link 33:33:00:00:00:01
link 01:00:5e:00:00:01
inet 224.0.0.6
inet 224.0.0.5
inet 224.0.0.1
inet6 ff02::2
inet6 ff02::1:ff70:eefc users 2
inet6 ff02::1
Post by Paul Jakma
(linux ip util), and then from ospfd 'show interface' again?
gremlin# show ip ospf interface
eth0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
OSPF not enabled on this interface
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.1, Interface Address 192.168.20.1
No backup designated router on this network
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Neighbor Count is 1, Adjacent neighbor count is 0
eth2 is down
ifindex 4, MTU 1500 bytes, BW 0 Kbit <BROADCAST,MULTICAST>
OSPF not enabled on this interface
lo is up
ifindex 1, MTU 16436 bytes, BW 0 Kbit <UP,LOOPBACK,RUNNING>
OSPF not enabled on this interface
sit0 is down
ifindex 5, MTU 1480 bytes, BW 0 Kbit <NOARP>
OSPF not enabled on this interface
gremlin#

Regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Paul Jakma
2005-11-07 01:29:21 UTC
Permalink
Post by Jan Wagner
2: eth0
inet 224.0.0.1
3: eth1
inet 224.0.0.6
inet 224.0.0.5
inet 224.0.0.1
gremlin# show ip ospf interface
eth0 is up
ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
OSPF not enabled on this interface
eth1 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.20.1/24, Broadcast 192.168.20.255, Area 0.0.0.0
Router ID 192.168.20.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.20.1, Interface Address 192.168.20.1
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Neighbor Count is 1, Adjacent neighbor count is 0
Well, now you shouldn't see any OSPF traffic sent on eth0, cause
ospfd doesn't think it's enabled (presumably you had tried removing
the 10.42.x.x network statement?).

The state for eth1 is correct though. If, with things as per above
(eth0 not enabled for OSPF), you see this ospfd sending Hellos on
eth1 with a source of eth0 then I can't of any reason within ospfd
for it. ospf_packet.c::ospf_write:

iph.ip_src.s_addr = oi->address->u.prefix4.s_addr;

Given the state above, with the only ospf_interface your machine has
being eth1, then the only source address we possibly could be setting
is 192.168.20.1. Yet thats not what you see on the wire, is it?

I'm absolutely perplexed. I'd say there was something really weird
going on in your kernel, but that seems unlikely... (can you confirm
this also occurs with different kernels? older versions
particularly.)

Absolutely perplexing. I have no idea what it could I'm afraid.

regards,
--
Paul Jakma ***@clubi.ie ***@jakma.org Key ID: 64A2FF6A
Fortune:
Ray's Rule of Precision:
Measure with a micrometer. Mark with chalk. Cut with an axe.
Jan Wagner
2005-11-07 02:01:21 UTC
Permalink
Hi!

After 30 additional minutes on irc we got some interesting stuff:

On eth0 of gremlin did run NAT but also with all rules removed it wasnt
working.

gremlin:~# iptables -t mangle -nvL
Chain PREROUTING (policy ACCEPT 817 packets, 68850 bytes)
pkts bytes target prot opt in out source
destination
Chain INPUT (policy ACCEPT 805 packets, 67019 bytes)
pkts bytes target prot opt in out source
destination
Chain FORWARD (policy ACCEPT 10 packets, 1342 bytes)
pkts bytes target prot opt in out source
destination
Chain OUTPUT (policy ACCEPT 422 packets, 69889 bytes)
pkts bytes target prot opt in out source
destination
Chain POSTROUTING (policy ACCEPT 444 packets, 72433 bytes)
pkts bytes target prot opt in out source
destination
gremlin:~# iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 4 packets, 655 bytes)
pkts bytes target prot opt in out source
destination
Chain POSTROUTING (policy ACCEPT 3 packets, 599 bytes)
pkts bytes target prot opt in out source
destination
Chain OUTPUT (policy ACCEPT 2 packets, 168 bytes)
pkts bytes target prot opt in out source
destination

then we did (it was only a wild guess from Paul):
gremlin:~# lsmod | grep connt
ip_conntrack_ftp 72848 1 ip_nat_ftp
ip_conntrack 44536 3 ip_nat_ftp,iptable_nat,ip_conntrack_ftp
gremlin:~# rmmod ip_nat_ftp
gremlin:~# rmmod ip_conntrack_ftp
gremlin:~# rmmod iptable_nat
gremlin:~# rmmod ip_conntrack
gremlin:~# lsmod | grep connt
gremlin:~# /etc/init.d/quagga restart

And with some voodoo it was working:

gremlin> sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
RXmtL RqstL DBsmL
192.168.20.2 1 Full/DR 00:00:30 192.168.20.2
eth1:192.168.20.1 0 0 0
gremlin>

I tried to reproduce it .. doesnt work.

Now OSPF runs well on eth1 and on eth0 there is running NAT:

gremlin:~# iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 96 packets, 15461 bytes)
pkts bytes target prot opt in out source
destination

Chain POSTROUTING (policy ACCEPT 31 packets, 3985 bytes)
pkts bytes target prot opt in out source
destination
0 0 SNAT all -- * eth0 192.168.1.0/24 0.0.0.0/0
to:10.42.1.65
2 479 SNAT all -- * eth0 192.168.20.0/24 0.0.0.0/0
to:10.42.1.65
0 0 SNAT all -- * eth0 192.168.100.0/24 0.0.0.0/0
to:10.42.1.65
0 0 SNAT all -- * eth0 192.168.200.0/24 0.0.0.0/0
to:10.42.1.65
0 0 SNAT all -- * eth0 10.35.42.0/24 0.0.0.0/0
to:10.42.1.65

Dunno how to come in this situation again nor to prevent from nor what it
realy was. I only know that i'm the guy who all ppl thought from he is mixing
up his wires (l2 problems) and stupid and who was searching around two days
to get to the conclusion that there is some voodoo is required in this
situation.

Paul: Thanks for your help.

With kind regards, Jan.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w---
O M-- V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++
G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
Loading...