news 2026/4/25 15:59:54

园区网综合实验作业

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
园区网综合实验作业

第一步:配置接入交换机

LSW3: [sw3]vlan batch 2 3 20 30 interface GigabitEthernet0/0/1 port link-type access port default vlan 2 interface GigabitEthernet0/0/2 port link-type access port default vlan 3 interface GigabitEthernet0/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 2 to 3 20 30 interface GigabitEthernet0/0/4 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 2 to 3 20 30 LSW4: [sw4]vlan batch 2 3 20 30 interface GigabitEthernet0/0/1 port link-type access port default vlan 20 interface GigabitEthernet0/0/2 port link-type access port default vlan 30 interface GigabitEthernet0/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 2 to 3 20 30 interface GigabitEthernet0/0/4 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 2 to 3 20 30

LSW3:

LSW4:

第二步:配置汇聚层

LSW1: [sw1]vlan batch 2 3 20 30 interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 将0/0/1和0/0/2接口链路聚合 [sw1-Eth-Trunk0]trunkport GigabitEthernet 0/0/1 to 0/0/2 interface Eth-Trunk0 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 300 LSW2: [sw2]vlan batch 2 3 20 30 interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 将0/0/1和0/0/2接口链路聚合 [sw2-Eth-Trunk0]trunkport GigabitEthernet 0/0/1 to 0/0/2 interface Eth-Trunk0 port link-type trunk port trunk allow-pass vlan 2 to 3 20 30 300

第三步:创建VLANIF并配置VRRP

LSW1: interface Vlanif2 ip address 10.0.2.253 255.255.255.0 vrrp vrid 2 virtual-ip 10.0.2.254 vrrp vrid 2 priority 120 vrrp vrid 2 preempt-mode timer delay 20 vrrp vrid 2 track interface GigabitEthernet0/0/5 reduced 30 dhcp select global interface Vlanif3 ip address 10.0.3.253 255.255.255.0 vrrp vrid 3 virtual-ip 10.0.3.254 vrrp vrid 3 priority 120 vrrp vrid 3 preempt-mode timer delay 20 vrrp vrid 3 track interface GigabitEthernet0/0/5 reduced 30 dhcp select global interface Vlanif20 ip address 10.0.20.252 255.255.255.0 vrrp vrid 20 virtual-ip 10.0.20.254 dhcp select global interface Vlanif30 ip address 10.0.30.252 255.255.255.0 vrrp vrid 30 virtual-ip 10.0.30.254 dhcp select global LSW2: interface Vlanif2 ip address 10.0.2.252 255.255.255.0 vrrp vrid 2 virtual-ip 10.0.2.254 dhcp select global interface Vlanif3 ip address 10.0.3.252 255.255.255.0 vrrp vrid 3 virtual-ip 10.0.3.254 dhcp select global interface Vlanif20 ip address 10.0.20.253 255.255.255.0 vrrp vrid 20 virtual-ip 10.0.20.254 vrrp vrid 20 priority 120 vrrp vrid 20 preempt-mode timer delay 20 vrrp vrid 20 track interface GigabitEthernet0/0/5 reduced 30 dhcp select global interface Vlanif30 ip address 10.0.30.253 255.255.255.0 vrrp vrid 30 virtual-ip 10.0.30.254 vrrp vrid 30 priority 120 vrrp vrid 30 preempt-mode timer delay 20 vrrp vrid 30 track interface GigabitEthernet0/0/5 reduced 30 dhcp select global

第四步:配置MSTP

LSW1: stp region-configuration region-name HCIP instance 1 vlan 2 to 3 instance 2 vlan 20 30 active region-configuration [sw1]stp instance 0 root primary [sw1]stp instance 1 root primary [sw1]stp instance 2 root secondary LSW2: stp region-configuration region-name HCIP instance 1 vlan 2 to 3 instance 2 vlan 20 30 active region-configuration [sw2]stp instance 2 root primary [sw2]stp instance 1 root secondary [sw2]stp instance 0 root secondary LSW3: stp region-configuration region-name HCIP instance 1 vlan 2 to 3 instance 2 vlan 20 30 active region-configuration LSW4: stp region-configuration region-name HCIP instance 1 vlan 2 to 3 instance 2 vlan 20 30 active region-configuration

第五步:配置汇聚层上层接口

[sw1]vlan 100 interface GigabitEthernet0/0/5 port link-type access port default vlan 100 interface Vlanif100 ip address 10.0.0.1 255.255.255.252 [sw1]vlan 300 interface Vlanif300 ip address 10.0.0.9 255.255.255.252 [sw2]vlan 200 interface GigabitEthernet0/0/5 port link-type access port default vlan 200 interface Vlanif200 ip address 10.0.0.5 255.255.255.252 [sw2]vlan 300 interface Vlanif300 ip address 10.0.0.10 255.255.255.252

第六步:配置DHCP

LSW1: [sw1]dhcp enable ip pool vlan2 gateway-list 10.0.2.254 network 10.0.2.0 mask 255.255.255.0 excluded-ip-address 10.0.2.1 10.0.2.128 dns-list 8.8.8.8 [sw1-Vlanif2]dhcp select global ip pool vlan3 gateway-list 10.0.3.254 network 10.0.3.0 mask 255.255.255.0 excluded-ip-address 10.0.3.1 10.0.3.128 dns-list 8.8.8.8 [sw1-Vlanif3]dhcp select global ip pool vlan20 gateway-list 10.0.20.254 network 10.0.20.0 mask 255.255.255.0 excluded-ip-address 10.0.20.129 10.0.20.253 dns-list 8.8.8.8 [sw1-Vlanif20]dhcp select global ip pool vlan30 gateway-list 10.0.30.254 network 10.0.30.0 mask 255.255.255.0 excluded-ip-address 10.0.30.129 10.0.30.253 dns-list 8.8.8.8 [sw1-Vlanif30]dhcp select global LSW2: [sw2]dhcp enable ip pool vlan2 gateway-list 10.0.2.254 network 10.0.2.0 mask 255.255.255.0 excluded-ip-address 10.0.2.129 10.0.2.253 dns-list 8.8.8.8 [sw2]dhcp select global ip pool vlan3 gateway-list 10.0.3.254 network 10.0.3.0 mask 255.255.255.0 excluded-ip-address 10.0.3.129 10.0.3.253 dns-list 8.8.8.8 [sw2-Vlanif3]dhcp select global ip pool vlan20 gateway-list 10.0.20.254 network 10.0.20.0 mask 255.255.255.0 excluded-ip-address 10.0.20.1 10.0.20.128 dns-list 8.8.8.8 [sw2-Vlanif20]dhcp select global ip pool vlan30 gateway-list 10.0.30.254 network 10.0.30.0 mask 255.255.255.0 excluded-ip-address 10.0.30.1 10.0.30.128 dns-list 8.8.8.8 [sw2-Vlanif30]dhcp select global

第七步:配置路由器接口的ip

r1: Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 202.1.1.1/30 up up GigabitEthernet0/0/1 10.0.0.2/30 up up GigabitEthernet0/0/2 10.0.0.6/30 up up ISP: GigabitEthernet0/0/0 202.1.1.2/30 up up LoopBack0 100.100.100.100/24 up up(s)

第八步:配置RIP

LSW1: rip 1 version 2 network 10.0.0.0 silent-interface Vlanif2 silent-interface Vlanif3 silent-interface Vlanif20 silent-interface Vlanif30 LSW2: rip 1 version 2 network 10.0.0.0 silent-interface Vlanif2 silent-interface Vlanif3 silent-interface Vlanif20 silent-interface Vlanif30 r1: rip 1 default-route originate version 2 network 10.0.0.0

第九步:用NAT将源IP从私网地址转化为公网地址并用ACL抓取流量

r1: [r1]ip route-static 0.0.0.0 0 202.1.1.2 [r1]acl 2000 [r1-acl-basic-2000]rule permit source 10.0.2.0 0.0.0.255 [r1-acl-basic-2000]rule permit source 10.0.3.0 0.0.0.255 [r1-acl-basic-2000]rule permit source 10.0.20.0 0.0.0.255 [r1-acl-basic-2000]rule permit source 10.0.30.0 0.0.0.255 [r1]int g 0/0/0 [r1-GigabitEthernet0/0/0]nat outbound 2000

第十步:调试

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/25 15:54:53

Translumo终极指南:5分钟掌握高效免费屏幕实时翻译

Translumo终极指南:5分钟掌握高效免费屏幕实时翻译 【免费下载链接】Translumo Advanced real-time screen translator for games, hardcoded subtitles in videos, static text and etc. 项目地址: https://gitcode.com/gh_mirrors/tr/Translumo 你是否厌倦…

作者头像 李华
网站建设 2026/4/25 15:54:53

Qianfan-OCR与PID控制结合:工业场景下的动态文本读取

Qianfan-OCR与PID控制结合:工业场景下的动态文本读取 1. 引言:当文字识别遇上运动控制 在食品包装生产线上,传送带以每秒2米的速度前进,包装袋上的生产日期随着传送带的轻微抖动而晃动不定。传统OCR系统在这里遇到了瓶颈——要么…

作者头像 李华
网站建设 2026/4/25 15:53:44

3大核心功能:OpenModScan如何解决工业Modbus调试的痛点?

3大核心功能:OpenModScan如何解决工业Modbus调试的痛点? 【免费下载链接】OpenModScan Open ModScan is a Free Modbus Master (Client) Utility 项目地址: https://gitcode.com/gh_mirrors/op/OpenModScan 在工业自动化现场,Modbus通…

作者头像 李华
网站建设 2026/4/25 15:51:41

解锁离线学习革命:MoocDownloader如何让你随时随地掌控MOOC课程

解锁离线学习革命:MoocDownloader如何让你随时随地掌控MOOC课程 【免费下载链接】MoocDownloader An MOOC downloader implemented by .NET. 一枚由 .NET 实现的 MOOC 下载器. 项目地址: https://gitcode.com/gh_mirrors/mo/MoocDownloader 你是否曾因为网络…

作者头像 李华