综合训练
拓扑图
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
原文链接:https://blog.csdn.net/gtdisscary/article/details/136522614?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171949704316800226546612%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=171949704316800226546612&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-23-136522614-null-null.nonecase&utm_term=2024%E9%AB%98%E8%80%83
© 版权声明
声明📢本站内容均来自互联网,归原创作者所有,如有侵权必删除。
本站文章皆由CC-4.0协议发布,如无来源则为原创,转载请注明出处。
THE END