TOTAL
Depuis Dec 2006
1'942'871 Visiteurs
4'218'042 Pages

Stats Nov 2010
82'909 Visiteurs
146'476 Pages
196 pays
Statistiques completes



Aidez-nous à traduire
nos tutoriaux!

REJOINGNEZ
l'équipe OpenManiak.
QUAGGA - Le Tutorial Facile - Etude 2 - OPSF Simple

Quagga Etude 2 - OSPF Simple
Dernière modif: Dec 06 2007


Tool
Installation
Ergonomie
Forum



Détails Quagga, c'est quoi?
Prérequis & Installation
Comment utiliser Quagga
Comparaison des fonctionnalités de routeurs
Étude de cas 1 - routes statiques
Étude de cas 2 - OSPF simple
Étude de cas 3 - OSPF avancé
Étude de cas 4 - BGP



⚠️⚠️⚠️
Please check our page about COVID-19!!
100 Questions and answers about Coronavirus.

⚠️⚠️⚠️
Merci de consulter notre page sur la COVID-19 !!
227 questions et réponses sur le Coronavirus.



1. PRINCIPE 2. SCHÉMA 3. CONFIGURATIONS 4. COMMANDES SHOW
Voir un scénario similaire avec le routeur Vyatta.


1. PRINCIPE

Dans cette deuxième étude, nous allons voir un exemple où deux postes de travail sont reliés entre eux par l'intermédiaire de deux routeurs, un routeur Cisco 2651 et un routeur Vyatta.
Les routeurs utilisent le protocole de routage dynamique OSPF pour annoncer les réseaux IP.


2. SCHÉMA

vyatta cisco case study 2651 ospf Fonctionnalités testées:

(cliquez sur les liens internet pour avoir plus de détails sur un protocole)

Paramétrage interfaces
OSPF - backbone area
Accès Telnet
 
 
 
 
 
 
 
 


3. CONFIGURATIONS

Vous devez configurer votre système Linux correctement pour pouvoir lancer Quagga avec succès.
Référez-vous au tutorial Quagga pour de l'assistance.
LINUX CONFIGURATIONS

Vérifiez que les démons ospfd et zebra sont activés:

#vim /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no


Si vous avez effectués des changements dans votre fichiers daemon, redémarrez le service quagga:

#/etc/init.d/quagga restart
Stopping Quagga daemons (prio:0): ospfd zebra (bgpd) (ripd) (ripngd) (ospf6= d) (isisd).
Removing all routes made by zebra.
Nothing to flush.
Loading capability module if not yet done.
Starting Quagga daemons (prio:10): zebra ospfd.


Configurez le nom d'hôte (hostname) de Quagga dans le fichier /etc/quagga/vtysh.conf:

#vim /etc/quagga/vtysh.conf
!
! Sample
!
! service integrated-vtysh-config
hostname quagga-router
username root nopassword
!


N'oubliez pas d'activer la redirection IP (IP forwarding) sur le routeur Quagga!

CONFIGURATIONS DES ROUTEURS

ROUTEUR CISCO IOS: 122-23a ROUTEUR QUAGGA 0.99.6
interface FastEthernet0/0
  description link to Vyatta router
  ip address 200.0.0.2 255.255.255.0
 
interface eth0
  description link to Cisco router
  ip address 200.0.0.1/24
  link-detect
interface FastEthernet0/1
  description link to Desktop A
  ip address 10.1.0.2 255.255.255.0
 
interface eth1
  description link to Desktop B
  ip address 10.2.0.1/24
  link-detect
interface Loopback1
  ip address 10.200.1.1 255.255.255.255
 
interface lo
  ip address 10.200.1.2/32
  link-detect
router ospf 1
  network 10.1.0.0 0.0.0.255 area 0
  network 10.200.1.1 0.0.0.0 area 0
  network 200.0.0.0 0.0.0.255 area 0
router ospf
  network 10.2.0.0/24 area 0
  network 10.200.1.2/32 area 0
  network 200.0.0.0/24 area 0
hostname cisco hostname quagga-router
line vty 0 4
  no login
line vty
  no login
enable secret password enable password password

Poste de travail A Poste de travail B
ip address:
subnet mask:
gateway:
 
10.1.0.3
255.255.255.0
10.1.0.2
Capture d'écran
ip address:
subnet mask:
gateway:
 
10.2.0.3
255.255.255.0
10.2.0.2
Capture d'écran
VOIR LA CONFIGURATION COMPLÈTE DES ÉQUIPEMENTS:

Routeur 2651 Cisco
Routeur Quagga

Vous pouvez utiliser un Switch Cisco L3 à la place du routeur Cisco 2651:
Switch L3 Cisco 3750



4. COMMANDES SHOW

TABLE DE ROUTAGE

quagga-router#show ip route

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
    I - ISIS, B - BGP, > - selected route, * - FIB route
     
C>* 200.0.0.0/24 is directly connected, eth0
C>* 10.2.0.0/24 is directly connected, eth1
C>* 127.0.0.0/8 is directly connected, lo
C>* 10.200.1.2/32 is directly connected, lo
O 10.2.0.0/24 [110/10] is directly connected, eth0, 05:45:59
O 200.0.0.0/24 [110/10] is directly connected, eth0, 05:53:20
O 10.200.1.2/32 [110/10] is directly connected, lo, 05:43:00
O>* 10.1.0.0/24 [110/11] via 200.0.0.2, eth0, 00:16:27
O>* 10.200.1.1/32 [110/11] via 200.0.0.2, eth0, 05:53:10
quagga-router (Linux level)#route -n

Destination Gateway Genmask Flags Metric Ref Use Iface
10.200.1.1 200.0.0.2 255.255.255.255 UGH 11 0 0 eth0
10.2.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.1.0.0 200.0.0.2 255.255.255.0 UG 11 0 0 eth0
200.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
cisco#show ip route

Codes:   C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route
     
Gateway of last resort is not set
 
C 200.0.0.0/24 is directly connected, FastEthernet0/0
  10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O   10.2.0.0/24 [110/11] via 200.0.0.1, 00:29:39, FastEthernet0/0
C   10.1.0.0/24 is directly connected, FastEthernet0/1
O   10.200.1.2/32 [110/11] via 200.0.0.1, 00:29:39, FastEthernet0/0
C   10.200.1.1/32 is directly connected, Loopback1
VOISINS OSPF (OPSF NEIGHBORS)

quagga-routershow ip opsf neighbor

Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL
10.200.1.1 1 Full/DR 36.591s 200.0.0.2 eth0:200.0.0.1 0 0 0
cisco#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
200.0.0.1 1 FULL/BDR 00:00:38 200.0.0.1 FastEthernet0/0
BASE DE DONNÉES OSPF (OSPF DATABASE)

quagga-router#show ip ospf database

  OSPF Router with ID (10.200.1.1) (Process ID 1)
 
    Router Link States (Area 0)
 
Link ID   ADV Router Age Seq# Checksum Link count
10.200.1.1   10.200.1.1 1821 0x80000017 0x009B40 3
200.0.0.1   200.0.0.1 1615 0x80000010 0x00B349 3
 
    Net Link States (Area 0)
 
Link ID   ADV Router Age Seq# Checksum  
200.0.0.2   10.200.1.1 48 0x8000000C 0x00E30D  
quagga-router#show ip ospf database

  OSPF Router with ID (10.200.1.2)
             
    Router Link States (Area 0.0.0.0)
             
Link ID   ADV Router Age Seq# CkSum Link count
10.200.1.1   10.200.1.1 1328 0x80000006 0xbd2f 3
10.200.1.2   10.200.1.2 1119 0x80000007 0x9756 3
             
    Net Link States (Area 0.0.0.0)
             
Link ID   ADV Router Age Seq# CkSum Link count
200.0.0.2   10.200.1.1 1549 0x80000004 0x46a6  
cisco#show ip ospf route

============ OSPF network routing table ============
N 10.1.0.0/24 [11] area: 0.0.0.0
    via 200.0.0.2, eth0
N 10.2.0.0/24 [10] area: 0.0.0.0
    directly attached to eth0
N 10.200.1.1/32 [11] area: 0.0.0.0
    via 200.0.0.2, eth0
N 10.200.1.2/32 [10] area: 0.0.0.0
    directly attached to lo
N 200.0.0.0/24 [10] area: 0.0.0.0
    directly attached to eth0
     
============ OSPF router routing table =============
     
============ OSPF external routing table ===========
STATISTIQUES OSPF

quagga-router#show ip ospf interface

eth0 is up
   ifindex 2, MTU 1500 bytes, BW 0 Kbit
   Internet Address 200.0.0.1/24, Broadcast 200.0.0.255, Area 0.0.0.0
   MTU mismatch detection:enabled
   Router ID 10.200.1.2, Network Type BROADCAST, Cost: 10
   Transmit Delay is 1 sec, State Backup, Priority 1
   Designated Router (ID) 10.200.1.1, Interface Address 200.0.0.2
   Backup Designated Router (ID) 10.200.1.2, Interface Address 200.0.0.1
   Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
   Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
      Hello due in 9.469s
   Neighbor Count is 1, Adjacent neighbor count is 1
eth1 is up
   ifindex 3, MTU 1500 bytes, BW 0 Kbit
   Internet Address 10.2.0.2/24, Broadcast 10.2.0.255, Area 0.0.0.0
   MTU mismatch detection:enabled
   Router ID 10.200.1.2, Network Type BROADCAST, Cost: 10
   Transmit Delay is 1 sec, State DR, Priority 1
   Designated Router (ID) 10.200.1.2, Interface Address 10.2.0.2
   No backup designated router on this network
   Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
   Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
      Hello due in 0.051s
   Neighbor Count is 0, Adjacent neighbor count is 0
lo is up
   ifindex 1, MTU 16436 bytes, BW 0 Kbit
   Internet Address 10.200.1.2/32, Area 0.0.0.0
   MTU mismatch detection:enabled
   Router ID 10.200.1.2, Network Type LOOPBACK, Cost: 10
   Transmit Delay is 1 sec, State Loopback, Priority 1
   No designated router on this network
   No backup designated router on this network
   Multicast group memberships:
   Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
      Hello due in inactive
   Neighbor Count is 0, Adjacent neighbor count is 0
cisco#show ip ospf brief

FastEthernet0/0 is up, line protocol is up
   Internet Address 200.0.0.2/24, Area 0
   Process ID 1, Router ID 10.200.1.1, Network Type BROADCAST, Cost: 1
   Transmit Delay is 1 sec, State DR, Priority 1
   Designated Router (ID) 10.200.1.1, Interface address 200.0.0.2
   Backup Designated router (ID) 200.0.0.1, Interface address 200.0.0.1
   Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
      Hello due in 00:00:05
   Index 3/3, flood queue length 0
   Next 0x0(0)/0x0(0)
   Last flood scan length is 1, maximum is 2
   Last flood scan time is 0 msec, maximum is 0 msec
   Neighbor Count is 1, Adjacent neighbor count is 1
      Adjacent with neighbor 200.0.0.1 (Backup Designated Router)
   Suppress hello for 0 neighbor(s)
Loopback1 is up, line protocol is up
   Internet Address 10.200.1.1/32, Area 0
   Process ID 1, Router ID 10.200.1.1, Network Type LOOPBACK, Cost: 1
   Loopback interface is treated as a stub Host
FastEthernet0/1 is up, line protocol is up
   Internet Address 10.1.0.2/24, Area 0
   Process ID 1, Router ID 10.200.1.1, Network Type BROADCAST, Cost: 1
   Transmit Delay is 1 sec, State DR, Priority 1
   Designated Router (ID) 10.200.1.1, Interface address 10.1.0.2
   No backup designated router on this network
   Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
      Hello due in 00:00:05
   Index 1/1, flood queue length 0
   Next 0x0(0)/0x0(0)
   Last flood scan length is 0, maximum is 0
   Last flood scan time is 0 msec, maximum is 0 msec
   Neighbor Count is 0, Adjacent neighbor count is 0
   Suppress hello for 0 neighbor(s)
STATISTIQUES DES INTERFACES (COURT)

quagga-router#show interface description

Interface Status Protocol Description
eth0 up up link to Cisco router
eth1 up up link to Desktop B
lo up up  
cisco#show ip int brief

Interface Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 200.0.0.2 YES NVRAM up up
FastEthernet0/1 10.1.0.2 YES NVRAM up up
Loopback1 10.200.1.1 YES NVRAM up up
STATISTIQUES DES INTERFACES (COMPLET)

quagga-router#show interface eth0

Interface eth0 is up, line protocol detection is disabled
   Description: link to Cisco router
   index 2 metric 1 mtu 1500
   flags:
   HWaddr: 00:02:55:33:22:11
   inet 200.0.0.1/24 broadcast 200.0.0.255
   inet6 fe80::202:55ff:4433:2211/64
      10477 input packets (0 multicast), 8758628 bytes, 0 dropped
      0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
      0 fifo, 0 missed
      7848 output packets, 608483 bytes, 0 dropped
      0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
      0 window, 0 collisions
cisco#show interfaces FastEthernet 0/0

FastEthernet0/0 is up, line protocol is up
   Hardware is AmdFE, address is 0009.1122.3344 (bia 0009.1122.3344)
   Description: link to Quagga router
   Internet address is 200.0.0.2/24
   MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
      reliability 255/255, txload 1/255, rxload 1/255
   Encapsulation ARPA, loopback not set
   Keepalive set (10 sec)
   Full-duplex, 100Mb/s, 100BaseTX/FX
   ARP type: ARPA, ARP Timeout 04:00:00
   Last input 00:00:00, output 00:00:01, output hang never
   Last clearing of "show interface" counters never
   Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
   Queueing strategy: fifo
   Output queue: 0/40 (size/max)
   5 minute input rate 0 bits/sec, 0 packets/sec
   5 minute output rate 0 bits/sec, 0 packets/sec
      1847 packets input, 154310 bytes
      Received 1637 broadcasts, 0 runts, 0 giants, 0 throttles
      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
      0 watchdog
      0 input packets with dribble condition detected
      3755 packets output, 337765 bytes, 0 underruns
      0 output errors, 0 collisions, 5 interface resets
      0 babbles, 0 late collision, 0 deferred
      0 lost carrier, 0 no carrier
      0 output buffer failures, 0 output buffers swapped out

VÉRIFICATION DE LA CONNECTIVITE DE BOUT EN BOUT:

Depuis le poste de travail A
C:\>tracert 10.2.0.3

windows output tracert

Depuis le poste de travail B
C:\>tracert 10.1.0.3

windows output tracert

Haut de la page