Static Routing can also be used for communication between multiple network segments
Yesterday, I discussed networking issues with my friends in the machine room. When I talked about communication between routers, my friend asked me why I had to configure the routing protocol. In the past, this problem was generally not carefully considered based on the configuration manual or experience configuration. Think about it like this (as follows ).
If you want to implement communication between multiple CIDR blocks, you must use a vro. If multiple selectable paths exist between multiple CIDR blocks, the most convenient method is to configure the routing protocol. For a simple network, the RIP Protocol can be used, OSPF can be used for complex networks. Of course, you can also use Static Routing when there are not many paths selected.
However, when there is only one path between multiple CIDR blocks, it is enough to configure a static route. If you work in an enterprise, it is often enough to configure a simple static route.
I demonstrated it with CPT (Cisco Packet Tracer) to be more convincing and easy to understand.
Shows the topology:
There are four network segments: 10.0.0.0/8, 112.237.228.0/24, 192.168.10.0/24, and 211.86.104.0/24.
Static route settings are as follows:
- Ip route 192.168.10.0 route 255.255.0 112.237.228.1 ip route 211.86.104.0 255.255.255.0 112.237.228.1
- Ip route 10.0.0.0 255.0.0.0 112.237.228.244 ip route 211.86.104.0 255.255.255.0 192.168.10.1
- Ip route 112.237.228.0 255.255.255.0 192.168.10.2 ip route 10.0.0.0 255.0.0.0 192.168.10.2
The configuration is as follows:
1. IP Address Configuration of PC0:
Packet Tracer PC Command Line 1.0
PC> ipconfig
IP Address...
Subnet Mask ......: 255.0.0.0
Default Gateway ......: 10.0.0.1
PC>
2. IP Address Configuration of PC1:
Packet Tracer PC Command Line 1.0
PC> ipconfig
IP Address ...... ..........: 211.86.104.52
Subnet Mask ......: 255.255.255.0
Default Gateway ......: 211.86.104.254
PC>
3. R1 Configuration:
- Router> enable Router # configure terminal
- Enter configuration commands, one per line. End with CNTL/Z. Router (config) # hostname R1
- R1 (config) # interface FastEthernet0/1 R1 (config-if) # ip address 10.0.0.1 255.0.0.0
- R1 (config-if) # no shutdown
- % LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
- R1 (config-if) # end R1 #
- % SYS-5-CONFIG_ I: Configured from console by the console
- R1 # conf t Enter configuration commands, one per line. End with CNTL/Z.
- R1 (config) # int f0/0 R1 (config-if) # ip addr 112.237.228.244 255.255.255.0
- R1 (config-if) # no shutdown
- % LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
- R1 (config-if) # end R1 #
- % SYS-5-CONFIG_ I: Configured from console by the console
- R1 # conf t
- Enter configuration commands, one per line. End with CNTL/Z. R1 (config) # ip route 192.168.10.0 255.255.255.0 112.237.228.1
- R1 (config) # ip route 211.86.104.0 255.255.255.0 112.237.228.1 R1 (config) # end
- R1 # % SYS-5-CONFIG_ I: Configured from console by console
- R1 #
4. R2 Configuration:
- Router> enable Router # configure terminal
- Enter configuration commands, one per line. End with CNTL/Z. Router (config) # hostname R2
- R2 (config) # R2 (config) # interface FastEthernet0/1
- R2 (config-if) # ip address 112.237.228.1 255.255.0 R2 (config-if) # no shutdown
- % LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up R2 (config-if )#
- R2 (config-if) # exit R2 (config) # interface FastEthernet0/0
- R2 (config-if) # ip address 192.168.10.2 255.255.255.0 R2 (config-if) # no shutdown
- % LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up R2 (config-if) # end
- R2 # conf t Enter configuration commands, one per line. End with CNTL/Z.
- R2 (config) # ip route 10.0.0.0 255.0.0.0 112.237.228.244 R2 (config) # ip route 211.86.104.0 255.255.255.0 192.168.10.1
- R2 (config) # end R2 #
- % SYS-5-CONFIG_ I: Configured from console by the console
- R2 #
5. R3 Configuration:
- Router> enable Router # configure terminal
- Enter configuration commands, one per line. End with CNTL/Z. Router (config) # hostname R3
- R3 (config) # R3 (config) # interface FastEthernet0/1
- R3 (config-if) # ip address 192.168.10.1 255.255.255.0 R3 (config-if) # no shutdown
- % LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up R3 (config-if )#
- R3 (config-if) # exit R3 (config) # interface FastEthernet0/0
- R3 (config-if) # ip address 211.86.104.254 255.255.255.0 R3 (config-if) # no shutdown
- R3 (config-if )#
- % LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
- R3> enable
- R3 # conf t Enter configuration commands, one per line. End with CNTL/Z.
- R3 (config) # ip route 112.237.228.0 255.255.255.0 192.168.10.2 R3 (config) # ip route 10.0.0.0 255.0.0.0 192.168.10.2
- R3 (config) # end R3 #
- % SYS-5-CONFIG_ I: Configured from console by the console
- R3 #
6. Use tracert for testing:
Test whether the route from PC0 can be routed to pc1.
The result indicates that the test is successful.
Test whether the route from PC1 can be routed to PC0.
The result indicates that the test is successful.
[Edit recommendations]
Differences between Http, TCP/IP and Socket: data link layer of two channels-detailed configuration process of point-to-point communication PPP dynamic route protocol RIP [responsible editor: Lin TEL :( 010) 68476606]