设为首页 收藏本站
查看: 1392|回复: 0

[经验分享] Cisco点滴——默认路由

[复制链接]
发表于 2018-7-18 06:38:42 | 显示全部楼层 |阅读模式
  默认路由(缺省路由)!呵呵,很多一听就会笑了,不就是全0嘛~~呵呵~~对啊~~很简单,仅供初学者或感兴趣者当个学习参考工具,其实网络也没有那么复杂~~很简单的哦~~
  下面开始准备我们的拓扑实验架构~~
  拓扑图:
DSC0000.jpg

  拓扑连线
  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>  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>  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,至此结束,怎么样,很简单吧,(*^__^*) 嘻,这个就算是先热热身,哈~~后面咱再做点有技术含量的,见笑了~~(*^__^*) 嘻…

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-538165-1-1.html 上篇帖子: Configuring Single Number Reach on Cisco CUCM 7.1.3 下篇帖子: Cisco设备上设置DHCP实例
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表