ccna静态路由与默认路由配置

未命名10
 
R1静态路由的配置如下:
Router>enable
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface s0
R1(config-if)#ip add 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#interface e0
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#ip route 192.168.10.0 255.255.255.0 10.0.0.2
 
R2静态路由的配置如下:
Router>enable
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface s0
R2(config-if)#ip add 10.0.0.2 255.0.0.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#interface e0
R1(config-if)#ip add 192.168.20.1 255.255.255.0
R1(config-if)#ip route 192.168.20.0 255.255.255.0 10.0.0.1
 
Host1的IP配置如下:
ipconfig /ip 192.168.10.10 255.255.255.0
ipconfig /dg 192.168.10.1 255.255.255.0
 
Host1的IP配置如下:
ipconfig /ip 192.168.20.20 255.255.255.0
ipconfig /dg 192.168.20.1 255.255.255.0
 
R1默认路由配置如下:
R1(config)#no ip route 192.168.10.0 255.255.255.0 10.0.0.2
R1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2
 
R2默认路由配置如下:
R2(config)#no ip route 192.168.20.0 255.255.255.0 10.0.0.2
R2(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1

你可能感兴趣的:(Cisco,路由配置,CCNA,静态路由,sunlinux)