Yesterday, and friends in the computer room to discuss the problem of networking, when the discussion to the router communication, friends asked why not to configure the routing protocol. It used to be based on configuration manuals or experience configurations and did not carefully consider the issue. Think about it, it should be so understood (as follows).
If you want to implement communication between multiple network segments, you must use a router, which is no doubt. If multiple network segments exist between multiple selectable paths, the most convenient way is to configure the routing protocol, the simple point of the network can use RIP protocol, if it is a complex network can be used OSPF. Of course, the path of static routing can be used when the paths are not too long.
However, when there is only one path between multiple network segments, it is sufficient to simply configure a static route. If you are working in an enterprise, it is often sufficient to configure a simple static route.
I demonstrated it with the CPT (Cisco Packet Tracer) in order to be more persuasive and easy to understand.
The topology map is shown in the following illustration:
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 respectively.
The static route settings are as follows:
IP route 192.168.10.0 255.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:
IP configuration for 1.pc0:
Packet Tracer PC Command Line 1.0
Pc>ipconfig
IP address ... ...: 10.0.0.3..........
Subnet Mask ......: 255.0.0.0.......
"Default Gateway ..." ...: 10.0.0.1....
Pc>
IP configuration for 2.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 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 through 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-c Onfig_i:configured from console by console r1#