1. Application background and scenario
① Background: in large enterprise networks, a large number of hosts or devices need to obtain network parameters such as IP address. If manual configuration is adopted, the workload is heavy and difficult to manage. If users modify network parameters without authorization, it may cause problems such as IP address conflict. When configuring the DHCP protocol host, the administrator can use the DHCP protocol parameter to reduce the workload caused by the network address conflict.
② DHCP server can assign IP addresses to a large number of hosts and can be managed centrally
2. Message type of DHCP
3. Address pool
ARG3 series routers support two kinds of address pools: global address pool and interface address pool
4.2 working principle
① When the IP lease term reaches 50%, the DHCP client will request to update the IP address lease
② When the lease term reaches 87.5, the DHCP client has not received the response from the server and will apply for rebinding IP
6.IP address release
① If the server does not respond before the IP lease expires, the client will stop using this IP address.
② If the DHCP client no longer uses the assigned IP address, it can also actively send DHCPRELEASE message to the DHCP server to release the IP address.
2, Dynamic routing protocol -- RIP
1. What is routing
① Routing behavior means that when the network equipment receives an IP message, it will query the destination IP address of the message in its routing table. If the routing table item matching the destination IP address can be found, it will forward the message according to the next hop and outbound interface indicated by the table item; If no routing table entries match, the message will be discarded.
② The routing behavior is hop by hop, so in the process of message from source to destination, each network device participating in data forwarding along the way needs to have a route about the destination network.
2. Classification of routing protocols
3. Classification of dynamic routing protocols
4. Distance vector routing protocol
5. Characteristics of distance vector routing protocol
Periodically update (broadcast) the whole routing table
6. Vector routing protocol
Initial startup of router
Initial network discovery: direct routes are written into the routing table
7.RIP routing metrics
① RIP takes hops as the measurement value. The so-called hops refer to the number of routers that need to pass to the target network.
② RIP takes Hops as the measurement value. Although it is simple, it is actually not scientific enough. As shown below:
① When a router finds a route to the same destination network through a variety of different routing protocols, it will choose the route with the lowest priority value; If these routes learn from the same routing protocol, the best metric is preferred
② In Huawei's network products, the corresponding relationship between the routing protocol and the default priority value is shown in the following table (Note: the routing priority protocols of different manufacturers may be different):
9.RIP protocol overview
① RIP(Routing Information Protocols)·
② It is an earlier internal gateway protocol (IGP).
③ The typical distance vector protocol is suitable for small networks.
④ RIP is based on UDP and port 520.
⑤ The routing priority on our equipment is 100.
⑥ RIP has three versions: RIPv1, RIPv2 and RPng.
① RIPv1 message format
② RIPv2 message format
③ Improvement of RIPv2 compared with RIPv1:
·Support external route Tag, which can flexibly control the route according to the Tag in the routing policy.
·The message carries mask information and supports routing aggregation and CIDR (classless inter domainrouting).
·It supports specifying the next hop. The optimal next hop address of the destination network segment can be selected on the broadcast network.
·It supports sending update messages by multicast. Only devices supporting RIP-2 can receive protocol messages to reduce resource consumption.
·Support the verification of protocol messages to enhance security.
11. Next jump
The next hop feature enables RIP to select the optimal next hop in multi-channel access networks. In the figure above, R1 introduces the 220.127.116.11/8 route into RIP and notifies R3 through RIP. When sending RIP route, set the next hop field to 192.168.123.2. In this way, when R3 receives the route and installs 18.104.22.168/8 into the routing table, set the next hop to R2 (instead of R1).
12. Message authentication
① R1 is connected to the 192.168.1.0/24 network segment, in which there are terminal devices and no other RIP routers. By executing the silent interface command, configure the GEO/0/1 interface as a silent interface, so as to inhibit the RIP interface from sending messages. In this way, the host will not receive RIP messages again, reducing the loss of resources and network bandwidth.
② If an interface is suppressed, the direct route of the network segment where the interface is located can still be published to other interfaces.
14. Anti ring mechanism of distance vector routing protocol
① Define the maximum metric to prevent counting to infinity:
(1) in order to prevent the RIP route from being flooded indefinitely in the network, so that the number of hops is accumulated to infinity, RIP stipulates that the maximum number of hops of the route is 15, that is, if the measurement value is greater than or equal to 16, it is regarded as unreachable
⑵ although the setting of maximum hops solves the problem that the metric technology reaches infinity, it also greatly limits the scale of the network supported by RIP.
② Horizontal segmentation: the principle of split horizon is that the route learned by RIP from an interface will not be sent back to the neighbor router from the interface. This not only reduces bandwidth consumption, but also prevents routing loops
③ Route poisoning:
④ Toxicity reversal: the principle of poison reverse is that after RIP learns a route from an interface, it sends it back to the neighbor router from the original interface, and sets the overhead of the route to 16 (that is, it indicates that the route is unreachable). In this way, useless routes in the other party's routing table can be cleared.
⑤ Suppression timer
⑥ Trigger update: trigger update means that when the routing information changes, the trigger update message is immediately sent to the neighbor equipment without waiting for the update timer to timeout, so as to avoid the generation of routing loop.
Practical operation: ① configure the topology diagram according to the diagram, as follows:
② Configure PC5,PC6IP address, subnet mask and gateway. Take PC5 as an example:
③ Configure R1. The specific commands are as follows:
<Huawei>sys [Huawei]undo info-center enable [Huawei]sys R1 [R1]dhcp enable [R1]ip pool 1 [R1-ip-pool-1]network 192.168.1.0 mask 24 [R1-ip-pool-1]gateway-list 192.168.1.254 [R1-ip-pool-1]dns-list 22.214.171.124 [R1-ip-pool-1]lease day 0 hour 12 minute 0 [R1-ip-pool-1]q [R1]int g0/0/0 [R1-GigabitEthernet0/0/0]dhcp select global [R1-GigabitEthernet0/0/0]q [R1]ip pool 2 [R1-ip-pool-2]network 192.168.2.0 mask 24 [R1-ip-pool-2]gateway-list 192.168.2.254 [R1-ip-pool-2]dns-list 126.96.36.199 [R1-ip-pool-2]lease day 0 hour 12 minute 0 [R1-ip-pool-2]static-bind ip-address 192.168.2.10 mac-add 5489-985F-7AA8 [R1-ip-pool-2]q [R1]int g0/0/1 [R1-GigabitEthernet0/0/1]dhcp select global [R1-GigabitEthernet0/0/1]q [R1]int g0/0/0 [R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24 [R1-GigabitEthernet0/0/0]int g0/0/1 [R1-GigabitEthernet0/0/1]ip add 192.168.2.254 24 [R1-GigabitEthernet0/0/1]int g2/0/0 [R1-GigabitEthernet2/0/0]ip add 192.168.40.1 24 [R1-GigabitEthernet2/0/0]q [R1]rip 1 [R1-rip-1]version 2 [R1-rip-1]network 192.168.1.0 [R1-rip-1]network 192.168.2.0 [R1-rip-1]network 192.168.40.0
④ Configure R2. The specific commands are as follows:
<Huawei>sys [Huawei]undo info-center e [Huawei]undo info-center enable [Huawei]sys [Huawei]sysname r2 [r2]int g0/0/0 [r2-GigabitEthernet0/0/0]ip add 192.168.40.2 24 [r2-GigabitEthernet0/0/0]int g0/0/1 [r2-GigabitEthernet0/0/1]ip add 192.168.30.1 24 [r2-GigabitEthernet0/0/1]q [r2]rip 1 [r2-rip-1]version 2 [r2-rip-1]network 192.168.40.0 [r2-rip-1]network 192.168.30.0 [r2-rip-1]q
⑤ Configure R3. The specific commands are as follows:
<Huawei>sys [Huawei]undo in e [Huawei]sys R3 [R3]int g0/0/0 [R3-GigabitEthernet0/0/0]ip add 192.168.30.2 24 [R3-GigabitEthernet0/0/0]int g0/0/1 [R3-GigabitEthernet0/0/1]ip add 192.168.20.1 24 [R3-GigabitEthernet0/0/1]q [R3]rip 1 [R3-rip-1]vers [R3-rip-1]version 2 [R3-rip-1]network 192.168.20.0 [R3-rip-1]network 192.168.30.0 [R3-rip-1]q
⑥ Configure R4. The specific commands are as follows:
<Huawei>sys [Huawei]undo in e [Huawei]sys R4 [R4]int g0/0/0 [R4-GigabitEthernet0/0/0]ip add 192.168.20.0 24 [R4-GigabitEthernet0/0/0]int g0/0/1 [R4-GigabitEthernet0/0/1]ip add 192.168.10.254 24 [R4-GigabitEthernet0/0/1]q [R4]rip 1 [R4-rip-1]version 2 [R4-rip-1]network 192.168.10.0 [R4-rip-1]network 192.168.20.0 [R4-rip-1]q
⑦ Verify PC3IP and check the interworking of the whole network