Quagga Case 2

来源:互联网 发布:怎么修改淘宝域名 编辑:程序博客网 时间:2024/05/17 07:45


http://openmaniak.com/quagga_case2.php


1. CASE PRINCIPLE

In this second case study, we will see an example where two Desktops are connected between each other through two routers, one Cisco 2651 router and one Quagga router.
The routers use the OSPF dynamic routing protocol to advertise the IP networks.


2. PICTURE

vyatta cisco case study 2651 ospfFunctionalities tested:

(click on the web links to have more details about a protocol)

Interface settings
OSPF - backbone area
Telnet access
 
 
 
 
 
 
 
 

3. CONFIGURATIONS

You must set your Linux system correctly to launch Quagga successfully.
See the Quagga tutorial for assisstance. LINUX CONFIGURATIONS

Check that the zebra and ospfd daemons are activated:

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


If you changed your daemons file, restart the quagga service:

#/etc/init.d/quagga restartStopping 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.


Set the router hostname in the /etc/quagga/vtysh.conf file:

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


Don't forget to activate the ip forwarding on the Quagga router!

ROUTERS CONFIGURATIONS

CISCO ROUTER IOS: 122-23aQUAGGA ROUTER 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-detectinterface 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-detectinterface Loopback1
  ip address 10.200.1.1 255.255.255.255
 interface lo
  ip address 10.200.1.2/32
  link-detectrouter 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 0router ospf
  network 10.2.0.0/24 area 0
  network 10.200.1.2/32 area 0
  network 200.0.0.0/24 area 0hostname ciscohostname quagga-routerline vty 0 4
  no loginline vty
  no loginenable secret passwordenable password password

Desktop A Desktop B ip address:
subnet mask:
gateway:
 10.1.0.3
255.255.255.0
10.1.0.2
Screenshotip address:
subnet mask:
gateway:
 10.2.0.3
255.255.255.0
10.2.0.2
ScreenshotSEE THE ENTIRE CONFIGURATION OF THE DEVICES:

2651 Cisco router
Quagga router

You can use a Cisco 3750 L3 switch instead of the 2651 Cisco router:
3750 switch L3



4. SHOW COMMANDS

ROUTING TABLE

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, eth0C>*10.2.0.0/24 is directly connected, eth1C>*127.0.0.0/8 is directly connected, loC>*10.200.1.2/32 is directly connected, loO10.2.0.0/24 [110/10] is directly connected, eth0, 05:45:59O200.0.0.0/24 [110/10] is directly connected, eth0, 05:53:20O10.200.1.2/32 [110/10] is directly connected, lo, 05:43:00O>*10.1.0.0/24 [110/11] via 200.0.0.2, eth0, 00:16:27O>*10.200.1.1/32 [110/11] via 200.0.0.2, eth0, 05:53:10quagga-router (Linux level)#route -n

DestinationGatewayGenmaskFlagsMetricRefUseIface10.200.1.1200.0.0.2255.255.255.255UGH1100eth010.2.0.00.0.0.0255.255.255.0U000eth110.1.0.0200.0.0.2255.255.255.0UG1100eth0200.0.0.00.0.0.0255.255.255.0U000eth0cisco#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 C200.0.0.0/24 is directly connected, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masksO 10.2.0.0/24 [110/11] via 200.0.0.1, 00:29:39, FastEthernet0/0C 10.1.0.0/24 is directly connected, FastEthernet0/1O 10.200.1.2/32 [110/11] via 200.0.0.1, 00:29:39, FastEthernet0/0C 10.200.1.1/32 is directly connected, Loopback1
 
OSPF NEIGHBORS

quagga-routershow ip opsf neighbor

Neighbor IDPriStateDead TimeAddressInterfaceRXmtLRqstLDBsmL10.200.1.11Full/DR36.591s200.0.0.2eth0:200.0.0.1000cisco#show ip ospf neighbor

Neighbor IDPriStateDead TimeAddressInterface200.0.0.11FULL/BDR00:00:38200.0.0.1FastEthernet0/0 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 RouterAgeSeq#ChecksumLink count10.200.1.1 10.200.1.118210x800000170x009B403200.0.0.1 200.0.0.116150x800000100x00B3493   Net Link States (Area 0) Link ID ADV RouterAgeSeq#Checksum 200.0.0.2 10.200.1.1480x8000000C0x00E30D 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 RouterAgeSeq#CkSumLink count10.200.1.1 10.200.1.113280x800000060xbd2f310.200.1.2 10.200.1.211190x800000070x97563         Net Link States (Area 0.0.0.0)       Link ID ADV RouterAgeSeq#CkSumLink count200.0.0.2 10.200.1.115490x800000040x46a6 cisco#show ip ospf route

============ OSPF network routing table ============N10.1.0.0/24[11] area: 0.0.0.0  via 200.0.0.2, eth0N10.2.0.0/24[10] area: 0.0.0.0  directly attached to eth0N10.200.1.1/32[11] area: 0.0.0.0  via 200.0.0.2, eth0N10.200.1.2/32[10] area: 0.0.0.0  directly attached to loN200.0.0.0/24[10] area: 0.0.0.0  directly attached to eth0   ============ OSPF router routing table =============   ============ OSPF external routing table =========== OSPF STATISTICS

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 0cisco#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) INTERFACE STATISTICS (BRIEF)

quagga-router#show interface description

InterfaceStatusProtocolDescriptioneth0upuplink to Cisco routereth1upuplink to Desktop Bloupup cisco#show ip int brief

InterfaceInterface IP-AddressOK?MethodStatusProtocolFastEthernet0/0200.0.0.2YESNVRAMupupFastEthernet0/110.1.0.2YESNVRAMupupLoopback110.200.1.1YESNVRAMupup INTERFACE STATISTICS (FULL)

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 collisionscisco#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
END TO END CONNECTIVITY CHECKS:

From Desktop A
C:\>tracert 10.2.0.3

windows output tracert
From Desktop B
C:\>tracert 10.1.0.3

windows output tracert
0 0
原创粉丝点击