华为模拟器eNSP基础实验

保存配置 注意:如果用快捷键ctrl + s或退出时提示保存,则只保存实验拓扑图,保存配置命令,我们需要在每一台交换机和路由器上的Huawei模式下输入如下命令。 <Huawei>save The current configuration will be written to the device

保存配置

注意:如果用快捷键ctrl + s或退出时提示保存,则只保存实验拓扑图,保存配置命令,我们需要在每一台交换机和路由器上的Huawei模式下输入如下命令。

<Huawei>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]:config.cfg //配置文件名称可以自定义(英文名称)
Now saving the current configuration to the slot 17.
Save the configuration successfully.
<Huawei>

单臂路由

单臂路由.png

交换机:建两个vlan,例如vlan 10 和 vlan 20,把与pc机直连的接口分别与两个vlan绑定,注意,交换机内的vlan不配置IP,因为二层交换机没有路由功能,与路由器直连的交换机的接口配置成trunk模式,与所有vlan 绑定
路由器:与交换机直连的路由器接口,配置子接口模式,dot1q和IP,IP分别与两个PC机的网关一样

  • 路由器配置命令
[Huawei]interface Ethernet0/0/0.1
[Huawei-Ethernet0/0/0.1]ip add 192.168.2.1 24
[Huawei-Ethernet0/0/0.1]vlan-type dot1q 10 default
 
[Huawei]interface Ethernet0/0/0.2
[Huawei-Ethernet0/0/0.2]ip add 192.168.3.1 24
[Huawei-Ethernet0/0/0.2]vlan-type dot1q 20 default

三层交换机Vlan间路由

6a58db4859786.png

交换机:分别配置两个vlan 比如vlan 10 和 vlan 20,两个vlan 的IP分别配置成两个PC机的网关IP

  • 交换机配置命令
[Huawei]vlan batch 10 20  #创建两个vlan
 
[Huawei]interface vlan 10
[Huawei-Vlanif10]ip add 192.168.2.1 24
 
[Huawei]interface vlan 20	
[Huawei-Vlanif20]ip address 192.168.3.1 24
 
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access 
[Huawei-GigabitEthernet0/0/1]port default vlan 10
 
[Huawei]interface GigabitEthernet 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access 
[Huawei-GigabitEthernet0/0/3]port default vlan 20

telnet配置

533f4e3386871.png

注意:华为模拟器里的PC不支持telnet客户端,可以在另一个交换机里telnet连接,但必须要在交换机的用户模式下使用telnet <Huawei>

前提:两交换机必须可以联通,即都在同一个网段,同一个vlan下

  • LSW4交换机的telnet配置命令
[Huawei]aaa
[Huawei-aaa]local-user dnxrzl password cipher 123456
Info: Add a new user.
[Huawei-aaa]local-user dnxrzl service-type telnet
[Huawei-aaa]local-user dnxrzl privilege level 3
[Huawei-aaa]q
[Huawei]telnet server enable 
Info: The Telnet server has been enabled.
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]q
[Huawei]

console密码配置

10d24a2a252c9.png
  • console aaa认证配置
[Huawei]aaa
[Huawei-aaa]local-user dnxrzl password cipher 123456
Info: Add a new user.
[Huawei-aaa]local dnxrzl privilege level 3
[Huawei-aaa]q
[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode aaa
[Huawei-ui-console0]q
[Huawei]q
<Huawei>q
 
Username:dnxrzl
Password:123456
<Huawei>

RIP动态路由配置

4b2bac6c39dfb.png
  • 前提:先配置好IP
  • 三个路由器RIP配置(下面只提供R4的配置,R5和R6与R4一样)
[Huawei]rip 
[Huawei-rip-1]version 2
[Huawei-rip-1]undo summary
宣告网段
[Huawei-rip-1]network 192.168.3.0
[Huawei-rip-1]network 192.168.1.0

OSPF单区域配置

sp20230629_135556_319.png
  • R1配置
[Huawei]ospf router-id 1.1.1.1
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255
  • R2配置
[Huawei]ospf router-id 2.2.2.2
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255
  • R3配置
[Huawei]ospf router-id 3.3.3.3
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]network 192.168.5.0 0.0.0.255

OSPF多区域配置

sp20230630_124859_043.png
  • R4配置
[Huawei]ospf router-id 1.1.1.1
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255
  • R5配置
[Huawei]ospf router-id 2.2.2.2
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]qu
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]qu
[Huawei-ospf-1]qu
  • R6配置
[Huawei]ospf router-id 1.1.1.1
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]network 192.168.5.0 0.0.0.255
LICENSED UNDER CC BY-NC-SA 4.0
访问统计
总访问量: 👀| 访客数: 🚶‍♂️