#作业三#
实验一
实验环境
实验思路
1. 规划并配置IP 3. 检验连通性具体实施
规划并配置IP
##### PC1: ![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/7e2571864d493489783d0fe1ceae270f.jpeg#pic_center#pic_center)PC2:
PC3:
AR1:
<Huawei>sy
Mar 10 2021 16:43:45-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[1]:Interface GigabitEt
hernet0/0/0 has turned into UP state.
[Huawei]
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R1
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.12.1 24
[R1]int lo 0
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]
AR2:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R2
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 10.1.32.2 24
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.12.2 24
[R3-GigabitEthernet0/0/0]int g4/0/0
[R3-GigabitEthernet4/0/0]ip add 10.1.23.2 24
[R3-GigabitEthernet4/0/0]int lo 0
[R3-LoopBack0]ip add 2.2.2.2 32
AR3:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R3
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.3.254 24
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 10.1.23.3 24
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.32.3 24
[R3-GigabitEthernet0/0/0]int lo 0
[R3-LoopBack0]ip add 3.3.3.3 32
静态配置
##### AR1: ##### ip route-static 2.2.2.2 255.255.255.255 GigabitEthernet0/0/0 10.1.12.2
ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/0 10.1.12.2
ip route-static 192.168.2.0 255.255.255.0 GigabitEthernet0/0/0 10.1.12.2
ip route-static 192.168.3.0 255.255.255.0 GigabitEthernet0/0/0 10.1.12.2
AR2:
ip route-static 1.1.1.1 255.255.255.255 GigabitEthernet0/0/0 10.1.12.1
ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/2 10.1.23.3
ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/0 10.1.32.3
ip route-static 192.168.1.0 255.255.255.0 GigabitEthernet0/0/0 10.1.12.1
ip route-static 192.168.3.0 255.255.255.0 GigabitEthernet0/0/2 10.1.23.3
ip route-static 192.168.3.0 255.255.255.0 GigabitEthernet0/0/0 10.1.32.3
AR3:
ip route-static 1.1.1.1 255.255.255.255 GigabitEthernet4/0/0 10.1.23.2
ip route-static 1.1.1.1 255.255.255.255 GigabitEthernet0/0/2 10.1.32.2
ip route-static 2.2.2.2 255.255.255.255 GigabitEthernet4/0/0 10.1.23.2
ip route-static 2.2.2.2 255.255.255.255 GigabitEthernet0/0/2 10.1.32.2
ip route-static 192.168.1.0 255.255.255.0 GigabitEthernet4/0/0 10.1.23.2
ip route-static 192.168.1.0 255.255.255.0 GigabitEthernet0/0/2 10.1.32.2
ip route-static 192.168.2.0 255.255.255.0 GigabitEthernet4/0/0 10.1.23.2
检验连通性
####### PC1 ping PC2 #######
PC>ping 192.168.2.1
Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.1: bytes=32 seq=2 ttl=127 time=16 ms
From 192.168.2.1: bytes=32 seq=3 ttl=127 time=16 ms
From 192.168.2.1: bytes=32 seq=4 ttl=127 time=16 ms
From 192.168.2.1: bytes=32 seq=5 ttl=127 time=16 ms
--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/16/16 ms
####### PC1 ping PC3 #######
PC>ping 192.168.3.1
Ping 192.168.3.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.3.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=3 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=5 ttl=126 time=16 ms
--- 192.168.3.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/16/16 ms
实验二
实验环境
实验思路
###1. 规划并配置IP### ###2. 动态配置### ###3. 检查连通性###具体实施
规划并配置IP
PC1:
PC2:
PC3:
AR1:
<Huawei>sy
Mar 10 2021 16:43:45-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[1]:Interface GigabitEt
hernet0/0/0 has turned into UP state.
[Huawei]
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R1
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.12.1 24
[R1]int lo 0
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]
AR2:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R2
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 10.1.32.2 24
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.12.2 24
[R3-GigabitEthernet0/0/0]int g4/0/0
[R3-GigabitEthernet4/0/0]ip add 10.1.23.2 24
[R3-GigabitEthernet4/0/0]int lo 0
[R3-LoopBack0]ip add 2.2.2.2 32
AR3:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R3
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.3.254 24
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 10.1.23.3 24
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.32.3 24
[R3-GigabitEthernet0/0/0]int lo 0
[R3-LoopBack0]ip add 3.3.3.3 32
动态配置
##### AR1: #####<R1>sy
Enter system view, return user view with Ctrl+Z.
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.254 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.
0
AR2:
<R2>sy
Enter system view, return user view with Ctrl+Z.
[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]q
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.0]network 192.168.2.254 0.0.0.0
[R2-ospf-1-area-0.0.0.1]network 10.1.32.2 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 2.2.2.2 0.0.0.0
AR3:
<R3>sy
Enter system view, return user view with Ctrl+Z.
[R3]ospf router-id 3.3.3.3
[R3-ospf-1]area 1
[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.32.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 192.168.3.254 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
检验连通性
####### PC1 ping PC2 ####### PC>ping 192.168.2.1Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.1: bytes=32 seq=2 ttl=126 time=31 ms
From 192.168.2.1: bytes=32 seq=3 ttl=126 time=16 ms
From 192.168.2.1: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.2.1: bytes=32 seq=5 ttl=126 time=31 ms
--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/23/31 ms
####### PC1 ping PC3 #######
PC>ping 192.168.3.1
Ping 192.168.3.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.3.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=3 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.3.1: bytes=32 seq=5 ttl=126 time=16 ms
--- 192.168.3.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/16/16 ms
实验总结
**路由是指导报文转发的路径信息,包含目的网络,掩码,出接口以及下一跳。分为直连,静态以及动态路由。直连路由自动生成,静态路由则适用于小型网络,需要网络管理员手动输入路由信息来实现路由的目的。配置静态路由最关键的两点是1.数据是否能有去有回,2.沿途的每个路由器是否有源目IP的路由信息。而动态路由则能根据网络情况自动调节路由信息以实现路由目的,常用于大型网络配置。OSPF路由器中当相邻的两个接口上激活了OSPF后,通过收发报文形成邻居关系,则两个路由可以实现信息共享,不再需要手动配置路由信息。**实验总结
路由是指导报文转发的路径信息,包含目的网络,掩码,出接口以及下一跳。分为直连,静态以及动态路由。直连路由自动生成,静态路由则适用于小型网络,需要网络管理员手动输入路由信息来实现路由的目的。配置静态路由最关键的两点是1.数据是否能有去有回,2.沿途的每个路由器是否有源目IP的路由信息。而动态路由则能根据网络情况自动调节路由信息以实现路由目的,常用于大型网络配置。OSPF路由器中当相邻的两个接口上激活了OSPF后,通过收发报文形成邻居关系,则两个路由可以实现信息共享,不再需要手动配置路由信息。