實驗拓撲
配置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文章
8575瀏覽量
151019 -
CISCO
+關注
關注
1文章
65瀏覽量
24665 -
靜態路由
+關注
關注
0文章
18瀏覽量
8568
原文標題: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
?3411次閱讀
CISCO與華為3COM路由器的比較分析
剖析CISCO與華為3COM路由器的區別,熟練掌握下面涉及到的CISCO與華為3COM路由器知識,很多方法都會使你豁然開朗的。華為路由器與同
發表于 02-26 10:22
?1233次閱讀
思科路由器配置基礎_7個方面詳解cisco路由器配置
大家一定對Cisco路由器并不陌生,作為第一個入行的國際化企業而言,它的產品眾所周知,但也正因為如此讓大家對于一些有關它的配置有所困惑,本文主要介紹的是思科路由器
發表于 05-14 09:32
?1.7w次閱讀
Cisco路由器調試命令大全
在配置Cisco路由器時,全局和接口命令的界限是十分明顯的。在這種情況下,我們使用“全局”來標識那些不能用于接口調試或者特定的傳輸介質類型和協議調試的命令。
評論