If there are two routers at the same time, how do the computers under the two routers communicate? Some people may also think of using jump, but do you know the specific configuration? Today, I will use the simulation software of Cisco routers to share with you how to configure static routing!
Baidu experience: jingyan.baidu.com
Baidu experience: jingyan.baidu.com
Baidu experience: jingyan.baidu.com
steps/methods
-
Set the IP of computer A to 192.168.1.2, the subnet mask to 255.255.255.0, and the gateway to 192.168.1.1! The diagram is as follows:
-
-
Set the IP of computer B to 192.168.2.2, the subnet mask to 255.255.255.0, and the gateway to 192.168.2.1! The diagram is as follows:
-
-
Configure the fastEthernet 0/0 port of route A as 192.168.1.1 and the subnet mask as 255.255.255.0. Since the default port of the route is closed, after configuring the IP for the route port, be careful to use no shutdown (no shutdown). close) command to open the port! The following are all the commands to configure route A port fastEthernet 0/0:
Continuewith configuration dialog? [yes/no]: no
Router#configure terminal (enter global configuration mode)
Router(config)#interfacefastEthernet 0/0 (enter port mode, enter port 0/0)
Router(config-if)#noshutdown (open port)
The following is a screenshot (the command I entered with the red line drawn, the command without the red line drawn, that is the routing prompt):
-
-
Configure the fastEthernet 1/0 port of route A as 192.168.3.1 and the subnet mask as 255.255.255.0. The following are all the commands to configure the fastEthernet 1/0 of route A port
Router(config-if)#exit (return to global configuration mode from port 0/0)
Router(config)#interfacefastEthernet 1/0 (into port 1/0)
Router(config-if)#ipaddress 192.168.3.1 255.255.255.0 (IP and subnet mask are configured for port 1/0)
Router(config-if)#noshutdown (open port)
%LINK-5-CHANGED:Interface FastEthernet1/0, changed state to up
Router(config-if)#exit (return to global configuration mode from port 1/0)
The following is a screenshot (the command I entered with the red line drawn, the command without the red line drawn, that is the routing prompt):
-
Configure the fastEthernet 1/0 port of route B as 192.168.3.2 and the subnet mask as 255.255.255.0. The following are all the commands to configure the fastEthernet 1/0 of route B port
Continuewith configuration dialog? [yes/no]: no
Router>enable (enter privileged mode)
Router#configure terminal (enter global configuration mode)
Enterconfiguration commands, one per line.End with CNTL/Z.
Router(config)#interfacefastEthernet 0/0 (enter port mode, enter port 0/0)
Router(config-if)#ipaddress 192.168.3.2 255.255.255.0 (IP and subnet mask are configured for port 0/0)
Router(config-if)#noshutdown (open port)
The following is a screenshot (the command I entered with the red line drawn, the command without the red line drawn, that is the routing prompt):
-
Configure the fastEthernet 0/0 port of route B as 192.168.2.1 and the subnet mask as 255.255.255.0. The following are all the commands to configure the fastEthernet 1/0 of route A port
Router(config-if)#exit (return to global configuration mode from port 0/0)
Router(config)#interface fastEthernet 1/0 (into port 1/0)
Router(config-if)#ip address 192.168.2.1 255.255.255.0 (IP and subnet mask are configured for port 1/0)
Router(config-if)#no shutdown (open port)
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
Router(config-if)#exit (return to global configuration mode from port 1/0)
The following is a screenshot (the command I entered with the red line drawn, the command without the red line drawn, that is the routing prompt):
-
Set a static jump for route B. If it encounters a data packet accessing the network segment of computer A (that is, 192.168.1.0), it is specified for him to jump to port 1/0 of route A (that is, 192.168.3.1), Then query the routing table for the route reached after the jump, query the network segment of computer A (that is, 192.168.1.0), and then forward the data packet! The specific commands are as follows:
Router(config)#iproute 192.168.1.0 255.255.255.0 192.168.3.1 (in global configuration mode)Screenshot below:
-
A jump is also set on route A. If the data is sent out, and the way back is not found, then there is no return information! The specific commands are as follows:
Router(config)#iproute 192.168.2.0 255.255.255.0 192.168.3.2 (in global configuration mode)
Screenshot below:
-
Use the ping command to test whether the entire network is connected! If you have done nothing wrong in the previous steps, then in the current test, you will get the following content:
END
Baidu experience: jingyan.baidu.com