当前位置:   article > 正文

华为ensp静态路由配置_ensp静态路由配置命令

ensp静态路由配置命令

**静态路由# 学习目标:

了解静态路由原理和弊端
掌握配置静态路由的命令
成功配置静态路由
对静态路由排错的命令


学习内容:

静态路由
1、 规划拓扑图
2、 使用华为ensp模拟器配置静态路由
3、 掌握静态路由配置命令
4、排错命令


学习时间:

提示:2021/12/2


学习内容:

静态路由:
是指用户或网络管理员手工配置的路由信息。当网络拓扑结构或链路状态发生改变时,需要网络管理员手工配置静态路由信息。

静态路由弊端:
相比于动态路由协议,静态路由并不适用于大型网络,因为大型网络在一旦发生变动管理员需要花费大量的时间进行配置,同时配置如有错误排错也是一个很漫长痛苦的事情

何时适合静态路由
稳定小型局域网

基于华为ensp模拟器配置静态路由命令详解:

在这里插入图片描述静态路由拓扑图(两台主机分别为10和20网段,需要经过三个路由器)

R1

sys #进入系统视图
[Huawei]sysname R1 #给路由器重新命名为R1
[R1]int g #选择接口,先配置g0/0/1口
[R1]int GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.10.254 24 #分配IP地址
Dec 2 2021 18:56:28-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q #退出该接口
[R1]int g
[R1]int GigabitEthernet 0/0/0 #进入g0/0/0口配置
[R1-GigabitEthernet0/0/0]ip add 10.0.12.1 24 #分配IP地址
Dec 2 2021 18:56:54-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]ip route-static 192.168.20.0 24 10.0.12.2 #在系统模式下配置静态路由,此实验是需要使pc1和pc2互相通信,那么目标主机便是IP段为192.168.20.0/24的主机 从路由器R1出去的的第一跳就为路由器R2的G0/0/0口

R2

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.0.12.2 24
Dec 2 2021 18:57:33-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]q
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.23.2 24
Dec 2 2021 18:57:56-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 192.168.10.0 24 10.0.12.1
[R2]ip route-static 192.168.20.0 24 10.0.23.3
#静态路由通信是双向的(request和reply),所以配置时也需要两头都配置,pc1通信向pc2的方向时192.168.20.0/24 R2需要通过的路径只剩下R3的g0/0/1口地址为10.0.23.3
#pc2回应pc1的目标为192.168.10.0/24路径有R1的g/0/0/0口10.0.12.1

R3

system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 10.0.23.3 24
Dec 2 2021 18:58:34-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[R3-GigabitEthernet0/0/1]q
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.20.254 24
Dec 2 2021 18:58:53-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]q
[R3]ip route-static 192.168.10.0 24 10.0.23.2
#PC2和PC1通信目标主机时192.168.10.0网段的主机,而R3需要靠路由器R2的g0/0/1口找到目标主机

到此静态路由配置完毕,主机之间互ping便可知道配置是否成功了

在这里插入图片描述

实验2

在这里插入图片描述

实验目标

使pc1和pc2、pc3之间互相通信(配置静态路由的方式)

实验过程

1.划分IP地址 2.配置IP 3.命令配置静态路由

PC1配置IP网关

![在这里插入图片描述](https://img-blog.csdnimg.cn/48ff26bfff67490cb9dc4a1b62b95501.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAamlheW91d2FfamlheW91,size_18,color_FFFFFF,t_70,g_se,x_16)

PC2配置IP网关

![在这里插入图片描述](https://img-blog.csdnimg.cn/6b76eba39b0d4cfe8173b35ed0bf9a79.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAamlheW91d2FfamlheW91,size_20,color_FFFFFF,t_70,g_se,x_16)

PC3配置IP网关

![在这里插入图片描述](https://img-blog.csdnimg.cn/bd91a00bbf104d9d995cc0b772c89a29.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAamlheW91d2FfamlheW91,size_20,color_FFFFFF,t_70,g_se,x_16)

R1配置命令

system-view
[Huawei]sysname R1
[R1]int GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.1.1.254 24
Dec 2 2021 20:10:32-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]int GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.1.123.1 24
Dec 2 2021 20:10:54-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1]ip route-static 10.3.3.0 24 10.1.123.3
[R1]ip route-static 10.2.2.0 24 10.1.123.2
#需要和pc2、pc3通信分清目标主机IP地址段和需要经过的路段是多少

R2配置命令

system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.1.123.2 24
Dec 2 2021 20:11:54-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state.
[R2-GigabitEthernet0/0/2]q
[R2]int GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.2.2.254 24
Dec 2 2021 20:12:13-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 10.1.1.0 24 10.1.123.1
#pc2进行reply的目标主机段和需要经过的路段

R3配置命令

system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g
[R3]int GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.3.3.254 24
Dec 2 2021 20:12:50-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[R3-GigabitEthernet0/0/1]q
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.1.123.3 24
Dec 2 2021 20:13:14-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]q
[R3]ip route-static 10.1.1.0 24 10.1.123.1
#pc3reply的目标主机段和需要经过的地址段

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/206783
推荐阅读
相关标签
  

闽ICP备14008679号