Quagga Case 2 - OSPF Simple


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/daemons
zebra=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 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.


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-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 ciscohostname quagga-router
line vty 0 4
  no login
line vty
  no login
enable 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
Screenshot
ip address:
subnet mask:
gateway:
 
10.2.0.3
255.255.255.0
10.2.0.2
Screenshot
SEE 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, 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
O10.2.0.0/24 [110/10] is directly connected, eth0, 05:45:59
O200.0.0.0/24 [110/10] is directly connected, eth0, 05:53:20
O10.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

DestinationGatewayGenmaskFlagsMetricRefUseIface
10.200.1.1200.0.0.2255.255.255.255UGH1100eth0
10.2.0.00.0.0.0255.255.255.0U000eth1
10.1.0.0200.0.0.2255.255.255.0UG1100eth0
200.0.0.00.0.0.0255.255.255.0U000eth0
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
 
C200.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

 

OSPF NEIGHBORS

quagga-routershow ip opsf neighbor

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

Neighbor IDPriStateDead TimeAddressInterface
200.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 count
10.200.1.1 10.200.1.118210x800000170x009B403
200.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 count
10.200.1.1 10.200.1.113280x800000060xbd2f3
10.200.1.2 10.200.1.211190x800000070x97563
       
  Net Link States (Area 0.0.0.0)
       
Link ID ADV RouterAgeSeq#CkSumLink count
200.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, eth0
N10.2.0.0/24[10] area: 0.0.0.0
  directly attached to eth0
N10.200.1.1/32[11] area: 0.0.0.0
  via 200.0.0.2, eth0
N10.200.1.2/32[10] area: 0.0.0.0
  directly attached to lo
N200.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 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)
INTERFACE STATISTICS (BRIEF)

quagga-router#show interface description

InterfaceStatusProtocolDescription
eth0upuplink to Cisco router
eth1upuplink to Desktop B
loupup 
cisco#show ip int brief

InterfaceInterface IP-AddressOK?MethodStatusProtocol
FastEthernet0/0200.0.0.2YESNVRAMupup
FastEthernet0/110.1.0.2YESNVRAMupup
Loopback110.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 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

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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值