园区网络项目实战

实验背景

某写字楼备搭建一张网络供楼内企业办公使用。写字楼共6层,目前已有三层投入使用,分别

是一层会客大厅、二层行政部及总经理办公室、三层研发部和市场部。一层设有核心机房,其

他各楼层均有一个小房间放置网络设备。

第一步

询问需求

第二步

按照需求组建方案

第三步 规划网络 总体流量

拓扑图

接入层 >> 汇聚层 >>核心层 >>出口层

配置

router

配置acl

acl 2000

rule 5 permit source 192.168.105.0 0.0.0.255

rule 10 permit source 192.168.106.0 0.0.0.255

rule 15 permit source 192.168.107.0 0.0.0.255

nat address-group 1 192.168.199.51 192.168.199.60 分配的地址(这个因为是vmware转换 随意 我使用了私网地址 ) 资源池不可以包含端口得IP得地址

配置端口

interface GigabitEthernet0/0/0 出口端口

ip address 192.168.199.50 255.255.255.0

nat server protocol tcp global current-interface 8080 inside 192.168.100.1 www

解释命令

这个命令是配置网络地址转换(NAT)服务器的规则,用于将外部TCP流量映射到内部地址上的WWW服务。具体解释如下:

  • nat server:表示配置一个NAT服务器规则。
  • protocol tcp:指定该NAT规则适用于TCP协议的流量。
  • global current-interface 8080:表示将流量从当前接口(可能是外部接口)上的8080端口进行匹配。
  • inside 192.168.100.1 www:将匹配到的流量映射到内部地址192.168.100.1上的WWW服务。

这个命令的作用是允许外部网络通过NAT服务器访问内部地址192.168.100.1上的WWW服务,并且使用8080端口进行通信

nat outbound 2000 address-group 1

int g0/0/1 入口

ip add 192.168.204.1 255.255.255.252

ospf 1

default-route-advertise always 它表示路由器将始终向外部邻居宣告默认路由。

area 0

net 192.168.204.0 0.0.0.3

默认路由

ip route-static 0.0.0.0 0.0.0.0 192.168.199.1(对方的端口IP )

core1

vlan batch 100 105 201 202 204 205

dhcp en 开启dhcp

acl 3000 策略3000

rule 5 deny ip source 192.168.105.0 0.0.0.255 destination 192.168.0.0 0.0.255.255

这条规则阻止了从192.168.105.0/24网段向192.168.0.0/16网段的所有流量

rule 10 permit ip

配置dhcp资源池

ip pool ap-f1 这个是ap得管理池子

gateway-list 192.168.205.254

network 192.168.205.0 mask 255.255.255.0

excluded-ip-address 192.168.205.253 不分配他

ip pool sta-f1 这个是ap终端连接池子

gateway-list 192.168.105.254

network 192.168.105.0 mask 255.255.255.0

配置 vlan的IP

interface Vlanif1

ip address 192.168.1.254 255.255.255.0

interface Vlanif100

ip address 192.168.100.254 255.255.255.0

interface Vlanif105

ip address 192.168.105.254 255.255.255.0

dhcp select global

interface Vlanif201

ip address 192.168.201.1 255.255.255.252

interface Vlanif202

ip address 192.168.202.1 255.255.255.252

interface Vlanif204

ip address 192.168.204.2 255.255.255.252

interface Vlanif205

ip address 192.168.205.254 255.255.255.0

dhcp select global

端口连接

nterface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 100 105 205

interface GigabitEthernet0/0/2

port link-type access

port default vlan 201

interface GigabitEthernet0/0/3

port link-type access

port default vlan 202

interface GigabitEthernet0/0/4

port link-type access

port default vlan 205

interface GigabitEthernet0/0/5

port link-type access

port default vlan 204

配置ospf 1

ospf1

area 0.0.0.0

network 192.168.1.0 0.0.0.255

network 192.168.100.0 0.0.0.255

network 192.168.105.0 0.0.0.255

network 192.168.205.0 0.0.0.255

network 192.168.204.0 0.0.0.3

network 192.168.202.0 0.0.0.3

network 192.168.201.0 0.0.0.3

f2-agg1的配置

sys f2-agg1

vlan batch 2 101 102 106 201 203 206

dhcp en

ip pool ap-f2

gateway-list 192.168.206.254

network 192.168.206.0 mask 255.255.255.0

option 43 sub-option 3 ascii 192.168.205.253 绑定特殊的厂商设备

ip pool manager

gateway-list 192.168.101.254

network 192.168.101.0 mask 255.255.255.0

ip pool sta-f2

gateway-list 192.168.106.254

network 192.168.106.0 mask 255.255.255.0

interface Vlanif101

ip address 192.168.101.254 255.255.255.0

dhcp select global

interface Vlanif102

ip address 192.168.102.254 255.255.255.0

dhcp select global

interface Vlanif106

ip address 192.168.106.254 255.255.255.0

dhcp select global

interface Vlanif201

ip address 192.168.201.2 255.255.255.252

interface Vlanif203

ip address 192.168.203.1 255.255.255.252

interface Vlanif206

ip address 192.168.206.254 255.255.255.0

dhcp select global

端口 配置

interface GigabitEthernet0/0/1

port link-type access

port default vlan 201

interface GigabitEthernet0/0/2

port link-type access

port default vlan 203

interface GigabitEthernet0/0/11

port link-type trunk

port trunk pvid vlan 2

port trunk allow-pass vlan 2 102

interface GigabitEthernet0/0/12

port link-type trunk

port trunk pvid vlan 2

port trunk allow-pass vlan 2 101 106 206

interface GigabitEthernet0/0/13

port link-type trunk

port trunk pvid vlan 2

port trunk allow-pass vlan 2 102

ospf 1

area 0

area 0.0.0.0

network 192.168.2.0 0.0.0.255

network 192.168.101.0 0.0.0.255

network 192.168.102.0 0.0.0.255

network 192.168.106.0 0.0.0.255

network 192.168.201.0 0.0.0.3

network 192.168.203.0 0.0.0.3

network 192.168.206.0 0.0.0.255

f3-agg1

vlan batch 3 103 to 104 107 202 to 203 207

相关推荐
观测云1 小时前
Fastjson 高危 RCE(CVE-2026-16723):如何用观测云快速发现并完成修复
网络·安全·可观测性·观测云
楷哥爱开发3 小时前
TikTok Shop新加坡本土店入驻:如何选择新加坡本土住宅IP?
网络·网络协议·tcp/ip
网安蟹佬霸3 小时前
# 网络流量分析实战:从Wireshark到入侵检测系统构建(2026最新版,附完整流量分析链与IDS规则集)
网络·测试工具·安全·开源·wireshark·密码学·哈希算法
昌原的儿子LEO6 小时前
进程和线程(2)
linux·服务器·网络
Zzzzmo_6 小时前
【网络原理】TCP/IP协议02
网络·tcp/ip
DianSan_ERP6 小时前
WMS接入电商平台自动化履约实战:一张订单从平台到出库的接口时序设计
java·前端·网络·数据库·安全·架构·自动化
数据知道6 小时前
漏洞挖掘方法论:从 Fuzz 到 0day 的思维框架
网络·安全·web安全·网络安全
智购科技自动售货机工厂7 小时前
2026自动售货机语音支付模块集成:从声纹识别到支付闭环的工程实践~YH
大数据·服务器·网络·数据库·人工智能
zcmodeltech8 小时前
煤化工沙盘模型控制系统设计与实现:多工段协同联动方案
网络·人工智能·stm32·嵌入式硬件·制造·多分类
qq_401700418 小时前
TCP 粘包问题深度解析:嵌入式网络开发的常见坑与解决方案
服务器·网络·qt·网络协议·tcp/ip