华为初命令实践!两个PC机,两个路由器,实现PC机ping通以及静态路由配置。
2018-01-29 20:11
1296 查看
设置环境
PC1 192.168.1.1 255.255.255.0
网关 192.168.1.254
PC2 192.168.31 255.255.255.0
网关 192.168.3254
连线图如下
全部开机启动
配置AR5
<Huawei>system-view (进入系统视图)
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info enable (关闭信息乱码,可以打可以不打)
Info: Information center is disabled.
[Huawei]sysname AR5(更改设备名)
[AR5]interface Ethernet 0/0/0(进入0/0/0接口)
[AR5-Ethernet0/0/0]ip address 192.168.1.254 255.255.255.0(配置接口IP)
[AR5-Ethernet0/0/0]undo shutdown (开启接口)
Info: Interface Ethernet0/0/0 is not shutdown.
[AR5-Ethernet0/0/0]interface Ethernet 0/0/1
[AR5-Ethernet0/0/1]ip address 192.168.2.1 255.255.255.0
[AR5-Ethernet0/0/1]undo shutdown
Info: Interface Ethernet0/0/1 is not shutdown.
[AR5-Ethernet0/0/1]quit(退出到上一层)
[AR5]quit
<AR5>save (保存)
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( .cfg, .zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
配置AR7
同理R5,只是IP不同,见图
<Huawei>display current-configuration (查看详细配置)
验证ping操作
不通因分析
1、各个接口IP配置完成,PC机设置已完成。
2、检查路由表,发现未配置静态路由。
静态路由
定义:需管理员手动配置,且数据包是有去有回,故每个路由器都需拥有整条路上的网段。
配置:ip route-static 去往目标网段 子网掩码 下一跳(永远是直接相连的路由器的端口IP地址)
本实验例子
[AR5]ip route-static 192.168.3.0 255.255.255.0 192.168.2.2
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
测试ping命令
Ping通,验结束。
PC1 192.168.1.1 255.255.255.0
网关 192.168.1.254
PC2 192.168.31 255.255.255.0
网关 192.168.3254
连线图如下
全部开机启动
配置AR5
<Huawei>system-view (进入系统视图)
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info enable (关闭信息乱码,可以打可以不打)
Info: Information center is disabled.
[Huawei]sysname AR5(更改设备名)
[AR5]interface Ethernet 0/0/0(进入0/0/0接口)
[AR5-Ethernet0/0/0]ip address 192.168.1.254 255.255.255.0(配置接口IP)
[AR5-Ethernet0/0/0]undo shutdown (开启接口)
Info: Interface Ethernet0/0/0 is not shutdown.
[AR5-Ethernet0/0/0]interface Ethernet 0/0/1
[AR5-Ethernet0/0/1]ip address 192.168.2.1 255.255.255.0
[AR5-Ethernet0/0/1]undo shutdown
Info: Interface Ethernet0/0/1 is not shutdown.
[AR5-Ethernet0/0/1]quit(退出到上一层)
[AR5]quit
<AR5>save (保存)
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( .cfg, .zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
配置AR7
同理R5,只是IP不同,见图
<Huawei>display current-configuration (查看详细配置)
验证ping操作
不通因分析
1、各个接口IP配置完成,PC机设置已完成。
2、检查路由表,发现未配置静态路由。
静态路由
定义:需管理员手动配置,且数据包是有去有回,故每个路由器都需拥有整条路上的网段。
配置:ip route-static 去往目标网段 子网掩码 下一跳(永远是直接相连的路由器的端口IP地址)
本实验例子
[AR5]ip route-static 192.168.3.0 255.255.255.0 192.168.2.2
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
测试ping命令
Ping通,验结束。
相关文章推荐
- 路由器命令使用、端口配置和静态路由配置
- 路由器静态路由配置 两个路由通过serial连接
- 配置静态路由实现两个公司网路互联
- oracle中快速实现命令记录与删除键,以及使用脚本快速配置
- 通过配置静态ip实现两个直连路由器的loopback地址通信
- 华为AR系列路由器静态路由协议配置方法
- PC机到路由器的配置命令总结 推荐
- 180316—网络学习笔记:路由器接口配置地址及静态路由的实现配置。
- 路由器静态路由配置命令
- 路由器配置实践 教你如何在Linux中三台主机两个网段互相通信
- 配置静态路由实现两个公司网络互联
- 路由器静态路由配置(华为模拟器)
- ping命令 仿源码实现 以及几个 命令的 使用
- 网络设备配置与管理----配置静态路由实现两个公司网络互联
- 路由器的静态路由配置命令
- 路由器IP地址以及静态路由的配置
- 路由器的基本原理与配置命令(静态路由和默认路由)
- 思科/华为/锐捷/华三四种路由器的配置命令
- Cisco路由器安全配置必用的10条命令
- 路由器OSPF协议配置命令<四>