实验拓扑
配置R1
Router(config) R1(config) R1(config-if) R1(config-if) R1(config-if) R1(config-if) R1(config-if) R1(config) R1(config)
查看接口ip
R1 Interface IP-Address OK? Method Status Protocol Ethernet0/0 192.168.12.1 YES manual up up Ethernet0/1 192.168.1.254 YES manual up up Ethernet0/2 unassigned YES unset administratively down down Ethernet0/3 unassigned YES unset administratively down down Serial1/0 unassigned YES unset administratively down down Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down
查看R1路由表
R1 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, Ethernet0/1 L 192.168.1.254/32 is directly connected, Ethernet0/1 S 192.168.3.0/24 [1/0] via 192.168.12.2 192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.12.0/24 is directly connected, Ethernet0/0 L 192.168.12.1/32 is directly connected, Ethernet0/0 S 192.168.23.0/24 [1/0] via 192.168.12.2
配置R2
Router>enable Router Router(config) R2(config) R2(config-if) R2(config-if) R2(config-if) R2(config-if) R2(config-if) R2(config) R2(config)
查看接口ip
R2 Interface IP-Address OK? Method Status Protocol Ethernet0/0 192.168.12.2 YES manual up up Ethernet0/1 192.168.23.2 YES manual up up Ethernet0/2 unassigned YES unset administratively down down Ethernet0/3 unassigned YES unset administratively down down Serial1/0 unassigned YES unset administratively down down Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down
查看路由
R2 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set S 192.168.1.0/24 [1/0] via 192.168.12.1 S 192.168.3.0/24 [1/0] via 192.168.23.3 192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.12.0/24 is directly connected, Ethernet0/0 L 192.168.12.2/32 is directly connected, Ethernet0/0 192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.23.0/24 is directly connected, Ethernet0/1 L 192.168.23.2/32 is directly connected, Ethernet0/1
配置R3
Router>enable Router Router(config) R3(config) R3(config) R3(config-if) R3(config-if) R3(config-if) R3(config-if) R3(config-if) R3(config) R3(config)
查看接口ip
R3 Interface IP-Address OK? Method Status Protocol Ethernet0/0 192.168.23.3 YES manual up up Ethernet0/1 192.168.3.254 YES manual up up Ethernet0/2 unassigned YES unset administratively down down Ethernet0/3 unassigned YES unset administratively down down Serial1/0 unassigned YES unset administratively down down Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down
查看路由
R3 Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set S 192.168.1.0/24 [1/0] via 192.168.23.2 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.3.0/24 is directly connected, Ethernet0/1 L 192.168.3.254/32 is directly connected, Ethernet0/1 S 192.168.12.0/24 [1/0] via 192.168.23.2 192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.23.0/24 is directly connected, Ethernet0/0 L 192.168.23.3/32 is directly connected, Ethernet0/0
配置vpc4
VPCS> ip 192.168.1.2/24 192.168.1.254 Checking for duplicate address... VPCS : 192.168.1.2 255.255.255.0 gateway 192.168.1.254
配置vpc5
VPCS> ip 192.168.3.2/24 192.168.3.254 Checking for duplicate address... VPCS : 192.168.3.2 255.255.255.0 gateway 192.168.3.254
在vpc4上ping vpc5测试连通性
VPCS> ping 192.168.3.2 84 bytes from 192.168.3.2 icmp_seq=1 ttl=61 time=0.958 ms 84 bytes from 192.168.3.2 icmp_seq=2 ttl=61 time=0.785 ms 84 bytes from 192.168.3.2 icmp_seq=3 ttl=61 time=1.050 ms 84 bytes from 192.168.3.2 icmp_seq=4 ttl=61 time=0.823 ms 84 bytes from 192.168.3.2 icmp_seq=5 ttl=61 time=0.827 ms
审核编辑:汤梓红
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。
举报投诉
-
接口
+关注
关注
33文章
8486浏览量
150805 -
CISCO
+关注
关注
1文章
65浏览量
24653 -
静态路由
+关注
关注
0文章
18浏览量
8565
原文标题:Cisco配置静态路由
文章出处:【微信号:magedu-Linux,微信公众号:马哥Linux运维】欢迎添加关注!文章转载请注明出处。
发布评论请先 登录
相关推荐
CISCO路由器配置实例
Cisco 路由器的基本配置百余例目录1.用户通过DDN专线接入ISP 2.远程用户拨号连入局域网 3.远程用户间对拨 4.Cisco 
发表于 08-31 09:46
•46次下载
Cisco路由安全性分析和改进
路由器安全在网络安全领域占有非常重要的地位,针对互联网中使用最为广泛的Cisco路由器,从3个方面出发分别说明了Cisco路由器所面临的各种
发表于 11-24 18:41
•15次下载
CISCO路由器之广域网协议设置
CISCO路由器之广域网协议设置
一、HDLC
HDLC是CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用H
发表于 04-01 13:42
•3394次阅读
CISCO与华为3COM路由器的比较分析
剖析CISCO与华为3COM路由器的区别,熟练掌握下面涉及到的CISCO与华为3COM路由器知识,很多方法都会使你豁然开朗的。华为路由器与同
发表于 02-26 10:22
•1221次阅读
思科路由器配置基础_7个方面详解cisco路由器配置
大家一定对Cisco路由器并不陌生,作为第一个入行的国际化企业而言,它的产品众所周知,但也正因为如此让大家对于一些有关它的配置有所困惑,本文主要介绍的是思科路由器
发表于 05-14 09:32
•1.6w次阅读
Cisco路由器调试命令大全
在配置Cisco路由器时,全局和接口命令的界限是十分明显的。在这种情况下,我们使用“全局”来标识那些不能用于接口调试或者特定的传输介质类型和协议调试的命令。
评论