Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

GNS3 - OSPF Lab - Part 1: Learning Objectives

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

GNS3 - OSPF Lab - Part 1

This is the first of four labs devoted to GNS3 OSPF. This is the beginning of a series that will ultimate goal
is to establish a relatively advanced OSPF configuration. Each lab will add to the previous configurations
to complete a complex OSPF network.

Learning Objectives:
 Basic configuration of multi-area OSPF.
 OSPF on the point-to-point Ethernet and NBMA (frame-relay).
 Setting priorities to influence the election of the DR and BDR.
 Redistribution base of another protocol.
 Configuring a virtual-link.
 Type particulers area (stub, totally stub and nssa).
 "Summarisation".

Details of lab
Routers in this topology are all 3725 models (256MB RAM).
The IOS used is: c3725-adventerprisek9_ivs-mz.124-15.T13.bin.unpacked (uncompressed version).

Task
1. As a first step we will configure area 0. The first thing to do is to define the bandwidth of the
interface so that the following OSPF can correctly calculate the metric (often called "cost").

a. The formula to calculate the OSPF metric:

COST = 100 / (Bandwidth in Mbit / s)

b. To configure bandwidth on an interface, just go to the interface configuration and enter


the following command:

Router (config-if) # bandwidth 128

c. The bandwidth value is expressed here in kbits / s. There will therefore be defined by a
bandwidth of 128kbps / s. So just configure the serial interfaces BBR1, ABR1, ABR2 and
ABR4 this way.

d. A quick check a lot of bandwidth. For example, the Serial 0/0 interface on BBR1:

BBR1 # show interface s0 / 0 | inc BW


MTU 1500 bytes, BW 128 Kbit / sec , DLY 20000 usec,
BBR1 #

2. Now configure the OSPF Area 0. As a reminder to the world of OSPF area 0 is the backbone of
the network. All other area should be attached to it.
3. All routers must have a router-id is expressed in the form abcd (4x 8 bits) as an IP address.
Default OSPF uses the largest address configured on a loopback interface. If no loopback, it will
use the largest address configured on a physical interface. It is also possible and advisable to
configure the router-id statically using the following command (in router ospf configuration):

Router (config-router) # router-id abcd

4. The following is a list of router-ids:

BBR1: 1.1.1.1
ABR1: 2.2.2.2
ABR2: 3.3.3.3
ABR3: 4.4.4.4
ABR4: 5.5.5.5
ASBR: 7.7.7.7
R1: 6.6.6.6
R2: 8.8.8.8
R3: 9.9.9.9

5. Once the router-id defined, we can define what interfaces will be part of the area 0 via the
following command:

Router (config-router) # network <subnet> <wildcard Mask> area <area nr>

Where <subnet> is the network address of the interface concerned <wildcard Mask> is
the "reverse" of the network and mask <area nr> No. of desired area.

 BBR1:

BBR1 (config) # router ospf 1


BBR1 (config-router) # router-id 1.1.1.1
BBR1 (config-router) # network 10.0.0.0 0.0.0.255 area 0
BBR1 (config-router) # network 10.0.1.0 0.0.0.3 area 0
BBR1 (config-router) # network 10.0.1.4 0.0.0.3 area 0
BBR1 (config-router) # exit
BBR1 (config) #

 Interface FastEthernet 0/0 , Serial 0/0 and Serial 0/1

 ABR1:

ABR1 (config) # router ospf 1


ABR1 (config-router) # router-id 2.2.2.2
ABR1 (config-router) # network 10.0.0.0 0.0.0.255 area 0
ABR1 (config-router) # network 10.0.1.0 0.0.0.3 area 0
ABR1 (config-router) # network 10.0.1.8 0.0.0.3 area 0
ABR1 (config-router) # exit
ABR1 (config) #
 ABR2:

BBR1 (config) # router ospf 1


BBR1 (config-router) # router-id 3.3.3.3
BBR1 (config-router) # network 10.0.0.0 0.0.0.255 area 0
BBR1 (config-router) # network 10.0.1.4 0.0.0.3 area 0
BBR1 (config-router) # network 10.0.1.12 0.0.0.3 area 0
BBR1 (config-router) # exit
BBR1 (config) #

 ABR4:

BBR1 (config) # router ospf 1


BBR1 (config-router) # router-id 5.5.5.5
BBR1 (config-router) # network 10.0.0.0 0.0.0.255 area 0
BBR1 (config-router) # network 10.0.1.8 0.0.0.3 area 0
BBR1 (config-router) # network 10.0.1.12 0.0.0.3 area 0
BBR1 (config-router) # exit
BBR1 (config) #

6. Now check the operation of OSPF in the area 0, such BBR1.

show ip protocols

BBR1 # sh ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.0.0 0.0.0.255 area 0
10.0.1.0 0.0.0.3 area 0
10.0.1.4 0.0.0.3 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
5.5.5.5 110 0:08:40
3.3.3.3 110 0:09:37
2.2.2.2 110 0:11:52
Distance: (default is 110)
BBR1 #

So we see here that the router-id is 1.1.1.1, which OSPF is enabled for three networks
connected to BBR1 BBR1 and receives information from three neighbors.
show ip ospf neighbors
BBR1 # sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL / - 0:00:36 10.0.1.6 Serial0 / 1
2.2.2.2 0 FULL / - 0:00:37 10.0.1.2 Serial0 / 0
2.2.2.2 1 FULL / BDR 0:00:36 10.0.0.3 FastEthernet0 / 0
3.3.3.3 1 FULL / DROTHER 0:00:35 10.0.0.4 FastEthernet0 / 0
5.5.5.5 1 FULL / DROTHER 0:00:37 10.0.0.2 FastEthernet0 / 0
BBR1 #

It is noted here that BBR1 established five adjacency relations. A share point-to-point, and three
on the Ethernet network. Everything seems in order from this point of view. I will return in more
detail in the "State" column in a future article when we influence the election of the DR and BDR
on a shared network.

show ip route
BBR1 # sh ip route
Codes: C - connected, S - static, 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
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
O 10.0.1.8/30 [ 110 / 782 ] via 10.0.0.3, 0:20:23, FastEthernet0 / 0
[ 110 / 782 ] via 10.0.0.2, 0:17:10, FastEthernet0 / 0
O 10.0.1.12/30 [ 110 / 782 ] via 10.0.0.4, 0:18:07, FastEthernet0 / 0
[ 110 / 782 ] via 10.0.0.2, 0:17:10, FastEthernet0 / 0
C 10.0.0.0/24 is directly connected, FastEthernet0 / 0
C 10.0.1.0/30 is directly connected, Serial0 / 0
C 10.0.1.4/30 is directly connected, Serial0 / 1
BBR1 #

BBR1 has learned many new routes to 10.0.1.8/30 and 10.0.1.12/30 networks with a cost of
782. Note that the administrative distance of OSPF default is 110.

Referring to the topology BBR1 10.0.1.8/30 can access either via ABR1 or via ABR4. In both cases
the metric is the same:

From BBR1 to ABR1, the best route is through the Fa0 / 0 interface, which has a bandwidth of
100 Mbit / s.

Then ABR1 has a link 128kbits / s to the 10.0.1.8/30 network. This allows it to calculate the total
metric for that network BBR1:

(100/100) + (100 / 0,128) = 1 + 781 = 782


show ip ospf interface fa0 / 0
BBR1 # sh ip ospf interface fa0 / 0
FastEthernet0 / 0 is up, line protocol is up
Internet Address 10.0.0.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST , Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.0.0.1
Backup Designated Router (ID) 2.2.2.2, Interface address 10.0.0.3
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 0:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper media enabled
Support enabled IETF NSF helper
Index 1/1, flood queue length 0
Next 0x0 (0) / 0x0 (0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 3, Adjacent neighbor count is 3
Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
Adjacent with neighbor 3.3.3.3
Adjacent with neighbor 5.5.5.5
Suppress hello for 0 neighbor (s)
BBR1 #

Note the following:


a. The area configured for the interface (via the network command).
b. The type of network (broadcast, non-broadcast, point-to-point).
c. The cost (the metric) of the interface to the connected network.
d. The values of the different timers (note that the Hello and Dead timer is part of the
critical points for the establishment of an adjacency, the routers must have the
same values).
e. The list of adjacent routers on the network connected to this interface.

This completes the first lab, the initial configuration of the topology. At this point there is a single
configured functional-area.

You might also like