In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Basic concepts of routing:
1 routing: to determine the best path from the source host to the target host, so as to achieve data forwarding, this is the routing technology.
2 routing table: there is a routing table in each router, which contains the network addresses of all destinations that the router knows and the best path to these network addresses through this router.
Formation of routing tables:
Directly connected network segment: when an IP address is configured on the interface of the router and the interface status is "up", a directly connected route entry appears in the routing table.
Non-directly connected network segments: written to the routing table through static or dynamic routes.
3 Administrative distance and metrics: the router only adds the optimal routing entries to the routing table, and the router uses two parameters, namely administrative distance (Administrative Distance) and metric (Metrics), when selecting routing entries.
Administrative distance: refers to the routing credibility of a routing protocol, which is a measure of priority. The smaller the administrative distance, the higher the priority. The default administrative distance used in Cisco IOS is as follows (different brands of network devices may be different):
Route type administrative distance
Directly connected route 0
Static Route 1
OSPF 110
RIP 120
Metric: the metric represents the distance and is used to determine the optimal route for pathfinding. Each routing algorithm generates a value (metric) for each network path when it generates a routing table, and the minimum value represents the optimal path. The calculation of metrics can take into account only one characteristic of the path, but complex metrics are generated by combining multiple characteristics of the path. The commonly used metrics are hop count, cost, bandwidth, delay and so on. The metric of OSPF routing protocol is cost (cost), and the metric of RIP routing protocol is hop count.
When the router receives the route entry of the same destination, it first compares the administrative distance, selects the route entry with small administrative distance to be added to the routing table, and compares the metric if the administrative distance is the same. Select a route entry with a small metric to add to the routing table. When a route entry with the same destination address, administrative distance, and metric is received, a load-balanced route entry is formed in the routing table. In some cases, you can also modify the administrative distance, use different administrative distances for the same network segment, and then let the router choose the best route (the highest credibility, that is, the administrative distance is small) to add to the routing table. When the line fails, the route with small administrative distance fails, and the route with large administrative distance is the best route, which will be written into the routing table, that is, floating route.
4 types of rout
1) static route: a fixed route manually configured by the administrator in the router.
Features:
Suitable for small-scale network environment
Static routes are unidirectional. If two parties are to communicate with each other, two-way static routes must be configured on both sides of the communication.
Static routing lacks sufficient flexibility and needs to be manually reconfigured if the topology changes.
2) dynamic routing: through a certain routing protocol, routers can share network connection information and status information, so as to update the routing table (choose the best path).
Measure: as described above, I won't talk about it any more.
Convergence: dynamic routing protocols include a series of processes, such as local routers advertising local directly connected network segments to other routers, receiving routing information from other routers, and so on. Therefore, the state of making the routing tables of all routers consistent is called convergence. The sum of the time taken by all routers to achieve network-wide information sharing and all routers to calculate the optimal path is the convergence time.
OSPF (Open shortest path first) dynamic routing protocol:
OSPF is an internal gateway protocol (IGP), which is used to solve the internal communication of AS (autonomous system: jointly managed internetwork such as an enterprise or a city), while the external gateway protocol (EGP) is used to solve the communication between AS. OSPF divides the AS into several small areas, and the OSPF router only learns complete link-state information within the area, without having to know all the link-states within the entire AS.
OSPF adaptation:
Network size: large and medium-sized networks when there are more than ten or more routers in the network.
Topological structure: the topological structure is a mesh, or there is a need for interworking between routers.
Router's own requirements: OSPF has certain requirements on the processing power and memory size of router CPU, and OSPF protocol is not recommended for routers with low performance.
Router ID of the OSPF router
Routers running the OSPF protocol need to know which router each link is connected to, so they need a unique identity to mark the router in the OSPF network, namely Router ID (usually identified by the IP address). In practice, the IP address of the Loopback interface is usually manually specified as the Router ID of the router. For example, the network segment of 192.168.255.0 and 24 is set as the identity of Router ID, which is already a standard configuration.
DR (designated router) and BDR (backup designated router) in OSPF protocol
Routers running OSPF establish adjacencies with neighboring routers through DR and BDR, and transmit link-state information to each other.
Automatic election of DR and BDR:Router ID the largest will be chosen as DR, and the second largest will be BDR.
Manual election of DR and BDR: manual election requires setting the priority of the router, which ranges from 0 to 255. the higher the value, the higher the priority. If the priority is 0, you will not participate in the election. If the priority is the same, compare the Router ID. Priority can affect the election process of routers, but it is not possible to force the replacement of existing DR and BDR routers.
Usually on broadcast multiaccess networks (such as Ethernet), the first two eligible routers to initialize will be DR and BDR routers.
OSPF routing Table:
Intra-area routing: the "O" in front of the route entry represents the route within the OSPF area.
Interarea routing: the "O IA" in front of the routing entry represents the OSPF interarea route, that is, the destination path in other areas but still within the OSPF AS, which passes through at least one ABR router.
Priority of the OSPF route type:
Intra-area path: priority 1
Interarea path: priority 2
E1 external path: priority 3
E2 external path: priority 4 (default OSPF external route)
When a route entry is added to the routing table, if the destination network segment is the same, the route entry with the highest priority is selected to be added to the routing table.
The OSPF network architecture is as follows:
Configuration of R1:
R1 (config) # router ospf 100 # configure the OSPF process number with local meaning only
R1 (config-router) # router-id 1.1.1.1 # specify Router ID
R1 (config-router) # network 10.1.1.0 0.0.0.3 area 0 # declares the interface and area on which the OSPF protocol is running
R1 (config-router) # network 10.1.1.4 0.0.0.3 area 1
Configuration of R2:
R2 (config) # router ospf 100
R2 (config-router) # router-id 2.2.2.2
R2 (config-router) # network 10.1.1.8 0.0.0.3 area 0
R2 (config-router) # network 10.1.1.12 0.0.0.3 area 1
Configuration of R3:
R3 (config) # router ospf 100
R3 (config-router) # router-id 3.3.3.3
R3 (config-router) # network 10.1.1.0 0.0.0.3 area 0
R3 (config-router) # network 10.1.1.8 0.0.0.3 area 0
R3 (config-router) # network 192.168.1.0 0.0.0.255 area 0
Configuration of R4:
R4 (config) # router ospf 100
R4 (config-router) # router-id 4.4.4.4
R4 (config-router) # network 10.1.1.4 0.0.0.3 area 1
R4 (config-router) # network 10.1.1.12 0.0.0.3 area 1
R4 (config-router) # network 172.16.1.0 0.0.255 area 1
Displays routing protocol information for the router:
R1#sh ip protocols
Routing Protocol is "ospf 100"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.1.0 0.0.0.3 area 0
10.1.1.4 0.0.0.3 area 1
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
4.4.4.4 110 00:14:48
2.2.2.2 110 00:14:48
3.3.3.3 110 00:17:19
Distance: (default is 110)
View the routing table:
R1#sh 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 not set
172.16.0.0/32 is subnetted, 1 subnets
O 172.16.1.1 [110/2] via 10.1.1.6, 00:03:55, FastEthernet1/0
10.0.0.0/30 is subnetted, 4 subnets
O 10.1.1.8 [110/2] via 10.1.1.1, 00:06:26, FastEthernet0/0
O 10.1.1.12 [110/2] via 10.1.1.6, 00:03:55, FastEthernet1/0
C 10.1.1.0 is directly connected, FastEthernet0/0
C 10.1.1.4 is directly connected, FastEthernet1/0
192.168.1.0/32 is subnetted, 1 subnets
O 192.168.1.1 [110/2] via 10.1.1.1, 00:06:26, FastEthernet0/0
Only OSPF-related routing information is displayed:
R1#sh ip route ospf
172.16.0.0/32 is subnetted, 1 subnets
O 172.16.1.1 [110/2] via 10.1.1.6, 00:17:27, FastEthernet1/0
10.0.0.0/30 is subnetted, 4 subnets
O 10.1.1.8 [110/2] via 10.1.1.1, 00:19:58, FastEthernet0/0
O 10.1.1.12 [110/2] via 10.1.1.6, 00:17:27, FastEthernet1/0
192.168.1.0/32 is subnetted, 1 subnets
O 192.168.1.1 [110/2] via 10.1.1.1, 00:19:58, FastEthernet0/0
Verify that the network is open:
R3#ping 172.16.1.1 source 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!
Success rate is 100 percent (5amp 5), round-trip min/avg/max = 52-66-76 ms
View adjacencies:
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/BDR 00:00:34 10.1.1.1 FastEthernet0/0
4.4.4.4 1 FULL/BDR 00:00:32 10.1.1.6 FastEthernet1/0
R3#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:33 10.1.1.10 FastEthernet1/0
1.1.1.1 1 FULL/DR 00:00:35 10.1.1.2 FastEthernet0/0
Check to see if the interface is added to the correct area:
R1#sh ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 10.1.1.2/30, Area 0
Process ID 100, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.1.1.2
Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Oob-resync timeout 40
Hello due in 00:00:07
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0 (0) / 0x0 (0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 3.3.3.3 (Backup Designated Router)
Suppress hello for 0 neighbor (s)
FastEthernet1/0 is up, line protocol is up
Internet Address 10.1.1.5/30, Area 1
Process ID 100, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.1.1.5
Backup Designated router (ID) 4.4.4.4, Interface address 10.1.1.6
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Oob-resync timeout 40
Hello due in 00:00:06
Supports Link-local Signaling (LLS)
Index 1/2, flood queue length 0
Next 0x0 (0) / 0x0 (0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 4.4.4.4 (Backup Designated Router)
Suppress hello for 0 neighbor (s)
View the OSPF database:
R1#sh ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1390 0x80000003 0x00AD5E 1
2.2.2.2 2.2.2.2 1373 0x80000003 0x0022D1 1
3.3.3.3 3.3.3.3 1367 0x80000005 0x00083C 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.1.2 1.1.1.1 1390 0x80000001 0x007AA0
10.1.1.10 2.2.2.2 1374 0x80000001 0x002EDC
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.1.4 1.1.1.1 1749 0x80000001 0x00A189
10.1.1.4 2.2.2.2 1218 0x80000001 0x008D98
10.1.1.12 1.1.1.1 1225 0x80000001 0x005BC6
10.1.1.12 2.2.2.2 1507 0x80000001 0x0033EB
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.