> On Fri, 26 Nov 2004, cristivoinicaru wrote:
>
> > A reusit cineva sa puna Zebra pe Fedora 1?
>
>   Ghici!
>

Cu ajutorul nemijlocit al domnului Tarhon-Onu Victor am reusit sa-l pun si
eu.
I-i multumesc si pe aceasta cale pt. ajutorul acordat!

(arhitectura retelei este prezentata pe net la adresa:
http://cristiv1.8m.com/linux/quagga/quagga.html )

Lucare practica

Scopul lucrarii
<top>
        Prezenta lucrare isi propune sa prezinte, in scop didactic
instalarea, configurarea si utilizarea programului de rutare quagga

Modu de realizare
<top>
        In acest scop am alcatuit o retea formata din trei calculatoare
dotate fiecare cu cate doua placi de retea conectate intre ele cu ajutorul a
3 cabluri UTP de tip cross-over.
        Fiecare calculator are suplimentar configurata inca o interfata
generica dummy0 spre cate o retea locala. Ne propunem folosind programul de
rutare quagga sa asiguram redundata  acestor trei interfete generice.
    Dispunerea claculatoarelor este in forma de triunghi legate intre ele cu
ajutorul a trei cabluri UTP de tip crossover.
 arhitectura

Configurare router R1
<top>
Denumire router: intra.net
System de operare: Fedora Core1

1)Configuare interfete
Routerul R1 dispune de doua interfete tip Ethernet (eth0, eth1) plus o
interfata virtuala  dummy0

Placi retea Ethernet:
Interfata eth0: RTL-8029(AS)
Interfata eth1: RTL-8029(AS)

Fisierul /etc/sysconfig/network-scripts/ifcfg-eth0 este de forma:

# Realtek|RTL-8029(AS)
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.0.0.1
NETMASK=255.255.255.252
HWADDR=00:E0:29:48:B2:5E
USERCTL=no
PEERDNS=no
TYPE=Ethernet

Fisierul /etc/sysconfig/network-scripts/ifcfg-eth1 este de forma:

# Realtek|RTL-8029(AS)
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
#IPADDR=192.168.9.10
IPADDR=10.0.0.10
#NETMASK=255.255.255.0
NETMASK=255.255.255.252
NETWORK=10.0.0.8
TYPE=Ethernet
#GATEWAY=192.168.1.31
HWADDR=00:E0:7D:7D:20:FA
USERCTL=no
PEERDNS=no

Se creaza un fisier /etc/sysconfig/network-scripts/ifcfg-dummy0 cu drepturi
identice cu celelalte doua si cu urmatorul continut:

# Realtek|RTL-8139/8139C/8139C+
DEVICE=dummy0
IPADDR=10.0.1.1
NETMASK=255.255.255.0
BROADCAST=10.0.1.255
NETWORK=10.0.1.0
ONBOOT=yes
BOOTPROTO=static

In fisierul /etc/modprobe.conf se adauga linia:
    Alias dummy0 dummy
Acesta este de forma:

include /etc/modprobe.conf.dist
alias eth0 8139too
alias dummy0 dummy

        Activam interfata dummy0:
            #ifup dummy0

        Se activeaza forwardarea prin setarea variblei net.ipv4.ip_forward
din fisierul /etc/sysctl.conf pe valoarea 1
        Acesta va fi de forma urmatoare:

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

        Se tasteaza de la consola comanda:
        #sysctl -p

        In fisierul /etc/sysconfig/network se adauga linia: NOZEROCONF=yes
        Acesta va avea forma urmatoare:

NETWORKING=yes
HOSTNAME=intra.net
NOZEROCONF=yes

        Se reporneste serviciul de retea:
        #service network restart

Verificare interfete:
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
                  inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
eth0           Link encap:Ethernet  HWaddr 00:C0:26:21:56:DA
                  inet addr:10.0.0.1  Bcast:10.0.0.3  Mask:255.255.255.252
eth1           Link encap:Ethernet  HWaddr 00:E0:7D:7D:20:FA
                  inet addr:10.0.0.10  Bcast:10.0.0.11  Mask:255.255.255.252
lo               Link encap:Local Loopback
                  inet addr:127.0.0.1  Mask:255.0.0.0

2)Instalare si configurarare program quagga

      Se instaleaza pachetul quagga, pachet ce vine implicit cu kitul de
Fedora (quagga-0.96.3-1).
#rpm -I quagga-0.96.3-1.rpm
     Configuram fisierul /etc/quagga/zebra.conf de forma:
hostname intra.net
password xxx

        Creem un fisier /etc/quagga/ospfd.conf  cu un continut  identic
(inclusive drepturi) cu al celui precedent
        Pornim serviciul ospfd dupa care zebra (ATENTIE! Aceasta ordine este
obligatorie la pornire precum si la oprire!!!)
#service ospfd start
#service zebra start

Verificam ca acestea sunt pornite:
[EMAIL PROTECTED] root]# ps ax | grep zebra
 6661 ?        S      0:00 /usr/sbin/zebra -d -A 127.0.0.1
 6665 pts/2    S      0:00 grep zebra
[EMAIL PROTECTED] root]# ps ax | grep ospf
 6559 ?        S      0:00 /usr/sbin/ospfd -d -A 127.0.0.1
 6667 pts/2    S      0:00 grep ospf
[EMAIL PROTECTED] root]# ps ax | grep ospf

Configuram ospfd_ul:
[EMAIL PROTECTED] root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
intra.net> enable
intra.net# conf t
intra.net(config)# router ospf
intra.net(config-router)# ospf router-id 10.0.1.1
intra.net(config-router)# redistribute connected
intra.net(config-router)# network 10.0.0.0/30 area 0
intra.net(config-router)# network 10.0.0.8/30 area 0
intra.net(config-router)# (aici este combinatia de taste CTRL+Z)
intra.net# wr mem
Configuration saved to /etc/quagga/ospfd.conf
intra.net# exit
Connection closed by foreign host.
[EMAIL PROTECTED] root]#

Fisisierul /etc/quagga/ospfd.conf va fi de forma:

!
! Zebra configuration saved from vty
!   2004/11/30 17:28:18
!
hostname intra.net
password xxx
!
!
!
interface dummy0
!
interface eth0
!
interface eth1
!
interface lo
!
router ospf
 ospf router-id 10.0.1.1
 redistribute connected
 network 10.0.0.0/30 area 0.0.0.0
 network 10.0.0.8/30 area 0.0.0.0
!
line vty
!

Repornim ospf_ul si zebra (atentie la ordine!)
#service zebra stop
#service ospf stop
#service ospf start
#service zebra start

Configurare router R2
<top>
Denumire router: gw1
System de operare: Fedora Core1

1)Configuare interfete
Routerul R2 dispune de doua interfete tip Ethernet (eth0, eth1) plus o
interfata virtuala  dummy0

Placi retea Ethernet:
Interfata eth0: RTL-8139/8139C/8139C+
Interfata eth1: RTL-8139/8139C/8139C+

Fisierul /etc/sysconfig/network-scripts/ifcfg-eth0 este de forma:

# Realtek|RTL-8139/8139C/8139C+
DEVICE=eth0
BOOTPROTO=none
BROADCAST=10.0.0.7
HWADDR=00:A0:D2:1C:55:03
IPADDR=10.0.0.5
NETMASK=255.255.255.252
NETWORK=10.0.0.4
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no

Fisierul /etc/sysconfig/network-scripts/ifcfg-eth1 este de forma:

# Realtek|RTL-8139/8139C/8139C+
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.0.0.2
NETMASK=255.255.255.252
HWADDR=00:00:21:E5:AF:2D
TYPE=Ethernet
USERCTL=no
PEERDNS=no

Se creaza un fisier /etc/sysconfig/network-scripts/ifcfg-dummy0 cu drepturi
identice cu celelalte doua si cu urmatorul continut:

# Realtek|RTL-8139/8139C/8139C+
DEVICE=dummy0
IPADDR=10.0.2.2
NETMASK=255.255.255.0
BROADCAST=10.0.2.255
NETWORK=10.0.2.0
ONBOOT=yes
BOOTPROTO=static

In fisierul /etc/modprobe.conf se adauga linia:
    Alias dummy0 dummy

Acesta este de forma:

include /etc/modprobe.conf.dist
alias eth0 8139too
alias dummy0 dummy

        Se activeaza interfata dummy0:
#ifup dummy0
        Se activeaza forwardarea prin setarea variblei net.ipv4.ip_forward
din fisierul /etc/sysctl.conf pe valoarea 1
Acesta va fi de forma urmatoare:

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

Se tasteaza de la consola comanda:
#sysctl -p

In fisierul /etc/sysconfig/network se adauga linia: NOZEROCONF=yes
Acesta va avea forma urmatoare:

NETWORKING=yes
HOSTNAME=gw1
NOZEROCONF=yes

Se reporneste serviciul de retea:
#service network restart

Verificare interfete:
masina gw1 (router_ul1)
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
                   inet addr:10.0.2.2  Bcast:10.0.2.255  Mask:255.255.255.0
eth0           Link encap:Ethernet  HWaddr 00:C0:26:21:56:DA
                  inet addr:10.0.0.5  Bcast:10.0.0.7  Mask:255.255.255.252
eth1           Link encap:Ethernet  HWaddr 00:E0:7D:7D:20:FA
                  inet addr:10.0.0.2  Bcast:10.0.0.3  Mask:255.255.255.252
lo              Link encap:Local Loopback
                 inet addr:127.0.0.1  Mask:255.0.0.0

2)Instalare si configurarare program quagga

Se instaleaza pachetul quagga, pachet ce vine implicit cu kitul de Fedora
(quagga-0.96.3-1).
#rpm -I quagga-0.96.3-1.rpm

Configuram fisierul /etc/quagga/zebra.conf de forma:

hostname gw1
password xxx

Creem un fisier /etc/quagga/ospfd.conf  cu un continut  identic (inclusive
drepturi) cu al celui precedent

Pornim serviciul ospfd dupa care zebra (ATENTIE! Aceasta ordine este
obligatorie la pornire precum si la oprire!!!)
#service ospfd start
#service zebra start

Verificam ca acestea sunt pornite:

[EMAIL PROTECTED] root]# ps ax | grep zebra
 6661 ?        S      0:00 /usr/sbin/zebra -d -A 127.0.0.1
 6665 pts/2    S      0:00 grep zebra
[EMAIL PROTECTED] root]# ps ax | grep ospf
 6559 ?        S      0:00 /usr/sbin/ospfd -d -A 127.0.0.1
 6667 pts/2    S      0:00 grep ospf
[EMAIL PROTECTED] root]# ps ax | grep ospf

Configuram ospfd_ul:

[root@ gw1 root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
gw1> enable
gw1# conf t
gw1(config)# router ospf
gw1(config-router)# ospf router-id 10.0.2.2
gw1config-router)# redistribute connected
gw1(config-router)# network 10.0.0.4/30 area 0
gw1(config-router)# network 10.0.0.8/30 area 0
gw1(config-router)# (aici este combinatia de taste CTRL+Z)
gw1# wr mem
Configuration saved to /etc/quagga/ospfd.conf
gw1# exit
Connection closed by foreign host.
[EMAIL PROTECTED] root]#

Fisisierul /etc/quagga/ospfd.conf va fi de forma:

!
! Zebra configuration saved from vty
!   2004/11/30 17:21:12
!
hostname gw1
password xxx
!
!
!
interface dummy0
!
interface eth0
!
interface eth1
!
interface lo
!
router ospf
 ospf router-id 10.0.2.2
 redistribute connected
 network 10.0.0.4/30 area 0.0.0.0
 network 10.0.0.8/30 area 0.0.0.0
!
line vty
!

Repornim ospf_ul si zebra (atentie la ordine!)

#service zebra stop
#service ospf stop
#service ospf start
#service zebra start

Configurare router R3
<top>
Denumire router: router3
System de operare: Fedora Core1

1)Configuare interfete
Routerul R3 dispune de doua interfete tip Ethernet (eth0, eth1) plus o
interfata virtuala  dummy0

Placi retea Ethernet:
Interfata eth0: 82557/8/9 [Ethernet Pro 100]
Interfata eth1: RTL-8139/8139C/8139C+

Fisierul /etc/sysconfig/network-scripts/ifcfg-eth0 este de forma:

# Intel Corp.|82557/8/9 [Ethernet Pro 100]
DEVICE=eth0
BOOTPROTO=none
BROADCAST=10.0.0.11
HWADDR=00:D0:B7:40:A5:A0
IPADDR=10.0.0.9
NETMASK=255.255.255.252
NETWORK=10.0.0.8
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no


Fisierul /etc/sysconfig/network-scripts/ifcfg-eth1 este de forma:

# Realtek|RTL-8139/8139C/8139C+
DEVICE=eth1
BOOTPROTO=none
BROADCAST=10.0.0.7
HWADDR=00:02:44:66:2A:62
IPADDR=10.0.0.6
NETMASK=255.255.255.252
NETWORK=10.0.0.4
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no


Se creaza un fisier /etc/sysconfig/network-scripts/ifcfg-dummy0 cu drepturi
identice cu celelalte doua si cu urmatorul continut:

# Intel Corp.|82557/8/9 [Ethernet Pro 100]
DEVICE=dummy0
IPADDR=10.0.3.3
NETMASK=255.255.255.0
BROADCAST=10.0.3.255
NETWORK=10.0.3.0
ONBOOT=yes
BOOTPROTO=static

In fisierul /etc/modprobe.conf se adauga linia:
    Alias dummy0 dummy
Acesta este de forma:

include /etc/modprobe.conf.dist
alias eth0 e100
alias eth1 8139too
alias scsi_hostadapter aic7xxx
alias dummy0 dummy


Se activeaza interfata dummy0:
#ifup dummy0
Se activeaza forwardarea prin setarea variblei net.ipv4.ip_forward din
fisierul /etc/sysctl.conf pe valoarea 1
Acesta va fi de forma urmatoare:

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
Se tasteaza de la consola comanda:
#sysctl -p

In fisierul /etc/sysconfig/network se adauga linia: NOZEROCONF=yes
Acesta va avea forma urmatoare:

NETWORKING=yes
HOSTNAME=router3

Se reporneste serviciul de retea:
#service network restart

Verificare interfete:
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:10.0.3.3  Bcast:10.0.3.255  Mask:255.255.255.0
eth0      Link encap:Ethernet  HWaddr 00:D0:B7:40:A5:A0
          inet addr:10.0.0.9  Bcast:10.0.0.11  Mask:255.255.255.252
eth1      Link encap:Ethernet  HWaddr 00:02:44:66:2A:62
          inet addr:10.0.0.6  Bcast:10.0.0.7  Mask:255.255.255.252
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0

2)Instalare si configurarare program quagga

Se instaleaza pachetul quagga, pachet ce vine implicit cu kitul de Fedora
(quagga-0.96.3-1).
#rpm -I quagga-0.96.3-1.rpm

Configuram fisierul /etc/quagga/zebra.conf de forma:

hostname router3
password xxx

Creem un fisier /etc/quagga/ospfd.conf  cu un continut  identic (inclusive
drepturi) cu al celui precedent

Pornim serviciul ospfd dupa care zebra (ATENTIE! Aceasta ordine este
obligatorie la pornire precum si la oprire!!!)
#service ospfd start
#service zebra start

Verificam ca acestea sunt pornite:

[EMAIL PROTECTED] root]# ps ax | grep zebra
 6661 ?        S      0:00 /usr/sbin/zebra -d -A 127.0.0.1
 6665 pts/2    S      0:00 grep zebra
[EMAIL PROTECTED] root]# ps ax | grep ospf
 6559 ?        S      0:00 /usr/sbin/ospfd -d -A 127.0.0.1
 6667 pts/2    S      0:00 grep ospf
[EMAIL PROTECTED] root]# ps ax | grep ospf

Configuram ospfd_ul:

[EMAIL PROTECTED] root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
router3> enable
router3# conf t
router3(config)# router ospf
router3(config-router)# ospf router-id 10.0.3.3
router3(config-router)# redistribute connected
router3(config-router)# network 10.0.0.4/30 area 0
router3(config-router)# network 10.0.0.8/30 area 0
router3(config-router)# (aici este combinatia de taste CTRL+Z)
router3# wr mem
Configuration saved to /etc/quagga/ospfd.conf
router3# exit
Connection closed by foreign host.
[EMAIL PROTECTED] root]#
Fisisierul /etc/quagga/ospfd.conf va fi de forma:

!
! Zebra configuration saved from vty
!   2004/12/01 15:11:22
!
hostname router3
password xxx
!
!
!
interface dummy0
!
interface eth0
!
interface eth1
!
interface lo
!
router ospf
 ospf router-id 10.0.3.3
 redistribute connected
 network 10.0.0.4/30 area 0.0.0.0
 network 10.0.0.8/30 area 0.0.0.0
!
line vty
!


Repornim ospf_ul si zebra (atentie la ordine!)

#service zebra stop
#service ospf stop
#service ospf start
#service zebra start

Teste
<top>
1)Vizualizam rutele pe fiecare masina in parte:

Router R1
[EMAIL PROTECTED] root]# route
Kernel IP routing table
Destination     Gateway         Genmask             Flags Metric Ref    Use
Iface
10.0.0.4        10.0.0.9        255.255.255.252   UG      20     0        0
eth1
10.0.0.0        *                   255.255.255.252   U         0       0
0 eth0
10.0.0.8        *                   255.255.255.252   U         0       0
0 eth1
10.0.1.0        *                   255.255.255.0       U         0       0
0 dummy0
10.0.2.0        10.0.0.9        255.255.255.0       UG      20      0
0 eth1
10.0.3.0        10.0.0.9        255.255.255.0       UG      20      0
0 eth1
127.0.0.0       *                   255.0.0.0               U        0
0        0 lo
[EMAIL PROTECTED] root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
intra.net> show ip ospf neighbor
Neighbor ID     Pri   State       Dead Time   Address     Interface
RXmtL RqstL DBsmL
10.0.3.3              1   Full/DR     00:00:35    10.0.0.9    eth1:10.0.0.10
0         0         0
intra.net> show ip ospf database
       OSPF Router with ID (10.0.1.1)
       Router Link States (Area 0.0.0.0)
Link ID         ADV Router      Age  Seq#           CkSum  Link count
10.0.1.1        10.0.1.1             755 0x80000007 0x9f41     2
10.0.2.2        10.0.2.2             476 0x80000005 0x8484    1
10.0.3.3        10.0.3.3             478 0x80000007 0x07ba    2

       Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#            CkSum
10.0.0.6        10.0.3.3             478 0x80000004 0x55c6
10.0.0.10      10.0.1.1             755 0x80000004 0x24f9

       AS External Link States

Link ID         ADV Router      Age  Seq#           CkSum      Route
10.0.0.0        10.0.2.2         426 0x80000005 0x9a0b E2  10.0.0.0/30 [0x0]
10.0.1.0        10.0.1.1         702 0x80000005 0xaef4 E2   10.0.1.0/24
[0x0]
10.0.2.0        10.0.2.2         416 0x80000005 0x960a E2  10.0.2.0/24 [0x0]
10.0.3.0        10.0.3.3         372 0x80000006 0x7c20 E2  10.0.3.0/24 [0x0]


Router R2
[EMAIL PROTECTED] root]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
10.0.0.4        *               255.255.255.252     U     0          0
0 eth0
10.0.0.0        *               255.255.255.252     U     0          0
0 eth1
10.0.0.8        10.0.0.6    255.255.255.252     UG  20        0        0
eth0
10.0.1.0        10.0.0.6    255.255.255.0         UG  20        0        0
eth0
10.0.2.0        *               255.255.255.0         U     0          0
0 dummy0
10.0.3.0        10.0.0.6    255.255.255.0         UG   20       0        0
eth0
127.0.0.0       *              255.0.0.0                  U     0         0
0 lo
[EMAIL PROTECTED] root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
gw1> show ip ospf neighbor
Neighbor ID     Pri   State   Dead Time   Address   Interface
RXmtL RqstL DBsmL
10.0.3.3          1   Full/DR 00:00:32    10.0.0.6  eth0:10.0.0.5       0
0     0
gw1> show ip ospf database

       OSPF Router with ID (10.0.2.2)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#             CkSum  Link count
10.0.1.1        10.0.1.1        1210     0x80000007 0x9f41     2
10.0.2.2        10.0.2.2         926      0x80000005 0x8484     1
10.0.3.3        10.0.3.3         931      0x80000007 0x07ba     2

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age   Seq#               CkSum
10.0.0.6        10.0.3.3         931       0x80000004   0x55c6
10.0.0.10       10.0.1.1        1210     0x80000004   0x24f9

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
10.0.0.0        10.0.2.2         877 0x80000005 0x9a0b E2 10.0.0.0/30 [0x0]
10.0.1.0        10.0.1.1        1157 0x80000005 0xaef4 E2 10.0.1.0/24 [0x0]
10.0.2.0        10.0.2.2         867 0x80000005 0x960a E2 10.0.2.0/24 [0x0]
10.0.3.0        10.0.3.3         824 0x80000006 0x7c20 E2 10.0.3.0/24 [0x0]

Router R3
[EMAIL PROTECTED] root]# route
Kernel IP routing table
Destination     Gateway           Genmask             Flags Metric Ref
Use Iface
10.0.0.4        *                       255.255.255.252 U         0      0
0     eth1
10.0.0.0        10.0.0.10          255.255.255.252 UG       20    0        0
eth0
10.0.0.8        *                       255.255.255.252 U          0      0
0     eth0
10.0.1.0        10.0.0.10          255.255.255.0     UG       20     0
0     eth0
10.0.2.0        10.0.0.5            255.255.255.0     UG       20     0
0     eth1
10.0.3.0        *                       255.255.255.0     U           0
0       0     dummy0
169.254.0.0     *                    255.255.0.0         U           0
0       0     eth1
127.0.0.0       *                      255.0.0.0              U           0
0      0     lo
[EMAIL PROTECTED] root]# telnet localhost 2604
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, this is quagga (version 0.96.3).
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
router3> show ip ospf neighbor
Neighbor ID     Pri   State       Dead Time   Address   Interface
RXmtL RqstL DBsmL
10.0.1.1          1   Full/Backup 00:00:35    10.0.0.10 eth0:10.0.0.9
0         0        0
10.0.2.2          1   Full/Backup 00:00:35    10.0.0.5   eth1:10.0.0.6
0         0        0
router3> show ip ospf database

       OSPF Router with ID (10.0.3.3)

        Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
10.0.1.1        10.0.1.1        1409 0x80000007 0x9f41      2
10.0.2.2        10.0.2.2        1127 0x80000005 0x8484     1
10.0.3.3        10.0.3.3        1129 0x80000007 0x07ba     2

               Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#           CkSum
10.0.0.6        10.0.3.3        1129 0x80000004   0x55c6
10.0.0.10       10.0.1.1        1409 0x80000004  0x24f9

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
10.0.0.0        10.0.2.2        1078 0x80000005 0x9a0b E2 10.0.0.0/30 [0x0]
10.0.1.0        10.0.1.1        1356 0x80000005 0xaef4 E2 10.0.1.0/24 [0x0]
10.0.2.0        10.0.2.2        1068 0x80000005 0x960a E2 10.0.2.0/24 [0x0]
10.0.3.0        10.0.3.3        1023 0x80000006 0x7c20 E2 10.0.3.0/24 [0x0]

Test final
<top>
a)legatura intre R1 si R2 intrerupta:

[EMAIL PROTECTED] root]# ping -I 10.0.1.1 10.0.2.2
PING 10.0.2.2 (10.0.2.2) from 10.0.1.1 : 56(84) bytes of data.
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable

b)legatura intre R1 si R2 refacuta :

[EMAIL PROTECTED] root]# ping -I 10.0.1.1 10.0.2.2
PING 10.0.2.2 (10.0.2.2) from 10.0.1.1 : 56(84) bytes of data.
 ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
64 bytes from 10.0.2.2: icmp_seq=7 ttl=63 time=0.960 ms
64 bytes from 10.0.2.2: icmp_seq=8 ttl=63 time=0.545 ms
64 bytes from 10.0.2.2: icmp_seq=9 ttl=63 time=0.591 ms
64 bytes from 10.0.2.2: icmp_seq=10 ttl=63 time=0.617 ms
64 bytes from 10.0.2.2: icmp_seq=11 ttl=63 time=0.609 ms

Concluzie:
Legatura se reia dupa 30 secunde de la intrerupere!
Similar pt. celelate 2 legaturi.


Aplicatii practice ale programului quagga.
<top>
            Sa zicem ca dispunem de un sistem informatic ce dispune de o
aplicatie software ce ruleaza pe doua calculatoare. Unul este un server de
baze de date si altul un server web.
            Aplicatia web ruleaza pe serverul web folosind bazele de date de
pe
serverul de baze de date. Ca sa avem conectivitate in permanenta trebuie sa
folosim
ip-uri care sint pe interfete de genul celor de pe dummy0 (sau pe alte
interfete care NU sint implicate in conectivitatea pe upstream).
            Idea este ca in cazul in care una din rute (de exemplu cea mai
eficienta
ruta) cade (este intrerupta prin inchiderea unui router) pachetele trebuie
sa gaseasca destinatia flosindu-se de exportul rutelor care se realizeaza in
mod dinamic cu ajutorul programului quagga.

Atentie!

            Sitemul Nu ofera redundanta DECIT pentru ip-urile din spate
(cele de pe eth3, eth4, eth8, de genul dummy0), nu cele implicate in
link-uri (/30-urile alea dintre routere).
            Daca de pe R1 dam ping in 10.0.2.2 (R2) normal atunci ping-ul va
pleca cu sursa 10.0.0.1.  Daca link-ul dintre R1 si R2 pica atunci se
intimpla urmatoarele:
-    10.0.2.0/24 ar trebui sa vina via R3, care e 10.0.0.10 ;
-     pachetele ICMP vor pleca spre 10.0.2.2 in continuare cu sursa 10.0.0.1
(asta daca nu intrerupem ping-ul si dam din nou);
  - vor ajunge la 10.0.2.2 cu aceasta sursa;
  - insa R2 va incerca sa raspunda la ele fix prin interfata cu
care tocmai am intrerupt link-ul pentru ca el are ruta connected pentru
10.0.0.0/30 pe acea interfata cu broken link.



--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui