园区网络项目实战

实验背景

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

相关推荐
初願致夕霞21 小时前
基于系统调用的Linux网络编程——UDP与TCP
linux·网络·c++·tcp/ip·udp
数智化精益手记局1 天前
什么是设备维护管理?设备维护管理包含哪些内容?
大数据·网络·人工智能·安全·信息可视化
salipopl1 天前
FPGA中AXI-FIFO主机接口的自定义实现与versal读写工程分析
网络·fpga开发
会周易的程序员1 天前
aiDgeScanner 工业设备网络扫描与管理工具
网络·c++·物联网·架构·electron·node.js·iot
CableTech_SQH1 天前
F5G 全光网,赋能智慧校园数字化建设
大数据·网络·5g·运维开发·信息与通信
hellojackjiang20111 天前
socket长连接在手游场景下的技术实践
网络·网络协议·tcp/ip·架构·网络编程
精益数智小屋1 天前
设备维护方案核心功能拆解:一套好的设备维护方案如何解决设备突发故障
大数据·运维·网络·数据库·人工智能·面试·自动化
其实防守也摸鱼1 天前
VS code怎么使用 Conda 安装预编译包
开发语言·网络·c++·vscode·安全·web安全·conda
zhangfeng11331 天前
IB = InfiniBand:一种超高速、低延迟的专用网络 和和一般我们在用的光纤网络的区别
网络