Ospf Basic Lab Walkthrough

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Basic OSPF Lab Walkthrough v1.

10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
1
- Basic OSPF Lab Walkthrough -

Configuring Basic OSPF Routing Lab Walkthrough



Basic Objectives:

1. Configure and cable the Serial and Ethernet interfaces as indicated in the
above diagram.

2. Configure IP addresses between the routers using the following
192.168.YY.x/24 scheme:

Router 1 3 = 192.168.13.x Router 5 6 = 192.168.56.x
Router 2 3 = 192.168.23.x Router 7 8 = 192.168.78.x
Router 3 4 = 192.168.34.x Router 7 9 = 192.168.79.x
Router 4 5 = 192.168.45.x Router 9 10 = 192.168.109.x
Router 4 7 = 192.168.47.x Router 9 - 11 = 192.168.119.x

3. Configure a loopback interface on each router. The interface should have
an address using the following scheme: Y.Y.Y.Y/24. For example, Router
4s loopback should be 4.4.4.4/24.


Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
2
Configuring Basic OSPF Routing Lab Walkthrough (continued)



OSPF Objectives:

4. Configure OSPF routing on all routers. Use whatever process ID you
wish.

Well look at Router 2 as our example to complete this:

Router2(config)# router ospf 2
Router2(config-router)#

The OSPF process ID is only locally significant a unique ID can be used on each router in your
Autonomous system. The process ID allows you to distinguish between multiple OSPF processes on
the same router. Do not confuse the OSPF process ID with the EIGRPs AS number!

5. Manually set the OSPF router-ID on your router to your loopback IP
address.

Well look at Router 6 as our example to complete this:

Router6(config)# router ospf 6
Router6(config-router)# router-id 6.6.6.6

The OSPF router ID can be manually specified, as it was here; otherwise, either the highest Loopback
interface IP address, or highest physical interface IP address (respectively) will be used for the RID.
Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
3
Configuring Basic OSPF Routing Lab (continued)



OSPF Objectives:

6. Place each interface on your router into the Area specified by the diagram.
Place loopback interfaces in whatever area makes the most sense.

Well look at Router 9 as our example to complete this:

Router9(config)# router ospf 9
Router9(config-router)# router-id 9.9.9.9
Router9(config-router)# network 192.168.79.0 0.0.0.255 area 0
Router9(config-router)# network 192.168.109.0 0.0.0.255 area 1011
Router9(config-router)# network 192.168.119.0 0.0.0.255 area 1011
Router9(config-router)# network 9.9.9.9 0.0.0.0 area 0

With OSPF, the network command does not tell the router what networks to advertise; instead, the
network command is used to place certain interfaces into specific areas, so those routers can form
neighbor relationships.

Notice the use of the wildcard mask. The first network command instructs the router to place any
interface with an IP address matching 192.168.79 into area 0. Thus, a 0 in the wildcard mask
indicates that octet must match exactly, where as a 255 indicates that octet can match anything.

To match a specific IP address, we use a wildcard mask of 0.0.0.0, as we did when we placed the
loopback interface in area 0.
Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
4

Configuring Basic OSPF Routing Lab (continued)



OSPF Objectives:

7. Check the routing tables on your routers. What different types of routes do
you see?

Well look at Router 10 as our example to complete this:

Router10# show ip route

Gateway of last resort is not set

O 192.168.119.0 [110/6] via 192.168.109.1, 0:01:22, Ethernet0
O 11.11.11.0 [110/9] via 192.168.109.1, 0:01:52, Ethernet0
O IA 192.168.79.0 [110/14] via 192.168.109.1, 0:00:59, Ethernet0
O IA 7.7.7.0 [110/15] via 192.168.109.1, 0:00:55, Ethernet0
O IA 9.9.9.0 [110/6] via 192.168.109.1, 0:01:23, Ethernet0

<snip>

The above is a condensed and incomplete look at Router 10s routing table, but enough to give us a
sense of whats happening. Notice that routes within the local area are marked simply as O (OSPF
intra-area), while routes from a remote area are marked O IA(OSPF inter-area).
Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
5
Configuring Basic OSPF Routing Lab (continued)



OSPF Objectives:

8. Confirm that you can ping all networks in the OSPF domain.

No explanation necessary. Use the ping command:

Router10# ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms


9. View your neighbor table.

Well look at Router 3 as our example to complete this:

Router3# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:36 192.168.13.1 Ethernet0
2.2.2.2 1 FULL/ 00:00:14 192.168.23.1 Serial0
4.4.4.4 1 FULL/ 00:00:11 192.168.34.2 Serial1


Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
6
Configuring Basic OSPF Routing Lab (continued)



OSPF Objectives:

10. Debug OSPF so that you can see hello packets sent between neighbors.

No explanation necessary. On Router 8:

Router8# debug ip ospf hello


Aug 14 09:22:40: OSPF: Send hello to 224.0.0.5 area 8 on Ethernet0
Aug 14 09:22:50: OSPF: Send hello to 224.0.0.5 area 8 on Ethernet0

Notice that the OSPF hellos are sent every 10 seconds. There are various other debug commands to
view OSPF messages:

Router8# debug ip ospf adj

Router8# debug ip ospf events





Basic OSPF Lab Walkthrough v1.10 Aaron Balchunas

* * *
All original material copyright 2006 by Aaron Balchunas ([email protected]),
unless otherwise noted. All other material copyright of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
7
Configuring Basic OSPF Routing Lab (continued)



OSPF Objectives:

11. Your instructor will inject some external routes into Router 7. What
additional type of route now shows up in the routing table?

Well look at Router 10s table again:

Router10# show ip route

O E2 199.1.1.0 [110/5] via 192.168.109.1, 0:01:21, Ethernet0
O E2 199.1.2.0 [110/5] via 192.168.109.1, 0:01:22, Ethernet0
O E2 199.1.3.0 [110/5] via 192.168.109.1, 0:01:24, Ethernet0
O E1 199.1.3.0 [110/16] via 192.168.109.1, 0:01:24, Ethernet0

<snip>

Notice the new types of routes populating the routing table. O E2 indicates an OSPF External Type
2 route, and is the default external type. External Type 2 routes include only the external cost to the
destination network.

OSPF External Type 1 routes (O E1) include both the external cost, and the internal cost to reach the
ASBR that injected the routes. Type 1 routes are always preferred over Type 2 routes to the same
destination.

You might also like