ospf last modified eng
DESCRIPTION
ospfTRANSCRIPT
OSPF
Alp ISIK
OSPF
Link State Routing Concept
OSPF Routing Design and Terminology
OSPF Neighbor Relationships
OSPF Area Design OSPF Authentication
Link State Routing Protocols
OSPF speaking Routers are creating their LSDB table via LSA’s that they have sent eachother. SPF tree’s are created via Dijkstra algorithm fram the linkstate database. Best routes in the LSDB are put into the routing table.
Link State Routing Protocols
There are 2 types of link state routing Protocol ---------------------------------------------------------------------------- - IS-IS - OSPF
Tables ---------------------------------------------------------------------------- - Neighbor Table - Topology Table - Routing Table
Link State Routing Protocols
Link State Routing Protocols uses SPF
Sends Triggered updates to annonce network changes
Send periodic updates on long intervals
Ospf basic topology
ADV Router Age Seq# Checksum Link count 1.1.1.1 494 0x8000000B 0x0098F1 5 2.2.2.2 108 0x8000000A 0x00391B 5 3.3.3.3 465 0x80000008 0x0051A0 3 4.4.4.4 390 0x80000008 0x00E7F7 3
Net Link States (Area 0)
ADV Router Age Seq# Checksum
Link ID 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4
Link ID
R1#show ip ospf data
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
192.168.13.1 192.168.14.1 192.168.23.3 192.168.24.4
1.1.1.1 650 0x80000002 0x00ECC0 1.1.1.1 1885 0x80000001 0x001693 3.3.3.3 1346 0x80000005 0x003A58 4.4.4.4 1356 0x80000003 0x002D5D
R1#show ip route ospf 2.0.0.0/24 is subnetted, 1 subnets
O 2.2.2.0 [110/3] via 192.168.14.4, 00:03:15, FastEthernet1/0 [110/3] via 192.168.13.3, 00:03:15, FastEthernet0/0
3.0.0.0/24 is subnetted, 1 subnets O 3.3.3.0 [110/2] via 192.168.13.3, 00:03:15, FastEthernet0/0
4.0.0.0/24 is subnetted, 1 subnets O 4.4.4.0 [110/2] via 192.168.14.4, 00:03:15, FastEthernet1/0 O 192.168.24.0/24 [110/2] via 192.168.14.4, 00:03:15,
FastEthernet1/0 O 192.168.23.0/24 [110/2] via 192.168.13.3, 00:03:15,
FastEthernet0/0
R1#show ip ospf int brie Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo0 1 0 1.1.1.1/24 1 P2P 0/0 Fa1/0 1 0 192.168.14.1/24 1 DR 1/1 Fa0/0 1 0 192.168.13.1/24 1 DR 1/1 Se2/0 1 0 192.168.12.1/24 64 P2P 1/1
R1#show ip ospf nei
Neighbor ID 4.4.4.4 3.3.3.3 2.2.2.2
Pri State Dead Time Address Interface 1 FULL/BDR 00:00:34 192.168.14.4 FastEthernet1/0 1 FULL/BDR 00:00:38 192.168.13.3 FastEthernet0/0 0 FULL/ - 00:00:35 192.168.12.2 Serial2/0
***************************************************** R1#clear ip ospf proces Reset ALL OSPF processes? [no]: y
OSPF Area Design
All ares must connected to area 0 which is also called backbone area.
Within the same area all routers have the same Lsdb table. Not the whole updates will pass the border of area, thus will not consume the BW of the other areas.
Data Exchange between areas provides by area border routers. ABR : 1- Seperates LSA’s flooding zones. 2- Address summarizations configured at ABR’s. 3- They will have different LSDB tables for each area’s.
Communicating between routing protocols are processed by Autonomous System Border Router (ASBR).
*********************************************************************************************** Topology changes only will converge within the area. Other area routers will only know ABR to reach the other areas. As a Cisco Recommendation there should be no more then 50 Routers in an area.
OSPF Neighbor Relationship Router ID should determined.
If there is no Router id is configured manually, highest active interface ip will become the router id, and if there is a loopback interface with an ip adres it will become the router id. Hello messages are send 10 second for broadcast Networks and 30 seconds for NBMA Networks. It can be thought as keepalive networks.
Hello Message content ----------------------------------- Router id Hello & Dead timer Network mask Area ID / flag Authentication password MTU Router priority
Neighbor DR , BDR ip address **************************************************************** Hello mesajlari, 30sn nbma de, 10sn diger network tiplerinde gonderilir. Dead timer is equal to 4 hello message as default.
OSPF Neighborship States
- - - - - -
Init // Receives a hello Twoway // check list is okey Exstart // master slave is determined Exchange Load Full
DBD’s acknowledges and
reviewed /// Related message types ----------------------------------------------------- ---- - LSR - LSA/ LSU - LS Ack **********************************************************************************
Master sends DBD first. DBD : it’s a summary of link state database .DR other’s are stay at two-way. Biggest sequence number
is the valid one, it has the newer information. Sequence number is changed by the advertised router.
Master sends DBD first.DBD : it’s a summary of link state database .DR other’s are stay at twoway. Biggest
OSPF Concepts
Cost // Depended on BW
DR & BDR are chosen by each subnet. // dependent on priority / highest ip
Topology changes are only sends to DR & BDR, more efficient BW usage will ensure.
Multicast ip 224.0.0.5 & …6, multicast mac 01-00-5e-00-00-05, …6 is used. ***************************************************************************
DR – BDR election is done at ethernet and Frame Relay networks.
DR election is not premt, for re-election reboot of router or clear ip ospf process is required.
Whole routers send to ..5, DR-BDR sends to ..6.
LSA’s are refreshed every 30 munite.
OSPF Packet Types
Hello DBD (Database Discription) Link state Request Link State Advertisement Link State Update Link State Ack
How to debug
DR-BDR DR-BDR election is occured at multiaccess networks as ethernet - framerelay. There ‘s no preemption, for any Router that joins ospf network, DR-BDR will not be re-elected. If the current DR will fall, the BDR otomatically becomes DR. In this situation no new DR election will occur but BDR election will occur.
DR-BDR 2 If we open the Routers with an order R1, R2, R3, R4. R1 becomes DR; R2 becomes BDR.
Then clear ip ospf process at R1 .
Re-elected the BDR and R4 becomes BDR.
PS: DROTHER’s stays at 2-way state. They don’t share information eachother, They shared DBD’s over DR.
******************************************************************* In order to troubleshoot initial state, “show ip ospf neighbor” command could be used.
Priority In order to manupulate DR-BDR election we can use the priority command under the related interface via “ip ospf priority <0-255>” command is used. Higher priority becomes DR olur. Router with a 0 priority does not attempt to DR-BDR election. 1 is default value.
Loopback interface When enabling loopback interface at ospf network, it’s advertised /32 as default without looking the original ip subnet. In order to advertise the original subnet under the interface use “ip ospf network point-to-point” command.
Summary
Summary 2
Show ip route output from R1, before summarization at R2 (ABR)
Summary Routes 3 At R2 applying summarization as below : R2(config-router) area 10 range 10.10.0.0 255.255.252.0
We see 1 entry for 10.10.0.0 network at the routing table of R1 as below
Summary for ASBR 4 Before summarization of static routes R5 routing table as below :
R1(config-router)# summary-address 172.16.0.0 255.255.252.0
Not : E2 routes does not change the cost after redistribution.
Summary for ASBR 4
Static routes are summarized as below :
Cost
By default for 100Mb BW cost is 1, and for any higher BW it s 1 again, you need to reconfigure the value while you have higher BW for proper calculation.
Not : that value need to change at all routers in the network. ----------------------------------------------------------------- R1 (config)# router ospf 1 R1(config-router)# auto-cost referance bandwidth 10000 ----------------------------------------------------------------- The above is done for 10G BW, and this config need to be implemented
at each Router in the network.
OSPF over NBMA There is 5 methods;
- Non Broadcast (rfc standart) - Point-to-multipoint (rfc standart) - Point-to-point (Cisco Proprietary) - Broadcast (Cisco) - Point-to-multipoint, non-broadcast (Cisco)
Not : In Hub & Spoke topology; Hub need to be DR. ********************************************************************************
At Non Broadcast; Neighbor command manually need to be typed. DR – BDR election is required.
R1 (config-router)# neighbor <ip address> priority 0
R1 (config-if)# ip ospf network non-broadcast
At Point – to – multipoint, neighbors automatically found, DR – BDR election does not occur..
At Broadcast neighbor’s automatically found, DR – BDR is elected.
Point- to – multipoint non broadcast: Neighbor command required, DR – BDR election is not required.
Point to point: neighbors automatically found, there is no DR-BDR.
NBMA p-to-p, p-to-mp, non-broadcast
Area 0 -> non broadcast Area 24 -> point-to-point Area 356 -> hybrid
Area 0, R1
Area 0, R1
Area 0, R1
R2; Area 0, Area 24
R2; Area 0, Area 24
R2; Area 0, Area 24
R4; Area 24
R4; Area 24
R3; Area 0, Area 356
R3; Area 0, Area 356
R3; Area 0, Area 356
R5; Area 356
R5; Area 356
Virtual Links
Is a necessity while it s not possible to directly connect an area to area 0.
Not a desired topology but it works. It should be used as a temporary solution, better to re-redesign.
Virtual Links 2
Virtual link
R2#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 2.2.2.2 log-adjacency-changes area 1 virtual-link 3.3.3.3 network 2.2.2.2 0.0.0.0 area 0 network 10.1.2.2 0.0.0.0 area 0 network 10.2.3.2 0.0.0.0 area 1
R4#show ip ospf data
OSPF Router with ID (4.4.4.4) (Process ID 1)
Router Link States (Area 2)
R3#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 3.3.3.3 log-adjacency-changes area 1 virtual-link 2.2.2.2 network 3.3.3.3 0.0.0.0 area 1 network 10.2.3.3 0.0.0.0 area 1 network 10.3.4.3 0.0.0.0 area 2
Virtual Links 3
Link ID ADV Router Age Seq# Checksum Link count 3.3.3.3 3.3.3.3 67 0x80000004 0x00272C 2 4.4.4.4 4.4.4.4 1524 0x80000002 0x00C789 2
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum 1.1.1.0 3.3.3.3 2 0x80000001 0x001A92 2.2.2.0 3.3.3.3 2 0x80000001 0x007376 3.3.3.0 3.3.3.3 67 0x80000001 0x00CC5A 10.1.2.0 3.3.3.3 2 0x80000001 0x008F14 10.2.3.0 3.3.3.3 68 0x80000001 0x00F5EB
OSPF Areas and Router Types What is the reasons behind Multiple Areas Summarization (only possible at ABR - ASBR) Hierarchical Network BW efficiency
Area Types Normal Stub // Automatically creates default route to area 0 Router; No redistribute routes accepted. Totally Stub // Automatically creates default route to area 0 Router; summary and redistribute routes not accepted. NSSA
- - -
- -
-
- - Totally NSSA
Router // Automatically creates default route to area 0
LSA Type 4 : Summary ASBR Reachability LSA Type 5 : Ext LSA // ASBR summary route LSA Type 7Ext LSA for Stub
LSA Type 1 : Router LSA Type 2 : Network LSA Type 3 : Summary
OSPF Areas and Router Types
// generated by DR // ABR summary
NORMAL
Type 1
Type 2 Type 3 Type 4 Type 5
STUB
Type 1
Type 2 Type 3
Totally Stub Type 1 Type 2
NSSA
Type 1
Type 2 Type 3 Type 7
Totally NSSA Type 1
Type 2 Type 7
OSPF Areas and Router Types
Area 0
R1#show run | s ospf ip ospf network point-to-point
router ospf 1 router-id 1.1.1.1 log-adjacency-changes area 2 stub network 1.1.1.1 0.0.0.0 area 2 network 10.1.2.1 0.0.0.0 area 2
R4#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 4.4.4.4 log-adjacency-changes area 1 stub no-summary network 0.3.4.4 0.0.0.0 area 0 network 4.4.4.4 0.0.0.0 area 1 network 10.3.4.4 0.0.0.0 area 0 network 10.4.5.4 0.0.0.0 area 1
R2#sho run | s ospf ip ospf network point-to-point router ospf 1 router-id 2.2.2.2 log-adjacency-changes area 2 stub network 2.2.2.2 0.0.0.0 area 0 network 10.1.2.2 0.0.0.0 area 2 network 10.2.3.2 0.0.0.0 area 0
R5#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 5.5.5.5 log-adjacency-changes area 1 stub no-summary network 5.5.5.5 0.0.0.0 area 1 network 10.4.5.5 0.0.0.0 area 1
OSPF Areas and Router Types
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 448 0x8000000B 0x000657 3 2.2.2.2 2.2.2.2 520 0x80000008 0x0090DD 2
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 2.2.2.2 520 0x80000002 0x0073C1 2.2.2.0 2.2.2.2 16 0x80000004 0x002706 3.3.3.0 2.2.2.2 520 0x80000003 0x008763 4.4.4.0 2.2.2.2 1700 0x80000001 0x00E9BF 5.5.5.0 2.2.2.2 1448 0x80000001 0x00481E 10.2.3.0 2.2.2.2 520 0x80000003 0x002EB7 10.3.4.0 2.2.2.2 520 0x80000003 0x00990A 10.4.5.0 2.2.2.2 1674 0x80000001 0x00095A R1#show ip route
Gateway of last resort is 10.1.2.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets O IA 2.2.2.0 [110/65] via 10.1.2.2, 00:38:46, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets O IA 3.3.3.0 [110/129] via 10.1.2.2, 00:38:46, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets O IA 4.4.4.0 [110/193] via 10.1.2.2, 00:28:31, Serial0/0
5.0.0.0/24 is subnetted, 1 subnets O IA 5.5.5.0 [110/257] via 10.1.2.2, 00:24:18, Serial0/0
10.0.0.0/24 is subnetted, 4 subnets C 10.1.2.0 is directly connected, Serial0/0 O IA 10.4.5.0 [110/256] via 10.1.2.2, 00:28:04, Serial0/0 O IA 10.2.3.0 [110/128] via 10.1.2.2, 00:38:47, Serial0/0 O IA 10.3.4.0 [110/192] via 10.1.2.2, 00:38:47, Serial0/0 O*IA 0.0.0.0/0 [110/65] via 10.1.2.2, 00:38:47, Serial0/0
R5#show ip ospf database
OSPF Router with ID (5.5.5.5) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 4.4.4.4 4.4.4.4 1657 0x80000005 0x00A87D 3 5.5.5.5 5.5.5.5 1657 0x80000005 0x00A579 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 4.4.4.4 1662 0x80000001 0x0039F4 R5#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
Gateway of last resort is 10.4.5.4 to network 0.0.0.0
4.0.0.0/24 is subnetted, 1 subnets O 4.4.4.0 [110/65] via 10.4.5.4, 00:27:40, Serial0/0
5.0.0.0/24 is subnetted, 1 subnets C 5.5.5.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets C 10.4.5.0 is directly connected, Serial0/0 O*IA 0.0.0.0/0 [110/65] via 10.4.5.4, 00:27:40, Serial0/0
OSPF Areas and Router Types
OSPF Areas and Router Types
R5# show run | s ospf ip ospf network point-to-point router ospf 1 router-id 5.5.5.5 log-adjacency-changes area 1 nssa redistribute rip subnets network 5.5.5.5 0.0.0.0 area 1 network 10.4.5.5 0.0.0.0 area 1
R5#show ip ospf data
OSPF Router with ID (5.5.5.5) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 4.4.4.4 4.4.4.4 80 0x8000000A 0x002CEA 3 5.5.5.5 5.5.5.5 81 0x8000000B 0x005AB4 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 1.1.1.0 4.4.4.4 85 0x80000002 0x00223F 2.2.2.0 4.4.4.4 85 0x80000002 0x007B23 3.3.3.0 4.4.4.4 85 0x80000002 0x00D407 10.1.2.0 4.4.4.4 85 0x80000002 0x0097C0 10.2.3.0 4.4.4.4 85 0x80000002 0x00FD98 10.3.4.0 4.4.4.4 85 0x80000002 0x006470
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag 172.16.1.0 5.5.5.5 128 0x80000001 0x002789 0
R4#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 4.4.4.4 log-adjacency-changes area 1 nssa network 0.3.4.4 0.0.0.0 area 0 network 4.4.4.4 0.0.0.0 area 1 network 10.3.4.4 0.0.0.0 area 0 network 10.4.5.4 0.0.0.0 area 1
R4#show ip route
1.0.0.0/24 is subnetted, 1 subnets O IA 1.1.1.0 [110/193] via 10.3.4.3, 00:00:53, Serial0/0
2.0.0.0/24 is subnetted, 1 subnets O 2.2.2.0 [110/129] via 10.3.4.3, 00:01:03, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets O 3.3.3.0 [110/65] via 10.3.4.3, 00:01:03, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets C 4.4.4.0 is directly connected, Loopback0
5.0.0.0/24 is subnetted, 1 subnets O 5.5.5.0 [110/65] via 10.4.5.5, 00:00:53, Serial0/1
172.16.0.0/24 is subnetted, 1 subnets O N2 172.16.1.0 [110/20] via 10.4.5.5, 00:00:53, Serial0/1
10.0.0.0/24 is subnetted, 4 subnets O IA 10.1.2.0 [110/192] via 10.3.4.3, 00:00:53, Serial0/0 C 10.4.5.0 is directly connected, Serial0/1 O 10.2.3.0 [110/128] via 10.3.4.3, 00:01:03, Serial0/0 C 10.3.4.0 is directly connected, Serial0/0 O E2 192.168.1.0/24 [110/20] via 10.3.4.3, 00:00:53, Serial0/0
OSPF Areas and Router Types
OSPF Areas and Router Types
R4#show run | s ospf ip ospf network point-to-point router ospf 1 router-id 4.4.4.4 log-adjacency-changes area 1 nssa no-summary network 0.3.4.4 0.0.0.0 area 0 network 4.4.4.4 0.0.0.0 area 1 network 10.3.4.4 0.0.0.0 area
0 network 10.4.5.4 0.0.0.0 area
1
R5#show ip ospf data
OSPF Router with ID (5.5.5.5) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 4.4.4.4 4.4.4.4 761 0x8000000A 0x002CEA 3 5.5.5.5 5.5.5.5 762 0x8000000B 0x005AB4 3
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 4.4.4.4 19 0x80000001 0x00C065
Type-7 AS External Link States (Area 1)
OSPF Areas and Router Types
Link ID ADV Router 172.16.1.0 5.5.5.5 R5#show ip route
Age Seq# Checksum Tag 809 0x80000001 0x002789 0
Gateway of last resort is 10.4.5.4 to network 0.0.0.0
4.0.0.0/24 is subnetted, 1 subnets O 4.4.4.0 [110/65] via 10.4.5.4, 00:12:59, Serial0/0
5.0.0.0/24 is subnetted, 1 subnets C 5.5.5.0 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets C 172.16.1.0 is directly connected, Loopback10
10.0.0.0/24 is subnetted, 1 subnets C 10.4.5.0 is directly connected, Serial0/0 O*IA 0.0.0.0/0 [110/65] via 10.4.5.4, 00:00:40, Serial0/0
OSPF Authentication
Both md5 and clear text authentication is supported.
It’s possible to use the command both under the area and the related İnterface but for tracking better to type under the interface.
ip ospf message-digest-key 1 md5 alp ip ospf authentication key alp // for clear text
Default information originate
Via default information originate command, if the command typed router has a default route, it will send it’s default route to other ospf domain routers making itself as next hop,if it does not have a configured default route it will not send the default route information. Default information originate always command sends default route to other ospf domain routers as it’s interface as a next hop, either it has a configured default route or not.