路由器的静态路由配置以及OSPF动态配置
路由器的路由配置
文章目录
- 路由器的路由配置
- 路由器的静态配置
- 实验拓扑图
- 配置IP和环回IP
- AR1
- AR2
- AR3
- 配置PC
- PC1
- PC2
- PC3
- 配置路由器的静态路由
- AR1
- AR2
- AR3
- 路由间的连通性
- AR1 ping AR2
- AR1 ping AR3
- AR2 ping AR3
- 主机之间的连通性
- PC1 ping PC2
- PC1 ping PC3
- pc2 ping PC3
- OSPF动态规划路由
- 实验拓扑图
- 配置IP和环回IP
- AR1
- AR2
- AR3
- OSPF动态规划
- R1
- R2
- R3
- 测试路由器的连通性
- R1 ping R2
- R1 ping R3
- R2 ping R3
- 测试主机间的连通性
- PC1 ping PC2
- PC1 ping PC3
- PC2 ping PC3
路由器的静态配置
实验拓扑图
配置IP和环回IP
AR1
<Huawei>system-view
[Huawei]sysname R1
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 1.1.1.1 32
[R1-LoopBack0]quit
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip ad
[R1-GigabitEthernet0/0/0]ip address 10.1.12.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 4.4.4.5 24
[R1-GigabitEthernet0/0/1]quit
AR2
<R2>sys
<R2>system-view
R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.1.12.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.1.23.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface g0/0/2
[R2-GigabitEthernet0/0/2]ip address 5.5.5.6 24
[R2-GigabitEthernet0/0/2]quit
[R2]interface g4/0/0
[R2-GigabitEthernet4/0/0]ip address 10.1.34.2 24
[R2-GigabitEthernet4/0/0]quit
[R2]interface LoopBack 0
[R2-LoopBack0]ip ad
[R2-LoopBack0]ip address 2.2.2.2 32
[R2-LoopBack0]quit
AR3
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]display this
[R3-GigabitEthernet0/0/0]ip ad
[R3-GigabitEthernet0/0/0]ip address 10.1.23.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]int
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip ad
[R3-GigabitEthernet0/0/1]ip address 6.6.6.7 24
[R3-GigabitEthernet0/0/1]quit
[R3]int
[R3]interface g0/0/2
[R3-GigabitEthernet0/0/2]ip ad
[R3-GigabitEthernet0/0/2]ip address 10.1.34.3 24
[R3]interface LoopBack 0
[R3-LoopBack0]ip ad
[R3-LoopBack0]ip address 3.3.3.3 32
[R3-LoopBack0]quit
配置PC
PC1
PC2
PC3
配置路由器的静态路由
AR1
[R1]ip route-static 10.1.23.0 24 10.1.12.2
[R1]ip route-static 10.1.34.0 24 10.1.12.2
[R1]ip route-static 5.5.5.0 24 10.1.12.2
[R1]ip route-static 6.6.6.0 24 10.1.12.2
[R1]ip route-static 2.2.2.2 32 10.1.12.2
[R1]ip route-static 3.3.3.3 32 10.1.12.2
AR2
[R2]ip route-static 1.1.1.1 32 10.1.12.1
[R2]ip route-static 3.3.3.3 32 10.1.23.3
[R2]ip route-static 3.3.3.3 32 10.1.34.3
[R2]ip route-static 4.4.4.0 24 10.1.12.1
[R2]ip route-static 6.6.6.0 24 10.1.23.3
[R2]ip route-static 6.6.6.0 24 10.1.34.3
AR3
[R3]ip route-static 2.2.2.2 32 10.1.23.2
[R3]ip route-static 2.2.2.2 32 10.1.34.2
[R3]ip route-static 1.1.1.1 32 10.1.23.2
[R3]ip route-static 1.1.1.1 32 10.1.34.2
[R3]ip route-static 10.1.12.0 24 10.1.23.2
[R3]ip route-static 10.1.12.0 24 10.1.34.2
[R3]ip route-static 5.5.5.0 24 10.1.23.2
[R3]ip route-static 5.5.5.0 24 10.1.34.2
[R3]ip route-static 4.4.4.0 24 10.1.23.2
[R3]ip route-static 4.4.4.0 24 10.1.34.2
路由间的连通性
AR1 ping AR2
<R1>ping -a 1.1.1.1 2.2.2.2PING 2.2.2.2: 56 data bytes, press CTRL_C to breakReply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=10 msReply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
<R1>ping 2.2.2.2PING 2.2.2.2: 56 data bytes, press CTRL_C to breakReply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=10 msReply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=10 msReply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=1 msReply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=30 ms
<R1>ping 10.1.12.2PING 10.1.12.2: 56 data bytes, press CTRL_C to breakReply from 10.1.12.2: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.1.12.2: bytes=56 Sequence=2 ttl=255 time=30 msReply from 10.1.12.2: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.1.12.2: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.1.12.2: bytes=56 Sequence=5 ttl=255 time=20 ms
AR1 ping AR3
<R1>ping 10.1.34.3PING 10.1.34.3: 56 data bytes, press CTRL_C to breakReply from 10.1.34.3: bytes=56 Sequence=1 ttl=254 time=20 msReply from 10.1.34.3: bytes=56 Sequence=2 ttl=254 time=20 msReply from 10.1.34.3: bytes=56 Sequence=3 ttl=254 time=20 msReply from 10.1.34.3: bytes=56 Sequence=4 ttl=254 time=20 msReply from 10.1.34.3: bytes=56 Sequence=5 ttl=254 time=20 ms
<R1>ping 10.1.23.3PING 10.1.23.3: 56 data bytes, press CTRL_C to breakReply from 10.1.23.3: bytes=56 Sequence=1 ttl=254 time=20 msReply from 10.1.23.3: bytes=56 Sequence=2 ttl=254 time=20 msReply from 10.1.23.3: bytes=56 Sequence=3 ttl=254 time=30 msReply from 10.1.23.3: bytes=56 Sequence=4 ttl=254 time=20 msReply from 10.1.23.3: bytes=56 Sequence=5 ttl=254 time=20 ms
<R1>ping -a 1.1.1.1 3.3.3.3PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=20 ms
AR2 ping AR3
<R2>ping 3.3.3.3PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=20 msReply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=30 msReply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=20 msReply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=20 ms
<R2>ping 10.1.23.3PING 10.1.23.3: 56 data bytes, press CTRL_C to breakReply from 10.1.23.3: bytes=56 Sequence=1 ttl=255 time=40 msReply from 10.1.23.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.1.23.3: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.1.23.3: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.1.23.3: bytes=56 Sequence=5 ttl=255 time=30 ms
<R2>ping 10.1.34.3PING 10.1.34.3: 56 data bytes, press CTRL_C to breakReply from 10.1.34.3: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.1.34.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.1.34.3: bytes=56 Sequence=3 ttl=255 time=20 msReply from 10.1.34.3: bytes=56 Sequence=4 ttl=255 time=20 msReply from 10.1.34.3: bytes=56 Sequence=5 ttl=255 time=20 ms
主机之间的连通性
PC1 ping PC2
PC>ping 5.5.5.6Ping 5.5.5.6: 32 data bytes, Press Ctrl_C to break
From 5.5.5.6: bytes=32 seq=1 ttl=255 time<1 ms
From 5.5.5.6: bytes=32 seq=2 ttl=255 time=15 ms
From 5.5.5.6: bytes=32 seq=3 ttl=255 time<1 ms
From 5.5.5.6: bytes=32 seq=4 ttl=255 time=16 ms
From 5.5.5.6: bytes=32 seq=5 ttl=255 time<1 ms--- 5.5.5.6 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 0/6/16 ms
PC1 ping PC3
PC>ping 6.6.6.7Ping 6.6.6.7: 32 data bytes, Press Ctrl_C to break
From 6.6.6.7: bytes=32 seq=1 ttl=254 time=32 ms
From 6.6.6.7: bytes=32 seq=2 ttl=254 time=15 ms
From 6.6.6.7: bytes=32 seq=3 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=4 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=5 ttl=254 time=31 ms--- 6.6.6.7 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/22/32 ms
pc2 ping PC3
PC>ping 6.6.6.7Ping 6.6.6.7: 32 data bytes, Press Ctrl_C to break
From 6.6.6.7: bytes=32 seq=1 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=2 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=3 ttl=254 time=31 ms
From 6.6.6.7: bytes=32 seq=4 ttl=254 time=15 ms
From 6.6.6.7: bytes=32 seq=5 ttl=254 time=32 ms--- 6.6.6.7 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/22/32 ms
OSPF动态规划路由
实验拓扑图
配置IP和环回IP
AR1
<Huawei>system-view
[Huawei]sysname R1
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 1.1.1.1 32
[R1-LoopBack0]quit
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip ad
[R1-GigabitEthernet0/0/0]ip address 10.1.12.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 4.4.4.5 24
[R1-GigabitEthernet0/0/1]quit
AR2
<R2>sys
<R2>system-view
R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.1.12.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.1.23.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface g0/0/2
[R2-GigabitEthernet0/0/2]ip address 5.5.5.6 24
[R2-GigabitEthernet0/0/2]quit
[R2]interface g4/0/0
[R2-GigabitEthernet4/0/0]ip address 10.1.34.2 24
[R2-GigabitEthernet4/0/0]quit
[R2]interface LoopBack 0
[R2-LoopBack0]ip ad
[R2-LoopBack0]ip address 2.2.2.2 32
[R2-LoopBack0]quit
AR3
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]display this
[R3-GigabitEthernet0/0/0]ip ad
[R3-GigabitEthernet0/0/0]ip address 10.1.23.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]int
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip ad
[R3-GigabitEthernet0/0/1]ip address 6.6.6.7 24
[R3-GigabitEthernet0/0/1]quit
[R3]int
[R3]interface g0/0/2
[R3-GigabitEthernet0/0/2]ip ad
[R3-GigabitEthernet0/0/2]ip address 10.1.34.3 24
[R3]interface LoopBack 0
[R3-LoopBack0]ip ad
[R3-LoopBack0]ip address 3.3.3.3 32
[R3-LoopBack0]quit
OSPF动态规划
R1
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 4.4.4.5 0.0.0.0
[R1-ospf-1-area-0.0.0.0] network 10.1.12.1 0.0.0.0
R2
[R2]ospf router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.1.12.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.1]network 5.5.5.6 0.0.0.0
[R2-ospf-1-area-0.0.0.1]network 10.1.23.2 0.0.0.0
[R2-ospf-1-area-0.0.0.1] network 10.1.34.2 0.0.0.0
R3
[R3]ospf router-id 3.3.3.3
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 6.6.6.7 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 10.1.23.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 10.1.34.3 0.0.0.0
测试路由器的连通性
R1 ping R2
<R1>ping 2.2.2.2PING 2.2.2.2: 56 data bytes, press CTRL_C to breakReply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=40 msReply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=30 msReply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=20 msReply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=30 ms--- 2.2.2.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/28/40 ms
R1 ping R3
<R1>ping 3.3.3.3PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=20 msReply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=40 ms--- 3.3.3.3 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/30/40 ms
R2 ping R3
<R1>ping 3.3.3.3PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 msReply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=20 msReply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=40 ms--- 3.3.3.3 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/30/40 ms
测试主机间的连通性
PC1 ping PC2
PC>ping 5.5.5.6Ping 5.5.5.6: 32 data bytes, Press Ctrl_C to break
From 5.5.5.6: bytes=32 seq=1 ttl=254 time=16 ms
From 5.5.5.6: bytes=32 seq=2 ttl=254 time=15 ms
From 5.5.5.6: bytes=32 seq=3 ttl=254 time=16 ms
From 5.5.5.6: bytes=32 seq=4 ttl=254 time=16 ms
From 5.5.5.6: bytes=32 seq=5 ttl=254 time=31 ms--- 5.5.5.6 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/18/31 ms
PC1 ping PC3
PC>ping 6.6.6.7Ping 6.6.6.7: 32 data bytes, Press Ctrl_C to break
From 6.6.6.7: bytes=32 seq=1 ttl=253 time=15 ms
From 6.6.6.7: bytes=32 seq=2 ttl=253 time=16 ms
From 6.6.6.7: bytes=32 seq=3 ttl=253 time=31 ms
From 6.6.6.7: bytes=32 seq=4 ttl=253 time=31 ms
From 6.6.6.7: bytes=32 seq=5 ttl=253 time=16 ms--- 6.6.6.7 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/21/31 ms
PC2 ping PC3
PC>ping 6.6.6.7Ping 6.6.6.7: 32 data bytes, Press Ctrl_C to break
From 6.6.6.7: bytes=32 seq=1 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=2 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=3 ttl=254 time=15 ms
From 6.6.6.7: bytes=32 seq=4 ttl=254 time=16 ms
From 6.6.6.7: bytes=32 seq=5 ttl=254 time=16 ms--- 6.6.6.7 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/15/16 ms
路由器的静态路由配置以及OSPF动态配置相关推荐
- 【计算机网络】思科实验(6):路由器的静态路由配置
系列文章目录 [计算机网络]思科实验(1):交换机的VLAN划分 [计算机网络]思科实验(2):交换机间的VLAN通信 [计算机网络]思科实验(3):使用三层交换机实现跨VLAN间的通信 [计算机网络 ...
- 14、配置路由器的静态路由
1.相关知识 什么是路由器 路由器(Router)是连接两个或多个网络的硬件设备,在网络间起网关的作用,是读取每一个数据包中的地址然后决定如何传送的专用智能性的网络设备.它能够理解不同的协议,例如某个 ...
- 两台路由器之间静态路由配置
实验环境为:Cisco Packet Tracer7.0 两台路由器之间静态路由配置 实验拓扑: 路由器0配置: Press RETURN to get started! Router>en R ...
- 路由器的静态路由配置命令
>路由器的静态路由配置 #静态路由的应用实例 在网络设计中,静态路由广泛得应用与点到点的网络连接,在这种静态路由指定数据分组的传输路径和设置路由器的缺省路由. #静态路由的配置方法与步骤 在全局 ...
- 路由器和静态路由的配置
目录 一.路由概述 二.静态路由和默认路由 三.配置静态路由 一.路由概述 路由:从源主机到目标主机的转发过程 路由器工作原理:根据路由表转发数据 二.静态路由和默认路由 1.静态路由 : 网络管理员 ...
- 路由器重温——静态路由
静态路由是手动配置的特殊路由,比动态路由使用更少的带宽,不占用CPU资源来计算和分析路由更新.不会自动收敛. 一.静态路由的组成 静态路由包括5个主要参数:目的IP地址和子网掩码.出接口和下一跳IP地 ...
- Envoy实现.NET架构的网关(一)静态配置与文件动态配置
什么是Gateway 在微服务体系结构中,如果每个微服务通常都会公开一组精细终结点,这种情况可能会有以下问题 如果没有 API 网关模式,客户端应用将与内部微服务相耦合. 在客户端应用中,单个页面/屏 ...
- 路由器上静态路由设置,实现不在通一网段的网络通信方法
期末复习,正好复习. 一.示意图 二.IP规划 配置终端IP.子网掩码.网关 PC0:192.168.10.100 255.255.255.0 192.168.10.1PC1:10.185.10.10 ...
- F1060 IPV6 BGP4+与静态路由重分布典型组网配置案例
转载来源 :F1060 IPV6 BGP4+与静态路由重分布典型组网配置案例 : https://mp.weixin.qq.com/s/zUCMs54yPgcCtNwXpARXnQ 1.组网及说明 组 ...
最新文章
- C/C++编译器mingw
- 理解MapReduce
- Docker大行其道—镜像
- [译] 重写 loadView() 方法使 Swift 视图代码更加简洁
- git/github的使用
- 文件夹目录结构导出工具及下载
- 基于ARM的Qt Creator嵌入式开发环境搭建
- linux 内核修改rss,linux 内核参数 rss
- c语言 程序延时 校准,c语言实现系统时间校正工具代码分享
- 【多项式求逆】[BZOJ3456]城市规划
- css模拟title和alt的提示效果[转]
- vs2010旗舰版密钥
- jQuery WeUI 组件下拉刷新和滚动加载的实现(复制就可以使用)
- 详解YUV数据格式(YUV444,YUV422,YUV420,YV12,YU12,NV12,NV21)
- html如何设置图片置顶,css怎么设置图片间距?
- Github中的缩写(PR, WIP, PTAL, TBR, TL, LGTM, SGTM, AFAIK, CC)含义
- 计算机的表白隐藏功能,微信还有这个功能?隐藏代码还能表白!教你高级告白手段...
- Debian7.5--双屏显示问题
- linux如何彻底删除一个用户
- H5手机休闲游戏开发商有哪些?带你看遍北京游戏研发公司
热门文章
- Spring Kafka消费模式(single, batch)及确认模式(自动、手动)示例
- asp新闻发布系统 html,构建你的网站新闻自动发布系统之一_asp实例
- C语言二级必须编译吗,c语言是计算机二级吗
- Java计算每月工作天数
- 新零售mysql设计 订单表 订单详情表
- 用c语言实现1+2+3+...+n求和
- Prometheus+Grafana监控安装及配置JVM实现企业微信告警
- 信息系统综合知识八 专业英语
- 阿里云国际站代理商:利用RDS MySQL数据库云开发ToDo List
- Java网课基础笔记(31)19-08-13