2024网络技术春考综合训练

综合训练

在这里插入图片描述

拓扑图

LSW2和LSW3只用划分vlan100 和200并且在连接电脑的端口配置access并将端口划分到相应Vlan中。其他接口均使用trunk,并且允许所有的VLan通过。这个题目的Vlan划分有错误,大家可以只划分连接电脑的接口为Vlan即可。

LSW1

un t m
//关闭信息提示
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//进入系统视图
[Huawei]sy LSW1
//命名为LSW1
[LSW1]vl b 100 200
//划分VLan 100 200
Info: This operation may take a few seconds. Please wait for a moment...done.
//配置接口模式
[LSW1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]p l t
[LSW1-GigabitEthernet0/0/2]p t a v a
[LSW1-GigabitEthernet0/0/2]int g0/0/3
[LSW1-GigabitEthernet0/0/3]p l t
[LSW1-GigabitEthernet0/0/3]p t a v a
[LSW1-GigabitEthernet0/0/3]in vl 100
//配置Vlan100的网关地址
[LSW1-Vlanif100]ip a 10.10.1.1 24
[LSW1-Vlanif100]in vl 200
//配置Vlan200的网关地址
[LSW1-Vlanif200]ip a 10.10.2.1 24
[LSW1-Vlanif200]int g0/0/1
[LSW1-GigabitEthernet0/0/1]p l a
[LSW1-GigabitEthernet0/0/1]in vl 1
//配置G0/0/1口的IP地址
[LSW1-Vlanif1]ip a 192.168.100.2 30
//配置OSPF
[LSW1-Vlanif1]ospf
[LSW1-ospf-1]area 0
[LSW1-ospf-1-area-0.0.0.0]net 192.168.100.0 0.0.0.3
[LSW1-ospf-1-area-0.0.0.0]net 10.10.1.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]net 10.10.2.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]q
//开启STP
[LSW1-ospf-1]stp en
[LSW1]stp mo rstp
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]stp prio	
//设置为根交换机
[LSW1]stp priority 0

注意LSW1上的G0/0/1端口使用Access接口并且配置IP地址,并且需要在LSW1上配置OSPF

LSW2

<Huawei>
<Huawei>un t m
//关闭信息提示
Info: Current terminal monitor is off.
<Huawei>sys
//进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sy LSW2
[LSW2]vl b 100 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]int g0/0/2
//配置接口模式
[LSW2-GigabitEthernet0/0/2]p l a
[LSW2-GigabitEthernet0/0/2]p d v 100
[LSW2-GigabitEthernet0/0/2]int g0/0/10
[LSW2-GigabitEthernet0/0/10]p l a
[LSW2-GigabitEthernet0/0/10]p d v 200
[LSW2-GigabitEthernet0/0/10]int g0/0/3
[LSW2-GigabitEthernet0/0/3]p l t
[LSW2-GigabitEthernet0/0/3]p t a v a
[LSW2-GigabitEthernet0/0/3]int g0/0/1
[LSW2-GigabitEthernet0/0/1]p l t
[LSW2-GigabitEthernet0/0/1]p t a v a
[LSW2]stp en
//开启STP
[LSW2]stp mo rstp
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]stp prio	
[LSW2]stp priority 4096
//配置为备用交换机
[LSW2]dis stp bri
//查看STP的简要信息
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/1        ROOT  FORWARDING      NONE
   0    GigabitEthernet0/0/2        DESI  FORWARDING      NONE
   0    GigabitEthernet0/0/3        DESI  FORWARDING      NONE
   0    GigabitEthernet0/0/10       DESI  FORWARDING      NONE
[LSW2] User interface con0 is available

LSW3

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sy LSW3
[LSW3]vl b 100 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3]int g0/0/2
[LSW3-GigabitEthernet0/0/2]p l a
[LSW3-GigabitEthernet0/0/2]p d v 100
[LSW3-GigabitEthernet0/0/2]int g0/0/1
[LSW3-GigabitEthernet0/0/1]p l t
[LSW3-GigabitEthernet0/0/1]p t a v a
[LSW3-GigabitEthernet0/0/1]int g0/0/3
[LSW3-GigabitEthernet0/0/3]p l t
[LSW3-GigabitEthernet0/0/3]p t a v a
[Huawei]sy LSW3
[LSW3]vl b 100 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3]int g0/0/2
[LSW3-GigabitEthernet0/0/2]p l a
[LSW3-GigabitEthernet0/0/2]p d v 100
[LSW3-GigabitEthernet0/0/2]int g0/0/1
[LSW3-GigabitEthernet0/0/1]p l t
[LSW3-GigabitEthernet0/0/1]p t a v a
[LSW3-GigabitEthernet0/0/1]int g0/0/3
[LSW3-GigabitEthernet0/0/3]p l t
[LSW3-GigabitEthernet0/0/3]p t a v a
[LSW3]stp en
[LSW3]stp mo rstp
Info: This operation may take a few seconds. Please wait for a moment...done.

AR1

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sy AR1
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip a 192.168.100.1 30
//配置IP地址
[AR1-GigabitEthernet0/0/1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip a 172.16.1.1 30
[AR1-GigabitEthernet0/0/0]ospf
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]net 192.168.100.0 0.0.0.3
[AR1-ospf-1-area-0.0.0.0]net 172.16.1.0 0.0.0.3
[AR1-ospf-1-area-0.0.0.0]net 10.10.1.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]net 10.10.2.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]

AR2

The device is running!

<Huawei>un t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sy AR2
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip a 172.16.1.2 30
[AR2-GigabitEthernet0/0/0]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip a 1.2.3.1 24
//配置Server的网关地址
[AR2-GigabitEthernet0/0/1]ospf
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]net 172.16.1.0 0.0.0.3
[AR2-ospf-1-area-0.0.0.0]net 1.2.3.0 0.0.0.255
//配置NAT实现Vlan100使用G0/0/1接口的IP访问Server
[AR2]acl 2000
[AR2-acl-basic-2000]rule permit source 10.10.1.0 0.0.0.255
[AR2-acl-basic-2000]rule deny source 10.10.2.0 0.0.0.255
[AR2-acl-basic-2000]int g0/0/1
[AR2-GigabitEthernet0/0/1]nat outbound 2000
//应用NAT服务
[AR2]acl 2000
[AR2-acl-basic-2000]rule deny source 10.10.2.0 0.0.0.255
[AR2-acl-basic-2000]int g0/0/1
[AR2-GigabitEthernet0/0/1]traffic-filter outbound acl 2000
//配置禁止Vlan200访问Server
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值