ArcObjects SDK 10.8终极指南:从零构建专业级地理信息系统
2026/6/25 16:54:23
基于eNSP的校园网络毕业设计实战:集成防火墙与安全策略部署
做校园网毕设,最容易踩的坑就是“拓扑一画,交换机一摆,VLAN一分,收工”。老师一问“外网怎么进来?”“财务服务器谁都能访问?”立刻语塞。真实园区网里,防火墙是标配,可在eNSP里却常被忽略:要么嫌USG6000V镜像大,干脆用ACL在三层交换机上“假装安全”;要么把防火墙当路由器,策略全放通,结果答辩现场被一句“你的安全边界在哪”问倒。本文把“防火墙真正用起来”当成主线,手把手带你跑一份能跑通、能防护、能答辩的校园网拓扑。
角色清单(按“区域—设备—作用”三级说明):
| 业务 | VLAN ID | 子网 | 网关 | 说明 |
|---|---|---|---|---|
| 办公 | 10 | 192.168.10.0/24 | .1 | 财务、人事 |
| 教学 | 20 | 192.168.20.0/24 | .1 | 教室、实验室 |
| 宿舍 | 30 | 192.168.30.0/24 | .1 | 学生PC |
| 服务器 | 50 | 192.168.50.0/24 | .1 | 内网文件/数据库 |
| DMZ | 100 | 10.1.100.0/24 | .254 | Web/Email/FTP |
| 设备管理 | 99 | 192.168.99.0/24 | .1 | SSH、SNMP |
# 创建VLAN vlan batch 10 20 30 50 99 100 # 上行口接防火墙trust interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 20 30 50 99 # VLANIF网关 interface Vlanif10 ip address 192.168.10.1 255.255.255.0 # interface Vlanif20 ip address 192.168.20.1 255.255.255.0 # interface Vlanif30 ip address 192.168.30.1 255.255.255.0 # interface Vlanif50 ip address 192.168.50.1 255.255.255.0 # interface Vlanif99 ip address 192.168.99.1 255.255.255.0 # 与防火墙跑OSPF,宣告内网 ospf 1 router-id 2.2.2.2 area 0 network 192.168.0.0 0.0.255.255# 接口配地址 interface GigabitEthernet1/0/0 ip address 192.168.99.254 255.255.255.0 service-manage ping permit # 允许管理口被ping,调通后关 # interface GigabitEthernet1/0/1 ip address 10.1.100.254 255.255.255.0 # interface GigabitEthernet1/0/2 ip address 200.1.1.2 255.255.255.252 # 接ISP # 划区域(关键!) firewall zone trust add interface GigabitEthernet1/0/0 # firewall zone dmz add interface GigabitEthernet1/0/1 # firewall zone untrust add interface GigabitEthernet1/0/2 # 内网上网做Easy-IP nat-policy rule name trust-to-untrust source-zone trust destination-zone untrust action nat easy-ip # 外网访问DMZ服务器——端口映射 nat server rule name web-dnat destination-address 200.1.1.2 0 service http protocol tcp global-port 80 inside-address 10.1.100.10 0 inside-port 80 # 安全策略:先拒绝,再按最小权限放通 security-policy rule name deny-all source-zone any destination-zone any action deny # rule name allow-trust-to-internet source-zone trust destination-zone untrust service icmp http https dns action permit # rule name allow-internet-to-dmz-web source-zone untrust destination-zone dmz destination-address 10.1.100.10 0 service http https action permit # rule name allow-trust-to-dmz-db source-zone trust destination-zone dmz destination-address 10.1.100.20 0 service mysql action permitdisplay firewall session table看NAT是否转换成功display security-policy rule all检查策略命中计数display ospf peer确认Core-SW与USG邻居建立save后把vrpcfg.cfg导出备份;eNSP异常退出会回滚到上次启动配置,答辩现场重启设备哭都来不及。<topo version="1.3.00.100"> <devices> <device name="USG" type="USG6000V" id="1"/> <device name="Core-SW" type="S5700" id="2"/> <device name="Acc-SW1" type="S3700" id="3"/> <device name="Acc-SW2" type="S3700" id="4"/> <device name="ISP-R" type="AR2220" id="5"/> <device name="Client-Internet" type="PC" id="6"/> <device name="Admin-pc" type="PC" id="7"/> </devices> <links> <link from="USG" if="G1/0/0" to="Core-SW" if="G0/0/1"/> <link from="USG" if="G1/0/2" to="ISP-R" if="G0/0/0"/> <!-- 其余省略 --> </links> </topo>把上面代码粘进空白拓扑,再按前文IP/策略补全即可跑通。
一套毕设只能拿及格,想冲优还得“讲情怀”。把USG换成USG9000V双机热备,再加一条IPSec隧道就能在eNSP里模拟“主校区—分校区”互联;隧道内跑OSPF,把分校区VLAN引入Area0,安全策略里对隧道口放行ESP、IKE,现场演示“主校区财务系统访问分校区工资库”秒变高大上。动手试试吧,老师若问“隧道加密算法为什么选aes-sha1”,你就把display ipsec sa截图甩出来,稳稳加分。
整份拓扑在笔记本i7-11800H+mba16G环境可稳定跑8小时不崩溃,答辩前记得关Windows更新,防止自动重启。把配置吃透,面试时也能吹半年。祝各位一次过毕设,早日把实验台配置搬进生产网。