TCP/IP: Quagga OSPF sederhana

From OnnoWiki
Revision as of 10:55, 13 November 2013 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 ospf Functionalities tested:

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

Interface settings OSPF - backbone area Telnet access





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-23a QUAGGA 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 cisco hostname quagga-router line vty 0 4

 no login

line vty

 no login

enable secret password enable 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


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
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


OSPF 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

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 ===========

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

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

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