[zebra 23085] Re: zebra, ospf, ping and traceroute problem

Daniel <[email protected]> Tue, 11 Dec 2007 14:45:36 -0500
Newsgroups gmane.network.zebra
Organization CS Dept@UT Knoxville
Message-ID <[email protected]>
Hi Michal,

 > what kind of network between neighbours are you useing?

Are you asking about topology, medium, etc.?
It's all Fast Ethernet, and the below diagram shows the topology.

<html><pre>

              top  bot
             ----r2----
            /          \      bot  top
r1-----sub2            sub1-----r5-----sub3-----r6
            \          /
             ----r3----
              bot  top

</pre></html>

top         - eth0
bot         - eth1
r1   - r6   - routers (Zebra Project, Linux Ubuntu 6.10)
sub1 - sub3 - switches

This is the hosts file, which is on every Linux machine in this network.

r2> cat /etc/hosts

127.0.0.1    localhost r2
192.168.2.1  r1
192.168.1.2  r2_bot
192.168.2.2  r2_top
192.168.1.3  r3_top
192.168.2.3  r3_bot
192.168.1.5  r5_bot
192.168.3.5  r5_top
192.168.3.6  r6


 > Why are you using ip ospf network command on interface

I just wanted to show that both interfaces eth0, eth1 were up and 
configured properly.

 > Can ypu provide us with sh ip ospf neigh command

there it is:

r2> show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address 
Interface           RXmtL RqstL DBsmL
192.168.2.1       1   Full/DROther    00:00:37    192.168.2.1 
eth0:192.168.2.2     0     0     0
192.168.1.3       1   Full/DROther    00:00:38    192.168.2.3 
eth0:192.168.2.2     0     0     0
192.168.1.3       1   Full/DROther    00:00:39    192.168.1.3 
eth1:192.168.1.2     0     0     0
192.168.1.5       1   Full/DROther    00:00:35    192.168.1.5 
eth1:192.168.1.2     0     0     0

other command output on r2:
r2> show ip ospf route
============ OSPF network routing table ============

============ OSPF router routing table =============

============ OSPF external routing table ===========

r2> show ip ospf database

        OSPF Router with ID (192.168.1.2)

                 Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
192.168.1.2     192.168.1.2      610 0x80000007 0x88cb 6
192.168.1.3     192.168.1.3      611 0x80000006 0x1f30 6
192.168.1.5     192.168.1.5      606 0x80000005 0xe99f 5
192.168.2.1     192.168.2.1     1415 0x80000004 0xda96 3
192.168.3.6     192.168.3.6      612 0x80000008 0x5549 2


This time there's no "AS External Link States", and I'm assuming that 
the it's because I added default gateways to each router, but last time 
I did it explicitly, e.g.
route add -net 192.168.3.0 gw 192.168.1.2


 > ... and respective config of neighbors

The zebra and ospf config files are very similar to those I showed for 
r2. They differ only  with the interface description and the following 
lines:
 >> router ospf
 >>  ospf router-id 192.168.1.2
 >>  network 192.168.1.0/24 area 0
 >>  network 192.168.2.0/24 area 0

router r1:
router ospf
  ospf router-id 192.168.2.1
  network 192.168.2.0/24 area 0

router r3:
router ospf
  ospf router-id 192.168.1.3
  network 192.168.1.0/24 area 0
  network 192.168.2.0/24 area 0

router r5:
router ospf
  ospf router-id 192.168.1.5
  network 192.168.1.0/24 area 0
  network 192.168.3.0/24 area 0

router r6:
router ospf
  ospf router-id 192.168.3.6
  network 192.168.3.0/24 area 0


Same with zebra.conf files, just different IP addresses

Do you need to see more output?

I want to remind again of what my problem was:
After I set up all routers with zebra and ospf I wasn't able to ping 
from r1 to r6. To be able to do this I had to use route command. After 
adding default gateways to each router I was able to ping and use 
tracepath (no traceroute on Ubuntu 6.10 and I didn't want to install it 
myself, tracepath was sufficient).

root@r1:/home/networking # tracepath 192.168.3.6
  1:  r1 (192.168.2.1)                            0.440ms pmtu 1500
  1:  r2_top (192.168.2.2)                        135.866ms
  2:  r5_bot (192.168.1.5)                        1.037ms
  3:  r6 (192.168.3.6)                            14.260ms reached
      Resume: pmtu 1500 hops 3 back 3

root@r1:/home/networking # ping 192.168.3.6
PING 192.168.3.6 (192.168.3.6) 56(84) bytes of data.
64 bytes from 192.168.3.6: icmp_seq=1 ttl=62 time=0.387 ms
64 bytes from 192.168.3.6: icmp_seq=2 ttl=62 time=0.407 ms

--- 192.168.3.6 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.387/0.397/0.407/0.010 ms


But still I wasn't able to ping one of the r3 interfaces (the one on the 
subnet1 - r3_bot)

root@r1:/home/networking # ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.

--- 192.168.1.3 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms

root@r1:/home/networking # tracepath 192.168.1.3
  1:  r1 (192.168.2.1)                              0.408ms pmtu 1500
  1:  r2_top (192.168.2.2)                          134.929ms
  2:  no reply
  3:  no reply
  4:  no reply


My problem is that I could do pinging and tracepath without using zebra, 
right? What is zebra then? I know it's for dynamic routing, but why did 
I have to use static routing to ping r6 from r1? Did I configure it 
wrong? Why are the routing tables empty (OSPF network routing table, 
OSPF router routing table, OSPF external routing table)??

I would appreciate your answer. Thank you.

Regards,

Daniel

--
Daniel Andrzejewski
student IT Administrator
Elec Engr & Comp Science
University of Tennessee
(865) 974 - 4388 (work)

"Investment in knowledge always pays the best interest" Benjamin Franklin
--


Michal Nehasil wrote:
> Hi Daniel,
> 
> you said you set up couple of Linux machines but showing us just
> config and outputs of r2. So it is hard to guess what is wrong. Why
> are you using ip ospf network command on interface, what kind of
> network between neighbours are you useing? Can ypu provide us with sh
> ip ospf neigh command and respective config of neighbors?
> 
> Regards, Michal
> 
> 2007/12/5, Daniel Andrzejewski <[email protected]>:
>> Hi,
>>
>> I have a problem. I set up couple Linux machines as routers using Zebra.
>> However, I cannot ping machines that are on different subnets, can't use
>> traceroute either. If I add static routes using route command then I can
>> ping but still can't use traceroute. The below output shows that
>> 'routing tables' are empty. Why is that? Is there something I'm missing
>> in the conf files?
>>
>> r2# show ip ospf interface
>> lo is up, line protocol is up
>>   OSPF not enabled on this interface
>> eth0 is up, line protocol is up
>>   Internet Address 192.168.2.2/24, Area 0.0.0.0
>>   Router ID 192.168.1.2, Network Type POINTOMULTIPOINT, Cost: 100
>>   Transmit Delay is 1 sec, State Point-To-Point, Priority 1
>>   No designated router on this network
>>   No backup designated router on this network
>>   Timer intervals configured, Hello 5, Dead 40, Wait 40, Retransmit 5
>>     Hello due in 00:00:04
>>   Neighbor Count is 2, Adjacent neighbor count is 2
>> r2# show ip ospf interface
>> lo is up, line protocol is up
>>   OSPF not enabled on this interface
>> eth0 is up, line protocol is up
>>   Internet Address 192.168.2.2/24, Area 0.0.0.0
>>   Router ID 192.168.1.2, Network Type POINTOMULTIPOINT, Cost: 100
>>   Transmit Delay is 1 sec, State Point-To-Point, Priority 1
>>   No designated router on this network
>>   No backup designated router on this network
>>   Timer intervals configured, Hello 5, Dead 40, Wait 40, Retransmit 5
>>     Hello due in 00:00:04
>>   Neighbor Count is 2, Adjacent neighbor count is 2
>> eth1 is up, line protocol is up
>>   Internet Address 192.168.1.2/24, Area 0.0.0.0
>>   Router ID 192.168.1.2, Network Type POINTOMULTIPOINT, Cost: 100
>>   Transmit Delay is 1 sec, State Point-To-Point, Priority 1
>>   No designated router on this network
>>   No backup designated router on this network
>>   Timer intervals configured, Hello 5, Dead 40, Wait 40, Retransmit 5
>>     Hello due in 00:00:02
>>   Neighbor Count is 1, Adjacent neighbor count is 1
>> sit0 is down, line protocol is down
>>   OSPF not enabled on this interface
>>
>>
>> r2> show ip ospf databa
>>
>>        OSPF Router with ID (192.168.1.2)
>>
>>                 Router Link States (Area 0.0.0.0)
>>
>> Link ID         ADV Router      Age  Seq#       CkSum  Link count
>> 192.168.1.2     192.168.1.2     1585 0x80000003 0xe9bc 5
>> 192.168.1.3     192.168.1.3     1586 0x80000003 0x2e73 5
>> 192.168.2.1     192.168.2.1     1585 0x80000002 0xde94 3
>>
>>                 AS External Link States
>>
>> Link ID         ADV Router      Age  Seq#       CkSum  Route
>> 192.168.1.0     192.168.2.1      978 0x80000001 0x3545 E2 192.168.1.0/24
>> [0x0]
>> 192.168.3.0     192.168.1.2      673 0x80000001 0x3d39 E2 192.168.3.0/24
>> [0x0]
>> 192.168.3.0     192.168.1.3       13 0x80000001 0x373e E2 192.168.3.0/24
>> [0x0]
>> 192.168.3.0     192.168.2.1      800 0x80000001 0x1f59 E2 192.168.3.0/24
>> [0x0]
>>
>>
>> r2# show ip ospf route
>> ============ OSPF network routing table ============
>>
>> ============ OSPF router routing table =============
>>
>> ============ OSPF external routing table ===========
>>
>>
>> The following is a listing of the ospfd.conf and zebra.conf files.
>>
>> r2:~# cat /mnt/sda/r2/ospfd_r2.conf
>> hostname r2
>> password ospf
>> enable password ospf
>> log file /usr/local/etc/temp/ospfd.log
>> log record-priority
>> !
>> interface lo
>> !
>> interface eth0
>>  description connection with r1 and r3
>>  ip ospf network point-to-multipoint
>>  ip ospf cost 100
>>  ip ospf hello-interval 5
>>  ip ospf retransmit-interval 5
>> !
>> interface eth1
>>  description connection with r3 and r6
>>  ip ospf network point-to-multipoint
>>  ip ospf cost 100
>>  ip ospf hello-interval 5
>>  ip ospf retransmit-interval 5
>> !
>> interface sit0
>> !
>> router ospf
>>  ospf router-id 192.168.1.2
>>  network 192.168.1.0/24 area 0
>>  network 192.168.2.0/24 area 0
>> ! Enable RFC-1583 compatibility to avoid routing loops
>>  compatible rfc1583
>>  redistribute connected
>>  redistribute static
>>  redistribute kernel
>>  refresh timer 30
>> !neighbor 192.168.2.1
>> !neighbor 192.168.2.3
>> !neighbor 192.168.1.3
>> !neighbor 192.168.1.6
>> !
>> line vty
>> !
>>
>> r2:~# cat /mnt/sda/r2/zebra_r2.conf
>> hostname r2
>> password zebra
>> enable password zebra
>> log file /usr/local/etc/temp/zebra.log
>> log record-priority
>> !
>> debug zebra events
>> debug zebra kernel
>> !
>> ! OSPF-ALL.MCAST.NET
>> ip route 224.0.0.5/32 127.0.0.1
>> !
>> ! OSPF-DSIG.MCAST.NET
>> ip route 224.0.0.6/32 127.0.0.1
>> !
>> interface lo
>>  ip address 127.0.0.1/8
>> !
>> interface eth0
>>  ip address 192.168.2.2/24
>> !
>> interface eth1
>>  ip address 192.168.1.2/24
>> !
>> line vty
>> !
>>
>> Thank you in advance,
>>
>> --
>> Daniel Andrzejewski
>> student IT Administrator
>> Electrical Engineering and Computer Science
>> University of Tennessee
>> (865) 974 - 4388 (work)
>> (865) 274 - 1499 (cell)
>>
>> "Investment in knowledge always pays the best interest" Benjamin Franklin
>> --
>> _______________________________________________
>> Zebra mailing list
>> [email protected]
>> http://ml.zebra.org/mailman/listinfo/zebra
>>