介绍VRP命令:
<Huawei> ----------用户视图
<Huawei>system-view
[Huawei] -------------系统视图
[Huawei]quit ---------退出-----是逐层退出。
<Huawei>
[AR1]return ----------退出 ,不是逐层退出,直接退到用户视图
<AR1>
[Huawei]sysname JSNJ-QYT-CORE-ROUTER-------做项目按照设备的实际用途命名
[JSNJ-QYT-CORE-ROUTER]
[AR1]display current-configuration -----检查正在配置的内容
[AR1]display saved-configuration
There is no correct configuration file in FLASH ---------没有保存的配置
[AR1]
<AR1>save -------------保存只能在用户视图下
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<AR1>
<AR1>reset saved-configuration ------删除保存的配置
This will delete the configuration in the flash memory.
The device configuratio
ns will be erased to reconfigure.
Are you sure? (y/n)[n]:y
Clear the configuration in the device successfully.
<AR1>
配置IP地址
[AR1]interface GigabitEthernet 0/0/0 -----------进入接口
[AR1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
或者
[AR1-GigabitEthernet0/0/0]ip address 12.1.1.1 255.255.255.0 、
注意:如果地址配置错误,可以覆盖配置,不需要undo掉
如果需要undo,配置如下:
[AR2-GigabitEthernet0/0/0]undo ip address 12.1.1.20 255.255.255.0
检查配置IP地址是否正确
[AR1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
[AR2-GigabitEthernet0/0/0]display this ------------查看当前的配置
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 12.1.1.20 255.255.255.0
完成直连接口配置以后,需要测试直连的连通性
[AR2]ping 12.1.1.1
PING 12.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=255 time=120 ms
Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 12.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/38/120 ms
注意点:
1. 注意配置的掩码,直连是否在同一个网段。
2. 广播地址和网段地址是不能在接口上的。这些不能作为可用地址
3. 一定直连的连通性