Static routing implements route backup and load sharing
- Backup routes:
to the next hop and the priority destination address are the same of different
higher priority mainly to prepare low - Load sharing:
The next hop to the same destination address is different, but the priority is the same
. Traffic to the destination will be evenly distributed
Experimental topology
- Note during configuration:
all routers must be configured with routes to all network segments. The
next hop address must be reachable on the direct link
The configuration commands are as follows:
- As shown in the topology diagram of the two PCs, add IP addresses and masks and gateways to them
- Note: After the PC is activated, it may also be down. The solution is to reconnect or reconnect a PC.
The PCA
PCB is
configured with the IP and mask and the gateway is enabled after the point, make sure that the status is UP
Router RA
<H3C>sys
[H3C]interface GigabitEthernet0/0
[H3C]ip address 192.168.0.1 255.255.255.0
[H3C]interface GigabitEthernet0/1
[H3C]ip address 192.168.1.1 255.255.255.252
[H3C]interface Serial1/0
[H3C]ip address 192.168.1.5 255.255.255.252
[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.2
[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.6
Router RB
<H3C>sys
[H3C]interface Serial1/0
[H3C]ip address 192.168.1.6 255.255.255.252
[H3C]interface GigabitEthernet0/0
[H3C]ip address 192.168.2.1 255.255.255.0
[H3C]interface GigabitEthernet0/1
[H3C]ip address 192.168.1.2 255.255.255.252
[H3C]ip route-static 192.168.0.0 255.255.255.0 192.168.1.1
[H3C]ip route-static 192.168.0.0 255.255.255.0 192.168.1.5
Start verification after configuration
Use display ip routing-table to check whether the route is written. If it is written, in this case, save the router (save) and then restart (reboot). Make sure that the two routers have two pieces of routing information.
After that, PCA pings to the PCB to ensure that the connection is
pinged. Use the display ip fast-forwarding cache command to check the
command. You can see that the two routers are using GE0 / 1 port for communication at this time, and S0 / 1 is not enabled. How to To verify whether S0 / 1 can communicate, we need to turn off GE0 / 1 port to see that S0 / 1 is enabled.
Hit the command on any router to close the port GE0 / 1
[H3C]interface GigabitEthernet 0/1
[H3C-GigabitEthernet0/1]shutdown
Then execute the PCA ping PCB command.
Using the display ip fast-forwarding cache command on the router,
we can see that the two routers use the S0 / 1 port for communication at this time, and our task is completed.