What are the details of OSPF network optimization?

Article catalog

After class summary of OSPF network optimization (2)

1, Topology

2, Configure underlying information

<Huawei>
<Huawei>system-view------------------------Enter system configuration mode from system user mode
[Huawei]
[Huawei]sysname AR-1-----------------------Change the system name of the equipment to AR-1
[AR-1]
[AR-1]int LoopBack 0-----------------------Create and enter loopback 0
[AR-1-LoopBack0]ip add 1.1.1.1 32----------Configure this interface address as 32-bit
[AR-1-LoopBack0]quit 
[AR-1]
[AR-1]int G0/0/0---------------------------Enter Gigabit physical interface G0/0/0
[AR-1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[AR-1-GigabitEthernet0/0/0]undo shutdown---Manual activation (default in activation mode)
[AR-1-GigabitEthernet0/0/0]quit
[AR-1] 
[AR-1]int G0/0/1
[AR-1-GigabitEthernet0/0/1]ip add 100.1.1.1 24  
[AR-1-GigabitEthernet0/0/1]undo shutdown 
[AR-1-GigabitEthernet0/0/1]quit 
[AR-1]int G0/0/2
[AR-1-GigabitEthernet0/0/1]ip add 15.1.1.1 24  
[AR-1-GigabitEthernet0/0/1]undo shutdown 
[AR-1-GigabitEthernet0/0/1]quit 
[AR-1]
[AR-1]quit ---------------------------------Exit from system mode to user mode
<AR-1>save----------------------------------Save current configuration (save current configuration information as text)
Similar to other equipment

Configure OSPF Protocol

[AR-1]
[AR-1] OSPF 1 router id 1.1.1.1
 [AR-1-ospf-1]area 0
 [ar-1-OSPF-1-area-0.0.0.0]
Dry area)
[AR-1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[AR-1-ospf-1-area-0.0.0.0]quit 
[AR-1-ospf-1]area 1
 [ar-1-OSPF-1-area-0.0.0.1] network
[AR-1-ospf-1-area-0.0.0.1]quit
[AR-1-ospf-1]quit 
Similar to other equipment

3, Function configuration and analysis

1. Equivalent routing and cost

(1) By modifying the cost parameter of the interface, the optimal route of AR-8 link on AR-9 is active

dis ip routing-table

[AR-9]int g0/0/2
[AR-9-GigabitEthernet0/0/2]ospf cost 10--Modify the COST Is 10, the smaller is the priority (default is 10^8/Interface bandwidth)

dis ip routing-table

(2) Certification:
Open the interface authentication mode on the AR-5 and AR-2 interconnection links: Keychain; authentication password 1008611; password encryption MD5; effective time: 8 a.m. to 18 p.m. every day

[AR-2]keychain AAA mode periodic daily------The creation name is AAA The authentication key is defined as the daily cycle of use
[AR-2-keychain]key-id 1---------------------Define key ID 1(with ID The key algorithm, password, and service life of the
[AR-2-keychain-keyid-1]algorithm md5--------The encryption algorithm of this key is MD5 encryption
[AR-2-keychain-keyid-1]key-string 1008611---The password of this key is 1008611
[AR-2-keychain-keyid-1]send-time  daily 08:00 to 18:00----The effective time of the message with the key password sent by the local terminal is from 8:00 to 18:00 every day (this time period Keychain Use this password)
[AR-2-keychain-keyid-1]receive-time daily 08:00 TO 18:00--The effective time of the message with the key code carried by the receiving terminal is from 8:00 to 18:00 every day (this time period Keychain Use this password)
[AR-2-keychain-keyid-1]QUI
[AR-2-keychain]QUIT
[AR-2-ospf-1-area-0.0.0.1]int g4/0/1
[AR-2-GigabitEthernet4/0/1]ospf authentication-mode keychain AAA--Open under interface ospf Interface authentication and call definition name is AAA Authentication strategy for

dis ospf peer brief

Grab AR-5g0/0/1

(3) Aggregate route:
8.8.8.1, 8.8.8.2 and 8.8.8.3 of area 3 are aggregated into 8.8.8.0/24 network segments, which are announced to other areas, and measures for releasing the environment are taken

[AR-2]ospf 1
[AR-2-ospf-1]a 3
[AR-2-ospf-1-area-0.0.0.3]abr-summary 8.8.8.0 255.255.255.0--stay ABR The regional process aggregates the inter domain routes sent out or entered into this region. After aggregation, the advertised routes are 8.8.8.0/24
[AR-2-ospf-1-area-0.0.0.3]quit

dis ip routing-table

(4) Silent interface:
PC-1 can access ospf network and external network 114.114.114.114, and OSPF's Hello package is not allowed to appear on the line connecting PC

[AR-5]ospf 1
[AR-5-ospf-1]silent-interface g0/0/0--stay OSPF Suppress the OSPF data packet      
[AR-5-ospf-1]quit

(5) Default route:
AR-1 and AR-2 issue default routes (cooperate to point to AR-3 static issue default)

[AR-2]
[AR-2]ospf 1
[AR-2-ospf-1]default-route-advertise always----Whether the device has a default route or not, it will OSPF Default route issued by neighbor

[AR-2]ip route-static 0.0.0.0 0.0.0.0 200.1.1.3

[AR-3]ip route-static 0.0.0.0 0.0.0.0 200.1.1.2

(6) AR-1 and AR-2 are distributed at the same time. Default (non mandatory distribution)

[AR-2]
[AR-2]ospf 1
[AR-2-ospf-1]default-route-advertise always---Whether the device has a default route or not, it will OSPF Default route issued by neighbor

[AR-1]
[AR-1]ospf 1
[AR-1-ospf-1]default-route-advertise always
[AR-3]ip route-static 0.0.0.0 0.0.0.0 100.1.1.1

[AR-1]ip route-static 0.0.0.0 0.0.0.0 100.1.1.3

(7) Under normal circumstances, the exit links of AR-1 and AR-2 access the data of external network and send it through AR-1

[AR-5]ospf 1
[AR-5-ospf-1]ne	
[AR-5-ospf-1]nexthop 15.1.1.1 w	
[AR-5-ospf-1]nexthop 15.1.1.1 weight 10----Modify the route weight of the equivalent route to the next hop to 10 (the smaller the priority is, the default is 255, and the value range is 1--255)

dis ip routing-table

(8) When the outbound link of AR-1 fails, AR-1 loses the ability to send the default route and switches to AR-2
When the link between AR-2 and AR-1 fails, ospf default route will not be issued

[AR-1]bfd
[AR-1-bfd]quit
[AR-1]int g0/0/0
[AR-1-GigabitEthernet0/0/0]ospf bfd enable---Turn on the BFD Function (do this configuration at the same time with the neighbor of this direct link)
[AR-1-GigabitEthernet0/0/0]ospf bfd min-rx-interval 300 min-tx-interval 300 detect-multiplier 3 frr-binding 
-----BFD Receive at local end BFD The detection packet time is 300 ms, the sending time is 300 ms, and the detection times are 3 times, BFD State is linked to interface state
[AR-1-GigabitEthernet0/0/0]quit
AR-2 configuration is similar

Close the interface g4/0/0 of the AR-2 device

tracert -a 5.5.5.5 114.114.114.114


Close interface g0/0/1 of AR-1 device

tracert -a 5.5.5.5 114.114.114.114

4, OSPF principle

The calculation process of OSPF protocol route can be described as follows:

1. Establish the adjacency relationship as follows:

a. The local device sends Hello message through the interface to establish neighbor relationship with the opposite device.
b. The master-slave relationship negotiation and DD message exchange are carried out by the equipment at both ends.
c. The devices at both ends complete the synchronization of link database LSDB by updating LSA.
At this time, the adjacency relationship is established successfully.

2. Route calculation

OSPF uses SPF (short path first) algorithm to calculate the route, which can achieve the purpose of rapid convergence of the route.

Establish adjacency

In the above changes of neighbor state machine, there are two decisions to establish adjacency relationship:

(1) When the two-way communication with neighbors is initially established.
(2) When DR and BDR in the network segment change.

In different types of OSPF networks, the process of establishing OSPF adjacency relationship is different, which is divided into broadcast network and NBMA network
Network, point-to-point / point to multipoint network.

Establishing OSPF adjacency in broadcast network

The establishment process of broadcast link adjacency is shown below.

In the broadcast network, DR, BDR and each industrial router switch in the network segment form an adjacency relationship, but
DR other only forms neighbor relationship

Establishing OSPF adjacency in broadcast network


All my articles are protected by copyright. The copyright belongs to yibodong! Without authorization, the reprint must be investigated or attached with its original link.

Tags: network Database

Posted on Sat, 06 Jun 2020 02:30:05 -0700 by PHPQuack