In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today mainly brings you some basic knowledge about OSPF, first contact, comparison, if there are deficiencies, please put forward valuable suggestions, the editor must actively correct, nonsense will not say more, let's get to the point.
OSPF Open Shortest Path First Open shortest path first Protocol
First, Overview: & is an internal network management protocol for routing decisions within a single autonomous system & protocol number 89 (RIP protocol port number is 520) & supports area partition & is a link-state routing protocol & Multicast message 2.-Notes on some network terms involved in the following experiments: 1.Router ID: an unsigned integer of a 32-bit that is the unique identity of a router Unique within the entire OSPF domain. two。 Neighbor: physical concept, a router running OSPF on the same end of the network can become a neighbor, flag: 2-way status. Adjacency: logical concept, neighbor router completely coking LSA (database) to achieve LSDB () consistent state, flag: Full state 3, how OSPF works:
1. Establish a neighbor table
Use only hello messages.
OSPF routing, switching only between OSPF neighbor routers
Neighbor status:
Down
Init initialization
2way bidirectional link
Exstart (exchange start) starts exchanging link state
Exchange switching link state complete
Loading starts announcing the routing table
Full established and completed
2. Synchronize the database
LSA-link state advertisement, link-state advertisement
3. Calculate the routing table (calculate the LSA through the SPF algorithm to get the final route entry)
-OSPF message:
Hello:
Dbd:database description, database description message
Lsu:link state update, link-state update message
Lsr:link state request, link-state request message
Lsack:link state ack, link-state confirmation message
To enter gi0/0/0,network x.x.x.x x.x.x.x, enable OSPF 1:
# you can send ospf 1 packets
# can receive packets from ospf 1
# you can put the network portion of the IP address of the port into the packet of OSPF 1, transmit it out, and give it to the neighboring router.
4. Verification
Display ospf [1] peer brief / / View brief information of the OSPF neighbor table
Display ospf [1] peer / / View details of the OSPF neighbor table
Display ospf [1] brief / / View information about OSPF 1 on the local device
Display ip routing-table / / View OSPF routes in the routing table
(determine the type and properties of the route)
=
Fourth, the influencing factors of OSPF neighbor establishment:
1. Make sure that the links in the minimum range are Ping each other.
2. Make sure the device port can send messages.
# network to declare the correct network scope
# make sure that the port that receives OSPF messages cannot be "passive port-silent-interface"
(the silent-interface of OSPF on Huawei equipment can neither send nor receive packets
3. Ensure that the device port can receive messages
# network to declare the correct network scope
# make sure that ACL allows OSPF traffic
# make sure that the port that receives OSPF messages cannot be "passive port-silent-interface"
(the silent-interface of OSPF on Huawei equipment can neither be sent nor received.)
Note: ensure that the key parameters in the OSPF Hello package are consistent; [compare parameters in hello]
Routers that directly establish a neighbor relationship must not have the same RID; # area ID must be the same; # authentication must be successful; # subnet masks must be the same (in special cases) # hello time, must be the same; # dead time, must be the same # special tag bits, must be exactly the same; # DR priority, not all 0 (special case) # layer 3 MTU, must be exactly the same
5. Set up a small network for experiment
Huawei-configure OSPF to ensure multi-area connectivity of small networks
Experiment name: Huawei-OSPF Multi-area configuration
Address Planning: device Port IP address Subnet Mask R1GI 0/0/0192.168.12.1255.255.255.0R1LOOPBACK 010.10.1.1255.255.255.0R2GI 0/0/1192.168.12.2255.255.255.0R2GI 0/0/0192.168.23.2255.255.255.0R2LOOPBACK 010.10.2.2255.255.255.0R3GI 0/0/1192.168.23.3255.255.255.0R3GI 0Universe 0Universe 0192.168.34 .3255.255.255.0R3LOOPBACK 010.10.3.3255.255.255.0R4GI 0/0/1192.168.34.4255.255.255.0R4LOOPBACK 010.10.4.4255.255.255.0
Lab Topology:
Purpose: to realize the interworking of the whole network by configuring OSPF: 1. Configure the device IP address and mask, this process is relatively simple, but must be careful, often inadvertently enter a wrong number and finally find that the network is blocked, so pay attention to this.
R1:
System-view\ enter the system view
Enter system view, return user view with Ctrl+Z.
[Huawei] sysname R1\ change name
[R1] interface GigabitEthernet 0Compact 0ram0\ entry port
[R1-GigabitEthernet0/0/0] undo shutdown\ Open the port
[R1-GigabitEthernet0/0/0] ip address 192.168.12.1 255.255.255.0\ configure IP address and mask
[R1-GigabitEthernet0/0/0] quit\ exit
[R1] interface LoopBack 0\ enters the virtual interface
[R1-LoopBack0] ip address 10.10.1.1 255.255.255.0\ configure IP address and mask
[R1-LoopBack0] quit\ exit
[R1]
R2:
System-view\ enter the system view
Enter system view, return user view with Ctrl+Z.
[Huawei] sysname R2\ change the name
[R2] interface GigabitEthernet 0ramram1\ entry port
[R2-GigabitEthernet0/0/1] undo shutdown\ Open the port
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1] ip address 192.168.12.2 255.255.255.0\ configure IP address and mask
[R2-GigabitEthernet0/0/1] quit\ exit
[R2] interface GigabitEthernet 0ramram0\ entry port
[R2-GigabitEthernet0/0/0] undo shutdown\ Open the port
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0] ip address 192.168.23.2 255.255.255.0\ configure IP address and mask
[R2-GigabitEthernet0/0/0] quit\ exit
[R2] interface LoopBack 0\ enter the virtual interface
[R2-LoopBack0] ip address 10.10.2.2 255.255.255.0\ configure IP address and mask
[R2-LoopBack0] quit\ exit
[R2]
R3:
System-view\ enter the system view
Enter system view, return user view with Ctrl+Z.
[Huawei] sysname R3\ change name
[R3] interface GigabitEthernet 0ram 0ram 1\ entry port
[R3-GigabitEthernet0/0/1] undo shutdown\ Open the port
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1] ip address 192.168.23.3 255.255.255.0\ configure IP address and mask
[R3-GigabitEthernet0/0/1] Q\ exit
[R3] interface GigabitEthernet 0ram 0ram 0\ entry port
[R3-GigabitEthernet0/0/0] undo shutdown\ Open the port
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0] ip address 192.168.34.3 255.255.255.0\ configure IP address and mask
[R3-GigabitEthernet0/0/0] quit\ exit
[R3] interface LoopBack 0\ enters the virtual interface
[R3-LoopBack0] ip address 10.10.3.3 255.255.255.0\ configure IP address and mask
[R3-LoopBack0] Q\ exit
R4:
System-view\ enter the system view
Enter system view, return user view with Ctrl+Z.
[Huawei] sysname R4\ change name
[R4] interface GigabitEthernet 0ram 0ram 1\ entry port
[R4-GigabitEthernet0/0/1] undo shutdown\ Open the port
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R4-GigabitEthernet0/0/1] ip address 12.168.34.4 255.255.255.0\ configure IP address and mask
[R4-GigabitEthernet0/0/1] quit\ exit
[R4] interface LoopBack 0\ enters the virtual interface
[R4-LoopBack0] ip address 10.10.4.4 255.255.255.0\ configure IP address and mask
[R4-LoopBack0] quit\ exit
[R4]
two。 Configure OSPF
Area 0:
R1:
[R1] ospf 1 router-id 1.1.1.1\ configure ospf 1 and configure the router unique identification Router ID as 1.1.1.1
Info: The configuration succeeded. You need to restart the OSPF process to valid
Ate the new router ID.
[R1-ospf-1] area 0\ configuration area 0
[R1-ospf-1-area-0.0.0.0] network 192.168.12.1 0.0.0.0\ precisely declare the network segment
[R1-ospf-1-area-0.0.0.0] network 10.10.1.1 0.0.0.0\ accurately declares the network segment
[R1-ospf-1-area-0.0.0.0] quit\ exit
[R1-ospf-1] quit\ exit
R2:
[R2] ospf 1 router-id 2.2.2.2\ configure ospf 1 and configure the router unique ID Router ID as 2.2.2.2
[R2-ospf-1] area 0\ configuration area
[R2-ospf-1-area-0.0.0.0] network 192.168.12.2 0.0.0.0\ accurately declares the network segment
[R2-ospf-1-area-0.0.0.0] network 10.10.2.2 0.0.0.0\ accurately declare the network segment
[R2-ospf-1-area-0.0.0.0] quit\ exit
[R2-ospf-1] quit\ exit
Area 34:
R2:
[R2] ospf 1 router-id 2.2.2.2\ configure ospf 1 and configure the router unique ID Router ID as 2.2.2.2
[R2-ospf-1] area 34\ configuration area 34
[R2-ospf-1-area-0.0.0.34] network 192.168.23.3 0.0.0.0\ accurately declare the network segment
[R2-ospf-1-area-0.0.0.34] Q\ exit * *
[R2-ospf-1] Q\ exit
R3:
[R3] ospf 1 router-id 3.3.3.3\ configure ospf 1 and configure the router unique identification Router ID of 3.3.3.3
[R3-ospf-1] area 34\ configuration area 34
[R3-ospf-1-area-0.0.0.34] network 192.168.23.3 0.0.0.0\ accurately declare the network segment
[R3-ospf-1-area-0.0.0.34] network 192.168.34.3 0.0.0.0\ accurately declare the network segment
[R3-ospf-1-area-0.0.0.34] network 10.10.3.3 0.0.0.0\ accurately declare the network segment
[R3-ospf-1-area-0.0.0.34] quit\ exit
[R3-ospf-1] quit\ exit
[R3]
R4:
[R4] ospf 1 router-id 4.4.4.4\ configure ospf 1 and configure the router unique identity Router ID to be 4.4.4.4
[R4-ospf-1] area 34\ configuration area 34
[R4-ospf-1-area-0.0.0.34] network 192.168.34.4 0.0.0.0\ precisely declare the network segment
[R4-ospf-1-area-0.0.0.34] network 10.10.4.4 0.0.0.0\ accurately declare the network segment
[R4-ospf-1-area-0.0.0.34] quit\ exit
[R4-ospf-1] quit\ exit
3. Testing and verification: verify adjacency establishment:
R1:
R2:
R3:
R4:
Test connectivity:
R1:
Connectivity to R2:
Connectivity to R3:
Connectivity to R4:
The network is connected and the experiment is completed.
Today's content is so much, it may not be very comprehensive, I hope you can put forward your valuable suggestions, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.