组网建网实例----静态路由配置实例

 网络拓扑图:

组网建网实例----静态路由配置实例_第1张图片

 

P.S.:所有掩码:255.255.255.0
PC配置:
Host A : IP:10.0.0.2 GW:10.0.0.1
Host B : IP:10.0.1.2 GW:10.0.1.1
Host C : IP:10.0.4.2 GW:10.0.4.1
 
路由器基本配置:
Router A
[A]int e0
[A-enternet0/0]ip addr 10.0.0.1 255.255.255.0
[A-enternet0/0]undo shut
[A-enternet0/0]int s1
[A-serial0/1]clock rate 64000
[A-serial0/1]ip addr 10.0.2.1 255.255.255.0
[A-serial0/1]undo shut
[A-serial0/1]quit
 
Router B
[B]int e0
[B-Enternet0/0]ip addr 10.0.1.2 255.255.255.0
[B-Enternet0/0]undo shut
[B-Enternet0/0]int s0
[B-Serial0/0]clock rate 64000
[B-Serial0/0]ip addr 10.0.2.2 255.255.255.0
[B-Serial0/0]undo shut
[B-Serial0/0]int s1
[B-Serial0/1]clock rate 64000
[B-Serial0/1]ip addr 10.0.3.1 255.255.255.0
[B-Serial0/1]undo shut
[B-Serial0/1]quit
 
Route C
[C]int e0
[C-Enternet0/0]ip addr 10.0.4.2 255.255.255.0
[C-Enternet0/0]undo shut
[C-Enternet0/0]int s0
[C-Serial0/0]clock rate 64000
[C-Serial0/0]ip addr 10.0.3.2 255.255.255.0
[C-Serial0/0]undo shut
[C-Serial0/0]quit
 
 
路由的配置:
Route B
[B]ip route-static 10.0.4.0 255.255.255.0 10.0.3.2     //指定路由器B发送到10.0.4.0网段的数据由10.0.3.2处理
[B]ip route-static 10.0.0.0 255.255.255.0 10.0.2.1
 
Route A
[A]ip route-static 10.0.4.0 255.255.255.0 10.0.2.2
[A]ip route-static 10.0.3.0 255.255.255.0 10.0.2.2
[A]ip route-static 10.0.1.0 255.255.255.0 10.0.2.2
 
Route C
[C]ip route-static 10.0.0.0 255.255.255.0 10.0.3.1
[C]ip route-static 10.0.2.0 255.255.255.0 10.0.3.1
[C]ip route-static 10.0.1.0 255.255.255.0 10.0.3.1
 
 
实验结果:

各网段互通~

你可能感兴趣的:(组网建网)