Tuesday, March 06, 2012

OSPF Features

In 1988, the Interior Gateway Protocol (IGP) Working Group of the Internet Engineering Task Force (EITF) was formed. Its brief was to design an IGP based on the Shortest Path First (SPF) algorithm for use on the internet. Open Shortest Path First (OSPF) was the result of their work.
As indicated by its name, Open Shortest Path First has two primary characteristics.
First it is open, that is, its specification is in the public domain.
Note: The OSPF specification is described by RFC 1583.
Second it is based on the SPF algorithm.
Note: The SPF algorithm is sometimes referred to as the Dijkstra algorithm, after the person credited with its creation.
OSPF is a link-state routing protocol.

  • As such, routers send link-state advertisements (LSAs) to all other routers.
  • The LSAs contain information such as the attached interfaces and metrics used.
  • An OSPF routers accumulate link-state information, they use the SPF algorithm to calculate the shortest path to every node.
  • Unlike RIP, OSPF operates within a routing hierarchy.
  • This divides routers’ responsibilities and so increases efficiency.
  • OSPF supports variable length subnet masks (VLSMs) to allow efficient allocation of IP addresses within a routing hierarchy.
  • Routing table entries are minimized by combining hierarchical areas and VLSM through route summarization.
  • The OSPF router ID is the number by which the router is known to OSPF.
  • This identification is important in establishing neighbor relationships and coordinating messages between copies of the SPF algorithm running in the network.
  • By default the OSPF router ID is the highest IP address on an active interface, unless a loopback address has been assigned.
  • This has the disadvantage that if that particular interface goes down, the OSPF process must recalculate a new router ID and resend all of its routing information out its interfaces.
  • The default router ID should be overridden by using a loopback interface.
  • This allows you to assign an IP address to the router that is not used for anything else.
  • You can set up a loopback interface by entering the Interface loopback 0 command in the configuration mode.
  • You then enter an address on the loopback interface by typing ip address 10.1.1.1 255.255.0.0 for example.
  • OSPF routers use a Hello protocol to identify and establish relationships with adjacent routers.

Note: Adjacent routers are routers with interfaces to a common network.
The router sends Hello packets to its neighbors and receives their Hello packets.
Note: Routers on broadcast network send Hello packets every 10 seconds, and routers on non-broadcast networks send Hello packets every 30 seconds.
In addition to helping acquire neighbors, Hello packets also act as “keepalives” to let routers know that other routers are still functional.
One of the best features of OSPF is its ability to quickly adapt to topology changes.
There are two components to routing convergence:
• detection of topology changes
• recalculation of routes

OSPF uses two mechanisms to detect topology changes.
The first mechanism is interface status changes.
For example a carrier failure on a serial link.

The second mechanism is the failure of OSPF to receive a Hello packet from its neighbor within a timing windows called dead timer.
Once this timer expires, the router assumes its neighbor is down.

You can configure the dead timer by entering ip ospf dead-interval at the configuration prompt.
The default value of the dead timer is four times the value of the Hello interval.
This results in a default of 40 seconds for broadcast networks and two minutes for non-broadcast networks.

The second component of routing convergence is the recalculation of routes.
Once a failure has been detected, the router that detected the failure sends a link-state packet with the change information to all routers in the area.
All the routers recalculate all of their routes using the SPF algorithm.
Note: The time required to run the algorithm depends on a combination of the size of the area and the number of links and nodes in the database.

Link-state Advertisements (LSAs)

  • OSPF is a link-state protocol.
  • OSPF routers periodically send out link-state advertisements (LSAs) to all other routers.
  • An LSA is an acknowledged message that contains the portion of the routing table that applies to the state of the router’s own links.
  • Unlike distance vector routing updates, LSAs are event-driven.

For example, a change in the physical state of a link will trigger an LSA.
LSAs are also generated every 30 minutes as a method of ensuring topological database synchronization.

Let’s look at two scenarios where a router generates an LSA.

  • In the first scenario the router generates the LSA in response to the standard 30 minute refresh.
  • The LSA is sent to the nearest neighboring routers.
  • These routers check the LSA against their existing entries in the topological database.
  • If the entries are identical there is no need to forward the LSA to other routers.
  • The neighboring routers then reset their 30 minute timers.
  • This keeps the 30 minute database synchronization traffic localized in the network.
  • In the second scenario the router generates an LSA in response to a link failure.
  • Again, the LSA is sent to the nearest neighboring routers.
  • In this case the routers find that the incoming LSAs is different from their topological databases.
  • They each update their databases by running the SPF algorithm.
  • They will forward the LSA on through the network until all databases are synchronized.

Configuring OSPF with Loopback Addresses

Posted by Cyrus Bermejo on March 10, 2011 at 1:39 AM Comments comments (0)
Objectives:
  • Configure routers with a Class C IP addressing scheme
  • Observe the election process for designated router (DR) and backup designated router (BDR) on the multiaccess network
  • Configure loopback addresses for OSPF stability
  • Assign eahc OSPF interface a priority to force the election of a specific router as DR.
Topology
Lab Equipment Configuration

Router Designation
Router Name Routing Protocol OSPF Routing ID Network Segments
Router 1 London OSPF 1 192.168.1.0
Router 2 Ottawa OSPF 1 192.168.1.0
Router 3 Brasilia OSPF 1 192.168.1.0

Lab Equipment Interface Configuration

Router Designation
IP Host Table Entry Fast Ethernet 0/0 Address Interface Type
Router 1 Ottawa
Brasilia
192.168.1.1/24 192.168.31.11/32
Router 2 London
Brasilia
192.168.1.2/24 192.168.31.22/32
Router 3 London
Ottawa
192.168.1.3/24 192.168.31.33/32

Configure the routers
Cable a network that is similar to the topology. On the routers, enter the global configuration mode and configure the hostname as shown in the table above. Next, configure the interfaces and the IP host names accordingly. Do not configure loopback interfaces and routing protocols yet.

Router 1
R1#enable
R1#configure terminal
R1(config)#hostname London
London(config)#interface FastEthernet 0/0
London(config-if)#ip address 192.168.1.1 255.255.255.0
London(config-if)#no shutdown
London(config-if)#end

Router 2
R2#enable
R2#configure terminal
R2(config)#hostname Ottawa
Ottawa(config)#interface FastEthernet 0/0
Ottawa(config-if)#ip address 192.168.1.2 255.255.255.0
Ottawa(config-if)#no shutdown
Ottawa(config-if)#end

Router 3
R3#enable
R3#configure terminal
R3(config)#hostname Brasilia
Brasilia(config)#interface FastEthernet 0/0
Brasiia(config-if)#ip address 192.168.1.3 255.255.255.0
Brasilia(config-if)#no shutdown
Brasilia(config-if)#end

View the router's interface information
Router 1


Router 2


Router 3


Verify connectivity of the routers
Ping all the connected Fast Ethernet interfaces from each other.
Router 1


Router 2


Router 3



Configure OSPF routing on all routers
Configure an OSPF routing process on all routers. Use OSPF process number 1 and ensure that all networks are in area 0.

London(config)#router ospf 1
London(config-router)#network 192.168.1.0 .0.0.0.255 area 0
London(config-router)#end

Ottawa(config)#router ospf 1
Ottawa(config-router)#network 192.168.1.0 .0.0.0.255 area 0
Ottawa(config-router)#end

Brasilia(config)#router ospf 1
Brasilia(config-router)#network 192.168.1.0 .0.0.0.255 area 0
Brasilia(config-router)#end

Show OSPF adjacencies
Type the command show ip ospf neighbor on all routers to verify that the OSPF routing has formed adjacencies.




Configure the loopback interfaces


London(config)#interface loopback 0
London(config-if)#ip address 192.168.31.11 255.255.255.255
London(config-if)#end

Ottawa(config)#interface loopback 0
Ottawa(config-if)#ip address 192.168.31.22 255.255.255.255
Ottawa(config-if)#end

Brasilia(config)#interface loopback 0
Brasiia(config-if)#ip address 192.168.31.33 255.255.255.255
Brasilia(config-if)#end

Save the configuration information for all the routers, power them down and back up again.
Show OSPF adjacencies




Verify OSPF interface configuration. Type show ip ospf interface FastE
thernet 0/0 on the London router.


Configure London to always be the DR
To ensure that the London router always becomes the DR for this multiaccess segment, you must set the OSPF priority. Set the priority of the interface to 50 on the London router only.
London(config)#interface FastEthernet 0/0
London(config-if)#ip ospf priority 50
London(config-if)#end

Watch the election process
To watch the OSPF election process, restart all the routers. As soon as the router prompt is available, type the following:
Ottawa>enable
Ottawa#debug ip ospf events
To turn off all debugging, type undebug all.

Show OSPF adjacencies




Single-Area OSPF Scenario 1

Posted by Cyrus Bermejo on March 8, 2011 at 4:37 PM Comments comments (0)
Objective:
  •  Set up an IP addressing scheme for OSPF area 0
  • Configure and verify OSPF routing

 Cable a network that is similar on the network below. You can use any router that meets the interface requirements (that is 800, 1600, 1700, 2500 and 2600 routers or a combination).

Lab Equipment Configuration

Router Designation
Router Name Routing Protocol Network Segments
Router 1 Berlin OSPF 192.168.1.128/26
192.168.15.0/30
Router 2 Rome OSPF 192.168.0.0/24
192.168.15.0/30

Lab Equipment Interface Configuration

Router Designation
Router Name Fast Ethernet 0/0 Address Interface Type Serial 0/1 Address
Router 1 Berlin 192.168.1.129/26 DCE 192.168.15.1/30
Router 2 Rome 192.168.0.1/24 DTE192.168.15.2/30

Configure the interfaces of the routers according to the chart.
Note:  The command ip subnet-zero may need to be added because of the use of the ZERO subnet with VLSM on 192.168.15.0/30 and 192.168.1.128/26 networks.

Router 1

R1#configure terminal
R1(config)#hostname Berlin
Berlin(config)#interface FastEthernet0/0
Berlin(config-if)#ip address 192.168.1.129 255.255.255.192
Berlin(config-if)#no shutdown
Berlin(config-if)#interface Serial0/0
Berlin(config-if)#ip address 192.168.15.1 255.255.255.252
Berlin(config-if)#clock rate 64000
Berlin(config-if)#no shutdown


Router 2

R2#configure terminal
R2(config)#hostname Rome
Rome(config)#interface FastEthernet0/0
Rome(config-if)#ip address 192.168.0.1 255.255.255.0
Rome(config-if)#no shutdown
Rome(config-if)#interface Serial0/0
Rome(config-if)#ip address 192.168.15.2 255.255.255.252
Rome(config-if)#no shutdown

Configure an OSPF routing process on router BERLIN. Use OSPF process number 1 and ensure that all networks are in area 0.

Berlin#configure terminal
Berlin(config)#router ospf 1
Berlin(config-router)#network 192.168.1.128 0.0.0.63 area 0
Berlin(config-router)#network 192.168.15.0 0.0.0.3 area 0

Configure an OSPF routing process on router ROME. Use OSPF process number 1 and ensure that all networks are in area 0.
Rome#configure terminal
Rome(config)#router ospf 1
Rome(config-router)#network 192.168.0.0 0.0.0.255 area 0
Rome(config-router)#network 192.168.15.0 0.0.0.3 area 0


Show the Berlin routing table



Show the Rome routing table


Test network connectivty.
Show the Berlin routing protocols



Show the Rome routing protocols



Ping the ROME host from the BERLIN host



Ping the BERLIN host from the ROME host

IGRP Configuration Scenario 1

Posted by Cyrus Bermejo on March 8, 2011 at 3:22 AM Comments comments (0)
Objective:  Configure the routers with IGRP (autonomous system 100) so that all devices can ping any other device.
Cable a network that is similar on the network below.

Lab Equipment Configuration

Router Name Ethernet 0/0 Address Serial 0/0 Address
Router 1 192.168.101.1 192.168.1.1
Router 2 192.168.100.1 192.168.1.2
The subnet mask for both interfaces on all routers is 255.255.255.0
Configure the interfaces of the router according to the chart.

Router 1
Router1#configure terminal
Router1(config)#interface Ethernet0/0
Router1(config-if)#ip address 192.168.101.1 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#interface Serial0/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.0
Router1(config-if)#clock rate 64000
Router1(config-if)#no shutdown

Router 2
Router2#configure terminal
Router2(config)#interface Ethernet0/0
Router2(config-if)#ip address 192.168.100.1 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#interface Serial0/0
Router2(config-if)#ip address 192.168.1.2 255.255.255.0
Router2(config-if)#no shutdown

Enable IGRP routing (autonomous system 100)
Router1#configure terminal
Router1(config)#router igrp 100
Router1(config-router)#network 192.168.1.0
Router1(config-router)#network 192.168.101.0

Router2#configure terminal
Router2(config)#router igrp 100
Router2(config-router)#network 192.168.1.0
Router2(config-router)#network 192.168.100.0

Show the Router1 routing table

Show the Router2 routing table

RIP Routing Configuration Scenario 2

Posted by Cyrus Bermejo on March 7, 2011 at 7:15 PM Comments comments (0)
Objective:  Configure RIP routing on routers.
Cable a network that is similar on the network below.

Lab Equipment Configuration

Router Designation
Router Name Fast Ethernet 0/0 Address Serial 0/0 Address Serial 0/1 Address
Router 1 R1 192.168.5.1 192.168.1.1 192.168.3.1
Router 2 R2 192.168.4.1 192.168.1.2 192.168.2.1
Router 3 R3
192.168.3.1 192.168.2.2
The subnet mask for both interfaces on all routers is 255.255.255.0
Configure the interfaces of the router according to the chart.

Router 1
R1#configure terminal
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.5.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface s0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.3.1 255.255.255.0
R1(config-if)#no shutdown

Router 2
R2#configure terminal
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.4.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface s0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface s0/1
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown

Router 3
R3#configure terminal
R3(config)#interface s0/0
R3(config-if)#ip address 192.168.3.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface s0/1
R3(config-if)#ip address 192.168.2.2 255.255.255.0
R3(config-if)#no shutdown

Enable RIP routing
R1#configure terminal
R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.3.0
R1(config-router)#network 192.168.5.0

R2#configure terminal
R2(config)#router rip
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.4.0

R3#configure terminal
R3(config)#router rip
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0

Show the R1 routing table

Show the R2 routing table

Show the R3 routing table


RIP Routing Configuration Scenario 1

Posted by Cyrus Bermejo on March 7, 2011 at 5:51 PM Comments comments (0)
Objective:  Configure RIP routing on routers.
Cable a network that is similar on the network below.

Lab Equipment Configuration

Router Designation
Router Name Fast Ethernet 0/0 Address Serial 0/0 Address Serial 0/1 Address
Router 1 London 172.16.10.1 172.16.20.1  
Router 2 Tokyo 172.16.30.1 172.16.20.2 172.16.40.1
Router 3 Sydney 172.16.50.1 172.16.40.2  
The subnet mask for both interfaces on all routers is 255.255.255.0
Configure the interfaces of the router according to the chart.

Router 1
London#configure terminal
London(config)#interface f0/0
London(config-if)#ip address 172.16.10.1 255.255.255.0
London(config-if)#no shutdown
London(config-if)#interface s0/0
London(config-if)#ip address 172.16.20.1 255.255.255.0
London(config-if)#no shutdown

Router 2
Tokyo#configure terminal
Tokyo(config)#interface f0/0
Tokyo(config-if)#ip address 172.16.30.1 255.255.255.0
Tokyo(config-if)#no shutdown
Tokyo(config-if)#interface s0/0
Tokyo(config-if)#ip address 172.16.20.2 255.255.255.0
Tokyo(config-if)#no shutdown
Tokyo(config-if)#interface s0/1
Tokyo(config-if)#ip address 172.16.40.1 255.255.255.0
Tokyo(config-if)#no shutdown

Router 3
Sydney#configure terminal
Sdyney(config)#interface f0/0
Sydney(config-if)#ip address 172.16.50.1 255.255.255.0
Sydney(config-if)#no shutdown
Sydney(config-if)#interface s0/0
Sydney(config-if)#ip address 172.16.40.2 255.255.255.0
Sydney(config-if)#no shutdown

Enable RIP routing
London#configure terminal
London(config)#router rip
London(config-router)#network 172.16.10.0
London(config-router)#network 172.16.20.0

Tokyo#configure terminal
Tokyo(config)#router rip
Tokyo(config-router)#network 172.16.20.0
Tokyo(config-router)#network 172.16.30.0
Tokyo(config-router)#network 172.16.40.0

Sydney#configure terminal
Sydney(config)#router rip
Sydney(config-router)#network 172.16.40.0
Sydney(config-router)#network 172.16.50.0

Show the London routing table


Show the Tokyo routing table

Show the Sydney routing table


No comments:

Post a Comment