默认路由(缺省路由)!呵呵,很多一听就会笑了,不就是全0嘛~~呵呵~~对啊~~很简单,仅供初学者或感兴趣者当个学习参考工具,其实网络也没有那么复杂~~很简单的哦~~
下面开始准备我们的拓扑实验架构~~
拓扑图:
拓扑连线
Router1 S0/0 <----> Router2 S0/0
Router1 F1/0 <----> VPCS V0/1
Router2 F1/0 <----> VPCS V0/2
路由优化指令:
alias exec a sh ip route
alias exec b sh ip inter b
no ip domain-lookup
line consloe 0
logging synchronous
exec-timeout 0 0
exit
路由R1配置:
Router(config)#hostname R1
R1(config)#interface serial 0/0
R1(config-if)#ip add 202.99.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
//配置外网出口IP地址
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
//配置内网连接IP地址
R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0
R1(config)#end
//配置静态路由
查看路由运行状态
R1#show running-config
Building configuration...
Current configuration : 1068 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
ip audit notify log
ip audit po max-events 100
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Serial0/0
ip address 202.99.1.1 255.255.255.0
serial restart_delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart_delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart_delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart_delay 0
!
interface FastEthernet1/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0
!
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
路由R2配置:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip do lo
Router(config)#hostname R2
R2(config)#interface serial 0/0
R2(config-if)#ip address 202.99.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#end
R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0
R2(config)#end
路由运行状态
R2#show run
Building configuration...
Current configuration : 1023 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
ip audit notify log
ip audit po max-events 100
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Serial0/0
ip address 202.99.1.2 255.255.255.0
serial restart_delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart_delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart_delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart_delay 0
!
interface FastEthernet1/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0
!
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
路由连通性检测:
R1#ping 172.16.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/64/92 ms
R2#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/73/124 ms
===========================================================================================
VPCS 1 >ip 192.168.1.2 192.168.1.1
PC1 : 192.168.1.2 255.255.255.0 gateway 192.168.1.1
VPCS 1 >2
VPCS 2 >ip 172.16.1.2 172.16.1.1
PC2 : 172.16.1.2 255.255.255.0 gateway 172.16.1.1
VPCS 2 >show
NAME IP/CIDR GATEWAY LPORT RPORT
PC1 192.168.1.2/24 192.168.1.1 10001 11110
PC2 172.16.1.2/24 172.16.1.1 10002 11210
PC3 0.0.0.0/0 0.0.0.0 10003 30002
PC4 0.0.0.0/0 0.0.0.0 10004 30003
PC5 0.0.0.0/0 0.0.0.0 10005 30004
PC6 0.0.0.0/0 0.0.0.0 10006 30005
PC7 0.0.0.0/0 0.0.0.0 10007 30006
PC8 0.0.0.0/0 0.0.0.0 10008 30007
PC9 0.0.0.0/0 0.0.0.0 10009 30008
VPCS 1 >ping 172.16.1.2
172.16.1.2 icmp_seq=1 time=94.000 ms
172.16.1.2 icmp_seq=2 time=188.000 ms
172.16.1.2 icmp_seq=3 time=110.000 ms
172.16.1.2 icmp_seq=4 time=94.000 ms
172.16.1.2 icmp_seq=5 time=94.000 ms
VPCS 1 >2
VPCS 2 >ping 192.168.1.2
192.168.1.2 icmp_seq=1 time=94.000 ms
192.168.1.2 icmp_seq=2 time=125.000 ms
192.168.1.2 icmp_seq=3 time=125.000 ms
192.168.1.2 icmp_seq=4 time=156.000 ms
192.168.1.2 icmp_seq=5 time=110.000 ms
==================================================================================
OK,至此结束,怎么样,很简单吧,(*^__^*) 嘻,这个就算是先热热身,哈~~后面咱再做点有技术含量的,见笑了~~(*^__^*) 嘻…
本文出自 “龙目小子,博闻天下” 博客,谢绝转载!