ENSP--三层交换配置实验

目录

一、实验目标

二、实验拓扑

三、场景需求

四、基本配置

五、创建VLAN

六、配置Eth-Trunk 链路:

七、配置三层接口

八、路由配置

九、验证配置

十、配置OSPF


一、实验目标

续上一篇实验文章,本次实验也是通过配置实现VLAN间的路由。而上篇实验是通过配置单臂路由实现VLAN间通信,本次实验将通过配置三层交换的方式实现VLAN间的通信。

  • 掌握配置三层交换机实现VLAN间通信的方法;
  • 掌握以太网Trunk链路实现VLAN间通信的方法;
  • 掌握在不同VLAN间配置动态路由协议OSPF的方法

二、实验拓扑

 

三、场景需求

在企业网络中,通过使用三层交换机可以简便的实现VLAN间通信。作为企业的网络管理员,需要在三层交换机配置VLANIF接口的三层功能,使得如上所示拓扑图中的网络能够实现VLAN间通信。此外,为了使S1和S2所连接的不同网络能够进行三层通信,还需要配置路由协议。

四、基本配置

配置R1&R2接口IP地址:

R1:

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]inter g0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.3.1 24
May 27 2022 17:46:14-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]q
[R1]

R2:

[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.0.4.1 24
May 27 2022 18:40:01-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]

配置S1与S2之间的Trunk链路:

S1&S2:

S1:

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname S1
[S1]
May 27 2022 17:53:47-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]mode lacp
May 27 2022 17:54:17-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1-Eth-Trunk1]port link-type trunk 
May 27 2022 17:54:57-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.	
[S1-Eth-Trunk1]port trunk allow-pass vlan all
[S1-Eth-Trunk1]q
[S1]
May 27 2022 17:55:17-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.int
[S1]interface g0/0/1
[S1-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1-GigabitEthernet0/0/1]
May 27 2022 17:55:57-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095
[S1-GigabitEthernet0/0/1]q
[S1]interface g0/0/2
[S1-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1-GigabitEthernet0/0/2]
May 27 2022 17:56:27-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.

S2:

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname S2
[S2]interface 
May 27 2022 17:58:07-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.th
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]mode lacp
May 27 2022 17:58:27-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.	
[S2-Eth-Trunk1]port link-type trunk 
May 27 2022 17:58:57-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095
[S2-Eth-Trunk1]port trunk allow-pass vlan all
[S2-Eth-Trunk1]q
May 27 2022 17:59:17-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.r	
[S2]interface g0/0/1
[S2-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
May 27 2022 17:59:23-08:00 S2 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk1 ha
s turned into UP state.
[S2-GigabitEthernet0/0/1]q
May 27 2022 17:59:27-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S2]interface g0/0/2
[S2-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2-GigabitEthernet0/0/2]q
[S2]
May 27 2022 17:59:47-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.

五、创建VLAN

在S1和S2上创建VLAN2-VLAN5:

S1:

[S1]vlan batch 2 to 5
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1]
May 27 2022 18:03:07-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 10, the c
hange loop count is 0, and the maximum number of records is 4095.
[S1]

S2:

[S2]vlan batch 2 to 5
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2]
May 27 2022 18:03:57-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 10, the c
hange loop count is 0, and the maximum number of records is 4095.

检查VLAN创建是否成功:

S1(同S2):

 

六、配置Eth-Trunk 链路:

 将S1上的G0/0/3和0/0/4端口分别加入VLAN 2和VLAN 3。将S2上的 G0/0/3和G0/0/4端口分别加入VLAN 4和VLAN 5:

S1:

[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]port trunk pvid vlan 1
[S1-Eth-Trunk1]q
May 27 2022 18:09:48-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[S1]interface g0/0/3
[S1-GigabitEthernet0/0/3]port link-type access 
May 27 2022 18:10:08-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 12, the c
hange loop count is 0, and the maximum number of records is 4095.t		
[S1-GigabitEthernet0/0/3]port default vlan 2
[S1-GigabitEthernet0/0/3]
May 27 2022 18:10:18-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 13, the c
hange loop count is 0, and the maximum number of records is 4095.q
[S1]interface g0/0/4
[S1-GigabitEthernet0/0/4]port link-type access 
May 27 2022 18:10:38-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 14, the c
hange loop count is 0, and the maximum number of records is 4095.de		
[S1-GigabitEthernet0/0/4]port default vlan 3
[S1-GigabitEthernet0/0/4]q
[S1]
May 27 2022 18:10:48-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 15, the c
hange loop count is 0, and the maximum number of records is 4095.

S2:

[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]port trunk pvid vlan 1
[S2-Eth-Trunk1]
May 27 2022 18:12:28-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[S2-Eth-Trunk1]q
[S2]interface g0/0/3	
[S2-GigabitEthernet0/0/3]port link-type access 
May 27 2022 18:12:58-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 12, the c
hange loop count is 0, and the maximum number of records is 4095.e		
[S2-GigabitEthernet0/0/3]port default vlan 4
[S2-GigabitEthernet0/0/3]q
May 27 2022 18:13:08-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 13, the c
hange loop count is 0, and the maximum number of records is 4095.
[S2]interface g0/0/4	
[S2-GigabitEthernet0/0/4]port link-type access 
May 27 2022 18:13:28-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 14, the c
hange loop count is 0, and the maximum number of records is 	
[S2-GigabitEthernet0/0/4]port default vlan 5
[S2-GigabitEthernet0/0/4]q
[S2]
May 27 2022 18:13:48-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 15, the c
hange loop count is 0, and the maximum number of records is 4095.

七、配置三层接口

分别为S1上的VLANIF 1、VLANIF 2和VLANIF 3以及S2上的VLANIF 4、 VLANIF 5和VLANIF 1配置IP地址:

S1:

[S1]interface Vlanif 3
[S1-Vlanif3]
May 27 2022 18:29:10-08:00 S1 %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif3 has t
urned into UP state.	
[S1-Vlanif3]ip address 10.0.3.254 24
[S1-Vlanif3]
May 27 2022 18:29:21-08:00 S1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface Vlanif3 has entered the UP state.
[S1-Vlanif3]q
May 27 2022 18:29:28-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 17, the c
hange loop count is 0, and the maximum number of records is 4095.	
[S1]interface Vlanif 1	
[S1-Vlanif1]ip address 10.0.1.1 24
[S1-Vlanif1]
May 27 2022 18:30:06-08:00 S1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface Vlanif1 has entered the UP state.
[S1-Vlanif1]q
May 27 2022 18:30:08-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 19, the c
hange loop count is 0, and the maximum number of records is 4095.
[S1]interface Vlanif 2	
[S1-Vlanif2]ip address 10.0.2.254 24
[S1-Vlanif2]
May 27 2022 18:30:21-08:00 S1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IP 
on the interface Vlanif2 has entered the UP state.
[S1-Vlanif2]q
[S1]
May 27 2022 18:30:28-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 20, the c
hange loop count is 0, and the maximum number of records is 4095.

S2:

[S2]interface Vlanif 1	
[S2-Vlanif1]ip address 10.0.1.2 24
[S2-Vlanif1]
May 27 2022 18:31:51-08:00 S2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Vlanif1 has entered the UP state.
[S2]interface Vlanif 4
[S2-Vlanif4]
May 27 2022 18:32:09-08:00 S2 %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif4 has t
urned into UP state.
[S2-Vlanif4]ip address 10.0.4.254 24
[S2-Vlanif4]
May 27 2022 18:32:23-08:00 S2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface Vlanif4 has entered the UP state.
[S2-Vlanif4]q	
[S2]interface Vlanif 
May 27 2022 18:32:28-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 17, the c
hange loop count is 0, and the maximum number of records is 4095.5
[S2-Vlanif5]
May 27 2022 18:32:29-08:00 S2 %%01IFNET/4/IF_STATE(l)[4]:Interface Vlanif5 has t
urned into UP state.
[S2-Vlanif5]ip address 10.0.5.254 24
[S2-Vlanif5]
May 27 2022 18:32:39-08:00 S2 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface Vlanif5 has entered the UP state.q
[S2]
May 27 2022 18:32:48-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 18, the c
hange loop count is 0, and the maximum number of records is 4095.

八、路由配置

本实验中,R1、R2、S3和S4模拟客户端主机,四台设备都需要配置一个用户IP地址,其中S3和S4使用VLANIF1接口配置IP地址,  最后为每台设备配置一条缺省静态路由指向网关:

R1:

[R1]ip route-static 0.0.0.0 0 10.0.3.254
[R1]

R2:

[R2]ip route-static 0.0.0.0 0 10.0.4.254
[R2]

S3:

[Huawei]sysname S3	
[S3]interface Vlanif 1
May 27 2022 18:40:52-08:00 S3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S3-Vlanif1]ip address 10.0.2.1 24
[S3-Vlanif1]
May 27 2022 18:41:26-08:00 S3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Vlanif1 has entered the UP state.
May 27 2022 18:41:32-08:00 S3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.	
[S3-Vlanif1]q
[S3]	
[S3]ip route-static 0.0.0.0 0 10.0.2.254
[S3]
May 27 2022 18:42:12-08:00 S3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.

S4:

[S4]interface Vlanif 
May 27 2022 18:43:42-08:00 S4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.1
[S4-Vlanif1]ip address 10.0.5.1 24
[S4-Vlanif1]
May 27 2022 18:43:52-08:00 S4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Vlanif1 has entered the UP state.
[S4-Vlanif1]q
May 27 2022 18:44:02-08:00 S4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.	
[S4]ip route-static 0.0.0.0 0 10.0.5.254
[S4]

九、验证配置

检测R1与S3的连通性,即VLAN2与VLAN3的连通性:

R1:

 检测R1与R2之间,即VLAN3与VLAN4的连通性:

R1:

 上述信息表表明VLAN3与VLAN4之间不能通信,使用Trancert命令查看测试原因:

R1:

 上述信息表明数据包只能到达VLAN3的网关设备,然后在S1上查看是否具有到达目的VLAN网段的路由条目:

S1:

 从路由表可以看出,这里是没有到目的网段10.0.4.0的路由条目的,所以数据包就不能转发到目的网段.

十、配置OSPF

由于S1上缺少路由条目,这里就可以使用OSPF动态获取.

在S1和S2上配置OSPF:

S1:

[S1]ospf
[S1-ospf-1]
May 27 2022 18:54:39-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 21, the c
hange loop count is 0, and the maximum number of records is 4095.	
[S1-ospf-1]area 0
May 27 2022 18:54:49-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 22, the c
hange loop count is 0, and the maximum number of records is 4095.
[S1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[S1-ospf-1-area-0.0.0.0]q
[S1-ospf-1]q
[S1]

S2:

[S2]ospf
[S2-ospf-1]ar	
[S2-ospf-1]area 0
May 27 2022 18:56:09-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 20, the c
hange loop count is 0, and the maximum number of records is 4095.
[S2-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[S2-ospf-1-area-0.0.0.0]
May 27 2022 18:56:19-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 21, the c
hange loop count is 0, and the maximum number of records is 4095.
[S2-ospf-1-area-0.0.0.0]q
[S2-ospf-1]q
[S2]

待收敛完成后,查看S1路由表:

S1:

 此时路由表已经有了我们需要的路由条目,然后再来测试VLAN3到VLAN4的连通性:

R1:

 可以看到,此时R1与R2已经可以进行通信了.

十一、配置文件

S1:

[S1]display current-configuration 
#
sysname S1
#
vlan batch 2 to 5
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
 ip address 10.0.1.1 255.255.255.0
#
interface Vlanif2
 ip address 10.0.2.254 255.255.255.0
#
interface Vlanif3
 ip address 10.0.3.254 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
#
interface GigabitEthernet0/0/1
 eth-trunk 1
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 2
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 3
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ospf 1
 area 0.0.0.0
  network 10.0.0.0 0.255.255.255
#
user-interface con 0
user-interface vty 0 4
#
return
[S1]

S2:

[S2]display current-configuration 
#
sysname S2
#
vlan batch 2 to 5
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
 ip address 10.0.1.2 255.255.255.0
#
interface Vlanif2
#
interface Vlanif4
 ip address 10.0.4.254 255.255.255.0
#
interface Vlanif5
 ip address 10.0.5.254 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
#
interface GigabitEthernet0/0/1
 eth-trunk 1
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 4
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 5
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ospf 1
 area 0.0.0.0
  network 10.0.0.0 0.255.255.255
#
user-interface con 0
user-interface vty 0 4
#
return
[S2]  

S3:

<S3>display current-configuration 
#
sysname S3
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
 ip address 10.0.2.1 255.255.255.0
#
interface MEth0/0/1
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Ethernet0/0/8
#
interface Ethernet0/0/9
#
interface Ethernet0/0/10
#
interface Ethernet0/0/11
#
interface Ethernet0/0/12
#
interface Ethernet0/0/13
#
interface Ethernet0/0/14
#
interface Ethernet0/0/15
#
interface Ethernet0/0/16
#
interface Ethernet0/0/17
#
interface Ethernet0/0/18
#
interface Ethernet0/0/19
#
interface Ethernet0/0/20
#
interface Ethernet0/0/21
#
interface Ethernet0/0/22
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.2.254
#
user-interface con 0
user-interface vty 0 4
#
return
<S3>

S4:

<S4>display current-configuration 
#
sysname S4
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
 ip address 10.0.5.1 255.255.255.0
#
interface MEth0/0/1
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Ethernet0/0/8
#
interface Ethernet0/0/9
#
interface Ethernet0/0/10
#
interface Ethernet0/0/11
#
interface Ethernet0/0/12
#
interface Ethernet0/0/13
#
interface Ethernet0/0/14
#
interface Ethernet0/0/15
#
interface Ethernet0/0/16
#
interface Ethernet0/0/17
#
interface Ethernet0/0/18
#
interface Ethernet0/0/19
#
interface Ethernet0/0/20
#
interface Ethernet0/0/21
#
interface Ethernet0/0/22
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.5.254
#
user-interface con 0
user-interface vty 0 4
#
return
<S4>

R1:

<R1>display current-configuration 
[V200R003C00]
#
 sysname R1
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.0.3.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.3.254
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R1>  

R2:

<R2>display current-configuration 
[V200R003C00]
#
 sysname R2
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.0.4.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.4.254
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R2> 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值