实践是检验真理的唯一标准!!单臂路由器设置案例!

实验

实验要求:配置单臂路由使得全网互通。

在这里插入图片描述
(1)配置PC1,PC2,PC3

分别配置PC,1PC2,PC3的IP地址,子网掩码和网关

(2)配置交换机LSW1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW1
[LSW1]
Apr  6 2021 19:25:34-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 4, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW1]vlan batch 10 20 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]
Apr  6 2021 19:26:04-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 5, the 
change loop count is 0, and the maximum number of records is 4095.

[LSW1]int e0/0/2
[LSW1-Ethernet0/0/2]port link-type access
[LSW1-Ethernet0/0/2]port default vlan 10
Apr  6 2021 19:27:04-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 6, the 
change loop count is 0, and the maximum number of records is 4095. 

[LSW1-Ethernet0/0/2]int e0/0/3
[LSW1-Ethernet0/0/3]port link-type access
[LSW1-Ethernet0/0/3]port default vlan 20

[LSW1-Ethernet0/0/3]int e0/0/4
[LSW1-Ethernet0/0/4]port link-type access
[LSW1-Ethernet0/0/4]
Apr  6 2021 19:29:04-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 10, the
 change loop count is 0, and the maximum number of records is 4095.
 
[LSW1-Ethernet0/0/4]port default vlan 30
[LSW1-Ethernet0/0/4]
Apr  6 2021 19:35:24-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 11, the
 change loop count is 0, and the maximum number of records is 4095.
 
[LSW1-Ethernet0/0/4]int e0/0/1
[LSW1-Ethernet0/0/1]port link-type trunk
[LSW1-Ethernet0/0/1]
Apr  6 2021 19:35:54-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 12, the
 change loop count is 0, and the maximum number of records is 4095.
[LSW1-Ethernet0/0/1]port trunk allow-pass vlan all
[LSW1-Ethernet0/0/1]
Apr  6 2021 19:36:34-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 13, the
 change loop count is 0, and the maximum number of records is 4095.

(3) 配置路由器R1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1

[R1]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]ip add 192.168.1.254 24
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 10
Apr  6 2021 19:41:36-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0.1 has entered the UP state. 
[R1-GigabitEthernet0/0/0.1]arp broadcast enable 

[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]ip add 192.168.2.254 24
[R1-GigabitEthernet0/0/0.2]dot1q termination vid 20
Apr  6 2021 19:44:04-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0.2 has entered the UP state. 
[R1-GigabitEthernet0/0/0.2]arp broadcast enable 

[R1-GigabitEthernet0/0/0.2]int g0/0/0.3
[R1-GigabitEthernet0/0/0.3]ip add 192.168.3.254 24
[R1-GigabitEthernet0/0/0.3]dot1q termination vid 30
Apr  6 2021 19:45:24-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0.3 has entered the UP state. 
[R1-GigabitEthernet0/0/0.3]arp broadcast enable 
[R1-GigabitEthernet0/0/0.3]

(4)测试

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值