当前位置:   article > 正文

ensp华为路由器静态配置和动态配置_esnp的静态和动态

esnp的静态和动态

#作业三#

实验一

实验环境

实验思路

1. 规划并配置IP 3. 检验连通性

具体实施

规划并配置IP
##### PC1: ![在这里插入图片描述](https://img-blog.csdnimg.cn/img_convert/beb2b298ca258e960e4d0f455aaaf60b.png#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]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
静态配置
##### 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
  • 1
  • 2
  • 3
  • 4
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
检验连通性

####### 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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

####### 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
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

实验二

实验环境

在这里插入图片描述

实验思路

###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]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
动态配置
##### 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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
检验连通性
####### 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=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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

####### 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
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

实验总结

**路由是指导报文转发的路径信息,包含目的网络,掩码,出接口以及下一跳。分为直连,静态以及动态路由。直连路由自动生成,静态路由则适用于小型网络,需要网络管理员手动输入路由信息来实现路由的目的。配置静态路由最关键的两点是1.数据是否能有去有回,2.沿途的每个路由器是否有源目IP的路由信息。而动态路由则能根据网络情况自动调节路由信息以实现路由目的,常用于大型网络配置。OSPF路由器中当相邻的两个接口上激活了OSPF后,通过收发报文形成邻居关系,则两个路由可以实现信息共享,不再需要手动配置路由信息。**

实验总结
路由是指导报文转发的路径信息,包含目的网络,掩码,出接口以及下一跳。分为直连,静态以及动态路由。直连路由自动生成,静态路由则适用于小型网络,需要网络管理员手动输入路由信息来实现路由的目的。配置静态路由最关键的两点是1.数据是否能有去有回,2.沿途的每个路由器是否有源目IP的路由信息。而动态路由则能根据网络情况自动调节路由信息以实现路由目的,常用于大型网络配置。OSPF路由器中当相邻的两个接口上激活了OSPF后,通过收发报文形成邻居关系,则两个路由可以实现信息共享,不再需要手动配置路由信息。

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/751079
推荐阅读
相关标签
  

闽ICP备14008679号