实验设备:虚拟路由器,pc端各三个
实验要求:按照以下图片,设置路由ip地址
AR1配置如下:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
Jul 8 2022 22:49:56-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 255.255.255.0
Jul 8 2022 22:51:10-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]qu
AR1静态地址配置如下:
[Huawei]ip route -static 192.168.3.0 24 192.168.2.2
[Huawei]ip route-static 192.168.4.0 24 192.168.2.2
[Huawei]ip route-static 192.168.5.0 24 192.168.2.2
[Huawei]qu
<Huawei>
AR2配置如下:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.3.1 255.255.255.0
Jul 8 2022 22:55:13-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 255.255.255.0
Jul 8 2022 22:55:51-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]qu
AR2静态地址配置如下:
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
[Huawei]ip route-static 192.168.5.0 255.255.255.0 192.168.4.2
[Huawei]qu
AR3配置如下:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.5.1 255.255.255.0
Jul 8 2022 22:58:57-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.2 255.255.255.0
Jul 8 2022 22:59:15-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]qu
AR3静态地址配置如下:
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.4.1
[Huawei]ip route-static 192.168.2.0 255.255.255.0 192.168.4.1
[Huawei]ip route-static 192.168.3.0 255.255.255.0 192.168.4.1
[Huawei]qu
PC1设置如图:
PC2设置如图:
PC3设置如图:
现在将其连接起来: