1 (edited by Fiete 2008-11-13 11:54:18)

Topic: Use RIP/Quagga between two routers

Hey dear community,

I am a newbie on the terrain of OpenWRT, but I love it... and I would like be an expert wink Now my problem!

For a test I want to use the RIP protocol. I had found the quagga Package but the How 2's in the net not really help me. I know what RIP is, but I don't know how to configure it in quagga.

My Configuration

    192.168.3.1     -  192.168.3.2
+--------+                        +--------+
| router1 |---------------    | router2 |
+--------+                       +--------+
192.168.1.1                 192.168.2.1
     |                                        |
     |                                        |
+----+                               +----+
| PC  |                               | PC   |
|   1   |                               |   2   |
+----+                              +----+
192.168.1.2             192.168.2.2

PC 1 become a entry
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1
PC 2 become a entry, too.
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1

The router configuration are now use static routes. But I would like use RIP...

I absolutely don't know what I write in my zebra.conf, ripd.conf etc. Can anybody help me please?

Router's = Asus WL-500GP → OpenWRT kamikaze revision 13055

sry for English and the beatiful chart big_smile

thank you
Kind regards from GER/BERLIN

Fiete

Re: Use RIP/Quagga between two routers

Perhaps just have a look at the Fine Manual at http://www.quagga.net/docs/docs-info.php#SEC37...

If you know what rip is about, this should be straightforward.

Re: Use RIP/Quagga between two routers

Ok thanks sentenza

I had configure my router 1 and PC 1

PC IP - 192.168.1.2
Router 1 IP - 192.168.1.3
-Vlan 1 '0 5'

My PC is directly connected on the WAN port of my router.

ripd.conf -->

router rip
network 192.168.3.0/24
network eth0
network eth0.1

zebra.conf -->

hostname router1
password zebra
enable password zebra
log stdout

root@Router_1:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:15:2F:80:62  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1385 errors:0 dropped:0 overruns:0 frame:0
          TX packets:854 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:101153 (98.7 KiB)  TX bytes:70751 (69.0 KiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr 00:22:15:2F:80:62  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1381 errors:0 dropped:0 overruns:0 frame:0
          TX packets:858 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:72483 (70.7 KiB)  TX bytes:67060 (65.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1384 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:63154 (61.6 KiB)  TX bytes:63154 (61.6 KiB)
root@Router_1:/# telnet localhost 2061
...
router1>enable
...
router1# configure terminal
router1(config)# interface eth0.1
router1(config-if)# show running-config 

Current configuration:
!
hostname router1
password zebra
enable password zebra
log stdout
!
interface eth0
!
interface eth0.1
 ip address 192.168.1.3/24
!
interface eth1
!
interface lo
!
interface wl0
!
ip forwarding
ipv6 forwarding
!
line vty  
!
end

When I take a sniffer on the Interface of my PC, I don't can see a RIP protocol.

What is wrong? I'm Stupid? I'm forgot something? please tell me...

Kind regards

Fiete

Re: Use RIP/Quagga between two routers

Fiete wrote:

Ok thanks sentenza

I had configure my router 1 and PC 1

PC IP - 192.168.1.2
Router 1 IP - 192.168.1.3
-Vlan 1 '0 5'

My PC is directly connected on the WAN port of my router.

ripd.conf -->

router rip
network 192.168.3.0/24
network eth0
network eth0.1

zebra.conf -->

hostname router1
password zebra
enable password zebra
log stdout

root@Router_1:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:15:2F:80:62  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1385 errors:0 dropped:0 overruns:0 frame:0
          TX packets:854 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:101153 (98.7 KiB)  TX bytes:70751 (69.0 KiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr 00:22:15:2F:80:62  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1381 errors:0 dropped:0 overruns:0 frame:0
          TX packets:858 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:72483 (70.7 KiB)  TX bytes:67060 (65.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1384 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:63154 (61.6 KiB)  TX bytes:63154 (61.6 KiB)
root@Router_1:/# telnet localhost 2061
...
router1>enable
...
router1# configure terminal
router1(config)# interface eth0.1
router1(config-if)# show running-config 

Current configuration:
!
hostname router1
password zebra
enable password zebra
log stdout
!
interface eth0
!
interface eth0.1
 ip address 192.168.1.3/24
!
interface eth1
!
interface lo
!
interface wl0
!
ip forwarding
ipv6 forwarding
!
line vty  
!
end

When I take a sniffer on the Interface of my PC, I don't can see a RIP protocol.

What is wrong? I'm Stupid? I'm forgot something? please tell me...

Kind regards

Fiete

These are the information of zebra, not ripd. Are you sure the ripd process is running? I think the console is on a different port, but can't remember.

5 (edited by Fiete 2008-11-24 11:41:37)

Re: Use RIP/Quagga between two routers

I think its enabled, because i had type this command

ripd -d

thats mean ripd start in deamon mode

When i telnet my router I can't use the router rip command.
And when i telnet localhost:2601 on my router I can't use the router rip command too.

6 (edited by Fiete 2008-11-24 14:09:19)

Re: Use RIP/Quagga between two routers

OK however I do... It works wink

When i sniff from PC 1 or PC 2 all 30sec. come a Ripv2 Packet. And between the Routers too.

The test is a little bit different between the first.

PC 1 --> 192.168.1.2/24
ROUTER 1 --> 192.168.1.1/24 AND 192.168.3.1/30

PC 2 --> 192.168.4.2/24
ROUTER 2 --> 192.168.4.1/24 AND 192.168.3.2/30

And here comes the but....

The routing table on Router 2 look like the following

root@Router_2:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     *               255.255.255.252 U     0      0        0 eth0.2
192.168.4.0     *               255.255.255.0   U     0      0        0 eth0.1
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan

The new Interface

br-lan    Link encap:Ethernet  HWaddr 00:22:15:26:B2:65  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:163 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:7206 (7.0 KiB)

And Router 1

root@Router_1:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     *               255.255.255.252 U     0      0        0 eth0.2
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0.1

The configuration is the same.... I don't know why it only work at one Router.
The ping between PC 1 and PC 2 doesn't work.


ripd.conf ROUTER 1

router rip
network 192.168.3.0/30
network 192.168.1.0/24

ripd.conf ROUTER 2

router rip
network 192.168.3.0/30
network 192.168.4.0/24

Fiete

Re: Use RIP/Quagga between two routers

Oh sorry i had build a error... the "new Interface" br-lan was configure from me... when it is down... the routing table from router 2 look like the table from router 1 the only different switch the ip adresses 192.168.1.0 and 192.168.4.0

Re: Use RIP/Quagga between two routers

Ok i think my configuration is correct, but it don't work... sad

I had make some sreenshots..

BETWEEN THE ROUTER'S:

http://img152.imageshack.us/img152/5926/10ne6.png

AND

http://img149.imageshack.us/img149/6273/40sy4.png

AND AT PC 2

http://img227.imageshack.us/my.php?image=41mt6.png

AND AT PC 1
http://img504.imageshack.us/img504/9684/lalawj6.png
http://img504.imageshack.us/img504/lalawj6.png/1/w1280.png

You can see the RIPv2 Packets... everything is right, but a ping between pc 1/2 doesn't work.

Router_2# show ip rip status 
Routing Protocol is "rip"
  Sending updates every 30 seconds with +/-50%, next due in 16 seconds
  Timeout after 180 seconds, garbage collect after 120 seconds
  Outgoing update filter list for all interface is not set
  Incoming update filter list for all interface is not set
  Default redistribution metric is 1
  Redistributing:
  Default version control: send version 2, receive version 2 
    Interface        Send  Recv   Key-chain
    eth0.1           2     2      
    eth0.2           2     2      
  Routing for Networks:
    192.168.3.0/29
    192.168.4.0/24
  Routing Information Sources:
    Gateway          BadPackets BadRoutes  Distance Last Update
    192.168.3.1             51         0       120   00:00:25
  Distance: (default is 120)
Router_1# show ip rip status
Routing Protocol is "rip"
  Sending updates every 30 seconds with +/-50%, next due in 9 seconds
  Timeout after 180 seconds, garbage collect after 120 seconds
  Outgoing update filter list for all interface is not set
  Incoming update filter list for all interface is not set
  Default redistribution metric is 1
  Redistributing:
  Default version control: send version 2, receive version 2 
    Interface        Send  Recv   Key-chain
    eth0.1           2     2      
    eth0.2           2     2      
  Routing for Networks:
    192.168.1.0/24
    192.168.3.0/29
  Routing Information Sources:
    Gateway          BadPackets BadRoutes  Distance Last Update
    192.168.3.2             56         0       120   00:00:06
  Distance: (default is 120)

sad sad sad sad

I don't understand why the router's don't add a route...?! can no one help me? please?!!! HELP ME! sad

Fiete

Re: Use RIP/Quagga between two routers

I think I found the problem.

Are you using quagga 0.98.6-1 by chance?

Take a look at your own screenshots of RIP status. See the bad packets there?

It seems like it is unable to accept routing updates. This happened to me as well.

Do you have logread package? Install it, and use it. It displays the system log onto the monitor.

keep on refereshing it until you find the problem. Mine showed "RIPv2 dropped because of authentication enabled".

Telnet to the RIP daemon and disable RIP authentication mode md5 on the interfaces connected from router 1 and router 2. Do the same for router 2 as well.

Try then. It should be able to add routes.

But it seems to me when I keep on restarting the ripd, it just keep on dropping routes.

NOTE: I am not too sure about this. So I did a telnet shell script for it.

Code wrote:

#!/bin/sh
# File name: ripd-telnet.sh

(
# sleep 1
echo user123;
echo "conf t";
echo "interface eth0.3";
echo "no ip rip authentication mode md5";
echo end;
echo exit;
) | telnet localhost 2602

Then, changed the mode to executable. chmod +x ripd-telnet.sh

Add this line into the start function of /etc/init.d/quagga

./ripd-telnet.sh


PS: This might not be able to help much since the last post was from 2008.