Beruflich Dokumente
Kultur Dokumente
2010 Juniper Networks, Inc. All rights reserved. | www.juniper.net | Worldwide Education Services
Chapter Objectives
After successfully completing this chapter, you will be able to:
Explain the operations of OSPF Describe the role of the designated router List and describe OSPF area types Configure, monitor, and troubleshoot OSPF
www.juniper.net | 4-
Agenda: OSPF
Overview of OSPF Adjacency Formation and the DR Election OSPF Scalability Configuring and Monitoring OSPF Basic OSPF Troubleshooting
www.juniper.net | 4-
An Overview of OSPF
OSPF is a link-state IGP used within an AS OSPF floods link-state advertisements
OSPF routers use the received LSAs to create a complete database of the network OSPF uses the shortest-path-first algorithm to calculate the best path to each destination network
OSPF
ISP X
AS 64512
2010 Juniper Networks, Inc. All rights reserved.
AS 64587
Worldwide Education Services
www.juniper.net | 4-
R2 R1 OSPF Area 0 R3 R4
www.juniper.net | 4-
Link-state advertisements are flooded reliably using link-state requests, link-state updates, and link-state acknowledgments.
R1
Link-State Request Link-State Update Link-State Acknowledgment
2010 Juniper Networks, Inc. All rights reserved.
R2
www.juniper.net | 4-
Hello Packet
Type 1 Hello Type 2 Type 3 Type 4 Type 5 Link-State Acknowledgment Database Link-State LinkDescription Request State Update
Multicast hello packets are used to establish and maintain OSPF neighbor relationships
Sent to 224.0.0.5all OSPF routers address Consist of the OSPF header plus the following fields:
Network mask* Router priority Hello interval* Designated router Dead interval* Backup designated router Options* Neighbor
* Fields that must match to form an adjacency over a broadcast medium; a matching network mask is not required for point-to-point links
2010 Juniper Networks, Inc. All rights reserved.
www.juniper.net | 4-
Database description packets are exchanged during adjacency formation to determine which router is in charge of the database exchange
Describe the contents of the link-state database and consist of the OSPF header, a sequence number, and LSA headers
www.juniper.net | 4-
Link-state request packets are sent by an OSPF router when that router detects its database is stale
Used to request precise version of database and consist of the OSPF header, link-state type, link-state ID, and advertising router
R1
Link-State Request Link-State Update Link-State Acknowledgment
2010 Juniper Networks, Inc. All rights reserved.
R2
www.juniper.net | 4-
Link-state update packets are the basic information block in OSPF and can carry multiple LSAs
Transmitted using multicast to either the all OSPF routers address (224.0.0.5) or the all DRs address (224.0.0.6), and consist of the OSPF header, number of advertisements, and LSAs
R1 R2
Link-State Request Link-State Update Link-State Acknowledgment
2010 Juniper Networks, Inc. All rights reserved.
www.juniper.net | 4-
R2
www.juniper.net | 4-
Agenda: OSPF
Overview of OSPF Adjacency Formation and the DR Election OSPF Scalability Configuring and Monitoring OSPF Basic OSPF Troubleshooting
www.juniper.net | 4-
Adjacency Formation
R1
Down 2Way ExStart Exchange
Hello (DR=0, Seen = 0) Hello (DR=RT2, Seen = RT1) Hello (DR=RT2, Seen = RT2) DD (Seq=x, Master) DD (Seq=y, Master) DD (Seq=y, Slave) DD (Seq=y+1, Master) DD (Seq=y+1, Slave)
R2
Down Init 2Way ExStart Exchange
Loading
Full
2010 Juniper Networks, Inc. All rights reserved.
Full
www.juniper.net | 4-
Adjacency Optimization (1 of 2)
By default, OSPF attempts to form adjacencies with all neighbors discovered on all interfaces
On a broadcast media like Ethernet, this approach is suboptimal because it would require a full mesh of adjacencies
Adjacencies
www.juniper.net | 4-
Adjacency Optimization (2 of 2)
OSPF elects a DR to represent the segment
Minimizes OSPF processes and reduces traffic on segment A BDR is also elected to recover if the DR fails
DR
BDR DR
DR
DROther
DROther
DROther
www.juniper.net | 4-
www.juniper.net | 4-
Adjacencies
DROther R3 (RID: 1.1.1.3) user@R1> show ospf neighbor Address Interface 172.25.0.4 ge-0/0/1.0 172.25.0.3 ge-0/0/1.0 172.25.0.2 ge-0/0/1.0 user@R4> show ospf neighbor Address Interface 172.25.0.1 ge-0/0/1.0 172.25.0.2 ge-0/0/1.0 172.25.0.3 ge-0/0/1.0
2010 Juniper Networks, Inc. All rights reserved.
2-way
Dead 33 38 38 Dead 37 35 34
www.juniper.net | 4-
Agenda: OSPF
Overview of OSPF Adjacency Formation and the DR Election OSPF Scalability Configuring and Monitoring OSPF Basic OSPF Troubleshooting
www.juniper.net | 4-
Solution: Implement OSPF areas to shrink the size of the link-state database
Area 0
Area 1
Area 0
www.juniper.net | 4-
OSPF Areas
AS 65415
Area 0.0.0.0 serves as backbone area and distributes routing information between attached areas.
Areas
Area 0.0.0.1
Area 0.0.0.0
Area 0.0.0.2
An AS can be divided into smaller groups called areas LSA flooding can be constrained to an area, which effectively reduces the size of the link-state database All routers maintain an identical copy of the link-state database on a per-area basis
2010 Juniper Networks, Inc. All rights reserved.
www.juniper.net | 4-
OSPF Routers
Area border routers (ABRs) belong to Area 0.0.0.0 and an attached area. Backbone routers have at least one link in OSPF Area 0.0.0.0
AS 65415
Area 0.0.0.1
Area 0.0.0.0
Area 0.0.0.2
www.juniper.net | 4-
Stub area that receives only a default route from the backbone Totally Stubby Area
www.juniper.net | 4-
Describe the state and cost of the routers links (interfaces) to the area (Intra-area).
Originated for multi-access segments with more than one attached router. Describe all routers attached to the specific segment. Originated by a designated router (DR).
ABR
Originated by ABRs. Describe networks in the AS but outside of area (Inter-area). Also describe the location of the ASBR.
ASBR
Originated by an ASBR. Describe external destination prefixes or a default route.
ASBR
Used by not-so-stubby areas to import external routes into a stub area.
www.juniper.net | 4-
www.juniper.net | 4-
Agenda: OSPF
Overview of OSPF Adjacency Formation and the DR Election OSPF Scalability Configuring and Monitoring OSPF Basic OSPF Troubleshooting
www.juniper.net | 4-
www.juniper.net | 4-
Conguring OSPF
[edit protocols] user@R1# show ospf { area <area-id> { <area options>; interface <interface-name> { <interface options>; } } } ospf3 { area <area-id> { <area options>; interface <interface-name> { <interface options>; } } }
www.juniper.net | 4-
The Router ID
OSPF uses the RID to identify the router from which a packet originated
You can manually define the RID under the [edit routing-options] hierarchy
[edit routing-options] user@R1# show router-id 192.168.100.1;
The RID is a 32-bit number in dotted quad notation.
If you do not configure a RID, a non-127/8 IP address of the first interface to come online is used (typically lo0) If lo0 does not have a suitable address, the IP address associated with first hardware interface is used
Note: We strongly recommend that you configure a RID to avoid unpredictable behavior if the interface addresses are changed.
2010 Juniper Networks, Inc. All rights reserved.
www.juniper.net | 4-
Area 0.0.0.1
ge-0/0/1 ge-1/0/0 ge-0/0/3
172.26.2.0/30
Area 0.0.0.2
ge-0/0/1 ge-0/0/2 ge-0/0/3 ge-1/0/1
172.18.1.0/24
172.26.1.0/30
172.26.3.0/30
R1 - lo0/RID: 192.168.1.1
R2 - lo0/RID: 192.168.1.2
R3 - lo0/RID: 192.168.1.3
www.juniper.net | 4-
[edit protocols] [edit protocols] user@R3# show user@R2# show ABRs ospf { ospf { area 0.0.0.0 { area 0.0.0.0 { interface ge-0/0/1.0; interface ge-0/0/1.0; interface ge-0/0/2.0 { interface ge-0/0/2.0 { metric 100; metric 100; Increased metric } } for secondary interface lo0.0; interface lo0.0; path } } area 0.0.0.2 { area 0.0.0.1 { interface ge-0/0/3.0; interface ge-0/0/3.0; } } } }
www.juniper.net | 4-
www.juniper.net | 4-
Area 0.0.0.1
ge-0/0/1 ge-1/0/0 ge-0/0/3 ge-0/0/1 ge-0/0/2
Area 0.0.0.0
172.26.2.0/30
ge-0/0/1 ge-0/0/2
Area 0.0.0.2
ge-0/0/3 ge-1/0/1
172.18.1.0/24
172.26.1.0/30
172.26.3.0/30
R1 - lo0/RID: 192.168.1.1
R2 - lo0/RID: 192.168.1.2
R3 - lo0/RID: 192.168.1.3
www.juniper.net | 4-
Area 0.0.0.1
ge-0/0/1 ge-1/0/0 ge-0/0/3 ge-0/0/1 ge-0/0/2
Area 0.0.0.0
172.26.2.0/30
ge-0/0/1 ge-0/0/2
Area 0.0.0.2
ge-0/0/3 ge-1/0/1
172.18.1.0/24
172.26.1.0/30
172.26.3.0/30
R1 - lo0/RID: 192.168.1.1
R2 - lo0/RID: 192.168.1.2
R3 - lo0/RID: 192.168.1.3
www.juniper.net | 4-
Remote subnet connecting R3 and R4 is reachable through desired path. inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both user@R2> show route 172.26.4.0/30 172.26.4.0/30 *[OSPF/10] 02:24:29, metric 2 > to 172.26.2.2 via ge-0/0/1.0
www.juniper.net | 4-
www.juniper.net | 4-
Area 0.0.0.1
ge-0/0/1 ge-1/0/0 ge-0/0/3 ge-0/0/1 ge-0/0/2
Area 0.0.0.0
172.26.2.0/30
ge-0/0/1 ge-0/0/2
172.18.1.0/24
172.26.1.0/30
172.26.3.0/30
R1 - lo0/RID: 192.168.1.1
R2 - lo0/RID: 192.168.1.2
R3 - lo0/RID: 192.168.1.3
www.juniper.net | 4-
Age 1387 1249 2049 2449 2541 2249 1618 1649 2310 Age 56 Age 96
Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22
Cksum Len 0x84ae 60 0x545e 60 0x43e3 32 0x38ed 32 0x4db7 28 0xe9f8 28 0xa3bb 28 0x57ef 28 0x93c9 28
Opt Cksum Len 0x22 0x82c3 48 Opt Cksum Len 0x22 0x374c 36
www.juniper.net | 4-
Elapsed 0.000003
www.juniper.net | 4-
www.juniper.net | 4-
Agenda: OSPF
Overview of OSPF Adjacency Formation and the DR Election OSPF Scalability Configuring and Monitoring OSPF Basic OSPF Troubleshooting
www.juniper.net | 4-
Protocol traceoptions
www.juniper.net | 4-
Checklist
Check physical and data link layer connectivity Check for mismatched IP subnet/mask, area number, area type, authentication, hello/dead interval, or network type Check MTU settings to ensure that they match Normal for DR-Other neighbor
www.juniper.net | 4-
Using Traceoptions
Use traceoptions to identify adjacency formation issues; a sample configuration is shown:
[edit protocols] user@R1# show ospf { traceoptions { file trace-ospf; flag error detail; flag event detail; } area 0.0.0.0 { interface ge-1/0/0.0; interface lo0.0; } }
User-defined file-name and flag options. Include the detail option to generate additional details in the associated log file.
Area 0.0.0.0
ge-1/0/0 ge-0/0/3
R1 - lo0: 192.168.1.1
.1
172.26.1.0/30
.2
R2 - lo0: 192.168.1.2
www.juniper.net | 4-
Area 0.0.0.0
R1 - lo0: 192.168.1.1
ge-1/0/0
.1
172.26.1.0/30
.2
R2 - lo0: 192.168.1.2
www.juniper.net | 4-
www.juniper.net | 4-
Summary
In this chapter, we:
Explained the operations of OSPF Described the role of the designated router Listed and described OSPF area types Configured, monitored, and troubleshot OSPF
www.juniper.net | 4-
Review Questions
1. What is the purpose of OSPF LSAs? 2. What benefits can exist by segmenting a large singlearea OSPF environment into multiple areas? 3. What is the difference between an ABR and an ASBR? 4. List some common OSPF area types and their functional considerations.
www.juniper.net | 4-
www.juniper.net | 4-