1. 程式人生 > >cisco靜態路由-適合初學者

cisco靜態路由-適合初學者

p地址 log ip地址 exit sco 分享 mage com ext

技術分享圖片
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

cisco靜態路由-適合初學者