园区网络项目实战

实验背景

某写字楼备搭建一张网络供楼内企业办公使用。写字楼共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

相关推荐
Proxy71137 分钟前
SOCKS5代理为何比HTTP代理更快?
网络·网络协议·http
qq_316837751 小时前
https的连接过程
网络·网络协议·ssl
.Net Core 爱好者2 小时前
ASP .NET CORE 6 项目实现WebSocket通信实践
网络·websocket·网络协议·c#·.net·.netcore·visual studio
Android技术栈2 小时前
鸿蒙开发(NEXT/API 12)【跨设备互通特性简介】协同服务
网络·harmonyos·鸿蒙·鸿蒙系统·openharmony·协同·跨设备
楚歌again3 小时前
【如何在 Windows 10 主机上通过 VMware 安装 Windows 11 虚拟机,并共享主机网络】
网络·windows
愤怒的小阿淇这就开摆3 小时前
TCP四大拥塞控制算法总结
服务器·网络·tcp/ip
Tony聊跨境4 小时前
如何有效检测住宅IP真伪?
网络·tcp/ip·ip
A尘埃4 小时前
RPC远程调用的序列化框架
网络·网络协议·rpc·序列化