Configuring Ospf: Robert Pradeepan Srilanka
Configuring Ospf: Robert Pradeepan Srilanka
Configuring Ospf: Robert Pradeepan Srilanka
Robert Pradeepan
SriLanka
Neighbor table:
Also known as the adjacency database
Contains list of recognized neighbors
Topology table:
Typically referred to as LSDB
Contains all routers and their attached links in the area or
network
Identical LSDB for all routers within an area
Routing table:
Commonly named a forwarding database
Contains list of best paths to destinations
OSPF area
characteristics:
• Minimizes routing
table entries
• Localizes impact of
a topology change
within an area
• Detailed LSA
flooding stops at
the area boundary
• Requires a
hierarchical
network design
Router(config)#
router ospf process-id [vrf vpn-name]
Router(config-router)#
network ip-address wildcard-mask area area-id
Router(config-if)#
ip ospf process-id area area-id [secondaries none]
Router(config)#interface loopback 0
Router(config-if)#ip address 172.16.17.5 255.255.255.255
Router(config-router)#
router-id ip-address
Router(config)#router ospf 1
Router(config-router)#router-id 172.16.1.1
RouterB#sh ip ospf
Routing Process "ospf 50" with ID 10.64.0.2
<output omitted>
Area 1
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:54.636 ago
SPF algorithm executed 3 times
<output omitted>
Verifying OSPF Operation
Router#
show ip protocols
Router#
show ip route ospf [process-id ]
Router#
show ip ospf interface [type number]
• Displays the OSPF router ID, area ID, and adjacency information
Verifying OSPF Operation (Cont.)
Router#
show ip ospf
Router#
Router(config-if)#
Router(config-if)#
ip ospf network [{broadcast | non-broadcast | point-to-
multipoint [non-broadcast] | point-to-point}]
Treated as a broadcast
network by OSPF
(acts like a LAN).
All serial ports are part of
the same IP subnet.
Frame Relay, X.25, and
ATM networks default to
nonbroadcast mode.
Neighbors must be
statically configured.
Duplicates LSA updates.
Complies with RFC 2328.
Using the neighbor Command
Router(config-router)#
neighbor ip-address [priority number] [poll-interval
number] [cost number] [database-filter all]
Router A
interface Serial0/0/0
ip address 192.168.1.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
<output omitted>
Router C
interface Serial0/0/0
ip address 192.168.1.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
ip ospf priority 0
Point-to-Multipoint Example
Router(config)#
interface serial number.subinterface-number {multipoint |
point-to-point}
Router(config)#
interface serial number.subinterface-number point-to-point
Router(config)#
interface serial number.subinterface-number multipoint
Single interface serial 0/0/0 has been logically separated into two subinterfaces:
one point-to-point (S0/0/0.1) and one point-to-multipoint (S0/0/0.2).
Each subinterface requires a subnet.
OSPF defaults to point-to-point mode on point-to-point subinterfaces.
OSPF defaults to nonbroadcast mode on point-to-multipoint subinterfaces.
OSPF over NBMA Topology Summary
Manual
Nonbroadcast Full or partial
Same 30 sec configuration, RFC
(NBMA) mesh
DR/BDR elected
Point-to- Manual
partial-mesh
multipoint Same 30 sec configuration, Cisco
or star
nonbroadcast no/DR/BDR
Partial-mesh or
Different for Each Automatic,
Point-to-point star, using 10 sec Cisco
Subinterface no DR/BDR
subinterface
Creation of Adjacencies for Point-to-Point
Mode
remoterouter#sh ip ospf
Routing Process "ospf 1000" with ID 10.2.2.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border router
<output omitted>
1 Router LSAs
2 Network LSAs
3 or 4 Summary LSAs
Autonomous system
5
external LSAs
One network (type 2) LSA for each transit broadcast or NBMA network in
an area
Includes list of attached routers on the transit link
Includes subnet mask of link
Advertised by the DR of the broadcast network
Floods within its area only; does not cross ABR
Type 3 LSAs are used to flood network information to areas outside the
originating area (interarea)
Describes network number and mask of link.
Advertised by the ABR of originating area.
Regenerated by subsequent ABRs to flood throughout the autonomous system.
By default, routes are not summarized, and type 3 LSA is advertised for every
subnet.
Summary (type 4) LSAs are used to advertise an ASBR to all other areas in the
autonomous system.
They are generated by the ABR of the originating area.
They are regenerated by all subsequent ABRs to flood throughout the autonomous
system.
Type 4 LSAs contain the router ID of the ASBR.
External (type 5) LSAs are used to advertise networks from other autonomous systems.
Type 5 LSAs are advertised and owned by the originating ASBR.
Type 5 LSAs flood throughout the entire autonomous system.
The advertising router ID (ASBR) is unchanged throughout the autonomous system.
Type 4 LSA is needed to find the ASBR.
By default, routes are not summarized.
RouterB>show 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
RouterA(config-if)#
ip ospf cost interface-cost
• Sets the reference bandwidth to values other than 100 Mbps (legal
values range from 1 to 4,294,967 in megabits per second).
Router(config-router)#
area area-id range address mask [advertise | not-advertise]
[cost cost]
• External LSAs
are stopped.
• Default route
is advertised
into stub area
by the ABR.
• All routers in
area 50 must
be configured
as stub.
RouterA(config-router)#
RouterA(config-router)#
area area-id default-cost cost
• This command defines the cost of a default route sent into the stub
area.
• The default cost is 1.
• NSSA breaks stub area rules. • ABR (R2) converts LSA type 7
• ASBR (R1) is allowed in to LSA type 5.
NSSA. • ABR sends default route into
• Special LSA type 7 defined, NSSA instead of external routes
sent by ASBR. from other ASBRs.
• NSSA is an RFC addendum.
• Use this command instead of the area stub command to define the
area as NSSA.
• The no-summary keyword creates an NSSA totally stubby area; this
is a Cisco proprietary feature.
Router(config-router)#
area area-id authentication [message-digest]
<output omitted>
interface Loopback0
ip address 10.2.2.2 255.255.255.0
<output omitted>
interface Serial0/0/1
ip address 192.168.1.102 255.255.255.224
ip ospf authentication
ip ospf authentication-key plainpas
<output omitted>
router ospf 10
log-adjacency-changes
network 10.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
R1#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:01:17, Serial0/0/1
C 10.1.1.0/24 is directly connected, Loopback0
192.168.1.0/27 is subnetted, 1 subnets
C 192.168.1.96 is directly connected, Serial0/0/1
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
Router(config-if)#
ip ospf authentication [message-digest | null]
Router(config-router)#
area area-id authentication [message-digest]
<output omitted>
interface Loopback0
ip address 10.2.2.2 255.255.255.0
<output omitted>
interface Serial0/0/1
ip address 192.168.1.102 255.255.255.224
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 secretpass
<output omitted>
router ospf 10
log-adjacency-changes
network 10.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
R1#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:00:37, Serial0/0/1
C 10.1.1.0/24 is directly connected, Loopback0
192.168.1.0/27 is subnetted, 1 subnets
C 192.168.1.96 is directly connected, Serial0/0/1
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
R2#
*Feb 17 18:50:43.046: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication type. Input packet specified type 1, we use type 0
R2#
*Feb 17 18:53:13.050: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication Key - Clear Text
R2#
*Feb 17 17:55:28.226: OSPF: Send with youngest Key 2
*Feb 17 17:55:28.286: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication Key - No message digest key 1 on interface
*Feb 17 17:55:38.226: OSPF: Send with youngest Key 2
LSAs are the building blocks of the LSDB. There are 11 types of
OSPF LSAs.
Route summarization reduces OSPF LSA flooding and routing
table size, which reduces memory and CPU utilization on
routers.
Stub area techniques improve OSPF performance by reducing
the LSA flooding.
OSPF supports two types of authentication:
Simple password (or plain text) authentication
MD5 authentication