Question: Configure the interface IP address and realize the interconnection of the whole network through static routing and default routing configuration.
According to the topic, use Huawei ensp software to make the topology The figure, and the IP address and subnet mask that need to be configured for each port are marked in detail according to the requirements of the title.
Question-solving ideas
- The first step is to configure the IP addresses, masks and gateways of all PC and router ports.
- The second step, according to the requirements of the topic, we need to use static routing and default routing. Let’s look at the above picture. PC1 and PC2 have their own local routers, and there is only one way out. The router in the middle is equivalent. For the role of a relay, it is connected to the routers at the left and right ends, so the router in the middle must be set up with two static routes to each of the two routers. The default route 0.0.0.0 can be applied to those with only one path at both ends. router.
- The third step is to use the computer to check the connectivity with the ping command.
Configure the computer IP address:
PC1:
IP address: 192.168.1.1 Subnet mask: 255.255.255.0 Gateway: 192.168.1.254
PC2:
IP address: 192.168.4.1 Subnet mask: 255.255.255.0 Gateway: 192.168.4.254
Configure the router’s port ip address and subnet mask
Configure router 1
[router- 1]interface g0/0/1
[router-1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
[router-1-GigabitEthernet0/0/1]interface g0/0/0
[router-1-GigabitEthernet0/0/0]ip add 192.168.2.2 24
Configure router 2
[router-2]int g0/0/0
[router-2-GigabitEthernet0/0/ 0]ip add 192.168.2.1 24
[router-2-GigabitEthernet0/0/0]int g0/0/1
[router-2-GigabitEthernet0/0/1]ip add 192.168.3.1 24
Configure router 3
[router-3]int g0/0/0
[router-3-GigabitEthernet0/0/0]ip add 192.168.4.254 24
[router-3-GigabitEthernet0/0/ 0]int g0/0/1
[router-3-GigabitEthernet0/0/1]ip add 192.168.3.2 24
All addresses are configured, and the routing is configured.
Using the command ip route -static target network segment subnet mask next hop address
Configure router 1
[router-1]ip route-static 0.0.0.0 0.0.0.0 192.168.2.1
Configure router 2
[router -2]ip route-static 192.168.1.0 24 192.168.2.2
[router-2]ip route-static 192. 168.4.0 24 192.168.3.2
Configure router 3
[router-3]ip route-static 0.0.0.0 0.0.0.0 192.168.3.1
After configuration, open PC1 and use ping Check the command line
Open PC2 and use the ping command line Check
Check result: PC1 and PC2 can communicate with each other Conclusion: The experiment is successful