RT1
enable
conf t /进入全局模式
banner motd #this is a ccna1# /设置旗标
banner login #this is a ccna1#
int f0/0 /进入接口
ip add 172.16.20.1 255.255.255.0 /接口配ip地址
int f0/1
ip add 172.16.10.1 255.255.255.0
eixt
ip route 172.16.30.0 255.255.255.0 172.16.20.2 /配置路由信息,30网段的地址指向172.16.20.2这个接口
ip route 172.16.40.0 255.255.255.0 172.16.20.2
ip route 172.16.50.0 255.255.255.0 172.16.20.2
exit
write
RT2
enable
conf t
banner motd #this is a ccna2#
banner login #this is a ccna2#
ip route 172.16.10.0 255.255.255.0 172.16.20.2
ip route 172.16.40.0 255.255.255.0 172.16.30.2
exit
write
RT3
enable
conf t
banner motd #this is a ccna3#
banner login #this is a ccna3#
ip route 172.16.10.0 255.255.255.0 172.16.30.1
ip route 172.16.20.0 255.255.255.0 172.16.30.1
ip route 172.16.50.0 255.255.255.0 172.16.30.1
exit
write
pc1
ip 172.16.10.3/24 172.16.10.1 /配置IP地址、掩码和网关
pc2
ip 172.16.50.2/24 172.16.50.1
pc1
ip 172.16.40.2/24 172.16.40.1
路由器替代pc
ip route 172.16.20.0 255.255.255.0 172.16.10.1
ip route 172.16.30.0 255.255.255.0 172.16.10.1
ip route 172.16.40.0 255.255.255.0 172.16.10.1
ip route 172.16.50.0 255.255.255.0 172.16.10.1 /配置路由
或者:配置默认路由 0.0.0.0 0.0.0.0 172.16.10.1
原文地址:http://blog.51cto.com/tudoubowen10/2065973