diff --git a/big1/1.DHCP-主机自动获取IP.jpg b/big1/1.DHCP-主机自动获取IP.jpg new file mode 100644 index 0000000..573b466 Binary files /dev/null and b/big1/1.DHCP-主机自动获取IP.jpg differ diff --git a/big1/2.PC1-ping老板 - 副本.jpg b/big1/2.PC1-ping老板 - 副本.jpg new file mode 100644 index 0000000..56decf3 Binary files /dev/null and b/big1/2.PC1-ping老板 - 副本.jpg differ diff --git a/big1/2.PC1-ping老板.jpg b/big1/2.PC1-ping老板.jpg new file mode 100644 index 0000000..d78946c Binary files /dev/null and b/big1/2.PC1-ping老板.jpg differ diff --git a/big1/3.PC2-ping-Asso - 副本.jpg b/big1/3.PC2-ping-Asso - 副本.jpg new file mode 100644 index 0000000..3d4f7e1 Binary files /dev/null and b/big1/3.PC2-ping-Asso - 副本.jpg differ diff --git a/big1/3.PC2-ping-Asso.jpg b/big1/3.PC2-ping-Asso.jpg new file mode 100644 index 0000000..a69ddc2 Binary files /dev/null and b/big1/3.PC2-ping-Asso.jpg differ diff --git a/big1/4.Asso访问web-通过ip.jpg b/big1/4.Asso访问web-通过ip.jpg new file mode 100644 index 0000000..b92d501 Binary files /dev/null and b/big1/4.Asso访问web-通过ip.jpg differ diff --git a/big1/5.Asso访问web-通过域名.jpg b/big1/5.Asso访问web-通过域名.jpg new file mode 100644 index 0000000..0b80d35 Binary files /dev/null and b/big1/5.Asso访问web-通过域名.jpg differ diff --git a/big1/AR1-NAT配置结果-截图.jpg b/big1/AR1-NAT配置结果-截图.jpg new file mode 100644 index 0000000..ef2bc26 Binary files /dev/null and b/big1/AR1-NAT配置结果-截图.jpg differ diff --git a/big1/AR1-NAT配置结果.jpg b/big1/AR1-NAT配置结果.jpg new file mode 100644 index 0000000..f04a4b3 Binary files /dev/null and b/big1/AR1-NAT配置结果.jpg differ diff --git a/big1/AR2-NAT配置结果-截图.jpg b/big1/AR2-NAT配置结果-截图.jpg new file mode 100644 index 0000000..4f970f6 Binary files /dev/null and b/big1/AR2-NAT配置结果-截图.jpg differ diff --git a/big1/AR2-NAT配置结果.jpg b/big1/AR2-NAT配置结果.jpg new file mode 100644 index 0000000..3d7d203 Binary files /dev/null and b/big1/AR2-NAT配置结果.jpg differ diff --git a/big1/NAT.md b/big1/NAT.md new file mode 100644 index 0000000..59b4ed2 --- /dev/null +++ b/big1/NAT.md @@ -0,0 +1,63 @@ + 1. AR1 + 1.1 使用公网地址池为内网用户做NAT转换 +在AR1上配置地址池: +``` +[AR1]nat address-group 1 172.163.1.10 172.163.1.252 +``` +创建acl,匹配需要上网的内网段: +``` +[AR1]acl 2000 +[AR1-acl-basic-2000]rule permit source 192.168.110.0 0.0.0.255 +[AR1-acl-basic-2000]rule permit source 192.168.120.0 0.0.0.255 +``` +在AR1路由出口g0/0/2引用acl 2000,使匹配的网段中的地址可以使用地址池中的地址进行NAT转换: +``` +[AR1]int g0/0/2 +[AR1-GigabitEthernet0/0/2]nat outbound 2000 address-group 1 no-pat +``` + 1.2 配置NAT静态映射,实现外网用户访问内部FTP/Web服务器 +在AR1的路由出口配置服务器映射NAT Static,实现外网用户通过预留的公网IP地址172.163.1.9访问内部FTP/Web服务器功能: +``` +[AR1]int g0/0/2 +[AR1-GigabitEthernet0/0/2]nat static protocol tcp global 172.163.1.9 21 inside 192.168.130.10 21 +[AR1-GigabitEthernet0/0/2]nat static protocol tcp global 172.163.1.9 80 inside 192.168.130.10 80 +[AR1-GigabitEthernet0/0/2]quit +``` +在AR1上开启FTP的NAT ALG功能: +``` +[AR1]nat alg ftp enable +``` + 1.3 查看NAT转换和静态映射的结果 + + + + 2. AR2 + 2.1 配置地址池和ACL +在AR2上配置地址池: +``` +[AR2]nat address-group 1 172.163.3.10 172.163.3.252 +``` +创建acl,匹配需要上网的内网段: +``` +[AR2]acl 2000 +[AR2-acl-basic-2000]rule permit source 192.168.110.0 0.0.0.255 +[AR2-acl-basic-2000]rule permit source 192.168.120.0 0.0.0.255 +``` +在AR2路由出口g0/0/3引用acl 2000,使匹配的网段中的地址可以使用地址池中的地址进行NAT转换: +``` +[AR2]int g0/0/3 +[AR2-GigabitEthernet0/0/3]nat outbound 2000 address-group 1 no-pat +``` + 2.2 配置NAT静态映射,实现外网用户访问内部FTP/Web服务器 +在AR2的路由出口配置服务器映射NAT Static,实现外网用户通过预留的公网IP地址172.163.3.9访问内部FTP/Web服务器功能: +``` +[AR2]int g0/0/3 +[AR2-GigabitEthernet0/0/3]nat static protocol tcp global 172.163.3.9 21 inside 192.168.130.10 21 +[AR2-GigabitEthernet0/0/3]nat static protocol tcp global 172.163.3.9 80 inside 192.168.130.10 80 +[AR2-GigabitEthernet0/0/3]quit +``` +在AR2上开启FTP的NAT ALG功能: +``` +[AR2]nat alg ftp enable +``` + 2.3 查看NAT转换和静态映射的结果 \ No newline at end of file diff --git a/big1/QQ20241219-134854.png b/big1/QQ20241219-134854.png new file mode 100644 index 0000000..158052e Binary files /dev/null and b/big1/QQ20241219-134854.png differ diff --git a/big1/big1.pdf b/big1/big1.pdf new file mode 100644 index 0000000..1a1c402 Binary files /dev/null and b/big1/big1.pdf differ diff --git a/big1/big1.txt b/big1/big1.txt new file mode 100644 index 0000000..dab0655 --- /dev/null +++ b/big1/big1.txt @@ -0,0 +1,1341 @@ +#import "labtemplate.typ": * +#show: nudtlabpaper.with(title: "异构网络设计综合实验", + author1: "王李烜", + id1: "202202001046", + author2: "廖中煜", + id2: "202202001032", + author3: "王誉潞", + id3: "202202001051", + advisor: "张军", + jobtitle: "工程师", + lab: "306-707", + date: "2024.12.24", + header_str: "《网络工程》实验报告", +) +#set page(header: [ + #set par(spacing: 6pt) + #align(center)[#text(size: 11pt)[《网络工程》实验报告]] + #v(-0.3em) + #line(length: 100%, stroke: (thickness: 1pt)) +],) + + #show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + #it.body + ] + +// #outline(title: "目录",depth: 3, indent: 1em) +// #outline( +// title: [图目录], +// target: figure.where(kind: image), +// ) + + #show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + #counter(heading).display() + // #h(0.5em) + #it.body + ] + +// Display inline code in a small box +// that retains the correct baseline. +#show raw.where(block: false): it => box( + text(font: ("Consolas","FangSong_GB2312"), it), + fill: luma(240), + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt, +) + +// Display block code in a larger block +// with more padding. +#show raw.where(block: true): it => block( + text(font: ("Consolas","FangSong_GB2312"), it), + fill: luma(240), + inset: 6pt, + radius: 3pt, + width: 100%, +) + +#set enum(indent: 0.5em,body-indent: 0.5em,) +#pagebreak() + += 实验目的与要求 +#para[ + + 实验目的:通过本实验,让学员熟悉从网络规划到方案撰写,再到工程实施及测试验收的整个过程。 + + 实验任务:设计和实现一个包含局域网和广域网的中型网络。 + 一个完整的组网工程包括需求分析、方案设计、设备选型与采购、硬件安装与配置、软件安装与配置、系统测试与联调、工程验收等若干个环节,其中硬件与应用系统安装、配置工作量大,技术含量高,是信息系统集成或网络工程的关键环节,其中既涉及到技术上的问题,也涉及到工程组织、协调配合上的问题,一个网络工程师只有通过多次工程的实际锻炼,不断积累经验、吸取教训才能提高自己的水平。 +] += 需求分析 +#para[ + 第三建筑公司大楼中需要布设网络基础设施。下面通过需求分析报告与技术分析阐明项目的实施方案。 +] +== 需求分析报告书 +#align(center)[#block(inset: 14pt,width: 95%,stroke: 0.3pt)[ + + #align(center)[#text(size:20pt,font:xbsong,)[网络工程项目需求分析报告]] + #set text(font:fsong) + #set align(start) + + 项目名称:第三建筑公司本部大楼网络工程项目 + + 客户单位:第三建筑公司 + + 承建单位:第三网络工程基础设施公司 + + 日期:2024年12月 + + #set text(font: xbsong) + #line(length: 100%) + + #text(size:14pt)[一、项目背景] + + #subpara[第三建筑公司(以下简称“贵公司”)目前正在规划公司总部大楼的网络基础设施,旨在建立一个高效、安全、稳定的网络环境,支持公司日常办公、项目管理、数据存储及未来业务扩展需求。由于贵公司对网络设备和技术了解有限,特委托第三网络工程基础设施公司(以下简称“我司”)进行网络规划、设计、实施及维护。 + ] + + #text(size:14pt)[二、项目目标] + + #subpara[本项目的主要目标是建立一个覆盖贵公司总部大楼的网络系统,确保所有员工能够顺畅访问内部资源和外部互联网。同时,网络需提供安全、可靠的运行环境,保护公司数据免受外部威胁。此外,网络设计需具备良好的扩展性,能够支持未来业务增长和技术升级。 + ] + + #text(size:14pt)[三、需求详述] + + (一)网络覆盖需求 + + #subpara[贵公司总部大楼中,网络需覆盖所有办公区域、会议室、服务器机房及公共区域。此外,需在公司大楼内提供无线网络覆盖,支持员工移动办公和访客接入。 + ] + + (二)网络性能需求 + + #subpara[网络需支持高速数据传输,确保员工能够高效访问内部服务器和外部互联网。] + + (三)网络安全需求 + + #subpara[需部署防火墙,保护贵公司网络免受外部攻击。不同部门之间的网络流量需进行隔离,确保敏感数据的安全性。同时,需支持远程员工通过VPN安全访问公司内部资源。 + ] + + (四)网络管理需求 + + #subpara[所有网络设备需支持集中管理,方便网络管理员进行配置和监控。网络设备需记录日志,便于故障排查和安全审计。网络管理员需能够远程访问和管理网络设备。 + ] + + (五)网络扩展需求 + + #subpara[网络需预留足够的端口和带宽,以便未来增加新的设备或用户。网络设计需考虑到未来的技术升级,确保能够支持新的网络协议和设备。 + ] + + (六)服务器和存储需求 + + #subpara[需为贵公司的Web服务器和数据库服务器提供稳定的网络连接。同时,需确保重要数据的定期备份和快速恢复能力。 + ] + + (七)终端设备需求 + + #subpara[所有员工的电脑、打印机等设备需能够接入网络。会议室内的投影仪、视频会议设备等也需接入网络,确保会议和协作的顺利进行。 + ] + + #text(size:14pt)[四、项目交付要求] + + #subpara[项目交付内容包括完整的网络拓扑设计及实施方案、所有网络设备的安装、配置及调试、网络安全策略的部署及测试、网络管理系统的部署及培训,以及项目文档(包括网络拓扑图、设备配置文档、操作手册等)。项目需在合同签订后3个月内完成,包括设计、采购、安装、调试及测试。 + ] + + #text(size:14pt)[五、预算要求] + + #subpara[项目预算需在合理范围内,具体金额可根据设计方案进行调整。我司将确保在满足需求的同时控制成本,提供性价比高的解决方案。 + ] + + #text(size:14pt)[六、其他要求] + + (一)培训需求 + + #subpara[项目实施完成后,我司将为贵公司IT团队提供相关设备的操作和维护培训,确保其能够独立进行日常管理和故障排查。 + ] + + (二)售后服务 + + #subpara[我司将提供至少1年的免费售后服务,包括设备维护、故障排查及技术支持。同时,我司将提供$7 × 24$小时的技术支持热线,确保在出现紧急问题时能够及时响应。 + ]]] +== 技术分析 +#para[ + 为满足公司大楼的网络需求,网络建设需采用多种先进技术。首先,需使用虚拟路由冗余协议(VRRP)确保出口网关的高可用性,防止单点故障。其次,通过链路聚合技术(Eth-trunk)提升网络带宽和链路可靠性,特别是在核心层与接入层之间。此外,堆叠技术用于核心交换机的冗余和扩展,确保网络的高效管理和扩展性。VLAN技术用于划分不同部门的安全区域,确保网络流量的隔离与安全性。防火墙旁挂系统则通过双机热备技术,确保网络安全防护的连续性。最后,无线网络覆盖技术用于支持移动办公和访客接入,确保网络的全面覆盖。 +] +#para[ + 公司大楼的网络建设需要多种设备来满足需求。首先,需要两台路由器(AR1、AR2)作为出口网关,支持VRRP协议。其次,核心层需要两台支持堆叠技术的交换机(LSW1、LSW2),用于连接各个接入层交换机和防火墙。接入层需要多台交换机(LSW3、LSW4、LSW5)用于连接终端设备,如PC、服务器等。防火墙方面,需要两台防火墙(FW1、FW2)用于网络安全防护,支持双机热备。此外,还需要若干无线接入点(AP)用于无线网络覆盖。总体来看,设备数量包括2台路由器、5台交换机、2台防火墙及若干无线接入点,确保网络的全面覆盖与高效运行。 +] + +== 拓扑图表 +#para[ + 下面给出拓扑图和设备连接表,详细描述公司大楼网络的设计方案。 +] +=== 拓扑图 +#para[ + 物理链路的拓扑图如@topo 所示(见下页): + #figure(image("实验拓扑.png",format: "png",fit:"stretch",width: 115%),caption: "实验拓扑图") + 核心交换机有2台,它们在物理上是横向而对等的关系。但由于使用了堆叠技术,核心层的2台交换机在逻辑上是同一个设备。此外,由于使用防火墙旁挂,所以需要把核心交换机分成内外两个VPN示例。而这两个VPN实例在逻辑上可以视为2个设备,故逻辑拓扑图由横向的2个设备变为了纵向的两个设备,如下图所示。 + #figure(image("逻辑拓扑.png",format: "png",fit:"stretch",width: 30%),caption: "逻辑拓扑图") + 接下来给出设备连接表(拓扑表): +] +#para[ + #set page(flipped: true) +#align(center)[#figure(caption: "核心交换机拓扑表")[#table( + columns: (auto, auto,auto,auto,auto,auto,auto,auto), + rows:17pt, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [LSW1], [g0/0/1], [LSW2], [g0/0/1], [-], [6], [-], [用于与 LSW2 组建堆叠系统(iStack)], + [LSW1], [g0/0/7], [LSW2], [g0/0/7], [-], [6], [-], [用于与 LSW2 组建堆叠系统(iStack)], + [LSW1], [g0/0/3], [AR1], [g0/0/4], [192.168.10.1/24], [2], [VLAN10], [连接出口网关 AR1], + [LSW1], [g0/0/4], [AR2], [g0/0/4], [192.168.10.1/24], [4], [VLAN10], [连接出口网关 AR2], + [LSW1], [g0/0/5], [LSW3], [g0/0/3], [192.168.110.1/24], [-], [VLAN110], [连接接入层交换机 LSW3], + [LSW1], [g0/0/6], [LSW4], [g0/0/3], [192.168.120.1/24], [-], [VLAN120], [连接接入层交换机 LSW4], + [LSW1], [g0/0/8], [FW1], [g0/0/0], [192.168.20.1/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [LSW1], [g0/0/9], [FW1], [g0/0/1], [192.168.30.1/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [LSW1], [g0/0/10], [FW2], [g0/0/0], [192.168.20.1/24], [9], [VLAN20], [出口防火墙旁挂-外侧], + [LSW1], [g0/0/11], [FW2], [g0/0/1], [192.168.30.1/24], [10], [VLAN30], [出口防火墙旁挂-内侧], + [LSW1], [g0/0/13], [LSW2], [g0/0/13], [-], [-], [-], [用于多主检测(CORE-mad)], + [LSW2], [g0/0/1], [LSW1], [g0/0/1], [-], [6], [-], [用于与 LSW1 组建堆叠系统(iStack)], + [LSW2], [g0/0/7], [LSW1], [g0/0/7], [-], [6], [-], [用于与 LSW1 组建堆叠系统(iStack)], + [LSW2], [g0/0/3], [AR1], [g0/0/5], [192.168.10.1/24], [2], [VLAN10], [连接出口网关 AR1], + [LSW2], [g0/0/4], [AR2], [g0/0/5], [192.168.10.1/24], [4], [VLAN10], [连接出口网关 AR2], + [LSW2], [g0/0/5], [LSW5], [g0/0/4], [192.168.130.1/24], [11], [VLAN130], [连接接入层交换机 LSW5], + [LSW2], [g0/0/6], [LSW5], [g0/0/5], [192.168.130.1/24], [11], [VLAN130], [连接接入层交换机 LSW5], + [LSW2], [g0/0/8], [FW1], [g0/0/2], [192.168.20.1/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [LSW2], [g0/0/9], [FW1], [g0/0/3], [192.168.30.1/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [LSW2], [g0/0/10], [FW2], [g0/0/2], [192.168.20.1/24], [9], [VLAN20], [出口防火墙旁挂-外侧], + [LSW2], [g0/0/11], [FW2], [g0/0/3], [192.168.30.1/24], [10], [VLAN30], [出口防火墙旁挂-内侧], + [LSW2], [g0/0/13], [LSW1], [g0/0/13], [-], [-], [-], [用于多主检测(CORE-mad)], +)]] + +#align(center)[#figure(caption: "出口网关拓扑表")[#table( + align: horizon, + columns: (auto, auto,auto,auto,auto,auto,auto,auto), + // columns: (30pt, auto, 30pt, auto, 80pt, 40pt, auto, auto), + rows: auto, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [AR1], [g0/0/2], [AR3], [g0/0/0], [-], [-], [-], [连接内网出口 AR3], + [AR1], [g0/0/4], [LSW1], [g0/0/3], [192.168.10.2/24], [2], [-], [用聚合链路连接堆叠系统], + [AR1], [g0/0/5], [LSW2], [g0/0/3], [192.168.10.2/24], [2], [-], [用聚合链路连接堆叠系统], + [AR2], [g0/0/3], [AR4], [g0/0/1], [-], [-], [-], [连接内网出口 AR4], + [AR2], [g0/0/4], [LSW1], [g0/0/4], [192.168.10.3/24], [4], [-], [用聚合链路连接堆叠系统], + [AR2], [g0/0/5], [LSW2], [g0/0/4], [192.168.10.3/24], [4], [-], [用聚合链路连接堆叠系统], + [AR3], [g0/0/0], [AR1], [g0/0/2], [-], [-], [-], [连接内网出口 AR1], + [AR3], [g0/0/1], [外部路由器], [未知], [-], [-], [-], [连接外部网络], + [VRRP], [-], [CORE], [-], [192.168.10.100/24], [-], [-], [VRRP 网关连接 Public 区域], +)]] + +#align(center)[#figure(caption: "终端设备与服务器拓扑表")[#table( + columns: (auto, auto, auto, auto, auto, auto, auto, auto), + rows: auto, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [PC1], [3号口], [LSW3], [g0/0/1], [-], [-], [VLAN110], [属于 VLAN110], + [PC2], [8号口], [LSW3], [g0/0/2], [-], [-], [VLAN110], [属于 VLAN110], + [Asso], [2号口], [LSW4], [g0/0/1], [-], [-], [VLAN120], [属于 VLAN120], + [Boss], [6号口], [LSW4], [g0/0/2], [-], [-], [VLAN120], [属于 VLAN120], + [WebServer], [N/A], [LSW5], [g0/0/2], [192.168.130.10], [-], [-], [Web服务器], + [DataServer], [N/A], [LSW5], [g0/0/2], [192.168.130.10], [-], [-], [数据库服务器], +)]] + +#align(center)[#figure(caption: "接入层交换机拓扑表")[#table( + columns: (auto, auto, auto, auto, auto, auto, auto, auto), + rows: 25pt, + align: horizon, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [LSW3], [g0/0/1], [PC1], [3号口], [-], [-], [-], [Access], + [LSW3], [g0/0/2], [PC2], [8号口], [-], [-], [-], [Access], + [LSW3], [g0/0/3], [LSW1], [g0/0/5], [-], [-], [VLAN110], [Trunk], + [LSW3], [g0/0/4], [LSW2], [-], [-], [-], [-], [-], + [LSW3], [g0/0/5\~g0/0/7], [新接入设备], [不分接口], [-], [-], [-], [新接入设备端口], + [LSW4], [g0/0/1], [Asso], [2号口], [-], [-], [-], [Access], + [LSW4], [g0/0/2], [Boss], [6号口], [-], [-], [-], [Access], + [LSW4], [g0/0/3], [LSW1], [g0/0/6], [-], [-], [VLAN120], [Trunk], + [LSW4], [g0/0/4\~g0/0/7], [新接入设备], [不分接口], [-], [-], [-], [新接入设备端口], + [LSW5], [g0/0/2], [DataServer], [不分接口], [192.168.130.10], [-], [-], [Web服务器地址], + [LSW5], [g0/0/2], [WebServer], [不分接口], [192.168.130.10], [-], [-], [DNS服务器地址], + [LSW5], [g0/0/3], [AP1], [不分接口], [-], [-], [-], [-], + [LSW5], [g0/0/4], [LSW2], [g0/0/5], [-], [-], [-], [-], + [LSW5], [g0/0/5], [LSW2], [g0/0/6], [-], [-], [-], [-], +)]] + +#align(center)[#figure(caption: "防火墙拓扑表")[#table( + align: horizon, + columns: (auto, auto, auto, auto, 80pt, auto, auto, auto), + rows: 30pt, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [FW1], [g0/0/0], [LSW1], [g0/0/8], [192.168.20.2/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW1], [g0/0/1], [LSW1], [g0/0/9], [192.168.30.2/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW1], [g0/0/2], [LSW2], [g0/0/8], [192.168.20.2/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW1], [g0/0/3], [LSW2], [g0/0/9], [192.168.30.2/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW1], [g0/0/4], [FW2], [g0/0/4], [10.1.1.1/24], [7], [-], [用于组建防火墙旁挂系统], + [FW1], [g0/0/5], [FW2], [g0/0/5], [10.1.1.1/24], [7], [-], [用于组建防火墙旁挂系统], + [FW2], [g0/0/0], [LSW1], [g0/0/10], [192.168.20.3/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW2], [g0/0/1], [LSW1], [g0/0/11], [192.168.30.3/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW2], [g0/0/2], [LSW2], [g0/0/10], [192.168.20.3/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW2], [g0/0/3], [LSW2], [g0/0/11], [192.168.30.3/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW2], [g0/0/4], [FW1], [g0/0/4], [10.1.1.2/24], [7], [-], [用于组建防火墙旁挂系统], + [FW2], [g0/0/5], [FW1], [g0/0/5], [10.1.1.2/24], [7], [-], [用于组建防火墙旁挂系统], +)]] +] + += 实验设备 +#para[ +#align(center)[#table( + columns: (auto, auto,auto,auto), + rows:40pt, + inset: 10pt, + align: horizon+center, + table.header( + [设备名称], [设备型号], [设备数量],[设备名称] + ), + "交换机", "华为S5735", "4","LSW1、LSW2、LSW3、LSW4", + "集线器", "TPLINK TL-SG1008+","1","LSW5", + "路由器", "华为AR6120-S", "2","AR1、AR2", + "防火墙", "华为USG6303E-AC", "3","FW1、FW2", + "无线路由器", "TP-LINK AX3000", "1","AP", + "PC", "联想启天M410 + Windows 10", "4","PC1、PC2、Asso、Boss", + "PC", "联想拯救者R9000P + Windows 11 23H2", "1","外网主机", + "PC", "联想拯救者Y9000P + Windows 10 24H4", "1","DataServer、WebServer", +)] + 另有网线、控制线若干。 +] += 实验步骤及结果 +#para[] +== 设备连接 +#para[ + 将所有设备按照拓扑图连接好,确保每个设备的接口都正确连接: + #figure(image("机柜正面接线图.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "机柜正面接线图") + #figure(image("机柜背面接线图.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "机柜背面接线图") +] +== 配置核心层堆叠系统基本功能 +=== 组建堆叠系统 +#para[ + 在此处配置开始之前,必须明确:本设备的逻辑堆叠端口stack-port 0/1对应的物理端口,必须连接邻设备的逻辑堆叠端口stack-port 0/2对应的物理端口,否则堆叠组建不成功。 + + 配置逻辑堆叠端口并加入物理成员端口。 + - 配置LSW1的业务口g0/0/1、g0/0/7为物理成员端口,并加入到相应的逻辑堆叠端口。 + ``` + system-view + [HUAWEI] sysname LSW1 + [LSW1] interface stack-port 0/1 + [LSW1-stack-port0/1] port interface g0/0/1 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW1-stack-port0/1] quit + [LSW1] interface stack-port 0/2 + [LSW1-stack-port0/2] port interface g0/0/7 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW1-stack-port0/2] quit + ``` + - 配置LSW2的业务口g0/0/1、g0/0/7为物理成员端口,并加入到相应的逻辑堆叠端口。 + ``` + system-view + [HUAWEI] sysname LSW2 + [LSW2] interface stack-port 0/1 + [LSW2-stack-port0/1] port interface g0/0/1 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW2-stack-port0/1] quit + [LSW2] interface stack-port 0/2 + [LSW2-stack-port0/2] port interface g0/0/7 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW2-stack-port0/2] quit + ``` + + 配置堆叠ID和堆叠优先级 + - 配置LSW1的堆叠优先级为200。 + + ``` + [LSW1] stack slot 0 priority 200 + Warning: Do not frequently modify the Priority because it will make the stack split. Continue? [Y/N]:y + ``` + - 配置LSW2的堆叠ID(即Slot)为1。 + ``` + [LSW2] stack slot 0 renumber 1 + Warning: All the configurations related to the slot ID will be lost after the slot ID is modified. + Do not frequently modify the slot ID because it will make the stack split. Continue? [Y/N]:y + Info: Stack configuration has been changed, and the device needs to restart to make the configuration effective. + ``` + + 在每台设备上、在用户界面下输入`save`命令,保存配置信息。 + + 关闭设备并按顺序启动 + - 关闭LSW1、LSW2。 + - 先启动LSW1,等待2分钟左右,控制机能够登录到LSW1之后,再启动LSW2。 + + 检验配置结果 + 使用`display stack`命令查看堆叠状态,输出信息如下: + ``` + [CORE]disp stack + Stack mode: Service-port + Stack topology type: Ring + Stack system MAC: 6012-3c9a-5ff0 + MAC switch delay time: 10 min + Stack reserved VLAN: 4093 + Slot of the active management port: -- + Slot Role MAC Address Priority Device Type + ------------------------------------------------------------- + 0 Master 6012-3c9a-5ff0 200 S5735S-S24T4S-A + 1 Standby 642c-acc1-5970 100 S5735S-S24T4S-A + ``` + 输出展示了堆叠的状态信息,包括堆叠模式、堆叠拓扑类型、堆叠系统MAC地址、MAC切换延迟时间、堆叠保留VLAN、激活管理端口的槽位、各个槽位的角色、MAC地址、优先级和设备类型。其中,槽位0的Priority为200,槽位1的Priority为100,在竞争中槽位0最终会成为Master角色,槽位1为Standby角色。按照顺序上电能够保证设备快速进入事先规定好的角色。 + + 配置完成后,两台设备将组成一个堆叠系统,逻辑上看成一个设备,标号为CORE,称为核心集群。在后续的配置中,将以CORE作为设备名称。 +] +=== 配置核心集群的Eth-Trunk功能和接口IP地址 +#para[ +此步骤是要将核心集群与其他设备相连的物理链路聚合起来,以提高链路的带宽和可靠性。 ++ 创建 Eth-Trunk1,用于连接 AR1,并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 1 + [CORE-Eth-Trunk1] mode lacp + [CORE-Eth-Trunk1] quit + [CORE] interface GigabitEthernet 0/0/3 + [CORE-GigabitEthernet0/0/3] Eth-Trunk 1 + [CORE-GigabitEthernet0/0/3] quit + [CORE] interface GigabitEthernet 1/0/3 + [CORE-GigabitEthernet1/0/3] Eth-Trunk 1 + [CORE-GigabitEthernet1/0/3] quit + ``` ++ 创建 Eth-Trunk2,用于连接 AR2,并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 2 + [CORE-Eth-Trunk2] mode lacp + [CORE-Eth-Trunk2] quit + [CORE] interface GigabitEthernet 0/0/4 + [CORE-GigabitEthernet0/0/4] Eth-Trunk 2 + [CORE-GigabitEthernet0/0/4] quit + [CORE] interface GigabitEthernet 1/0/4 + [CORE-GigabitEthernet1/0/4] Eth-Trunk 2 + [CORE-GigabitEthernet1/0/4] quit + ``` ++ 创建 Eth-Trunk3,用于连接 FW1(外侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 3 + [CORE-Eth-Trunk3] mode lacp + [CORE-Eth-Trunk3] quit + [CORE] interface GigabitEthernet 0/0/8 + [CORE-GigabitEthernet0/0/8] Eth-Trunk 3 + [CORE-GigabitEthernet0/0/8] quit + [CORE] interface GigabitEthernet 1/0/8 + [CORE-GigabitEthernet1/0/8] Eth-Trunk 3 + [CORE-GigabitEthernet1/0/8] quit + ``` ++ 创建 Eth-Trunk4,用于连接 FW1(内侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 4 + [CORE-Eth-Trunk4] mode lacp + [CORE-Eth-Trunk4] quit + [CORE] interface GigabitEthernet 0/0/9 + [CORE-GigabitEthernet0/0/9] Eth-Trunk 4 + [CORE-GigabitEthernet0/0/9] quit + [CORE] interface GigabitEthernet 1/0/9 + [CORE-GigabitEthernet1/0/9] Eth-Trunk 4 + [CORE-GigabitEthernet1/0/9] quit + ``` ++ 创建 Eth-Trunk5,用于连接 FW2(外侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 5 + [CORE-Eth-Trunk5] mode lacp + [CORE-Eth-Trunk5] quit + [CORE] interface GigabitEthernet 0/0/10 + [CORE-GigabitEthernet0/0/10] Eth-Trunk 5 + [CORE-GigabitEthernet0/0/10] quit + [CORE] interface GigabitEthernet 1/0/10 + [CORE-GigabitEthernet1/0/10] Eth-Trunk 5 + [CORE-GigabitEthernet1/0/10] quit + ``` ++ 创建 Eth-Trunk6,用于连接 FW2(内侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 6 + [CORE-Eth-Trunk6] mode lacp + [CORE-Eth-Trunk6] quit + [CORE] interface GigabitEthernet 0/0/11 + [CORE-GigabitEthernet0/0/11] Eth-Trunk 6 + [CORE-GigabitEthernet0/0/11] quit + [CORE] interface GigabitEthernet 1/0/11 + [CORE-GigabitEthernet1/0/11] Eth-Trunk 6 + [CORE-GigabitEthernet1/0/11] quit + ``` +] +=== 配置核心集群的VLAN功能 +#para[ + 经过前面的配置,核心集群上现在同时共存了2个VPN实例:Private与Public。它们互相隔离,表示内网与外网不能直接连通;每个实例内又需要配置多个VLAN,并在每个Eth接口上限制VLAN的出入,借此来限制与不同用途的设备的连接。本步骤进行VLAN配置,并为每个VLAN配置VLANIF接口的IP地址。 + + 创建 VLAN 并配置 VLANIF 接口。 + ``` + [CORE] vlan batch 10 20 30 110 120 130 + [CORE] interface Vlanif 10 + [CORE-Vlanif10] ip address 192.168.10.1 24 + [CORE-Vlanif10] quit + + [CORE] interface Vlanif 20 + [CORE-Vlanif20] ip address 192.168.20.1 24 + [CORE-Vlanif20] quit + + [CORE] interface Vlanif 30 + [CORE-Vlanif30] ip address 192.168.30.1 24 + [CORE-Vlanif30] quit + + [CORE] interface Vlanif 110 + [CORE-Vlanif110] ip address 192.168.110.1 24 + [CORE-Vlanif110] quit + + [CORE] interface Vlanif 120 + [CORE-Vlanif120] ip address 192.168.120.1 24 + [CORE-Vlanif120] quit + + [CORE] interface Vlanif 130 + [CORE-Vlanif130] ip address 192.168.130.1 24 + [CORE-Vlanif130] quit + ``` + ++ 配置 Eth-Trunk 的 VLAN 允许列表 + - 配置 Eth-Trunk1 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 1 + [CORE-Eth-Trunk1] port link-type trunk + [CORE-Eth-Trunk1] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk1] quit + ``` + - 配置 Eth-Trunk2 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 2 + [CORE-Eth-Trunk2] port link-type trunk + [CORE-Eth-Trunk2] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk2] quit + ``` + - 配置 Eth-Trunk3 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 3 + [CORE-Eth-Trunk3] port link-type trunk + [CORE-Eth-Trunk3] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk3] quit + ``` + - 配置 Eth-Trunk4 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 4 + [CORE-Eth-Trunk4] port link-type trunk + [CORE-Eth-Trunk4] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk4] quit + ``` + - 配置 Eth-Trunk5 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 5 + [CORE-Eth-Trunk5] port link-type trunk + [CORE-Eth-Trunk5] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk5] quit + ``` + - 配置 Eth-Trunk6 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 6 + [CORE-Eth-Trunk6] port link-type trunk + [CORE-Eth-Trunk6] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk6] quit + ``` + - 配置 Eth-Trunk7 允许 VLAN130。 + ``` + [CORE] interface Eth-Trunk 7 + [CORE-Eth-Trunk7] port link-type trunk + [CORE-Eth-Trunk7] port trunk allow-pass vlan 130 + [CORE-Eth-Trunk7] quit + ``` + 配置完成后,通过`display vlan`命令查看VLAN配置信息,输出信息如下: + ``` + [CORE]disp vlan + The total number of VLANs is: 8 + -------------------------------------------------------------------------------- + U: Up; D: Down; TG: Tagged; UT: Untagged; + MP: Vlan-mapping; ST: Vlan-stacking; + #: ProtocolTransparent-vlan; *: Management-vlan; + -------------------------------------------------------------------------------- + + VID Type Ports + -------------------------------------------------------------------------------- + 1 common UT:GE0/0/2(D) GE0/0/5(U) GE0/0/6(U) GE0/0/12(D) + GE0/0/13(U) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D) + GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D) + GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/25(D) + GE0/0/26(D) GE0/0/27(D) GE0/0/28(D) GE1/0/2(D) + GE1/0/6(U) GE1/0/12(U) GE1/0/13(U) GE1/0/14(D) + GE1/0/16(D) GE1/0/17(D) GE1/0/18(D) GE1/0/19(D) + GE1/0/20(D) GE1/0/21(D) GE1/0/22(D) GE1/0/23(D) + GE1/0/24(D) GE1/0/25(D) GE1/0/26(D) GE1/0/27(D) + GE1/0/28(D) Eth-Trunk1(U) Eth-Trunk2(U) Eth-Trunk10(D) + Eth-Trunk20(D) + 10 common TG:GE1/0/12(U) Eth-Trunk1(U) Eth-Trunk2(U) + 20 common UT:Eth-Trunk3(U) Eth-Trunk5(U) + TG:GE1/0/12(U) + 30 common UT:Eth-Trunk4(U) Eth-Trunk6(U) + TG:GE1/0/12(U) + 66 common UT:GE0/0/24(U) + TG:GE1/0/12(U) + 110 common TG:GE0/0/5(U) GE1/0/6(U) GE1/0/12(U) + 120 common TG:GE0/0/6(U) GE0/0/12(D) GE1/0/12(U) + 130 common UT:GE1/0/5(U) GE1/0/15(D) + TG:GE1/0/12(U) + + VID Status Property MAC-LRN Statistics Description + -------------------------------------------------------------------------------- + 1 enable default enable disable VLAN 0001 + 10 enable default enable disable VLAN 0010 + 20 enable default enable disable VLAN 0020 + 30 enable default enable disable VLAN 0030 + 66 enable default enable disable VLAN 0066 + 110 enable default enable disable VLAN 0110 + 120 enable default enable disable VLAN 0120 + 130 enable default enable disable VLAN 0130 + ``` + 输出中的信息与上文配置办法无异,说明各个VLAN#footnote[其中的VLAN 66是后来配置的,此处可忽略。]配置生效。 +] +== 配置接入层 +#para[ + 接入层的配置比较简单,仅涉及到 VLAN。 + + + 配置 LSW3: + ```plaintext + system-view + [HUAWEI] sysname LSW3 + [LSW3] vlan batch 110 // 创建 VLAN110 + + [LSW3] interface GigabitEthernet 0/0/1 // 配置连接 PC1 的接口为 Access 模式,加入 VLAN110 + [LSW3-GigabitEthernet0/0/1] port link-type access + [LSW3-GigabitEthernet0/0/1] port default vlan 110 + [LSW3-GigabitEthernet0/0/1] quit + + [LSW3] interface GigabitEthernet 0/0/2 // 配置连接 PC2 的接口为 Access 模式,加入 VLAN110 + [LSW3-GigabitEthernet0/0/2] port link-type access + [LSW3-GigabitEthernet0/0/2] port default vlan 110 + [LSW3-GigabitEthernet0/0/2] quit + + [LSW3] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN110 通过 + [LSW3-GigabitEthernet0/0/3] port link-type trunk + [LSW3-GigabitEthernet0/0/3] port trunk allow-pass vlan 110 + [LSW3-GigabitEthernet0/0/3] quit + ``` + + + 配置 LSW4: + ```plaintext + system-view + [HUAWEI] sysname LSW4 + [LSW4] vlan batch 120 // 创建 VLAN120 + + [LSW4] interface GigabitEthernet 0/0/1 // 配置连接 Asso 的接口为 Access 模式,加入 VLAN120 + [LSW4-GigabitEthernet0/0/1] port link-type access + [LSW4-GigabitEthernet0/0/1] port default vlan 120 + [LSW4-GigabitEthernet0/0/1] quit + + [LSW4] interface GigabitEthernet 0/0/2 // 配置连接 Boss 的接口为 Access 模式,加入 VLAN120 + [LSW4-GigabitEthernet0/0/2] port link-type access + [LSW4-GigabitEthernet0/0/2] port default vlan 120 + [LSW4-GigabitEthernet0/0/2] quit + + [LSW4] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN120 通过 + [LSW4-GigabitEthernet0/0/3] port link-type trunk + [LSW4-GigabitEthernet0/0/3] port trunk allow-pass vlan 120 + [LSW4-GigabitEthernet0/0/3] quit + ``` + + + 配置 LSW5: + ```plaintext + system-view + [HUAWEI] sysname LSW5 + [LSW5] vlan batch 130 // 创建 VLAN130 + + [LSW5] interface GigabitEthernet 0/0/2 // 配置连接 DataServer 的接口为 Access 模式,加入 VLAN130 + [LSW5-GigabitEthernet0/0/2] port link-type access + [LSW5-GigabitEthernet0/0/2] port default vlan 130 + [LSW5-GigabitEthernet0/0/2] quit + + [LSW5] interface GigabitEthernet 0/0/3 // 配置连接 AP1 的接口为 Access 模式,加入 VLAN130 + [LSW5-GigabitEthernet0/0/3] port link-type access + [LSW5-GigabitEthernet0/0/3] port default vlan 130 + [LSW5-GigabitEthernet0/0/3] quit + + [LSW5] interface GigabitEthernet 0/0/4 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN130 通过 + [LSW5-GigabitEthernet0/0/4] port link-type trunk + [LSW5-GigabitEthernet0/0/4] port trunk allow-pass vlan 130 + [LSW5-GigabitEthernet0/0/4] quit + ``` +] +== 配置出口网关的基本功能 +#para[ + 出口网关即为AR1、AR2。在此步骤中,首先配置路由器使用链路聚合接口,核心交换机能够荣 ++ 在 AR1 上创建 Eth-Trunk2,并加入成员接口。 + ```plaintext + [AR1] interface Eth-Trunk 2 + [AR1-Eth-Trunk2] undo portswitch + [AR1-Eth-Trunk2] mode lacp-static + [AR1-Eth-Trunk2] quit + [AR1] interface GigabitEthernet 0/0/4 + [AR1-GigabitEthernet0/0/4] Eth-Trunk 2 + [AR1-GigabitEthernet0/0/4] quit + [AR1] interface GigabitEthernet 0/0/5 + [AR1-GigabitEthernet0/0/5] Eth-Trunk 2 + [AR1-GigabitEthernet0/0/5] quit + ``` ++ 在 AR1 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + ```plaintext + [AR1] interface Eth-Trunk 2.100 + [AR1-Eth-Trunk2.100] ip address 192.168.10.2 24 + [AR1-Eth-Trunk2.100] dot1q termination vid 10 + [AR1-Eth-Trunk2.100] quit + ``` ++ AR2与AR1的配置几乎一模一样,仅有IP地址的设置不同。在 AR2 上创建 Eth-Trunk4,并加入成员接口。 + ```plaintext + [AR2] interface Eth-Trunk 2 + [AR2-Eth-Trunk2] undo portswitch + [AR2-Eth-Trunk2] mode lacp-static + [AR2-Eth-Trunk2] quit + [AR2] interface GigabitEthernet 0/0/4 + [AR2-GigabitEthernet0/0/4] Eth-Trunk 2 + [AR2-GigabitEthernet0/0/4] quit + [AR2] interface GigabitEthernet 0/0/5 + [AR2-GigabitEthernet0/0/5] Eth-Trunk 2 + [AR2-GigabitEthernet0/0/5] quit + ``` + ++ 在 AR2 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + ```plaintext + [AR2] interface Eth-Trunk 2.100 + [AR2-Eth-Trunk2.100] ip address 192.168.10.3 24 + [AR2-Eth-Trunk2.100] dot1q termination vid 10 + [AR2-Eth-Trunk2.100] quit + ``` +] +=== 配置防火墙的基本功能 +#para[ + 在此步骤中,首先配置防火墙使用链路聚合接口,然后配置接口的IP地址,最后根据接口划分安全区域。 + + 在 FW1 上配置接口与安全区域。 + ```plaintext + [FW1] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) + [FW1-Eth-Trunk3] ip address 192.168.20.2 24 + [FW1-Eth-Trunk3] mode lacp-static + [FW1-Eth-Trunk3] quit + [FW1] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 + [FW1-GigabitEthernet0/0/0] Eth-Trunk 3 + [FW1-GigabitEthernet0/0/0] quit + [FW1] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 + [FW1-GigabitEthernet0/0/2] Eth-Trunk 3 + [FW1-GigabitEthernet0/0/2] quit + + [FW1] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) + [FW1-Eth-Trunk4] ip address 192.168.30.2 24 + [FW1-Eth-Trunk4] mode lacp-static + [FW1-Eth-Trunk4] quit + [FW1] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 + [FW1-GigabitEthernet0/0/1] Eth-Trunk 4 + [FW1-GigabitEthernet0/0/1] quit + [FW1] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 + [FW1-GigabitEthernet0/0/3] Eth-Trunk 4 + [FW1-GigabitEthernet0/0/3] quit + + [FW1] interface Eth-Trunk 1 // 配置 FW1 与 FW2 连接的接口 + [FW1-Eth-Trunk1] ip address 10.1.1.1 24 + [FW1-Eth-Trunk1] mode lacp-static + [FW1-Eth-Trunk1] quit + [FW1] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 + [FW1-GigabitEthernet0/0/4] Eth-Trunk 1 + [FW1-GigabitEthernet0/0/4] quit + [FW1] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 + [FW1-GigabitEthernet0/0/5] Eth-Trunk 1 + [FW1-GigabitEthernet0/0/5] quit + + [FW1] firewall zone trust + [FW1-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 + [FW1-zone-trust] quit + + [FW1] firewall zone untrust + [FW1-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 + [FW1-zone-untrust] quit + + [FW1] firewall zone dmz + [FW1-zone-dmz] add interface Eth-Trunk 1 // 将 FW1 与 FW2 之间的接口加入 DMZ 区域 + [FW1-zone-dmz] quit + ``` + + + 在 FW2 上配置接口与安全区域。 + + ```plaintext + [FW2] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) + [FW2-Eth-Trunk3] ip address 192.168.20.3 24 + [FW2-Eth-Trunk3] mode lacp-static + [FW2-Eth-Trunk3] quit + [FW2] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 + [FW2-GigabitEthernet0/0/0] Eth-Trunk 3 + [FW2-GigabitEthernet0/0/0] quit + [FW2] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 + [FW2-GigabitEthernet0/0/2] Eth-Trunk 3 + [FW2-GigabitEthernet0/0/2] quit + + [FW2] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) + [FW2-Eth-Trunk4] ip address 192.168.30.3 24 + [FW2-Eth-Trunk4] mode lacp-static + [FW2-Eth-Trunk4] quit + [FW2] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 + [FW2-GigabitEthernet0/0/1] Eth-Trunk 4 + [FW2-GigabitEthernet0/0/1] quit + [FW2] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 + [FW2-GigabitEthernet0/0/3] Eth-Trunk 4 + [FW2-GigabitEthernet0/0/3] quit + + [FW2] interface Eth-Trunk 1 // 配置 FW2 与 FW1 连接的接口 + [FW2-Eth-Trunk1] ip address 10.1.1.2 24 + [FW2-Eth-Trunk1] mode lacp-static + [FW2-Eth-Trunk1] quit + [FW2] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 + [FW2-GigabitEthernet0/0/4] Eth-Trunk 1 + [FW2-GigabitEthernet0/0/4] quit + [FW2] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 + [FW2-GigabitEthernet0/0/5] Eth-Trunk 1 + [FW2-GigabitEthernet0/0/5] quit + + [FW2] firewall zone trust + [FW2-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 + [FW2-zone-trust] quit + + [FW2] firewall zone untrust + [FW2-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 + [FW2-zone-untrust] quit + + [FW2] firewall zone dmz + [FW2-zone-dmz] add interface Eth-Trunk 1 // 将 FW2 与 FW1 之间的接口加入 DMZ 区域 + [FW2-zone-dmz] quit + ``` +] +== 配置使内部网络互联互通 +#para[ + 此处内网指与核心集群相连的重要设备,即AR1、AR2、FW1、FW2。在此步骤中,需要配置核心集群与AR1、AR2的连接,使得核心集群能够连接路由器;其次还要配置核心集群上两个不互通的VPN实例与FW1、FW2的连接,使得两个VPN实例可以通过旁挂防火墙互通。 +] +=== 在路由器上部署VRRP +#para[ + 在AR1、AR2上部署VRRP,使得核心集群能够通过VRRP虚拟IP地址连接路由器。 + - 配置AR1: + ``` + [AR1] interface Eth-Trunk 2.100 + [AR1-Eth-Trunk2.100] vrrp vrid 1 virtual-ip 192.168.10.100 //配置VRRP的虚拟IP地址 + [AR1-Eth-Trunk2.100] vrrp vrid 1 priority 120 //提高RouterA的优先级,使其成为Master + [AR1-Eth-Trunk2.100] quit + ``` + - 配置AR2: + ``` + [AR2] interface Eth-Trunk 2.100 + [AR2-Eth-Trunk2.100] vrrp vrid 1 virtual-ip 192.168.10.100 //配置VRRP的虚拟IP地址 + [AR2-Eth-Trunk2.100] quit + ``` +] +=== 配置 AR1 和 AR2 的路由 +#para[ + + 在 AR1 上配置 OSPF。 + ```plaintext + [AR1] ospf 100 router-id 1.1.1.1 + [AR1-ospf-100] area 0 + [AR1-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 + [AR1-ospf-100-area-0.0.0.0] quit + [AR1-ospf-100] quit + ``` + + + 在 AR2 上配置 OSPF。 + ```plaintext + [AR2] ospf 100 router-id 2.2.2.2 + [AR2-ospf-100] area 0 + [AR2-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 + [AR2-ospf-100-area-0.0.0.0] quit + [AR2-ospf-100] quit + ``` +] + +=== 配置防火墙的路由 +#para[ + + 在 FW1 上配置静态路由。 + + ```plaintext + [FW1] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW1] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` + + + 在 FW2 上配置静态路由。 + + ```plaintext + [FW2] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW2] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` +] +=== 配置核心集群的路由 +#para[ + 核心集群上路由配置比较复杂,涉及到两个VPN实例,分别是Public和Private。Public用于连接路由器,Private用于连接防火墙。在此步骤中,需要配置核心集群上的路由,使得核心集群能够连接路由器和防火墙。配置时需要仔细对照网络拓扑表,确保路由配置正确。 + + 在 CORE 上创建 VPN 实例 Public,将连接路由器的接口和连接防火墙上行口的接口绑定到 Public。 + ```plaintext + [CORE] ip vpn-instance Public // 创建 Public + [CORE-vpn-instance-Public] ipv4-family + [CORE-vpn-instance-Public-af-ipv4] route-distinguisher 100:2 + [CORE-vpn-instance-Public-af-ipv4] vpn-target 222:2 both + [CORE-vpn-instance-Public-af-ipv4] quit + [CORE-vpn-instance-Public] quit + + [CORE] interface Vlanif 10 + [CORE-Vlanif10] ip binding vpn-instance Public // 将 CORE 连接路由器的接口 VLANIF10 绑定至 Public + [CORE-Vlanif10] ip address 192.168.10.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif10] quit + + [CORE] interface Vlanif 20 + [CORE-Vlanif20] ip binding vpn-instance Public // 将 CORE 连接防火墙上行口的接口 VLANIF20 绑定至 Public + [CORE-Vlanif20] ip address 192.168.20.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif20] quit + ``` + + + 对于上行流量,在 Public 中配置静态路由,路由下一跳指向路由器 VRRP 虚拟 IP。 + ```plaintext + [CORE] ip route-static vpn-instance Public 0.0.0.0 0.0.0.0 192.168.10.100 // 缺省路由下一跳指向 VRRP 虚拟 IP + ``` + + 3. 对于下行流量,在 Public 中配置静态路由,路由下一跳指向防火墙上行 VRRP 1 的虚拟 IP(VRID1)。 + + ```plaintext + [CORE] ip route-static vpn-instance Public 192.168.110.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN110 网络,下一跳指向 FW1 的上行接口 + [CORE] ip route-static vpn-instance Public 192.168.120.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN120 网络,下一跳指向 FW1 的上行接口 + [CORE] ip route-static vpn-instance Public 192.168.130.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN130 网络,下一跳指向 FW1 的上行接口 + ``` + + + 对于下行流量,在 CORE 与 AR1、AR2 之间运行 OSPF 协议,用于 AR1、AR2 学习到业务网段的回程路由信息。 + ```plaintext + [CORE] ospf 100 router-id 1.1.1.1 vpn-instance Public + [CORE-ospf-100] area 0 + [CORE-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 AR1、AR2 的网段发布到 OSPF 中 + [CORE-ospf-100-area-0.0.0.0] quit + [CORE-ospf-100] import-route static // 在 OSPF 中引入静态路由 + [CORE-ospf-100] quit + ``` + + + 对于上行流量,在 CORE 上创建 VPN 实例 Private,将连接业务网络的接口和连接防火墙下行的接口绑定到 Private,Private 的缺省路由下一跳指向防火墙下行 VRRP 虚拟 IP(VRID2)。 + ```plaintext + [CORE] ip vpn-instance Private // 创建 Private + [CORE-vpn-instance-Private] ipv4-family + [CORE-vpn-instance-Private-af-ipv4] route-distinguisher 100:1 + [CORE-vpn-instance-Private-af-ipv4] vpn-target 111:1 both + [CORE-vpn-instance-Private-af-ipv4] quit + [CORE-vpn-instance-Private] quit + + [CORE] interface Vlanif 110 + [CORE-Vlanif110] ip binding vpn-instance Private // 将 CORE 连接 VLAN110 的接口 VLANIF110 绑定至 Private + [CORE-Vlanif110] ip address 192.168.110.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif110] quit + + [CORE] interface Vlanif 120 + [CORE-Vlanif120] ip binding vpn-instance Private // 将 CORE 连接 VLAN120 的接口 VLANIF120 绑定至 Private + [CORE-Vlanif120] ip address 192.168.120.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif120] quit + + [CORE] interface Vlanif 130 + [CORE-Vlanif130] ip binding vpn-instance Private // 将 CORE 连接 VLAN130 的接口 VLANIF130 绑定至 Private + [CORE-Vlanif130] ip address 192.168.130.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif130] quit + + [CORE] interface Vlanif 30 + [CORE-Vlanif30] ip binding vpn-instance Private // 将 CORE 连接防火墙下行的接口 VLANIF30 绑定至 Private + [CORE-Vlanif30] ip address 192.168.30.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif30] quit + ``` + + + 在 Private 中配置缺省路由,下一跳指向防火墙下行 VRRP 2 的虚拟 IP(VRID2)。 + ```plaintext + [CORE] ip route-static vpn-instance Private 0.0.0.0 0.0.0.0 192.168.30.2 // 缺省路由下一跳指向 FW1 的下行接口 + ``` +] +== 阶段性检验 +#para[ + 上面的配置完成后,进行一个阶段性检验。配置PC1的IP地址为`192.168.110.10/24`,网关为核心集群上VPN实例Private内的Vlanif110接口地址`192.168.110.1`,然后ping AR1、AR2的VRRP虚拟IP地址`192.168.10.100`,是可以通的,如图@check_point1。如果不能,则逐级ping,查找问题所在。 + #figure(image("阶段性检验1.jpg",format:"jpg",fit:"stretch",width: 100%),caption:"阶段性检验1") +] +== 配置其他功能 +=== 配置出口网关的BFD功能 +#para[ + 配置 AR1 和 AR2 之间的 BFD 功能,用于快速检测链路故障并触发 OSPF 路由收敛。 + + + 配置全局 BFD 功能。 + ```plaintext + [AR1] bfd // 配置全局 BFD 功能并进入全局 BFD 视图 + [AR1-bfd] quit + ``` + ```plaintext + [AR2] bfd // 配置全局 BFD 功能并进入全局 BFD 视图 + [AR2-bfd] quit + ``` + + + 在 AR1 上配置 OSPF 的 BFD 特性。 + ```plaintext + [AR1] ospf 100 // 进入 OSPF 视图 + [AR1-ospf-100] bfd all-interfaces enable // 打开 OSPF BFD 特性的开关,建立 BFD 会话 + [AR1-ospf-100] quit + ``` + + + 在 AR2 上配置 OSPF 的 BFD 特性。 + ```plaintext + [AR2] ospf 100 // 进入 OSPF 视图 + [AR2-ospf-100] bfd all-interfaces enable // 打开 OSPF BFD 特性的开关,建立 BFD 会话 + [AR2-ospf-100] quit + ``` + + + 配置 BFD 参数。 + ```plaintext + [AR1-ospf-100] bfd all-interfaces min-rx-interval 1000 min-tx-interval 1000 detect-multiplier 3 + [AR2-ospf-100] bfd all-interfaces min-rx-interval 1000 min-tx-interval 1000 detect-multiplier 3 + ``` + + + 验证 BFD 会话。 + ```plaintext + [AR1] display ospf bfd session all + [AR2] display ospf bfd session all + ``` + 该命令在AR1上得到以下输出: + ``` + [AR1]disp ospf bfd session all + + OSPF Process 100 with Router ID 2.2.2.2 + Area 0.0.0.0 interface 192.168.10.3(Eth-Trunk2.100)'s BFD Sessions + + NeighborId:1.1.1.1 AreaId:0.0.0.0 Interface:Eth-Trunk2.100 + BFDState:up rx :1000 tx :1000 + Multiplier:3 BFD Local Dis:8198 LocalIpAdd:192.168.10.3 + RemoteIpAdd:192.168.10.1 Diagnostic Info:No diagnostic information + + NeighborId:3.3.3.3 AreaId:0.0.0.0 Interface:Eth-Trunk2.100 + BFDState:up rx :1000 tx :1000 + Multiplier:3 BFD Local Dis:8197 LocalIpAdd:192.168.10.3 + RemoteIpAdd:192.168.10.2 Diagnostic Info:No diagnostic information + ``` + 注意其中的`BFDStat`字段,显示为`up`,表示 BFD 会话建立成功。 +] +=== 配置防火墙的双机热备 +#para[ + 在防火墙上配置双机热备功能(主备备份模式),确保高可用性。FW1 作为 Master,FW2 作为 Slave。 + + + 在 FW1 上配置双机热备,FW1 在备份组中作为 Master。 + ```plaintext + [FW1] interface Eth-Trunk 3 + [FW1-Eth-Trunk3] vrrp vrid 1 virtual-ip 192.168.20.2 24 active + [FW1-Eth-Trunk3] quit + [FW1] interface Eth-Trunk 4 + [FW1-Eth-Trunk4] vrrp vrid 2 virtual-ip 192.168.30.2 24 active + [FW1-Eth-Trunk4] quit + [FW1] hrp interface Eth-Trunk 1 remote 10.1.1.2 // 配置心跳口,并启用双机热备 + [FW1] hrp enable + ``` + + + 在 FW2 上配置双机热备,FW2 在备份组中作为 Slave。 + ```plaintext + [FW2] interface Eth-Trunk 3 + [FW2-Eth-Trunk3] vrrp vrid 1 virtual-ip 192.168.20.2 24 standby + [FW2-Eth-Trunk3] quit + [FW2] interface Eth-Trunk 4 + [FW2-Eth-Trunk4] vrrp vrid 2 virtual-ip 192.168.30.2 24 standby + [FW2-Eth-Trunk4] quit + [FW2] hrp interface Eth-Trunk 1 remote 10.1.1.1 // 配置心跳口,并启用双机热备 + [FW2] hrp enable + ``` + 配置好之后,保存配置,将两台设备全部断电关机。按照FW1先、FW2后的顺序开机(防火墙开机较久,约5分钟,可通过风扇声音判断,声音突然由大变小表示开机完成),应该可以观察到防火墙Web主页中的主备状态: + #figure(image("主备备份(主).png",format:"png",fit:"stretch",width: 80%),caption:"防火墙双机热备(主,FW1)") + #figure(image("主备备份(备).png",format:"png",fit:"stretch",width: 80%),caption:"防火墙双机热备(备,FW2)") +] +=== 配置DHCP服务器 +#para[ + DHCP服务器一般配置在接入层上,但本实验拓扑图较为简单,所以在核心集群上配置DHCP服务器,为 VLANIF110 和 VLANIF120 接口下的客户端分配 IP 地址和相关网络参数。 + + + 配置 VLANIF110 接口的 DHCP 地址池 + - 配置 VLANIF110 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ```plaintext + [CORE] interface vlanif 110 + [CORE-Vlanif110] dhcp select interface + [CORE-Vlanif110] dhcp server gateway-list 192.168.110.1 + [CORE-Vlanif110] dhcp server lease day 30 + [CORE-Vlanif110] dhcp server dns-list 192.168.130.10 //内网中的DNS服务器地址 + [CORE-Vlanif110] quit + ``` + + 配置 VLANIF120 接口的 DHCP 地址池 + - 配置 VLANIF120 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ``` + [CORE] interface vlanif 120 + [CORE-Vlanif120] dhcp select interface + [CORE-Vlanif120] dhcp server gateway-list 192.168.120.1 + [CORE-Vlanif120] dhcp server lease day 60 // 老板一般会当得比员工久 + [CORE-Vlanif120] dhcp server dns-list 192.168.130.10 + [CORE-Vlanif120] quit + ``` + + 配置完成之后,配置PC1、PC2为自动获取IP地址的方式(还可配置自动获取DNS地址),查看 DHCP 地址池信息: + + - 使用 `display ip pool` 命令查看 DHCP 地址池的配置和状态。 + ```plaintext + [CORE] display ip pool + ------------------------------------------------------------------------------------- + Pool-name : Vlanif110 + Pool-No : 0 + Lease : 1 Days 0 Hours 0 Minutes + Position : Interface + Status : Unlocked + Gateway-0 : 192.168.110.1 + Network : 192.168.110.0 + Mask : 255.255.255.0 + VPN instance : Private + Conflicted address recycle interval: - + Address Statistic: Total :253 Used :2 + Idle :251 Expired :0 + Conflict :0 Disabled :0 + ``` + 注意到`Used`字段中变成2。此时在任一台机器上查看IP地址和DNS地址,可以看到被分配的地址: + #figure#figure(image("dhcp_dns.jpg",format:"jpg",fit:"stretch",width: 100%),caption:"PC1自动获取IP地址和DNS服务器地址") +] +=== 配置STP以消除网络中的环路 +#para[ + 逻辑拓扑图@logic_topo 有更完整的版本: + #figure(image("无环路.png",format:"png",fit:"stretch",width: 60%),caption:"逻辑拓扑图(完整)") + 分析逻辑拓扑图,发现此网络基本呈树形,有且仅有核心集群与FW1、FW2之间组成的环。因此,只需要在核心集群、防火墙上配置 STP,就可以消除网络中的环路,不需要RSTP、MSTP等较复杂的协议。具体来说,以阻塞 FW2 连接Private的端口Eth4为目的,配置STP协议。 + + 在 CORE 上启用 STP 并配置优先级。 + ```plaintext + [CORE] stp enable // 启用 STP 协议 + [CORE] stp mode stp // 配置 STP 模式为标准 STP + [CORE] stp priority 0 // 设置 CORE 的 STP 优先级为 0(确保 CORE 成为根桥) + [CORE] quit + ``` + + + 在 FW1 上启用 STP 并配置优先级。 + ```plaintext + [FW1] stp enable // 启用 STP 协议 + [FW1] stp mode stp // 配置 STP 模式为标准 STP + [FW1] stp priority 4096 // 设置 FW1 的 STP 优先级为 4096 + [FW1] quit + ``` + + + 在 FW2 上启用 STP 并配置优先级。 + ```plaintext + [FW2] stp enable // 启用 STP 协议 + [FW2] stp mode stp // 配置 STP 模式为标准 STP + [FW2] stp priority 8192 // 设置 FW2 的 STP 优先级为 8192 + [FW2] quit + ``` + + + 在 FW2 上阻塞指定端口 + ```plaintext + [FW2] interface Eth-Trunk 4 + [FW2-Eth-Trunk4] stp disable // 禁用 STP 以阻塞 Eth4 端口 + [FW2-Eth-Trunk4] quit + ``` +] +=== 为出口网关配置NAT +#para[ + 由于内网用户有上网需求,所以需要进行地址转换。这一步骤在 AR1 和 AR2 上配置 NAT 功能,包括地址池、ACL、静态映射以及 FTP ALG 功能。 + + 配置地址池和 ACL + - 在 AR1 上配置地址池: + ```plaintext + [AR1] nat address-group 1 172.163.1.10 172.163.1.252 + ``` + - 在 AR2 上配置地址池: + ```plaintext + [AR2] nat address-group 1 172.163.3.10 172.163.3.252 + ``` + - 在 AR1 和 AR2 上创建 ACL,匹配需要上网的内网段: + ```plaintext + [AR1] acl 2000 + [AR1-acl-basic-2000] rule permit source 192.168.110.0 0.0.0.255 + [AR1-acl-basic-2000] rule permit source 192.168.120.0 0.0.0.255 + [AR1-acl-basic-2000] quit + ``` + ``` + [AR2] acl 2000 + [AR2-acl-basic-2000] rule permit source 192.168.110.0 0.0.0.255 + [AR2-acl-basic-2000] rule permit source 192.168.120.0 0.0.0.255 + [AR2-acl-basic-2000] quit + ``` + - 在 AR1 和 AR2 的路由出口引用 ACL 2000,使匹配的网段中的地址可以使用地址池中的地址进行 NAT 转换: + ```plaintext + [AR1] int g0/0/2 + [AR1-GigabitEthernet0/0/2] nat outbound 2000 address-group 1 no-pat + [AR1-GigabitEthernet0/0/2] quit + ``` + ``` + [AR2] int g0/0/3 + [AR2-GigabitEthernet0/0/3] nat outbound 2000 address-group 1 no-pat + [AR2-GigabitEthernet0/0/3] quit + ``` + + + 配置 NAT 静态映射 + - 在 AR1 上配置 NAT 静态映射,实现外网用户通过预留的公网 IP 地址 172.163.1.9 访问内部 FTP/Web 服务器: + ```plaintext + [AR1] int g0/0/2 + [AR1-GigabitEthernet0/0/2] nat static protocol tcp global 172.163.1.9 21 inside 192.168.130.10 21 + [AR1-GigabitEthernet0/0/2] nat static protocol tcp global 172.163.1.9 80 inside 192.168.130.10 80 + [AR1-GigabitEthernet0/0/2] quit + ``` + - 在 AR2 上配置 NAT 静态映射,实现外网用户通过预留的公网 IP 地址 172.163.3.9 访问内部 FTP/Web 服务器: + ```plaintext + [AR2] int g0/0/3 + [AR2-GigabitEthernet0/0/3] nat static protocol tcp global 172.163.3.9 21 inside 192.168.130.10 21 + [AR2-GigabitEthernet0/0/3] nat static protocol tcp global 172.163.3.9 80 inside 192.168.130.10 80 + [AR2-GigabitEthernet0/0/3] quit + ``` + + + 开启 FTP 的 NAT ALG 功能 + ```plaintext + [AR1] nat alg ftp enable + ``` + ``` + [AR2] nat alg ftp enable + ``` + + 4. 查看 NAT 转换和静态映射的结果 + + 在 AR1 和 AR2 上查看 NAT 转换和静态映射的结果: + ```plaintext + [AR1] display nat address-group 1 + [AR1] display nat static + ``` + ``` + [AR2] display nat address-group 1 + [AR2] display nat static + ``` + 结果如@ar1nat 和@ar2nat 所示(见下页): + #figure(image("AR1-NAT配置结果-截图.jpg",format:"jpg",fit:"stretch",width: 80%),caption:"AR1 NAT配置结果") + #figure(image("AR1-NAT配置结果-截图.jpg",format:"jpg",fit:"stretch",width: 80%),caption:"AR1 NAT配置结果") +] +=== 防火墙的工作时间段切换 +#para[ + 公司规定员工办公室工作时间内不能访问外网。因此,需要在防火墙上配置对应的安全策略,即工作时间段内`trust`不能访问`untrust`区域,策略配置如下: + #figure(image("do_not_play_policy.png",format:"png",fit:"stretch",width: 90%),caption:"配置非工作时间段内不能访问外网") +] +=== 配置端口安全 +#para[ + +] +=== 配置Web服务器与DNS服务器 +#para[ + 在个人笔记本电脑上配置服务器。选择Apache24作为Web服务器,选择BIND 9作为DNS服务器。Apache的配置十分简单,而BIND的具体配置十分复杂,不是重点,在此不再展开。 +] +=== 配置无线路由器 +#para[ + 初始化AP,然后以无线网络连接到它的配置界面`tplogin.cn`(TP-Link AX3000)。随后,选择桥接模式即可。 + + 理论成立,但实际不可行。经测试,此AP在选取桥接模式后,也无法真正地担任交换机的功能(两个连接同网段设备的端口间互ping不通)。推测在工程环境下只能作为路由器使用。而拓扑图中已经没有多余的路由器位置。即使有,也不具有适合此AP的功能性。所以不再继续配置此AP。 +] + +== 实验后验收 +#para[ + 检查以下项目来验证整个网络的功能: + + 内网主机能够通过DHCP获取到IP地址;#box( + text(font: ("Times LT Pro","FZXiaoBiaoSong-B05"),fill: luma(240), weight:"bold", "先前已验证"), + fill:green, + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt,) + // + 内网主机之间互相ping通:PC1和老板、PC2和Asso; + + 内网主机之间可以互相通信; + + 内网主机可以通过IP地址访问Web服务器; + // + 内网主机可以通过域名www.construction.com访问Web服务器; + + 内网主机可以通过域名访问Web服务器; + + 外网主机可以通过外网地址访问内网Web服务器; + //+ 内网主机可以ping通外网主机,抓包显示源地址是经过转换的地址; + + 内网主机可以访问外网; + + 检验防火墙安全策略; + + 防火墙主备备份;#box( + text(font: ("Times LT Pro","FZXiaoBiaoSong-B05"),fill: luma(240), weight:"bold", "先前已验证"), + fill:green, + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt,) + + 检验出口网关双机热备份/BFD(快速切换); + + 检验端口安全; + 其中,第一项与第八项先前已经验证生效,后续不再专门验收。 +] +=== 内网通信 +#para[ + 检查内网主机之间是否可以互相ping通。这里以PC1和Boss、PC2和Asso通信为例: + #figure(image("2.PC1-ping老板.jpg",format: "jpg",width: 50%,fit:"stretch"),caption:"PC1 ping 通 Boss") + #figure(image("3.PC2-ping-Asso.jpg",format: "jpg",width: 50%,fit:"stretch"),caption:"PC2 ping 通 Asso") +] +=== 内网访问Web服务器 +#para[ + 使用主机Asso,经由IP地址192.168.130.10访问Web服务器: + #figure(image("4.Asso访问web-通过ip.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"Asso通过IP访问Web服务器") + 通过域名www.construction.com访问服务器: + #figure(image("5.Asso访问web-通过域名.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"Asso通过访问Web服务器") +] +=== 外网访问Web服务器 +#para[ + 使用外网主机(地址为`172.163.5.1`),通过服务器的公网IP访问服务器: + #figure(image("外网主机访问web-通过转换后地址.png",format: "png",width: 100%,fit:"stretch"),caption:"Asso通过访问Web服务器") + 这还可以说明防火墙有关内外网之间的区域限制策略设置无误,即Untrust区域可以访问DMZ区域,DMZ区域也可以访问Untrust区域。 +] +=== 内外网访问系列验证、NAT验证与出口网关BFD验证 +#para[ + 使用内网主机PC1对外网主机进行长ping,然后再外网主机上开启抓包。途中,使用`shutdown`命令断开AR1与CORE的连接。在PC1上观察长ping是否断开,在外网主机上观察抓包结果中,源地址是否是经过NAT的转换,以及时间序列上相差多少。 + + 运行过程如下: + #figure(image("路由器双机热备份.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"长ping不断") + 从@ping_s 中可以观察到: + - 长ping没有断开; + - `shutdown`端口之前,`tracert`命令返回的路径经过了AR1,即`192.168.10.3`; + - `shutdown`端口之前,`tracert`命令返回的路径变为经过AR2,即`192.168.10.2`。 + 进一步分析需要查看抓包结果。抓包结果如下: + #figure(image("长ping不断.png",format: "png",width: 100%,fit:"stretch"),caption:"长ping不断") + 观察@ping_t,靠上方红框内的源地址均为`172.163.1.10`,即AR1经过NAT转换后的外网网关地址,这说明AR1上的NAT生效;在第8到9秒之间,外网主机捕获到一个ARP报文,询问它的IP地址,这可能是AR2从备份状态变为了工作状态,发出ARP询问。随后的第9.7s,内网主机的下一个ping报文到来。由于此次报文到达与上次到达间隔仅为1s,恰好是ping程序发送请求的时间间隔,由此可见PC1上的长ping丝毫没有受到影响。在这之后,ping的源地址均为`172.163.3.10`,即AR2经过NAT转换后的外网网关地址,这说明AR2上的NAT生效。 + + 凭此抓包结果即可验证数个配置项目。 +] +=== 防火墙安全策略系列验证 +#para[ + 此处主要验证几条“禁止”的防火墙策略。 + 1. 验证非工作时间段职员办公室(PC1、PC2)无法访问外网 + 以PC1为例。验证这条策略,需要查看工作时间、非工作时间下,PC1是否能ping通外网主机。 + + 首先,在工作时间下,查看防火墙策略的命中次数: + #figure(image("防火墙工作时段时间截图.png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段") + #figure(image("防火墙工作时段策略命中次数截图(ping前).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段策略命中次数截图(ping前)") + 然后用PC1 ping外网,发现能够ping通。观察策略命中次数: + #figure(image("防火墙工作时段策略命中次数截图(ping后).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段策略命中次数截图(ping后)") + 注意到命中次数增加。 + + 首先,在非工作时间下,查看防火墙策略的命中次数: + #figure(image("防火墙非工作时段时间截图.png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段") + #figure(image("防火墙非工作时段策略命中次数截图(ping前).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段策略命中次数截图(ping前)") + 然后用PC1 ping外网,发现能够ping通。观察策略命中次数: + #figure(image("防火墙非工作时段策略命中次数截图(ping后).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段策略命中次数截图(ping后)") + 注意到命中次数增加。 + + 2. 验证外网ping不通内网trust区域 + 在外网主机上ping内网PC1,发现无法ping通: + #figure(image("外网ping不通内网.png",format: "png",width: 70%,fit:"stretch"),caption:"Untrust区域无法访问Trust区域") + 防火墙上的验证与上面的步骤类似,此处不再展示。 +] +=== 端口安全验证 +#para[ + 将Boss电脑取下,将其网线接到外网主机上。在外网主机上配置自动获取IP地址,然后运行ipconfig /renew命令后,依然无法获取到IP地址。 + #figure(image("外网主机接boss网.png",format: "png",width: 50%,fit:"stretch"),caption:"配置外网主机为自动获取IP地址") + #figure(image("外网主机无法自动获取IP.png",format: "png",width: 70%,fit:"stretch"),caption:"外网主机无法自动获取IP地址") + 此外,还可通过手动设置外网主机IP地址为192.168.120.25/24(即192.168.120.0/24网段中,除Vlanif 120与特殊IP地址外的任一IP地址)来构成直连网络。但即便如此,ping Vlanif 120还是会发现无法ping通。 + + 至此,所有配置验证结束。 +] + += 实验总结 +== 内容总结 +#para[ + 本次实验 +] +== 心得感悟 + +#show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + // #counter(heading).display() + // #h(0.5em) + #it.body +] +#pagebreak() +#bibliography("ref.yml",full: true,title: "参考文献",style:"gb-7714-2015-numeric") + + +/* +根据这个网站的格式示范https://github.com/typst/hayagriva/blob/main/docs/file-format.md +为这个网页生成.yml文件 +https://blog.csdn.net/jxjdhdnd/article/details/138009187 +*/ \ No newline at end of file diff --git a/big1/big1.typ b/big1/big1.typ new file mode 100644 index 0000000..64322c2 --- /dev/null +++ b/big1/big1.typ @@ -0,0 +1,1388 @@ +#import "labtemplate.typ": * +#show: nudtlabpaper.with(title: "异构网络设计综合实验", + author1: "王李烜", + id1: "202202001046", + author2: "廖中煜", + id2: "202202001032", + author3: "王誉潞", + id3: "202202001051", + advisor: "张军", + jobtitle: "工程师", + lab: "306-707", + date: "2024.12.24", + header_str: "《网络工程》实验报告", +) +#set page(header: [ + #set par(spacing: 6pt) + #align(center)[#text(size: 11pt)[《网络工程》实验报告]] + #v(-0.3em) + #line(length: 100%, stroke: (thickness: 1pt)) +],) + + #show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + #it.body + ] + +#outline(title: "目录",depth: 3, indent: 1em) +#outline( + title: [图目录], + target: figure.where(kind: image), +) + + #show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + #counter(heading).display() + // #h(0.5em) + #it.body + ] + +// Display inline code in a small box +// that retains the correct baseline. +#show raw.where(block: false): it => box( + text(font: ("Consolas","FangSong_GB2312"), it), + fill: luma(240), + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt, +) + +// Display block code in a larger block +// with more padding. +#show raw.where(block: true): it => block( + text(font: ("Consolas","FangSong_GB2312"), it), + fill: luma(240), + inset: 6pt, + radius: 3pt, + width: 100%, +) + +#set enum(indent: 0.5em,body-indent: 0.5em,) +#pagebreak() + += 实验目的与要求 +#para[ + + 实验目的:通过本实验,让学员熟悉从网络规划到方案撰写,再到工程实施及测试验收的整个过程。 + + 实验任务:设计和实现一个包含局域网和广域网的中型网络。 + 一个完整的组网工程包括需求分析、方案设计、设备选型与采购、硬件安装与配置、软件安装与配置、系统测试与联调、工程验收等若干个环节,其中硬件与应用系统安装、配置工作量大,技术含量高,是信息系统集成或网络工程的关键环节,其中既涉及到技术上的问题,也涉及到工程组织、协调配合上的问题,一个网络工程师只有通过多次工程的实际锻炼,不断积累经验、吸取教训才能提高自己的水平。 +] += 需求分析 +#para[ + 第三建筑公司大楼中需要布设网络基础设施。下面通过需求分析报告与技术分析阐明项目的实施方案。 +] +== 需求分析报告书 +#align(center)[#block(inset: 14pt,width: 95%,stroke: 0.3pt)[ + + #align(center)[#text(size:20pt,font:xbsong,)[网络工程项目需求分析报告]] + #set text(font:fsong) + #set align(start) + + 项目名称:第三建筑公司本部大楼网络工程项目 + + 客户单位:第三建筑公司 + + 承建单位:第三网络工程基础设施公司 + + 日期:2024年12月 + + #set text(font: xbsong) + #line(length: 100%) + + #text(size:14pt)[一、项目背景] + + #subpara[第三建筑公司(以下简称“贵公司”)目前正在规划公司总部大楼的网络基础设施,旨在建立一个高效、安全、稳定的网络环境,支持公司日常办公、项目管理、数据存储及未来业务扩展需求。由于贵公司对网络设备和技术了解有限,特委托第三网络工程基础设施公司(以下简称“我司”)进行网络规划、设计、实施及维护。 + ] + + #text(size:14pt)[二、项目目标] + + #subpara[本项目的主要目标是建立一个覆盖贵公司总部大楼的网络系统,确保所有员工能够顺畅访问内部资源和外部互联网。同时,网络需提供安全、可靠的运行环境,保护公司数据免受外部威胁。此外,网络设计需具备良好的扩展性,能够支持未来业务增长和技术升级。 + ] + + #text(size:14pt)[三、需求详述] + + (一)网络覆盖需求 + + #subpara[贵公司总部大楼中,网络需覆盖所有办公区域、会议室、服务器机房及公共区域。此外,需在公司大楼内提供无线网络覆盖,支持员工移动办公和访客接入。 + ] + + (二)网络性能需求 + + #subpara[网络需支持高速数据传输,确保员工能够高效访问内部服务器和外部互联网。] + + (三)网络安全需求 + + #subpara[需部署防火墙,保护贵公司网络免受外部攻击。不同部门之间的网络流量需进行隔离,确保敏感数据的安全性。同时,需支持远程员工通过VPN安全访问公司内部资源。 + ] + + (四)网络管理需求 + + #subpara[所有网络设备需支持集中管理,方便网络管理员进行配置和监控。网络设备需记录日志,便于故障排查和安全审计。网络管理员需能够远程访问和管理网络设备。 + ] + + (五)网络扩展需求 + + #subpara[网络需预留足够的端口和带宽,以便未来增加新的设备或用户。网络设计需考虑到未来的技术升级,确保能够支持新的网络协议和设备。 + ] + + (六)服务器和存储需求 + + #subpara[需为贵公司的Web服务器和数据库服务器提供稳定的网络连接。同时,需确保重要数据的定期备份和快速恢复能力。 + ] + + (七)终端设备需求 + + #subpara[所有员工的电脑、打印机等设备需能够接入网络。会议室内的投影仪、视频会议设备等也需接入网络,确保会议和协作的顺利进行。 + ] + + #text(size:14pt)[四、项目交付要求] + + #subpara[项目交付内容包括完整的网络拓扑设计及实施方案、所有网络设备的安装、配置及调试、网络安全策略的部署及测试、网络管理系统的部署及培训,以及项目文档(包括网络拓扑图、设备配置文档、操作手册等)。项目需在合同签订后3个月内完成,包括设计、采购、安装、调试及测试。 + ] + + #text(size:14pt)[五、预算要求] + + #subpara[项目预算需在合理范围内,具体金额可根据设计方案进行调整。我司将确保在满足需求的同时控制成本,提供性价比高的解决方案。 + ] + + #text(size:14pt)[六、其他要求] + + (一)培训需求 + + #subpara[项目实施完成后,我司将为贵公司IT团队提供相关设备的操作和维护培训,确保其能够独立进行日常管理和故障排查。 + ] + + (二)售后服务 + + #subpara[我司将提供至少1年的免费售后服务,包括设备维护、故障排查及技术支持。同时,我司将提供$7 × 24$小时的技术支持热线,确保在出现紧急问题时能够及时响应。 + ]]] +== 技术分析 +#para[ + 为满足公司大楼的网络需求,网络建设需采用多种先进技术。首先,需使用虚拟路由冗余协议(VRRP)确保出口网关的高可用性,防止单点故障。其次,通过链路聚合技术(Eth-trunk)提升网络带宽和链路可靠性,特别是在核心层与接入层之间。此外,堆叠技术用于核心交换机的冗余和扩展,确保网络的高效管理和扩展性。VLAN技术用于划分不同部门的安全区域,确保网络流量的隔离与安全性。防火墙旁挂系统则通过双机热备技术,确保网络安全防护的连续性。最后,无线网络覆盖技术用于支持移动办公和访客接入,确保网络的全面覆盖。 +] +#para[ + 公司大楼的网络建设需要多种设备来满足需求。首先,需要两台路由器(AR1、AR2)作为出口网关,支持VRRP协议。其次,核心层需要两台支持堆叠技术的交换机(LSW1、LSW2),用于连接各个接入层交换机和防火墙。接入层需要多台交换机(LSW3、LSW4、LSW5)用于连接终端设备,如PC、服务器等。防火墙方面,需要两台防火墙(FW1、FW2)用于网络安全防护,支持双机热备。此外,还需要若干无线接入点(AP)用于无线网络覆盖。总体来看,设备数量包括2台路由器、5台交换机、2台防火墙及若干无线接入点,确保网络的全面覆盖与高效运行。 +] + +== 拓扑图表 +#para[ + 下面给出拓扑图和设备连接表,详细描述公司大楼网络的设计方案。 +] +=== 拓扑图 +#para[ + 物理链路的拓扑图如@topo 所示(见下页): + #figure(image("实验拓扑.png",format: "png",fit:"stretch",width: 115%),caption: "实验拓扑图") + 核心交换机有2台,它们在物理上是横向而对等的关系。但由于使用了堆叠技术,核心层的2台交换机在逻辑上是同一个设备。此外,由于使用防火墙旁挂,所以需要把核心交换机分成内外两个VPN示例。而这两个VPN实例在逻辑上可以视为2个设备,故逻辑拓扑图由横向的2个设备变为了纵向的两个设备,如下图所示。 + #figure(image("逻辑拓扑.png",format: "png",fit:"stretch",width: 30%),caption: "逻辑拓扑图") + 接下来给出设备连接表(拓扑表): +] +#para[ + #set page(flipped: true) +#align(center)[#figure(caption: "核心交换机拓扑表")[#table( + columns: (auto, auto,auto,auto,auto,auto,auto,auto), + rows:17pt, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [LSW1], [g0/0/1], [LSW2], [g0/0/1], [-], [6], [-], [用于与 LSW2 组建堆叠系统(iStack)], + [LSW1], [g0/0/7], [LSW2], [g0/0/7], [-], [6], [-], [用于与 LSW2 组建堆叠系统(iStack)], + [LSW1], [g0/0/3], [AR1], [g0/0/4], [192.168.10.1/24], [2], [VLAN10], [连接出口网关 AR1], + [LSW1], [g0/0/4], [AR2], [g0/0/4], [192.168.10.1/24], [4], [VLAN10], [连接出口网关 AR2], + [LSW1], [g0/0/5], [LSW3], [g0/0/3], [192.168.110.1/24], [-], [VLAN110], [连接接入层交换机 LSW3], + [LSW1], [g0/0/6], [LSW4], [g0/0/3], [192.168.120.1/24], [-], [VLAN120], [连接接入层交换机 LSW4], + [LSW1], [g0/0/8], [FW1], [g0/0/0], [192.168.20.1/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [LSW1], [g0/0/9], [FW1], [g0/0/1], [192.168.30.1/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [LSW1], [g0/0/10], [FW2], [g0/0/0], [192.168.20.1/24], [9], [VLAN20], [出口防火墙旁挂-外侧], + [LSW1], [g0/0/11], [FW2], [g0/0/1], [192.168.30.1/24], [10], [VLAN30], [出口防火墙旁挂-内侧], + [LSW1], [g0/0/13], [LSW2], [g0/0/13], [-], [-], [-], [用于多主检测(CORE-mad)], + [LSW2], [g0/0/1], [LSW1], [g0/0/1], [-], [6], [-], [用于与 LSW1 组建堆叠系统(iStack)], + [LSW2], [g0/0/7], [LSW1], [g0/0/7], [-], [6], [-], [用于与 LSW1 组建堆叠系统(iStack)], + [LSW2], [g0/0/3], [AR1], [g0/0/5], [192.168.10.1/24], [2], [VLAN10], [连接出口网关 AR1], + [LSW2], [g0/0/4], [AR2], [g0/0/5], [192.168.10.1/24], [4], [VLAN10], [连接出口网关 AR2], + [LSW2], [g0/0/5], [LSW5], [g0/0/4], [192.168.130.1/24], [11], [VLAN130], [连接接入层交换机 LSW5], + [LSW2], [g0/0/6], [LSW5], [g0/0/5], [192.168.130.1/24], [11], [VLAN130], [连接接入层交换机 LSW5], + [LSW2], [g0/0/8], [FW1], [g0/0/2], [192.168.20.1/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [LSW2], [g0/0/9], [FW1], [g0/0/3], [192.168.30.1/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [LSW2], [g0/0/10], [FW2], [g0/0/2], [192.168.20.1/24], [9], [VLAN20], [出口防火墙旁挂-外侧], + [LSW2], [g0/0/11], [FW2], [g0/0/3], [192.168.30.1/24], [10], [VLAN30], [出口防火墙旁挂-内侧], + [LSW2], [g0/0/13], [LSW1], [g0/0/13], [-], [-], [-], [用于多主检测(CORE-mad)], +)]] + +#align(center)[#figure(caption: "出口网关拓扑表")[#table( + align: horizon, + columns: (auto, auto,auto,auto,auto,auto,auto,auto), + // columns: (30pt, auto, 30pt, auto, 80pt, 40pt, auto, auto), + rows: auto, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [AR1], [g0/0/2], [AR3], [g0/0/0], [-], [-], [-], [连接内网出口 AR3], + [AR1], [g0/0/4], [LSW1], [g0/0/3], [192.168.10.2/24], [2], [-], [用聚合链路连接堆叠系统], + [AR1], [g0/0/5], [LSW2], [g0/0/3], [192.168.10.2/24], [2], [-], [用聚合链路连接堆叠系统], + [AR2], [g0/0/3], [AR4], [g0/0/1], [-], [-], [-], [连接内网出口 AR4], + [AR2], [g0/0/4], [LSW1], [g0/0/4], [192.168.10.3/24], [4], [-], [用聚合链路连接堆叠系统], + [AR2], [g0/0/5], [LSW2], [g0/0/4], [192.168.10.3/24], [4], [-], [用聚合链路连接堆叠系统], + [AR3], [g0/0/0], [AR1], [g0/0/2], [-], [-], [-], [连接内网出口 AR1], + [AR3], [g0/0/1], [外部路由器], [未知], [-], [-], [-], [连接外部网络], + [VRRP], [-], [CORE], [-], [192.168.10.100/24], [-], [-], [VRRP 网关连接 Public 区域], +)]] + +#align(center)[#figure(caption: "终端设备与服务器拓扑表")[#table( + columns: (auto, auto, auto, auto, auto, auto, auto, auto), + rows: auto, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [PC1], [3号口], [LSW3], [g0/0/1], [-], [-], [VLAN110], [属于 VLAN110], + [PC2], [8号口], [LSW3], [g0/0/2], [-], [-], [VLAN110], [属于 VLAN110], + [Asso], [2号口], [LSW4], [g0/0/1], [-], [-], [VLAN120], [属于 VLAN120], + [Boss], [6号口], [LSW4], [g0/0/2], [-], [-], [VLAN120], [属于 VLAN120], + [WebServer], [N/A], [LSW5], [g0/0/2], [192.168.130.10], [-], [-], [Web服务器], + [DataServer], [N/A], [LSW5], [g0/0/2], [192.168.130.10], [-], [-], [数据库服务器], +)]] + +#align(center)[#figure(caption: "接入层交换机拓扑表")[#table( + columns: (auto, auto, auto, auto, auto, auto, auto, auto), + rows: 25pt, + align: horizon, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [LSW3], [g0/0/1], [PC1], [3号口], [-], [-], [-], [Access], + [LSW3], [g0/0/2], [PC2], [8号口], [-], [-], [-], [Access], + [LSW3], [g0/0/3], [LSW1], [g0/0/5], [-], [-], [VLAN110], [Trunk], + [LSW3], [g0/0/4], [LSW2], [-], [-], [-], [-], [-], + [LSW3], [g0/0/5\~g0/0/7], [新接入设备], [不分接口], [-], [-], [-], [新接入设备端口], + [LSW4], [g0/0/1], [Asso], [2号口], [-], [-], [-], [Access], + [LSW4], [g0/0/2], [Boss], [6号口], [-], [-], [-], [Access], + [LSW4], [g0/0/3], [LSW1], [g0/0/6], [-], [-], [VLAN120], [Trunk], + [LSW4], [g0/0/4\~g0/0/7], [新接入设备], [不分接口], [-], [-], [-], [新接入设备端口], + [LSW5], [g0/0/2], [DataServer], [不分接口], [192.168.130.10], [-], [-], [Web服务器地址], + [LSW5], [g0/0/2], [WebServer], [不分接口], [192.168.130.10], [-], [-], [DNS服务器地址], + [LSW5], [g0/0/3], [AP1], [不分接口], [-], [-], [-], [-], + [LSW5], [g0/0/4], [LSW2], [g0/0/5], [-], [-], [-], [-], + [LSW5], [g0/0/5], [LSW2], [g0/0/6], [-], [-], [-], [-], +)]] + +#align(center)[#figure(caption: "防火墙拓扑表")[#table( + align: horizon, + columns: (auto, auto, auto, auto, 80pt, auto, auto, auto), + rows: 30pt, + [*设备名称*], [*接口*], [*连接设备*], [*对方接口*], [*IP 地址*], [*链路聚合 ID*], [*VLAN*], [*备注*], + [FW1], [g0/0/0], [LSW1], [g0/0/8], [192.168.20.2/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW1], [g0/0/1], [LSW1], [g0/0/9], [192.168.30.2/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW1], [g0/0/2], [LSW2], [g0/0/8], [192.168.20.2/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW1], [g0/0/3], [LSW2], [g0/0/9], [192.168.30.2/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW1], [g0/0/4], [FW2], [g0/0/4], [10.1.1.1/24], [7], [-], [用于组建防火墙旁挂系统], + [FW1], [g0/0/5], [FW2], [g0/0/5], [10.1.1.1/24], [7], [-], [用于组建防火墙旁挂系统], + [FW2], [g0/0/0], [LSW1], [g0/0/10], [192.168.20.3/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW2], [g0/0/1], [LSW1], [g0/0/11], [192.168.30.3/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW2], [g0/0/2], [LSW2], [g0/0/10], [192.168.20.3/24], [3], [VLAN20], [出口防火墙旁挂-外侧], + [FW2], [g0/0/3], [LSW2], [g0/0/11], [192.168.30.3/24], [8], [VLAN30], [出口防火墙旁挂-内侧], + [FW2], [g0/0/4], [FW1], [g0/0/4], [10.1.1.2/24], [7], [-], [用于组建防火墙旁挂系统], + [FW2], [g0/0/5], [FW1], [g0/0/5], [10.1.1.2/24], [7], [-], [用于组建防火墙旁挂系统], +)]] +] + += 实验设备 +#para[ +#align(center)[#table( + columns: (auto, auto,auto,auto), + rows:40pt, + inset: 10pt, + align: horizon+center, + table.header( + [设备名称], [设备型号], [设备数量],[设备名称] + ), + "交换机", "华为S5735", "4","LSW1、LSW2、LSW3、LSW4", + "集线器", "TPLINK TL-SG1008+","1","LSW5", + "路由器", "华为AR6120-S", "2","AR1、AR2", + "防火墙", "华为USG6303E-AC", "3","FW1、FW2", + "无线路由器", "TP-LINK AX3000", "1","AP", + "PC", "联想启天M410 + Windows 10", "4","PC1、PC2、Asso、Boss", + "PC", "联想拯救者R9000P + Windows 11 23H2", "1","外网主机", + "PC", "联想拯救者Y9000P + Windows 10 24H4", "1","DataServer、WebServer", +)] + 另有网线、控制线若干。 +] += 实验步骤及结果 +#para[] +== 设备连接 +#para[ + 将所有设备按照拓扑图连接好,确保每个设备的接口都正确连接: + #figure(image("机柜正面接线图.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "机柜正面接线图") + #figure(image("机柜背面接线图.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "机柜背面接线图") +] +== 配置核心层堆叠系统基本功能 +=== 组建堆叠系统 +#para[ + 在此处配置开始之前,必须明确:本设备的逻辑堆叠端口stack-port 0/1对应的物理端口,必须连接邻设备的逻辑堆叠端口stack-port 0/2对应的物理端口,否则堆叠组建不成功。 + + 配置逻辑堆叠端口并加入物理成员端口。 + - 配置LSW1的业务口g0/0/1、g0/0/7为物理成员端口,并加入到相应的逻辑堆叠端口。 + ``` + system-view + [HUAWEI] sysname LSW1 + [LSW1] interface stack-port 0/1 + [LSW1-stack-port0/1] port interface g0/0/1 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW1-stack-port0/1] quit + [LSW1] interface stack-port 0/2 + [LSW1-stack-port0/2] port interface g0/0/7 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW1-stack-port0/2] quit + ``` + - 配置LSW2的业务口g0/0/1、g0/0/7为物理成员端口,并加入到相应的逻辑堆叠端口。 + ``` + system-view + [HUAWEI] sysname LSW2 + [LSW2] interface stack-port 0/1 + [LSW2-stack-port0/1] port interface g0/0/1 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW2-stack-port0/1] quit + [LSW2] interface stack-port 0/2 + [LSW2-stack-port0/2] port interface g0/0/7 enable + Warning: Enablingstack function may cause configuration loss on the interface. Continue? [Y/N]:y + Info: This operation may take a few seconds. Please wait. + [LSW2-stack-port0/2] quit + ``` + + 配置堆叠ID和堆叠优先级 + - 配置LSW1的堆叠优先级为200。 + + ``` + [LSW1] stack slot 0 priority 200 + Warning: Do not frequently modify the Priority because it will make the stack split. Continue? [Y/N]:y + ``` + - 配置LSW2的堆叠ID(即Slot)为1。 + ``` + [LSW2] stack slot 0 renumber 1 + Warning: All the configurations related to the slot ID will be lost after the slot ID is modified. + Do not frequently modify the slot ID because it will make the stack split. Continue? [Y/N]:y + Info: Stack configuration has been changed, and the device needs to restart to make the configuration effective. + ``` + + 在每台设备上、在用户界面下输入`save`命令,保存配置信息。 + + 关闭设备并按顺序启动 + - 关闭LSW1、LSW2。 + - 先启动LSW1,等待2分钟左右,控制机能够登录到LSW1之后,再启动LSW2。 + + 检验配置结果 + 使用`display stack`命令查看堆叠状态,输出信息如下: + ``` + [CORE]disp stack + Stack mode: Service-port + Stack topology type: Ring + Stack system MAC: 6012-3c9a-5ff0 + MAC switch delay time: 10 min + Stack reserved VLAN: 4093 + Slot of the active management port: -- + Slot Role MAC Address Priority Device Type + ------------------------------------------------------------- + 0 Master 6012-3c9a-5ff0 200 S5735S-S24T4S-A + 1 Standby 642c-acc1-5970 100 S5735S-S24T4S-A + ``` + 输出展示了堆叠的状态信息,包括堆叠模式、堆叠拓扑类型、堆叠系统MAC地址、MAC切换延迟时间、堆叠保留VLAN、激活管理端口的槽位、各个槽位的角色、MAC地址、优先级和设备类型。其中,槽位0的Priority为200,槽位1的Priority为100,在竞争中槽位0最终会成为Master角色,槽位1为Standby角色。按照顺序上电能够保证设备快速进入事先规定好的角色。 + + 配置完成后,两台设备将组成一个堆叠系统,逻辑上看成一个设备,标号为CORE,称为核心集群。在后续的配置中,将以CORE作为设备名称。 +] +=== 配置核心集群的Eth-Trunk功能和接口IP地址 +#para[ +此步骤是要将核心集群与其他设备相连的物理链路聚合起来,以提高链路的带宽和可靠性。 ++ 创建 Eth-Trunk1,用于连接 AR1,并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 1 + [CORE-Eth-Trunk1] mode lacp + [CORE-Eth-Trunk1] quit + [CORE] interface GigabitEthernet 0/0/3 + [CORE-GigabitEthernet0/0/3] Eth-Trunk 1 + [CORE-GigabitEthernet0/0/3] quit + [CORE] interface GigabitEthernet 1/0/3 + [CORE-GigabitEthernet1/0/3] Eth-Trunk 1 + [CORE-GigabitEthernet1/0/3] quit + ``` ++ 创建 Eth-Trunk2,用于连接 AR2,并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 2 + [CORE-Eth-Trunk2] mode lacp + [CORE-Eth-Trunk2] quit + [CORE] interface GigabitEthernet 0/0/4 + [CORE-GigabitEthernet0/0/4] Eth-Trunk 2 + [CORE-GigabitEthernet0/0/4] quit + [CORE] interface GigabitEthernet 1/0/4 + [CORE-GigabitEthernet1/0/4] Eth-Trunk 2 + [CORE-GigabitEthernet1/0/4] quit + ``` ++ 创建 Eth-Trunk3,用于连接 FW1(外侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 3 + [CORE-Eth-Trunk3] mode lacp + [CORE-Eth-Trunk3] quit + [CORE] interface GigabitEthernet 0/0/8 + [CORE-GigabitEthernet0/0/8] Eth-Trunk 3 + [CORE-GigabitEthernet0/0/8] quit + [CORE] interface GigabitEthernet 1/0/8 + [CORE-GigabitEthernet1/0/8] Eth-Trunk 3 + [CORE-GigabitEthernet1/0/8] quit + ``` ++ 创建 Eth-Trunk4,用于连接 FW1(内侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 4 + [CORE-Eth-Trunk4] mode lacp + [CORE-Eth-Trunk4] quit + [CORE] interface GigabitEthernet 0/0/9 + [CORE-GigabitEthernet0/0/9] Eth-Trunk 4 + [CORE-GigabitEthernet0/0/9] quit + [CORE] interface GigabitEthernet 1/0/9 + [CORE-GigabitEthernet1/0/9] Eth-Trunk 4 + [CORE-GigabitEthernet1/0/9] quit + ``` ++ 创建 Eth-Trunk5,用于连接 FW2(外侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 5 + [CORE-Eth-Trunk5] mode lacp + [CORE-Eth-Trunk5] quit + [CORE] interface GigabitEthernet 0/0/10 + [CORE-GigabitEthernet0/0/10] Eth-Trunk 5 + [CORE-GigabitEthernet0/0/10] quit + [CORE] interface GigabitEthernet 1/0/10 + [CORE-GigabitEthernet1/0/10] Eth-Trunk 5 + [CORE-GigabitEthernet1/0/10] quit + ``` ++ 创建 Eth-Trunk6,用于连接 FW2(内侧),并加入 Eth-Trunk 成员接口。 + ``` + [CORE] interface Eth-Trunk 6 + [CORE-Eth-Trunk6] mode lacp + [CORE-Eth-Trunk6] quit + [CORE] interface GigabitEthernet 0/0/11 + [CORE-GigabitEthernet0/0/11] Eth-Trunk 6 + [CORE-GigabitEthernet0/0/11] quit + [CORE] interface GigabitEthernet 1/0/11 + [CORE-GigabitEthernet1/0/11] Eth-Trunk 6 + [CORE-GigabitEthernet1/0/11] quit + ``` +] +=== 配置核心集群的VLAN功能 +#para[ + 经过前面的配置,核心集群上现在同时共存了2个VPN实例:Private与Public。它们互相隔离,表示内网与外网不能直接连通;每个实例内又需要配置多个VLAN,并在每个Eth接口上限制VLAN的出入,借此来限制与不同用途的设备的连接。本步骤进行VLAN配置,并为每个VLAN配置VLANIF接口的IP地址。 + + 创建 VLAN 并配置 VLANIF 接口。 + ``` + [CORE] vlan batch 10 20 30 110 120 130 + [CORE] interface Vlanif 10 + [CORE-Vlanif10] ip address 192.168.10.1 24 + [CORE-Vlanif10] quit + + [CORE] interface Vlanif 20 + [CORE-Vlanif20] ip address 192.168.20.1 24 + [CORE-Vlanif20] quit + + [CORE] interface Vlanif 30 + [CORE-Vlanif30] ip address 192.168.30.1 24 + [CORE-Vlanif30] quit + + [CORE] interface Vlanif 110 + [CORE-Vlanif110] ip address 192.168.110.1 24 + [CORE-Vlanif110] quit + + [CORE] interface Vlanif 120 + [CORE-Vlanif120] ip address 192.168.120.1 24 + [CORE-Vlanif120] quit + + [CORE] interface Vlanif 130 + [CORE-Vlanif130] ip address 192.168.130.1 24 + [CORE-Vlanif130] quit + ``` + ++ 配置 Eth-Trunk 的 VLAN 允许列表 + - 配置 Eth-Trunk1 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 1 + [CORE-Eth-Trunk1] port link-type trunk + [CORE-Eth-Trunk1] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk1] quit + ``` + - 配置 Eth-Trunk2 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 2 + [CORE-Eth-Trunk2] port link-type trunk + [CORE-Eth-Trunk2] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk2] quit + ``` + - 配置 Eth-Trunk3 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 3 + [CORE-Eth-Trunk3] port link-type trunk + [CORE-Eth-Trunk3] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk3] quit + ``` + - 配置 Eth-Trunk4 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 4 + [CORE-Eth-Trunk4] port link-type trunk + [CORE-Eth-Trunk4] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk4] quit + ``` + - 配置 Eth-Trunk5 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 5 + [CORE-Eth-Trunk5] port link-type trunk + [CORE-Eth-Trunk5] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk5] quit + ``` + - 配置 Eth-Trunk6 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 6 + [CORE-Eth-Trunk6] port link-type trunk + [CORE-Eth-Trunk6] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk6] quit + ``` + - 配置 Eth-Trunk7 允许 VLAN130。 + ``` + [CORE] interface Eth-Trunk 7 + [CORE-Eth-Trunk7] port link-type trunk + [CORE-Eth-Trunk7] port trunk allow-pass vlan 130 + [CORE-Eth-Trunk7] quit + ``` + 配置完成后,通过`display vlan`命令查看VLAN配置信息,输出信息如下: + ``` + [CORE]disp vlan + The total number of VLANs is: 8 + -------------------------------------------------------------------------------- + U: Up; D: Down; TG: Tagged; UT: Untagged; + MP: Vlan-mapping; ST: Vlan-stacking; + #: ProtocolTransparent-vlan; *: Management-vlan; + -------------------------------------------------------------------------------- + + VID Type Ports + -------------------------------------------------------------------------------- + 1 common UT:GE0/0/2(D) GE0/0/5(U) GE0/0/6(U) GE0/0/12(D) + GE0/0/13(U) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D) + GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D) + GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/25(D) + GE0/0/26(D) GE0/0/27(D) GE0/0/28(D) GE1/0/2(D) + GE1/0/6(U) GE1/0/12(U) GE1/0/13(U) GE1/0/14(D) + GE1/0/16(D) GE1/0/17(D) GE1/0/18(D) GE1/0/19(D) + GE1/0/20(D) GE1/0/21(D) GE1/0/22(D) GE1/0/23(D) + GE1/0/24(D) GE1/0/25(D) GE1/0/26(D) GE1/0/27(D) + GE1/0/28(D) Eth-Trunk1(U) Eth-Trunk2(U) Eth-Trunk10(D) + Eth-Trunk20(D) + 10 common TG:GE1/0/12(U) Eth-Trunk1(U) Eth-Trunk2(U) + 20 common UT:Eth-Trunk3(U) Eth-Trunk5(U) + TG:GE1/0/12(U) + 30 common UT:Eth-Trunk4(U) Eth-Trunk6(U) + TG:GE1/0/12(U) + 66 common UT:GE0/0/24(U) + TG:GE1/0/12(U) + 110 common TG:GE0/0/5(U) GE1/0/6(U) GE1/0/12(U) + 120 common TG:GE0/0/6(U) GE0/0/12(D) GE1/0/12(U) + 130 common UT:GE1/0/5(U) GE1/0/15(D) + TG:GE1/0/12(U) + + VID Status Property MAC-LRN Statistics Description + -------------------------------------------------------------------------------- + 1 enable default enable disable VLAN 0001 + 10 enable default enable disable VLAN 0010 + 20 enable default enable disable VLAN 0020 + 30 enable default enable disable VLAN 0030 + 66 enable default enable disable VLAN 0066 + 110 enable default enable disable VLAN 0110 + 120 enable default enable disable VLAN 0120 + 130 enable default enable disable VLAN 0130 + ``` + 输出中的信息与上文配置办法无异,说明各个VLAN#footnote[其中的VLAN 66是后来配置的,此处可忽略。]配置生效。 +] +== 配置接入层 +#para[ + 接入层的配置比较简单,仅涉及到 VLAN。 + + + 配置 LSW3: + ```plaintext + system-view + [HUAWEI] sysname LSW3 + [LSW3] vlan batch 110 // 创建 VLAN110 + + [LSW3] interface GigabitEthernet 0/0/1 // 配置连接 PC1 的接口为 Access 模式,加入 VLAN110 + [LSW3-GigabitEthernet0/0/1] port link-type access + [LSW3-GigabitEthernet0/0/1] port default vlan 110 + [LSW3-GigabitEthernet0/0/1] quit + + [LSW3] interface GigabitEthernet 0/0/2 // 配置连接 PC2 的接口为 Access 模式,加入 VLAN110 + [LSW3-GigabitEthernet0/0/2] port link-type access + [LSW3-GigabitEthernet0/0/2] port default vlan 110 + [LSW3-GigabitEthernet0/0/2] quit + + [LSW3] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN110 通过 + [LSW3-GigabitEthernet0/0/3] port link-type trunk + [LSW3-GigabitEthernet0/0/3] port trunk allow-pass vlan 110 + [LSW3-GigabitEthernet0/0/3] quit + ``` + + + 配置 LSW4: + ```plaintext + system-view + [HUAWEI] sysname LSW4 + [LSW4] vlan batch 120 // 创建 VLAN120 + + [LSW4] interface GigabitEthernet 0/0/1 // 配置连接 Asso 的接口为 Access 模式,加入 VLAN120 + [LSW4-GigabitEthernet0/0/1] port link-type access + [LSW4-GigabitEthernet0/0/1] port default vlan 120 + [LSW4-GigabitEthernet0/0/1] quit + + [LSW4] interface GigabitEthernet 0/0/2 // 配置连接 Boss 的接口为 Access 模式,加入 VLAN120 + [LSW4-GigabitEthernet0/0/2] port link-type access + [LSW4-GigabitEthernet0/0/2] port default vlan 120 + [LSW4-GigabitEthernet0/0/2] quit + + [LSW4] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN120 通过 + [LSW4-GigabitEthernet0/0/3] port link-type trunk + [LSW4-GigabitEthernet0/0/3] port trunk allow-pass vlan 120 + [LSW4-GigabitEthernet0/0/3] quit + ``` + + + 配置 LSW5: + ```plaintext + system-view + [HUAWEI] sysname LSW5 + [LSW5] vlan batch 130 // 创建 VLAN130 + + [LSW5] interface GigabitEthernet 0/0/2 // 配置连接 DataServer 的接口为 Access 模式,加入 VLAN130 + [LSW5-GigabitEthernet0/0/2] port link-type access + [LSW5-GigabitEthernet0/0/2] port default vlan 130 + [LSW5-GigabitEthernet0/0/2] quit + + [LSW5] interface GigabitEthernet 0/0/3 // 配置连接 AP1 的接口为 Access 模式,加入 VLAN130 + [LSW5-GigabitEthernet0/0/3] port link-type access + [LSW5-GigabitEthernet0/0/3] port default vlan 130 + [LSW5-GigabitEthernet0/0/3] quit + + [LSW5] interface GigabitEthernet 0/0/4 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN130 通过 + [LSW5-GigabitEthernet0/0/4] port link-type trunk + [LSW5-GigabitEthernet0/0/4] port trunk allow-pass vlan 130 + [LSW5-GigabitEthernet0/0/4] quit + ``` +] +== 配置出口网关的基本功能 +#para[ + 出口网关即为AR1、AR2。在此步骤中,首先配置路由器使用链路聚合接口,核心交换机能够荣 ++ 在 AR1 上创建 Eth-Trunk2,并加入成员接口。 + ```plaintext + [AR1] interface Eth-Trunk 2 + [AR1-Eth-Trunk2] undo portswitch + [AR1-Eth-Trunk2] mode lacp-static + [AR1-Eth-Trunk2] quit + [AR1] interface GigabitEthernet 0/0/4 + [AR1-GigabitEthernet0/0/4] Eth-Trunk 2 + [AR1-GigabitEthernet0/0/4] quit + [AR1] interface GigabitEthernet 0/0/5 + [AR1-GigabitEthernet0/0/5] Eth-Trunk 2 + [AR1-GigabitEthernet0/0/5] quit + ``` ++ 在 AR1 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + ```plaintext + [AR1] interface Eth-Trunk 2.100 + [AR1-Eth-Trunk2.100] ip address 192.168.10.2 24 + [AR1-Eth-Trunk2.100] dot1q termination vid 10 + [AR1-Eth-Trunk2.100] quit + ``` ++ AR2与AR1的配置几乎一模一样,仅有IP地址的设置不同。在 AR2 上创建 Eth-Trunk4,并加入成员接口。 + ```plaintext + [AR2] interface Eth-Trunk 2 + [AR2-Eth-Trunk2] undo portswitch + [AR2-Eth-Trunk2] mode lacp-static + [AR2-Eth-Trunk2] quit + [AR2] interface GigabitEthernet 0/0/4 + [AR2-GigabitEthernet0/0/4] Eth-Trunk 2 + [AR2-GigabitEthernet0/0/4] quit + [AR2] interface GigabitEthernet 0/0/5 + [AR2-GigabitEthernet0/0/5] Eth-Trunk 2 + [AR2-GigabitEthernet0/0/5] quit + ``` + ++ 在 AR2 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + ```plaintext + [AR2] interface Eth-Trunk 2.100 + [AR2-Eth-Trunk2.100] ip address 192.168.10.3 24 + [AR2-Eth-Trunk2.100] dot1q termination vid 10 + [AR2-Eth-Trunk2.100] quit + ``` +] +=== 配置防火墙的基本功能 +#para[ + 在此步骤中,首先配置防火墙使用链路聚合接口,然后配置接口的IP地址,最后根据接口划分安全区域。 + + 在 FW1 上配置接口与安全区域。 + ```plaintext + [FW1] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) + [FW1-Eth-Trunk3] ip address 192.168.20.2 24 + [FW1-Eth-Trunk3] mode lacp-static + [FW1-Eth-Trunk3] quit + [FW1] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 + [FW1-GigabitEthernet0/0/0] Eth-Trunk 3 + [FW1-GigabitEthernet0/0/0] quit + [FW1] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 + [FW1-GigabitEthernet0/0/2] Eth-Trunk 3 + [FW1-GigabitEthernet0/0/2] quit + + [FW1] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) + [FW1-Eth-Trunk4] ip address 192.168.30.2 24 + [FW1-Eth-Trunk4] mode lacp-static + [FW1-Eth-Trunk4] quit + [FW1] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 + [FW1-GigabitEthernet0/0/1] Eth-Trunk 4 + [FW1-GigabitEthernet0/0/1] quit + [FW1] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 + [FW1-GigabitEthernet0/0/3] Eth-Trunk 4 + [FW1-GigabitEthernet0/0/3] quit + + [FW1] interface Eth-Trunk 1 // 配置 FW1 与 FW2 连接的接口 + [FW1-Eth-Trunk1] ip address 10.1.1.1 24 + [FW1-Eth-Trunk1] mode lacp-static + [FW1-Eth-Trunk1] quit + [FW1] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 + [FW1-GigabitEthernet0/0/4] Eth-Trunk 1 + [FW1-GigabitEthernet0/0/4] quit + [FW1] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 + [FW1-GigabitEthernet0/0/5] Eth-Trunk 1 + [FW1-GigabitEthernet0/0/5] quit + + [FW1] firewall zone trust + [FW1-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 + [FW1-zone-trust] quit + + [FW1] firewall zone untrust + [FW1-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 + [FW1-zone-untrust] quit + + [FW1] firewall zone dmz + [FW1-zone-dmz] add interface Eth-Trunk 1 // 将 FW1 与 FW2 之间的接口加入 DMZ 区域 + [FW1-zone-dmz] quit + ``` + + + 在 FW2 上配置接口与安全区域。 + + ```plaintext + [FW2] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) + [FW2-Eth-Trunk3] ip address 192.168.20.3 24 + [FW2-Eth-Trunk3] mode lacp-static + [FW2-Eth-Trunk3] quit + [FW2] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 + [FW2-GigabitEthernet0/0/0] Eth-Trunk 3 + [FW2-GigabitEthernet0/0/0] quit + [FW2] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 + [FW2-GigabitEthernet0/0/2] Eth-Trunk 3 + [FW2-GigabitEthernet0/0/2] quit + + [FW2] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) + [FW2-Eth-Trunk4] ip address 192.168.30.3 24 + [FW2-Eth-Trunk4] mode lacp-static + [FW2-Eth-Trunk4] quit + [FW2] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 + [FW2-GigabitEthernet0/0/1] Eth-Trunk 4 + [FW2-GigabitEthernet0/0/1] quit + [FW2] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 + [FW2-GigabitEthernet0/0/3] Eth-Trunk 4 + [FW2-GigabitEthernet0/0/3] quit + + [FW2] interface Eth-Trunk 1 // 配置 FW2 与 FW1 连接的接口 + [FW2-Eth-Trunk1] ip address 10.1.1.2 24 + [FW2-Eth-Trunk1] mode lacp-static + [FW2-Eth-Trunk1] quit + [FW2] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 + [FW2-GigabitEthernet0/0/4] Eth-Trunk 1 + [FW2-GigabitEthernet0/0/4] quit + [FW2] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 + [FW2-GigabitEthernet0/0/5] Eth-Trunk 1 + [FW2-GigabitEthernet0/0/5] quit + + [FW2] firewall zone trust + [FW2-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 + [FW2-zone-trust] quit + + [FW2] firewall zone untrust + [FW2-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 + [FW2-zone-untrust] quit + + [FW2] firewall zone dmz + [FW2-zone-dmz] add interface Eth-Trunk 1 // 将 FW2 与 FW1 之间的接口加入 DMZ 区域 + [FW2-zone-dmz] quit + ``` +] +== 配置使内部网络互联互通 +#para[ + 此处内网指与核心集群相连的重要设备,即AR1、AR2、FW1、FW2。在此步骤中,需要配置核心集群与AR1、AR2的连接,使得核心集群能够连接路由器;其次还要配置核心集群上两个不互通的VPN实例与FW1、FW2的连接,使得两个VPN实例可以通过旁挂防火墙互通。 +] +=== 在路由器上部署VRRP +#para[ + 在AR1、AR2上部署VRRP,使得核心集群能够通过VRRP虚拟IP地址连接路由器。 + - 配置AR1: + ``` + [AR1] interface Eth-Trunk 2.100 + [AR1-Eth-Trunk2.100] vrrp vrid 1 virtual-ip 192.168.10.100 //配置VRRP的虚拟IP地址 + [AR1-Eth-Trunk2.100] vrrp vrid 1 priority 120 //提高RouterA的优先级,使其成为Master + [AR1-Eth-Trunk2.100] quit + ``` + - 配置AR2: + ``` + [AR2] interface Eth-Trunk 2.100 + [AR2-Eth-Trunk2.100] vrrp vrid 1 virtual-ip 192.168.10.100 //配置VRRP的虚拟IP地址 + [AR2-Eth-Trunk2.100] quit + ``` +] +=== 配置 AR1 和 AR2 的路由 +#para[ + + 在 AR1 上配置 OSPF。 + ```plaintext + [AR1] ospf 100 router-id 1.1.1.1 + [AR1-ospf-100] area 0 + [AR1-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 + [AR1-ospf-100-area-0.0.0.0] quit + [AR1-ospf-100] quit + ``` + + + 在 AR2 上配置 OSPF。 + ```plaintext + [AR2] ospf 100 router-id 2.2.2.2 + [AR2-ospf-100] area 0 + [AR2-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 + [AR2-ospf-100-area-0.0.0.0] quit + [AR2-ospf-100] quit + ``` +] + +=== 配置防火墙的路由 +#para[ + + 在 FW1 上配置静态路由。 + + ```plaintext + [FW1] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW1] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` + + + 在 FW2 上配置静态路由。 + + ```plaintext + [FW2] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW2] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` +] +=== 配置核心集群的路由 +#para[ + 核心集群上路由配置比较复杂,涉及到两个VPN实例,分别是Public和Private。Public用于连接路由器,Private用于连接防火墙。在此步骤中,需要配置核心集群上的路由,使得核心集群能够连接路由器和防火墙。配置时需要仔细对照网络拓扑表,确保路由配置正确。 + + 在 CORE 上创建 VPN 实例 Public,将连接路由器的接口和连接防火墙上行口的接口绑定到 Public。 + ```plaintext + [CORE] ip vpn-instance Public // 创建 Public + [CORE-vpn-instance-Public] ipv4-family + [CORE-vpn-instance-Public-af-ipv4] route-distinguisher 100:2 + [CORE-vpn-instance-Public-af-ipv4] vpn-target 222:2 both + [CORE-vpn-instance-Public-af-ipv4] quit + [CORE-vpn-instance-Public] quit + + [CORE] interface Vlanif 10 + [CORE-Vlanif10] ip binding vpn-instance Public // 将 CORE 连接路由器的接口 VLANIF10 绑定至 Public + [CORE-Vlanif10] ip address 192.168.10.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif10] quit + + [CORE] interface Vlanif 20 + [CORE-Vlanif20] ip binding vpn-instance Public // 将 CORE 连接防火墙上行口的接口 VLANIF20 绑定至 Public + [CORE-Vlanif20] ip address 192.168.20.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif20] quit + ``` + + + 对于上行流量,在 Public 中配置静态路由,路由下一跳指向路由器 VRRP 虚拟 IP。 + ```plaintext + [CORE] ip route-static vpn-instance Public 0.0.0.0 0.0.0.0 192.168.10.100 // 缺省路由下一跳指向 VRRP 虚拟 IP + ``` + + 3. 对于下行流量,在 Public 中配置静态路由,路由下一跳指向防火墙上行 VRRP 1 的虚拟 IP(VRID1)。 + + ```plaintext + [CORE] ip route-static vpn-instance Public 192.168.110.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN110 网络,下一跳指向 FW1 的上行接口 + [CORE] ip route-static vpn-instance Public 192.168.120.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN120 网络,下一跳指向 FW1 的上行接口 + [CORE] ip route-static vpn-instance Public 192.168.130.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN130 网络,下一跳指向 FW1 的上行接口 + ``` + + + 对于下行流量,在 CORE 与 AR1、AR2 之间运行 OSPF 协议,用于 AR1、AR2 学习到业务网段的回程路由信息。 + ```plaintext + [CORE] ospf 100 router-id 1.1.1.1 vpn-instance Public + [CORE-ospf-100] area 0 + [CORE-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 AR1、AR2 的网段发布到 OSPF 中 + [CORE-ospf-100-area-0.0.0.0] quit + [CORE-ospf-100] import-route static // 在 OSPF 中引入静态路由 + [CORE-ospf-100] quit + ``` + + + 对于上行流量,在 CORE 上创建 VPN 实例 Private,将连接业务网络的接口和连接防火墙下行的接口绑定到 Private,Private 的缺省路由下一跳指向防火墙下行 VRRP 虚拟 IP(VRID2)。 + ```plaintext + [CORE] ip vpn-instance Private // 创建 Private + [CORE-vpn-instance-Private] ipv4-family + [CORE-vpn-instance-Private-af-ipv4] route-distinguisher 100:1 + [CORE-vpn-instance-Private-af-ipv4] vpn-target 111:1 both + [CORE-vpn-instance-Private-af-ipv4] quit + [CORE-vpn-instance-Private] quit + + [CORE] interface Vlanif 110 + [CORE-Vlanif110] ip binding vpn-instance Private // 将 CORE 连接 VLAN110 的接口 VLANIF110 绑定至 Private + [CORE-Vlanif110] ip address 192.168.110.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif110] quit + + [CORE] interface Vlanif 120 + [CORE-Vlanif120] ip binding vpn-instance Private // 将 CORE 连接 VLAN120 的接口 VLANIF120 绑定至 Private + [CORE-Vlanif120] ip address 192.168.120.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif120] quit + + [CORE] interface Vlanif 130 + [CORE-Vlanif130] ip binding vpn-instance Private // 将 CORE 连接 VLAN130 的接口 VLANIF130 绑定至 Private + [CORE-Vlanif130] ip address 192.168.130.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif130] quit + + [CORE] interface Vlanif 30 + [CORE-Vlanif30] ip binding vpn-instance Private // 将 CORE 连接防火墙下行的接口 VLANIF30 绑定至 Private + [CORE-Vlanif30] ip address 192.168.30.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 + [CORE-Vlanif30] quit + ``` + + + 在 Private 中配置缺省路由,下一跳指向防火墙下行 VRRP 2 的虚拟 IP(VRID2)。 + ```plaintext + [CORE] ip route-static vpn-instance Private 0.0.0.0 0.0.0.0 192.168.30.2 // 缺省路由下一跳指向 FW1 的下行接口 + ``` +] +== 阶段性检验 +#para[ + 上面的配置完成后,进行一个阶段性检验。配置PC1的IP地址为`192.168.110.10/24`,网关为核心集群上VPN实例Private内的Vlanif110接口地址`192.168.110.1`,然后ping AR1、AR2的VRRP虚拟IP地址`192.168.10.100`,是可以通的,如图@check_point1。如果不能,则逐级ping,查找问题所在。 + #figure(image("阶段性检验1.jpg",format:"jpg",fit:"stretch",width: 100%),caption:"阶段性检验1") +] +== 配置其他功能 +=== 配置出口网关的BFD功能 +#para[ + 配置 AR1 和 AR2 之间的 BFD 功能,用于快速检测链路故障并触发 OSPF 路由收敛。 + + + 配置全局 BFD 功能。 + ```plaintext + [AR1] bfd // 配置全局 BFD 功能并进入全局 BFD 视图 + [AR1-bfd] quit + ``` + ```plaintext + [AR2] bfd // 配置全局 BFD 功能并进入全局 BFD 视图 + [AR2-bfd] quit + ``` + + + 在 AR1 上配置 OSPF 的 BFD 特性。 + ```plaintext + [AR1] ospf 100 // 进入 OSPF 视图 + [AR1-ospf-100] bfd all-interfaces enable // 打开 OSPF BFD 特性的开关,建立 BFD 会话 + [AR1-ospf-100] quit + ``` + + + 在 AR2 上配置 OSPF 的 BFD 特性。 + ```plaintext + [AR2] ospf 100 // 进入 OSPF 视图 + [AR2-ospf-100] bfd all-interfaces enable // 打开 OSPF BFD 特性的开关,建立 BFD 会话 + [AR2-ospf-100] quit + ``` + + + 配置 BFD 参数。 + ```plaintext + [AR1-ospf-100] bfd all-interfaces min-rx-interval 1000 min-tx-interval 1000 detect-multiplier 3 + [AR2-ospf-100] bfd all-interfaces min-rx-interval 1000 min-tx-interval 1000 detect-multiplier 3 + ``` + + + 验证 BFD 会话。 + ```plaintext + [AR1] display ospf bfd session all + [AR2] display ospf bfd session all + ``` + 该命令在AR1上得到以下输出: + ``` + [AR1]disp ospf bfd session all + + OSPF Process 100 with Router ID 2.2.2.2 + Area 0.0.0.0 interface 192.168.10.3(Eth-Trunk2.100)'s BFD Sessions + + NeighborId:1.1.1.1 AreaId:0.0.0.0 Interface:Eth-Trunk2.100 + BFDState:up rx :1000 tx :1000 + Multiplier:3 BFD Local Dis:8198 LocalIpAdd:192.168.10.3 + RemoteIpAdd:192.168.10.1 Diagnostic Info:No diagnostic information + + NeighborId:3.3.3.3 AreaId:0.0.0.0 Interface:Eth-Trunk2.100 + BFDState:up rx :1000 tx :1000 + Multiplier:3 BFD Local Dis:8197 LocalIpAdd:192.168.10.3 + RemoteIpAdd:192.168.10.2 Diagnostic Info:No diagnostic information + ``` + 注意其中的`BFDStat`字段,显示为`up`,表示 BFD 会话建立成功。 +] +=== 配置防火墙的双机热备 +#para[ + 在防火墙上配置双机热备功能(主备备份模式),确保高可用性。FW1 作为 Master,FW2 作为 Slave。 + + + 在 FW1 上配置双机热备,FW1 在备份组中作为 Master。 + ```plaintext + [FW1] interface Eth-Trunk 3 + [FW1-Eth-Trunk3] vrrp vrid 1 virtual-ip 192.168.20.2 24 active + [FW1-Eth-Trunk3] quit + [FW1] interface Eth-Trunk 4 + [FW1-Eth-Trunk4] vrrp vrid 2 virtual-ip 192.168.30.2 24 active + [FW1-Eth-Trunk4] quit + [FW1] hrp interface Eth-Trunk 1 remote 10.1.1.2 // 配置心跳口,并启用双机热备 + [FW1] hrp enable + ``` + + + 在 FW2 上配置双机热备,FW2 在备份组中作为 Slave。 + ```plaintext + [FW2] interface Eth-Trunk 3 + [FW2-Eth-Trunk3] vrrp vrid 1 virtual-ip 192.168.20.2 24 standby + [FW2-Eth-Trunk3] quit + [FW2] interface Eth-Trunk 4 + [FW2-Eth-Trunk4] vrrp vrid 2 virtual-ip 192.168.30.2 24 standby + [FW2-Eth-Trunk4] quit + [FW2] hrp interface Eth-Trunk 1 remote 10.1.1.1 // 配置心跳口,并启用双机热备 + [FW2] hrp enable + ``` + 配置好之后,保存配置,将两台设备全部断电关机。按照FW1先、FW2后的顺序开机(防火墙开机较久,约5分钟,可通过风扇声音判断,声音突然由大变小表示开机完成),应该可以观察到防火墙Web主页中的主备状态: + #figure(image("主备备份(主).png",format:"png",fit:"stretch",width: 80%),caption:"防火墙双机热备(主,FW1)") + #figure(image("主备备份(备).png",format:"png",fit:"stretch",width: 80%),caption:"防火墙双机热备(备,FW2)") +] +=== 配置DHCP服务器 +#para[ + DHCP服务器一般配置在接入层上,但本实验拓扑图较为简单,所以在核心集群上配置DHCP服务器,为 VLANIF110 和 VLANIF120 接口下的客户端分配 IP 地址和相关网络参数。 + + + 配置 VLANIF110 接口的 DHCP 地址池 + - 配置 VLANIF110 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ```plaintext + [CORE] interface vlanif 110 + [CORE-Vlanif110] dhcp select interface + [CORE-Vlanif110] dhcp server gateway-list 192.168.110.1 + [CORE-Vlanif110] dhcp server lease day 30 + [CORE-Vlanif110] dhcp server dns-list 192.168.130.10 //内网中的DNS服务器地址 + [CORE-Vlanif110] quit + ``` + + 配置 VLANIF120 接口的 DHCP 地址池 + - 配置 VLANIF120 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ``` + [CORE] interface vlanif 120 + [CORE-Vlanif120] dhcp select interface + [CORE-Vlanif120] dhcp server gateway-list 192.168.120.1 + [CORE-Vlanif120] dhcp server lease day 60 // 老板一般会当得比员工久 + [CORE-Vlanif120] dhcp server dns-list 192.168.130.10 + [CORE-Vlanif120] quit + ``` + + 配置完成之后,配置PC1、PC2为自动获取IP地址的方式(还可配置自动获取DNS地址),查看 DHCP 地址池信息: + + - 使用 `display ip pool` 命令查看 DHCP 地址池的配置和状态。 + ```plaintext + [CORE] display ip pool + ------------------------------------------------------------------------------------- + Pool-name : Vlanif110 + Pool-No : 0 + Lease : 1 Days 0 Hours 0 Minutes + Position : Interface + Status : Unlocked + Gateway-0 : 192.168.110.1 + Network : 192.168.110.0 + Mask : 255.255.255.0 + VPN instance : Private + Conflicted address recycle interval: - + Address Statistic: Total :253 Used :2 + Idle :251 Expired :0 + Conflict :0 Disabled :0 + ``` + 注意到`Used`字段中变成2。此时在任一台机器上查看IP地址和DNS地址,可以看到被分配的地址: + #figure#figure(image("dhcp_dns.jpg",format:"jpg",fit:"stretch",width: 100%),caption:"PC1自动获取IP地址和DNS服务器地址") +] +=== 配置STP以消除网络中的环路 +#para[ + 逻辑拓扑图@logic_topo 有更完整的版本: + #figure(image("无环路.png",format:"png",fit:"stretch",width: 60%),caption:"逻辑拓扑图(完整)") + 分析逻辑拓扑图,发现此网络基本呈树形,有且仅有核心集群与FW1、FW2之间组成的环。因此,只需要在核心集群、防火墙上配置 STP,就可以消除网络中的环路,不需要RSTP、MSTP等较复杂的协议。具体来说,以阻塞 FW2 连接Private的端口Eth4为目的,配置STP协议。 + + 在 CORE 上启用 STP 并配置优先级。 + ```plaintext + [CORE] stp enable // 启用 STP 协议 + [CORE] stp mode stp // 配置 STP 模式为标准 STP + [CORE] stp priority 0 // 设置 CORE 的 STP 优先级为 0(确保 CORE 成为根桥) + [CORE] quit + ``` + + + 在 FW1 上启用 STP 并配置优先级。 + ```plaintext + [FW1] stp enable // 启用 STP 协议 + [FW1] stp mode stp // 配置 STP 模式为标准 STP + [FW1] stp priority 4096 // 设置 FW1 的 STP 优先级为 4096 + [FW1] quit + ``` + + + 在 FW2 上启用 STP 并配置优先级。 + ```plaintext + [FW2] stp enable // 启用 STP 协议 + [FW2] stp mode stp // 配置 STP 模式为标准 STP + [FW2] stp priority 8192 // 设置 FW2 的 STP 优先级为 8192 + [FW2] quit + ``` + + + 在 FW2 上阻塞指定端口 + ```plaintext + [FW2] interface Eth-Trunk 4 + [FW2-Eth-Trunk4] stp disable // 禁用 STP 以阻塞 Eth4 端口 + [FW2-Eth-Trunk4] quit + ``` +] +=== 为出口网关配置NAT +#para[ + 由于内网用户有上网需求,所以需要进行地址转换。这一步骤在 AR1 和 AR2 上配置 NAT 功能,包括地址池、ACL、静态映射以及 FTP ALG 功能。 + + 配置地址池和 ACL + - 在 AR1 上配置地址池: + ```plaintext + [AR1] nat address-group 1 172.163.1.10 172.163.1.252 + ``` + - 在 AR2 上配置地址池: + ```plaintext + [AR2] nat address-group 1 172.163.3.10 172.163.3.252 + ``` + - 在 AR1 和 AR2 上创建 ACL,匹配需要上网的内网段: + ```plaintext + [AR1] acl 2000 + [AR1-acl-basic-2000] rule permit source 192.168.110.0 0.0.0.255 + [AR1-acl-basic-2000] rule permit source 192.168.120.0 0.0.0.255 + [AR1-acl-basic-2000] quit + ``` + ``` + [AR2] acl 2000 + [AR2-acl-basic-2000] rule permit source 192.168.110.0 0.0.0.255 + [AR2-acl-basic-2000] rule permit source 192.168.120.0 0.0.0.255 + [AR2-acl-basic-2000] quit + ``` + - 在 AR1 和 AR2 的路由出口引用 ACL 2000,使匹配的网段中的地址可以使用地址池中的地址进行 NAT 转换: + ```plaintext + [AR1] int g0/0/2 + [AR1-GigabitEthernet0/0/2] nat outbound 2000 address-group 1 no-pat + [AR1-GigabitEthernet0/0/2] quit + ``` + ``` + [AR2] int g0/0/3 + [AR2-GigabitEthernet0/0/3] nat outbound 2000 address-group 1 no-pat + [AR2-GigabitEthernet0/0/3] quit + ``` + + + 配置 NAT 静态映射 + - 在 AR1 上配置 NAT 静态映射,实现外网用户通过预留的公网 IP 地址 172.163.1.9 访问内部 FTP/Web 服务器: + ```plaintext + [AR1] int g0/0/2 + [AR1-GigabitEthernet0/0/2] nat static protocol tcp global 172.163.1.9 21 inside 192.168.130.10 21 + [AR1-GigabitEthernet0/0/2] nat static protocol tcp global 172.163.1.9 80 inside 192.168.130.10 80 + [AR1-GigabitEthernet0/0/2] quit + ``` + - 在 AR2 上配置 NAT 静态映射,实现外网用户通过预留的公网 IP 地址 172.163.3.9 访问内部 FTP/Web 服务器: + ```plaintext + [AR2] int g0/0/3 + [AR2-GigabitEthernet0/0/3] nat static protocol tcp global 172.163.3.9 21 inside 192.168.130.10 21 + [AR2-GigabitEthernet0/0/3] nat static protocol tcp global 172.163.3.9 80 inside 192.168.130.10 80 + [AR2-GigabitEthernet0/0/3] quit + ``` + + + 开启 FTP 的 NAT ALG 功能 + ```plaintext + [AR1] nat alg ftp enable + ``` + ``` + [AR2] nat alg ftp enable + ``` + + 4. 查看 NAT 转换和静态映射的结果 + + 在 AR1 和 AR2 上查看 NAT 转换和静态映射的结果: + ```plaintext + [AR1] display nat address-group 1 + [AR1] display nat static + ``` + ``` + [AR2] display nat address-group 1 + [AR2] display nat static + ``` + 结果如@ar1nat 和@ar2nat 所示(见下页): + #figure(image("AR1-NAT配置结果-截图.jpg",format:"jpg",fit:"stretch",width: 80%),caption:"AR1 NAT配置结果") + #figure(image("AR1-NAT配置结果-截图.jpg",format:"jpg",fit:"stretch",width: 80%),caption:"AR1 NAT配置结果") +] +=== 防火墙的工作时间段切换 +#para[ + 公司规定员工办公室工作时间内不能访问外网。因此,需要在防火墙上配置对应的安全策略,即工作时间段内`trust`不能访问`untrust`区域,策略配置如下: + #figure(image("do_not_play_policy.png",format:"png",fit:"stretch",width: 90%),caption:"配置非工作时间段内不能访问外网") +] +=== 配置端口安全 +#para[ + 在 LSW4 上为连接到 Boss 设备的接口配置端口安全,以确保只有特定的 MAC 地址可以访问该端口。 + + 进入连接到 Boss 设备的接口配置模式。 + ```plaintext + [LSW4] interface GigabitEthernet0/0/2 + ``` + + 启用端口安全功能。 + ```plaintext + [LSW4-GigabitEthernet0/0/2] port-security enable + ``` + + + 配置粘性 MAC 地址,以便动态学习并绑定第一个连接到该端口的设备的 MAC 地址。 + ```plaintext + [LSW4-GigabitEthernet0/0/2] port-security mac-address sticky + ``` + + 设置该端口允许的最大 MAC 地址数量为 1,确保只有一个设备可以连接到该端口。 + ```plaintext + [LSW4-GigabitEthernet0/0/2] port-security max-mac-num 1 + ``` +] + +] +=== 配置Web服务器与DNS服务器 +#para[ + 在个人笔记本电脑上配置服务器。选择Apache24作为Web服务器,选择BIND 9作为DNS服务器。Apache的配置十分简单,而BIND的具体配置十分复杂,不是重点,在此不再展开。 +] +=== 配置无线路由器 +#para[ + 初始化AP,然后以无线网络连接到它的配置界面`tplogin.cn`(TP-Link AX3000)。随后,选择桥接模式即可。 + + 理论成立,但实际不可行。经测试,此AP在选取桥接模式后,也无法真正地担任交换机的功能(两个连接同网段设备的端口间互ping不通)。推测在工程环境下只能作为路由器使用。而拓扑图中已经没有多余的路由器位置。即使有,也不具有适合此AP的功能性。所以不再继续配置此AP。 +] + +== 实验后验收 +#para[ + 检查以下项目来验证整个网络的功能: + + 内网主机能够通过DHCP获取到IP地址;#box( + text(font: ("Times LT Pro","FZXiaoBiaoSong-B05"),fill: luma(240), weight:"bold", "先前已验证"), + fill:green, + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt,) + // + 内网主机之间互相ping通:PC1和老板、PC2和Asso; + + 内网主机之间可以互相通信; + + 内网主机可以通过IP地址访问Web服务器; + // + 内网主机可以通过域名www.construction.com访问Web服务器; + + 内网主机可以通过域名访问Web服务器; + + 外网主机可以通过外网地址访问内网Web服务器; + //+ 内网主机可以ping通外网主机,抓包显示源地址是经过转换的地址; + + 内网主机可以访问外网; + + 检验防火墙安全策略; + + 防火墙主备备份;#box( + text(font: ("Times LT Pro","FZXiaoBiaoSong-B05"),fill: luma(240), weight:"bold", "先前已验证"), + fill:green, + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt,) + + 检验出口网关双机热备份/BFD(快速切换); + + 检验端口安全; + 其中,第一项与第八项先前已经验证生效,后续不再专门验收。 +] +=== 内网通信 +#para[ + 检查内网主机之间是否可以互相ping通。这里以PC1和Boss、PC2和Asso通信为例: + #figure(image("2.PC1-ping老板.jpg",format: "jpg",width: 50%,fit:"stretch"),caption:"PC1 ping 通 Boss") + #figure(image("3.PC2-ping-Asso.jpg",format: "jpg",width: 50%,fit:"stretch"),caption:"PC2 ping 通 Asso") +] +=== 内网访问Web服务器 +#para[ + 使用主机Asso,经由IP地址192.168.130.10访问Web服务器: + #figure(image("4.Asso访问web-通过ip.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"Asso通过IP访问Web服务器") + 通过域名www.construction.com访问服务器: + #figure(image("5.Asso访问web-通过域名.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"Asso通过访问Web服务器") +] +=== 外网访问Web服务器 +#para[ + 使用外网主机(地址为`172.163.5.1`),通过服务器的公网IP访问服务器: + #figure(image("外网主机访问web-通过转换后地址.png",format: "png",width: 100%,fit:"stretch"),caption:"Asso通过访问Web服务器") + 这还可以说明防火墙有关内外网之间的区域限制策略设置无误,即Untrust区域可以访问DMZ区域,DMZ区域也可以访问Untrust区域。 +] +=== 内外网访问系列验证、NAT验证与出口网关BFD验证 +#para[ + 使用内网主机PC1对外网主机进行长ping,然后再外网主机上开启抓包。途中,使用`shutdown`命令断开AR1与CORE的连接。在PC1上观察长ping是否断开,在外网主机上观察抓包结果中,源地址是否是经过NAT的转换,以及时间序列上相差多少。 + + 运行过程如下: + #figure(image("路由器双机热备份.jpg",format: "jpg",width: 100%,fit:"stretch"),caption:"长ping不断") + 从@ping_s 中可以观察到: + - 长ping没有断开; + - `shutdown`端口之前,`tracert`命令返回的路径经过了AR1,即`192.168.10.3`; + - `shutdown`端口之前,`tracert`命令返回的路径变为经过AR2,即`192.168.10.2`。 + 进一步分析需要查看抓包结果。抓包结果如下: + #figure(image("长ping不断.png",format: "png",width: 100%,fit:"stretch"),caption:"长ping不断") + 观察@ping_t,靠上方红框内的源地址均为`172.163.1.10`,即AR1经过NAT转换后的外网网关地址,这说明AR1上的NAT生效;在第8到9秒之间,外网主机捕获到一个ARP报文,询问它的IP地址,这可能是AR2从备份状态变为了工作状态,发出ARP询问。随后的第9.7s,内网主机的下一个ping报文到来。由于此次报文到达与上次到达间隔仅为1s,恰好是ping程序发送请求的时间间隔,由此可见PC1上的长ping丝毫没有受到影响。在这之后,ping的源地址均为`172.163.3.10`,即AR2经过NAT转换后的外网网关地址,这说明AR2上的NAT生效。 + + 凭此抓包结果即可验证数个配置项目。 +] +=== 防火墙安全策略系列验证 +#para[ + 此处主要验证几条“禁止”的防火墙策略。 + 1. 验证非工作时间段职员办公室(PC1、PC2)无法访问外网 + 以PC1为例。验证这条策略,需要查看工作时间、非工作时间下,PC1是否能ping通外网主机。 + + 首先,在工作时间下,查看防火墙策略的命中次数: + #figure(image("防火墙工作时段时间截图.png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段") + #figure(image("防火墙工作时段策略命中次数截图(ping前).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段策略命中次数截图(ping前)") + 然后用PC1 ping外网,发现能够ping通。观察策略命中次数: + #figure(image("防火墙工作时段策略命中次数截图(ping后).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙工作时段策略命中次数截图(ping后)") + 注意到命中次数增加。 + + 首先,在非工作时间下,查看防火墙策略的命中次数: + #figure(image("防火墙非工作时段时间截图.png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段") + #figure(image("防火墙非工作时段策略命中次数截图(ping前).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段策略命中次数截图(ping前)") + 然后用PC1 ping外网,发现能够ping通。观察策略命中次数: + #figure(image("防火墙非工作时段策略命中次数截图(ping后).png",format: "png",width: 100%,fit:"stretch"),caption:"防火墙非工作时段策略命中次数截图(ping后)") + 注意到命中次数增加。 + + 2. 验证外网ping不通内网trust区域 + 在外网主机上ping内网PC1,发现无法ping通: + #figure(image("外网ping不通内网.png",format: "png",width: 70%,fit:"stretch"),caption:"Untrust区域无法访问Trust区域") + 防火墙上的验证与上面的步骤类似,此处不再展示。 +] +=== 端口安全验证 +#para[ + 将Boss电脑取下,将其网线接到外网主机上。在外网主机上配置自动获取IP地址,然后运行ipconfig /renew命令后,依然无法获取到IP地址。 + #figure(image("外网主机接boss网.png",format: "png",width: 50%,fit:"stretch"),caption:"配置外网主机为自动获取IP地址") + #figure(image("外网主机无法自动获取IP.png",format: "png",width: 70%,fit:"stretch"),caption:"外网主机无法自动获取IP地址") + 此外,还可通过手动设置外网主机IP地址为192.168.120.25/24(即192.168.120.0/24网段中,除Vlanif 120与特殊IP地址外的任一IP地址)来构成直连网络。但即便如此,ping Vlanif 120还是会发现无法ping通。 + + 至此,所有配置验证结束。 +] + += 实验总结 +== 内容总结 +#para[ + 本次实验的主要目标是设计和实现一个包含局域网和广域网的中型网络,涵盖了从网络规划、方案设计、设备选型与采购、硬件安装与配置、软件安装与配置、系统测试与联调、工程验收等完整的组网工程流程。实验通过模拟第三建筑公司总部大楼的网络建设需求,详细展示了如何通过多种先进技术(如VRRP、链路聚合、堆叠技术、VLAN、防火墙旁挂等)来构建一个高效、安全、稳定的网络环境。实验首先进行了详细的需求分析,明确了网络覆盖、性能、安全、管理、扩展、服务器和存储、终端设备等方面的需求,并制定了相应的项目交付要求和预算。随后,实验采用了多种网络技术来满足需求,包括虚拟路由冗余协议(VRRP)确保出口网关的高可用性,链路聚合技术(Eth-trunk)提升网络带宽和链路可靠性,堆叠技术用于核心交换机的冗余和扩展,VLAN技术用于划分不同部门的安全区域,防火墙旁挂系统通过双机热备技术确保网络安全防护的连续性。 + + 实验设计了详细的网络拓扑图,并通过设备连接表展示了各个设备之间的连接关系。核心交换机、路由器、防火墙、接入层交换机等设备的连接和配置都严格按照拓扑图进行。实验详细配置了核心交换机的堆叠系统、Eth-Trunk功能、VLAN功能等,确保核心层的高效管理和扩展性。通过堆叠技术,两台核心交换机在逻辑上形成一个设备,提升了网络的冗余性和可靠性。接入层的配置相对简单,主要涉及VLAN的划分和接入层交换机的配置,确保终端设备能够正确接入网络并实现部门间的隔离。出口网关的VRRP功能和防火墙的双机热备功能也得到配置,确保出口网关的高可用性和网络安全防护的连续性。此外,实验还配置了防火墙的安全策略,限制非工作时间的网络访问,并通过DHCP服务器为VLAN内的终端设备自动分配IP地址,同时配置了NAT功能,确保内网用户能够通过出口网关访问外网资源。 + + 实验通过多个阶段的验证,确保网络的各项功能正常运行。包括内网主机之间的通信、内网主机访问Web服务器、外网主机访问内网服务器、防火墙安全策略的验证、出口网关的双机热备验证等。 +] +== 心得感悟 +=== 组长的心得感悟 +#para[ + 本次实验自由度较大,时间跨度长,所以我选择了比较有挑战性的设计方案,也因此实现难度较大。在配置的过程中,遇到了很多困难,但也让我对网络设备的运行机制有了更深的理解。从需求分析到方案设计,再到设备配置和测试验收,每一个环节都需要严谨的态度和细致的操作。实验中的每一步配置都充满了挑战,尤其是在核心交换机的堆叠配置、防火墙的双机热备、NAT的配置等方面,我遇到了不少困难,但也因此积累了宝贵的实践经验。 + + 最“磨人”的当属防火墙配置问题。由于防火墙旁挂需要第二台防火墙,所以我们启用了全新的防火墙,又由于机柜上的防火墙的MGMT网口有些许破损,我们启用了2台新的防火墙,而这给我的调试带来了灾难性后果,即无论如何,配置均不生效。最后经教员指导排查,发现是防火墙未激活的问题。遂将防火墙搬到寝室内进行联网激活: + #figure(image("激活1.jpg",format: "jpg",width: 70%,fit:"stretch"),caption:"搬运防火墙") + #figure(image("激活2.jpg",format: "jpg",width: 70%,fit:"stretch"),caption:"激活防火墙") + + 在将防火墙联网激活之后,一切豁然开朗,之前的问题全数解决!这一过程虽然“磨人”,但也让我深刻体会到设备初始化与激活的重要性,以及在实际工程中细节决定成败的道理。 + +此外,实验还让我意识到网络安全的重要性。在防火墙策略的配置和端口安全的设置上,必须严格把控,确保网络的安全性和稳定性。通过本次实验,我不仅掌握了多种网络技术的应用,还学会了如何在工程中协调各方资源,确保项目的顺利实施。总的来说,本次实验极大地提升了我的网络工程能力,为我未来的职业发展奠定了坚实的基础。 + +] +=== 一把手的心得感悟 +#para[ + 完成这次组网实验是一次难忘的体验,在团队的共同努力下,我们成功完成了实验的各项任务。 + + 在实验中,我负责了出口路由器AR1、AR2的NAT地址转换配置。在该配置中,我们首先为内网办公区域配置了公网的动态地址池,当内网用户访问外网时,其内网地址将会转换为地址池中第一个空闲的公网地址,从而隐藏内网用户的IP地址。然后我们为内网的Web和FTP#footnote[最初的实验设计中,还包含实现一个FTP服务器。但由于时间限制,最终没有在服务器具体配置上实现,但保留了相应的特殊NAT转换规则。]服务器配置了静态的地址转换,使得外网用户能够通过预留的公网地址172.163.1.9和172.163.3.9访问内网的Web服务。 + + 通过与其他组员的密切合作,我们不仅顺利完成了任务,还在过程中学到了许多新的知识。大家在讨论和解决问题的过程中,彼此分享经验和观点,使得整个实验过程既高效又充实。 +] +=== 二把手的心得感悟 +#para[ + 本次实验收获颇丰。通过让交换机学习老板及老板助理PC的MAC地址,限制了其他设备的接入,成功完成了MAC端口安全的配置,有效的增强了网络的安全性和可控性。DHCP的配置实现了接入层IP地址的动态分配,让网络管理更为方便,大大减少了手动配置的工作量。在核心交换机与防火墙之间配置的STP成功消除了网络环路,保障了网络的稳定性,避免了因环路引发的广播风暴等问题。整个实验过程让我将理论知识与实践紧密结合,提升了网络工程实践能力,还增强了团队间的协作能力和问题解决能力。在面对复杂的网络配置问题时,我们能够共同探讨、分析并找到解决方案,这将对我们今后的学习和工作产生积极而深远的影响。 +] +#show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + // #counter(heading).display() + // #h(0.5em) + #it.body +] +#pagebreak() +#bibliography("ref.yml",full: true,title: "参考文献",style:"gb-7714-2015-numeric") + + +/* +根据这个网站的格式示范https://github.com/typst/hayagriva/blob/main/docs/file-format.md +为这个网页生成.yml文件 +https://blog.csdn.net/jxjdhdnd/article/details/138009187 +*/ \ No newline at end of file diff --git a/big1/dhcp_dns.jpg b/big1/dhcp_dns.jpg new file mode 100644 index 0000000..8902efb Binary files /dev/null and b/big1/dhcp_dns.jpg differ diff --git a/big1/disp_vlan.png b/big1/disp_vlan.png new file mode 100644 index 0000000..a1ac8ff Binary files /dev/null and b/big1/disp_vlan.png differ diff --git a/big1/dmz_untrust_after.png b/big1/dmz_untrust_after.png new file mode 100644 index 0000000..cb10a79 Binary files /dev/null and b/big1/dmz_untrust_after.png differ diff --git a/big1/dmz_untrust_before.png b/big1/dmz_untrust_before.png new file mode 100644 index 0000000..5be037b Binary files /dev/null and b/big1/dmz_untrust_before.png differ diff --git a/big1/dmz_untrust_ping.png b/big1/dmz_untrust_ping.png new file mode 100644 index 0000000..70e8234 Binary files /dev/null and b/big1/dmz_untrust_ping.png differ diff --git a/big1/do_not_play_policy.png b/big1/do_not_play_policy.png new file mode 100644 index 0000000..506ff04 Binary files /dev/null and b/big1/do_not_play_policy.png differ diff --git a/big1/fw1.zip b/big1/fw1.zip new file mode 100644 index 0000000..1ff1de0 Binary files /dev/null and b/big1/fw1.zip differ diff --git a/big1/fw2.zip b/big1/fw2.zip new file mode 100644 index 0000000..1f6ebc7 Binary files /dev/null and b/big1/fw2.zip differ diff --git a/big1/labtemplate.typ b/big1/labtemplate.typ new file mode 100644 index 0000000..29c38f0 --- /dev/null +++ b/big1/labtemplate.typ @@ -0,0 +1,161 @@ +#let times = "Times LT Pro" +#let times = "Times New Roman" +#let song = (times, "FZShuSong-Z01") +#let hei = (times, "FZHei-B01") +#let kai = (times, "FZKai-Z03") +#let xbsong = (times, "FZXiaoBiaoSong-B05") +#let fsong = (times, "FangSong_GB2312") +#let code = (times, "DejaVu Sans Mono") +#let nudtlabpaper(title: "", + author1: "", + id1: "", + author2: "", + id2: "", + author3: "", + id3: "", + advisor: "", + jobtitle: "", + lab: "", + date: "", + header_str: "", + body) = { + // Set the document's basic properties. + set document(author: author1, title: title) + set page( + + margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm), + ) + + // Title row. + v(158pt) + align(center)[ + #block(text(weight: 700, size: 30pt, font: hei, tracking: 15pt, "网络工程")) + ] + align(center)[ + #block(text(weight: 700, size: 30pt, font: song, tracking: 15pt, "本科实验报告")) + ] + + v(103pt) + pad( + left: 1em, + right: 1em, + grid( + columns: (80pt, 1fr), + rows: (17pt, auto), + text(weight: 700, size: 16pt, font: song, "实验名称:"), + align(center, text(weight: "regular", size: 16pt, font: song, title)), + text(""), + line(length: 100%) + ) + // #block(text(weight: 700, 1.75em, title)) + // underline(text(weight: 700, size: 16pt, font: song, title)) + ) + + // Author information. + + v(62.5pt) + + grid( + columns: (0.25fr, 0.25fr, 0.25fr, 0.25fr), + rows: (20pt, 8pt, 20pt, 8pt, 20pt, 8pt, 20pt, 12pt), + text(size: 14pt, font: song, tracking: 9pt, "学员姓名"), + align(center, text(size: 14pt, font: song, author1)), + text(size: 14pt, font: song, tracking: 54pt, "学号"), + align(center, text(size: 14pt, font: times, id1)), + text(""), + line(length: 100%), + text(""), + line(length: 100%), + text(size: 14pt, font: song, tracking: 9pt, "学员姓名"), + align(center, text(size: 14pt, font: song, author2)), + text(size: 14pt, font: song, tracking: 54pt, "学号"), + align(center, text(size: 14pt, font: times, id2)), + text(""), + line(length: 100%), + text(""), + line(length: 100%), + text(size: 14pt, font: song, tracking: 9pt, "学员姓名"), + align(center, text(size: 14pt, font: song, author3)), + text(size: 14pt, font: song, tracking: 54pt, "学号"), + align(center, text(size: 14pt, font: times, id3)), + text(""), + line(length: 100%), + text(""), + line(length: 100%), + text(size: 14pt, font: song, tracking: 9pt, "指导教员"), + align(center, text(size: 14pt, font: song, advisor)), + text(size: 14pt, font: song, tracking: 54pt, "职称"), + align(center, text(size: 14pt, font: song, jobtitle)), + text(""), + line(length: 100%), + text(""), + line(length: 100%), + text(size: 14pt, font: song, tracking: 9pt, "实验室"), + align(center, text(size: 14pt, font: song, lab)), + text(size: 14pt, font: song, tracking: 9pt, "实验时间"), + align(center, text(size: 14pt, font: song, date)), + text(""), + line(length: 100%), + text(""), + line(length: 100%), + ) + + v(50.5pt) + align(center, text(font: hei, size: 15pt, "国防科技大学教育训练部制")) + + pagebreak() + + set page( + margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm), + numbering: "i", + number-align: center, + ) + + v(14pt) + align(center)[ + #block(text(font: hei, size: 14pt, "《本科实验报告》填写说明")) + ] + + v(14pt) + text("") + par(first-line-indent: 2em, text(font: song, size: 12pt, "实验报告内容编排应符合以下要求:")) + + par(first-line-indent: 2em, text(font: fsong, size: 12pt, "(1)采用A4(21cm×29.7cm)白色复印纸,单面黑字。上下左右各侧的页边距均为3cm;缺省文档网格:字号为小4号,中文为宋体,英文和阿拉伯数字为Times New Roman,每页30行,每行36字;页脚距边界为2.5cm,页码置于页脚、居中,采用小5号阿拉伯数字从1开始连续编排,封面不编页码。")) + + par(first-line-indent: 2em, text(font: fsong, size: 12pt, "(2)报告正文最多可设四级标题,字体均为黑体,第一级标题字号为4号,其余各级标题为小4号;标题序号第一级用“一、”、“二、”……,第二级用“(一)”、“(二)” ……,第三级用“1.”、“2.” ……,第四级用“(1)”、“(2)” ……,分别按序连续编排。")) + + par(first-line-indent: 2em, text(font: fsong, size: 12pt, "(3)正文插图、表格中的文字字号均为5号。")) + + pagebreak() + + set page( + margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm), + numbering: "1", + number-align: center, + ) + + set heading(numbering: "1.1") + // set text(font: hei, lang: "zh") + + show heading: it => box(width: 100%)[ + #v(0.50em) + #set text(font: hei) + #counter(heading).display() + // #h(0.5em) + #it.body + ] + // Main body. + set par(justify: true) + + body +} + +#let para(t) = par(first-line-indent: 2em, text(font: song, size: 10.5pt, t)) +#let subpara(t) = par(first-line-indent: 2em, text(font: song, size: 10pt, t)) +#let cb(t) = block( + text(font: ("Consolas","FangSong_GB2312"), t), + fill: luma(240), + inset: 1pt, + radius: 4pt, + // width: 100%, +) \ No newline at end of file diff --git a/big1/log.md b/big1/log.md new file mode 100644 index 0000000..c7fffc0 --- /dev/null +++ b/big1/log.md @@ -0,0 +1,135 @@ +完善拓扑表,为接口分配ip地址(如需要)。局域网采用192.168网段。 +根据您的要求,我为各设备分配了IP地址,并在拓扑表中相应位置填写。以下是详细修改后的内容: + +--- + +### **IP地址规划** +- **局域网网段**:`192.168.0.0/16` +- **VLAN10(192.168.10.0/24)**:用于PC1、PC2。 +- **VLAN20(192.168.20.0/24)**:用于Asso、Boss。 +- **DMZ区(192.168.30.0/24)**:用于WebServer、DataServer。 +- **PC5网络(192.168.40.0/24)**:AR4通过DHCP为PC5分配IP地址。 +- **核心层、汇聚层和防火墙设备**:分配静态IP地址。 +- **VRRP 虚拟 IP 地址**:用于 AR1 和 AR2。 + +--- + +### **更新后的拓扑表** + +| 区域 | 分层 | 安全区域 | 设备 | 接口1 | 对方设备 | 接口2 | IP地址 | 链路聚合id | 机上聚合接口 | 备注 | +|------------------|---------|------------|------------|-------------|--------------|-------------|------------------|-----------|---------------|----------------------------| +| 公司大楼 | 核心层 | trust | AR1 | g0/0/0 | AR2 | g0/0/0 | 192.168.1.1 | 1 | Eth-trunk1 | 用于与AR2组建VRRP | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/1 | AR2 | g0/0/1 | 192.168.1.2 | 1 | Eth-trunk1 | 用于与AR2组建VRRP | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/2 | AR3 | g0/0/0 | 192.168.2.1 | | | | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/3 | AR4 | g0/0/0 | 192.168.3.1 | | | | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/4 | LSW1 | g0/0/3 | | 2 | Eth-trunk2 | 用聚合链路连接堆叠系统 | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/5 | LSW2 | g0/0/3 | | 2 | Eth-trunk2 | 用聚合链路连接堆叠系统 | +| 公司大楼 | 核心层 | trust | AR1 | g0/0/6 | FW1 | g0/0/0 | 192.168.4.1 | | | 出口防火墙旁挂-外侧 | +| 公司大楼 | 核心层 | trust | AR2 | g0/0/0 | AR1 | g0/0/0 | 192.168.1.3 | 1 | Eth-trunk1 | 用于与AR1组建VRRP | +| 公司大楼 | 核心层 | trust | AR2 | g0/0/4 | LSW1 | g0/0/4 | | 4 | Eth-trunk2 | 用聚合链路连接堆叠系统 | +| 公司大楼 | 汇聚层 | trust | LSW1 | vlanif10 | | | 192.168.10.1 | | | VLAN10的网关 | +| 公司大楼 | 汇聚层 | trust | LSW1 | vlanif20 | | | 192.168.20.1 | | | VLAN20的网关 | +| 公司大楼 | 汇聚层 | trust | LSW1 | g0/0/7 | WebServer | 不分接口 | 192.168.30.10 | | | DMZ区Web服务器 | +| 公司大楼 | 汇聚层 | trust | LSW2 | g0/0/5 | DataServer | 不分接口 | 192.168.30.20 | | | DMZ区Data服务器 | +| 公司大楼 | 接入层 | trust | LSW3 | g0/0/1 | PC1 | 3号口 | DHCP | | | VLAN10 | +| 公司大楼 | 接入层 | trust | LSW3 | g0/0/2 | PC2 | 8号口 | DHCP | | | VLAN10 | +| 公司大楼 | 接入层 | trust | LSW4 | g0/0/1 | Asso | 2号口 | DHCP | | | VLAN20 | +| 公司大楼 | 接入层 | trust | LSW4 | g0/0/2 | Boss | 6号口 | DHCP | | | VLAN20 | +| 分公司办公室 | 核心层 | trust | AR4 | g0/0/2 | PC5 | 1号口 | DHCP | | | AR4为PC5提供DHCP服务 | + +--- + +### **DHCP 配置建议** +1. **在LSW1上配置VLAN10和VLAN20的DHCP池**: + ```text + ip pool vlan10 + network 192.168.10.0 mask 255.255.255.0 + gateway-list 192.168.10.1 + dns-list 8.8.8.8 + ip pool vlan20 + network 192.168.20.0 mask 255.255.255.0 + gateway-list 192.168.20.1 + dns-list 8.8.8.8 + ``` + +2. **AR4配置为PC5提供DHCP服务**: + ```text + ip pool pc5_pool + network 192.168.40.0 mask 255.255.255.0 + gateway-list 192.168.40.1 + dns-list 8.8.8.8 + interface g0/0/2 + dhcp select global + ``` + +--- + +### **总结** +- **PC1、PC2、Asso、Boss 和 PC5** 可自动获取IP地址(即插即用)。 +- **WebServer 和 DataServer** 配置静态IP地址,并位于DMZ区。 +- 核心层和汇聚层的设备均使用静态IP地址,确保网络稳定性。 +- DHCP服务在LSW1和AR4上进行配置。 + +如果有其他细节需要完善,欢迎继续讨论! + +--- + +根据思考过程,以下是为网络设备整理的IP地址分配和配置: + +### IP地址分配 + +#### VLAN分配: +- **VLAN10**:192.168.10.0/24(PC1、PC2、PC5) +- **VLAN20**:192.168.20.0/24(Asso、Boss) +- **VLAN30**:192.168.30.0/24(服务器、Web服务器、数据服务器) +- **VLAN40**:192.168.40.0/24(无线、AP1) + +#### 设备接口分配: + +1. **LSW1(与LSW2堆叠)**: + - **VLANIF10**:192.168.10.1 + - **VLANIF20**:192.168.20.1 + +2. **AR1**: + - **Eth-Trunk2**:192.168.3.1(连接到LSW1/LSW2) + - **Eth-Trunk1**:192.168.1.1(连接到AR2) + - **g0/0/2**:192.168.4.1(连接到AR3) + +3. **AR2**: + - **Eth-Trunk2**:192.168.3.2(连接到LSW1/LSW2) + - **Eth-Trunk1**:192.168.1.2(连接到AR1) + - **g0/0/2**:192.168.7.1(连接到AR4) + +4. **AR3**: + - **g0/0/0**:192.168.4.2(连接到AR1) + - **g0/0/1**:192.168.6.1(连接到外部路由器) + +5. **AR4**: + - **g0/0/0**:192.168.7.2(连接到AR2) + - **VLANIF10**:192.168.10.2(连接到PC5) + +6. **FW1和FW2**: + - 根据防火墙配置中的角色配置IP地址。 + +7. **服务器**: + - **Web服务器**:192.168.30.100(如果在dmz中) + - **数据服务器**:192.168.30.101(如果在dmz中) + +### DHCP配置 + +- **DHCP服务器**:AR1将作为VLAN10和VLAN20的DHCP服务器。 + - **VLAN10的地址池**:192.168.10.100 - 192.168.10.200 + - **VLAN20的地址池**:192.168.20.100 - 192.168.20.200 + +- **DHCP中继**: + - 在AR4的VLANIF10上配置DHCP中继,将请求转发到AR1的VLANIF10(192.168.10.1)。 + +### 路由配置 + +- 确保所有设备都有到彼此子网的路由。 +- AR1和AR2应有到VLAN10、VLAN20和外部网络子网的路由。 +- AR4应有到AR1的VLANIF10的路由,以便处理DHCP请求。 + +### 总结 + +此配置确保VLAN10和VLAN20中的PC可以通过DHCP自动获取IP地址,而服务器则使用静态IP地址以确保稳定性。AR4配置为将DHCP请求中继到AR1,从而在整个网络中保持一致的IP寻址方案。 \ No newline at end of file diff --git a/big1/ref.yml b/big1/ref.yml new file mode 100644 index 0000000..ce2a06a --- /dev/null +++ b/big1/ref.yml @@ -0,0 +1,131 @@ +haweiS5735SeriesSwitchesStacking1: + type: Web + title: S5735-L, S5735S-L, S5735S-L-M业务口堆叠支持情况 - S300, S500, S2700, S5700, S6700 V200R021C00, C01 配置指南-设备管理 - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1100212502/d9806384 + date: 2024-11-07 + +haweiS5735SeriesSwitchesStacking2: + type: Web + title: S5735-L, S5735S-L, S5735S-L-M业务口堆叠支持情况 - S300, S500, S2700, S5700, S6700 V200R021C00, C01 配置指南-设备管理 - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1100212502/493f7e15 + date: 2024-11-07 + +haweiWhatIsStacking: + type: Web + title: 什么是堆叠?为什么需要堆叠? - 华为 + author: 华为 + url: + value: https://info.support.huawei.com/info-finder/encyclopedia/zh/%E5%A0%86%E5%8F%A0.html + date: 2024-11-07 + +haweiEthernetTrunkEthTrunkETrunk: + type: Web + title: 网工最容易混淆的Ethernet、trunk、Eth-Trunk、E-Trunk,四者之间有什么区别?-云社区-华为云 + author: 华为云 + url: + value: https://bbs.huaweicloud.com/blogs/386900 + date: 2024-11-07 + +awesomeSelfhosted: + type: Web + title: awesome-selfhosted + author: 未知 + url: + value: https://awesome-selfhosted.net/ + date: 2024-11-07 + +haweiFirewallBypass: + type: Web + title: 防火墙旁挂 - S300, S500, S2700, S3700, S5700, S6700, S7700, S7900, S9700系列交换机 典型配置案例(V200) - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1000069491/e6367fb + date: 2024-11-07 + +haweiHuaweiSwitchPortCommands: + type: Web + title: 华为交换机查看端口相关信息常用命令_华为交换机查看端口状态命令-CSDN博客 + author: CSDN + url: + value: https://blog.csdn.net/zhongguoYPT/article/details/130771351 + date: 2024-11-07 + +haweiHuaweiDeviceStackingCommands: + type: Web + title: 华为设备堆叠配置命令(查看华为堆叠命令)-eolink官网 + author: eolink + url: + value: https://www.eolink.com/news/post/24989.html + date: 2024-11-07 + +haweiClusterStackingGeneralDeployment: + type: Web + title: 集群/堆叠通用部署 - S300, S500, S2700, S3700, S5700, S6700, S7700, S7900, S9700系列交换机 典型配置案例(V200) - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1000069491/4af18100#ZH-CN_TOPIC_0177315553 + date: 2024-11-07 + +haweiExportNetworkDesign: + type: Web + title: 出口网络设计 - 云园区网络解决方案 V100R022C00 大中型园区网络设计与部署指南(虚拟化场景) - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1100278208/4d9ef478 + date: 2024-11-07 + +haweiClearStackingConfiguration: + type: Web + title: 清除堆叠配置 - S1720, S2700, S3700, S5700, S6700, S7700, S7900, S9700系列交换机 常用操作指南(V200) - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1000057409?section=j00l + date: 2024-11-07 + +haweiAddAndRemoveStackingMemberPorts: + type: Web + title: 添加和删除堆叠成员端口 - CloudEngine S5700, S6700 V600R022C10 配置指南-虚拟化 - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1100302422/cbd1d1a0 + date: 2024-11-07 + +haweiConfigureTelnetLogin: + type: Web + title: 配置通过Telnet登录设备 - 配置通过Telnet登录设备 - S300, S500, S2700, S5700, S6700 V200R022C00 配置指南-基础配置 - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1100277061/b3180b88 + date: 2024-11-07 + +haweiOneWayPingProblem: + type: Web + title: 单向能ping通,反向不通故障解决过程_单向ping通 反向不通-CSDN博客 + author: CSDN + url: + value: https://blog.csdn.net/wj31932/article/details/89634302 + date: 2024-11-07 + +haweiPacketCapture: + type: Web + title: 抓包 - HUAWEI USG6000E, USG6000, USG9500, NGFW Module V500, V600 维护宝典 - 华为 + author: 华为 + url: + value: https://support.huawei.com/enterprise/zh/doc/EDOC1000160160/6ebae75f + date: 2024-11-07 + +haweiHuaweiFirewallVRRP: + type: Web + title: 华为防火墙VRRP双机热备的原理及配置详解_51CTO博客_华为防火墙双机热备 + author: 51CTO + url: + value: https://blog.51cto.com/u_14154700/2427616 + date: 2024-11-07 + +haweiUSG6310PingIssue: + type: Web + title: USG6310 PC能ping通防火墙,防火墙无法ping通PC \ No newline at end of file diff --git a/big1/temp.md b/big1/temp.md new file mode 100644 index 0000000..aee4be7 --- /dev/null +++ b/big1/temp.md @@ -0,0 +1,975 @@ +按照【示例】中的文本格式,按照《网络工程需求分析报告大纲》,把此大纲撰写为需求分析报告。报告用词用语要准确、符合商务标准。其中的文本应该是一个个自然段组成的,而不能使用阿拉伯数字标号一句话一个关键词一行。用“== <一级标题内容>”来表示一级标题,“= <二级标题内容>”来表示二级标题,以此类推。每个自然段用“para[<自然段内容>]”包裹起来。最后,你需要输出整个报告文本。 +【示例】 +== 项目背景 +para[ + 我司目前正在规划公司总部大楼的网络基础设施,旨在建立一个高效、安全、稳定的网络环境,支持公司日常办公、项目管理、数据存储及未来业务扩展需求。由于公司对网络设备和技术了解有限,特委托第三组网络工程基础设施公司进行网络规划、设计、实施及维护。 +] + == 项目目标 +para[ + 建立一个覆盖公司总部大楼和分公司办公室的网络系统,确保所有员工能够顺畅访问内部资源和外部互联网。提供安全、可靠的网络环境,保护公司数据免受外部威胁。确保网络具备良好的扩展性,能够支持未来业务增长和技术升级。 +] +== 需求详述 +=== 网络覆盖需求 +para[ + 公司总部大楼中,网络需覆盖所有办公区域、会议室、服务器机房及公共区域。分公司办公室内,分公司办公室需与总部网络互联,确保分公司员工能够访问总部资源。此外,需在公司大楼内提供无线网络覆盖,支持员工移动办公和访客接入。 +] + + +网络工程需求分析报告大纲 + +项目名称: 第三组建筑公司本部大楼网络工程项目 +客户单位: 第三组建筑公司 +承建单位: 第三组网络工程基础设施公司 +日期: 2023年10月 + +--- + +1. 引言 + +1.1 编写目的 +本需求分析报告旨在明确第三组建筑公司本部大楼网络工程项目的需求,确保客户与承建单位对项目的设计、建设、性能需求等有共同的理解,并为后续的网络规划、设计、实施及维护提供依据。 + +1.2 参考资料 +- 客户提供的项目背景及需求文档 +- 相关网络工程标准与规范 +- 行业最佳实践与案例参考 + +1.3 术语定义 +- VRRP: 虚拟路由冗余协议,用于实现网关冗余,确保网络的高可用性 +- 堆叠: 通过将多台交换机逻辑上合并为一台设备,提高网络的可管理性和扩展性 +- 双机热备: 通过两台设备互为备份,确保在单点故障时系统仍能正常运行 +- 链路聚合: 将多条物理链路捆绑为一条逻辑链路,提高带宽和链路可靠性 + +--- + +2. 概述 + +2.1 项目描述 +第三组建筑公司正在规划其总部大楼的网络基础设施,旨在建立一个高效、安全、稳定的网络环境,支持公司日常办公、项目管理、数据存储及未来业务扩展需求。项目包括有线、无线网络覆盖、网络安全、网络管理、服务器与存储需求等。 + +2.2 项目功能 +- 提供内部网络服务(如文件共享、数据库访问、视频会议等) +- 提供外部互联网访问 +- 提供无线网络覆盖,支持移动办公和访客接入 +- 提供网络安全防护,确保数据安全 +- 提供公网Web服务器,支持外部访问 +- 提供网络管理功能,支持集中管理与监控 + +2.3 实现语言 +- 网络设备配置语言(如华为VRP等) +- 网络管理软件(如Huawei Web端管理) + +2.4 客户特点 +- 公司总部大楼内网络覆盖需求广泛,包括办公区、会议室、服务器机房等 +- 对网络安全要求较高,需保护敏感数据 +- 网络需具备良好的扩展性,支持未来业务增长 +- 需提供无线网络覆盖,支持移动办公和访客接入 + +2.5 一般约束 +- 项目预算需在合理范围内 +- 项目需在合同签订后3个月内完成 +- 网络设计需考虑未来技术升级与扩展 + +--- + +3. 详细需求 + +3.1 功能需求 + +3.1.1 引言 +网络需支持公司日常办公、项目管理、数据存储及未来业务扩展需求,确保所有员工能够顺畅访问内部资源和外部互联网。 + +3.1.2 内部网功能类型 +- 文件共享 +- 数据库访问 +- 视频会议 +- 项目管理 +- 数据备份与恢复 + +3.1.3 外部网功能类型 +- 互联网访问 +- 公网Web服务器 + +3.2 网络基本构造需求 + +3.2.1 拓扑结构需求 +- 采用三层网络结构(接入层、汇聚层、核心层) +- 支持VLAN划分,确保不同部门之间的网络流量隔离 +- 支持无线网络覆盖,确保移动办公和访客接入 + +3.2.2 网络节点需求 +- 网络节点需覆盖所有办公区域、会议室、服务器机房及公共区域 +- 网络设备(如交换机、路由器)需满足高性能需求 +- 终端设备(如PC、打印机、投影仪)需能够接入网络 + +3.2.3 网络链路需求 +- 主干链路采用光纤,确保高速数据传输 +- 无线网络需支持高带宽应用(如视频会议) +- 网络链路需具备良好的扩展性,支持未来带宽需求 + +3.3 网络性能需求 +- 网络需支持高速数据传输,确保员工能够高效访问内部服务器和外部互联网 +- 网络带宽需满足视频会议、文件传输等高带宽应用需求 +- 网络延迟需控制在合理范围内,确保用户体验 + +3.4 网络安全需求 +- 部署防火墙,保护公司网络免受外部攻击 +- 不同部门之间的网络流量需进行隔离,确保敏感数据的安全性 +- 需记录网络日志,便于故障排查和安全审计 + +3.5 网络管理需求 +- 所有网络设备需支持集中管理,方便网络管理员进行配置和监控 +- 网络设备需记录日志,便于故障排查和安全审计 +- 网络管理员需能够远程访问和管理网络设备 + +3.6 网络扩展需求 +- 网络需预留足够的端口和带宽,以便未来增加新的设备或用户 +- 网络设计需考虑到未来的技术升级,确保能够支持新的网络协议和设备 + +3.7 服务器和存储需求 +- 需为公司的Web服务器和数据库服务器提供稳定的网络连接 +- 需确保重要数据的定期备份和快速恢复能力 + +3.8 终端设备需求 +- 所有员工的电脑、打印机等设备需能够接入网络 +- 会议室内的投影仪、视频会议设备等也需接入网络,确保会议和协作的顺利进行 + +--- + +4. 支持信息 + +4.1 目次和索引 +- 项目背景 +- 项目目标 +- 需求详述 +- 项目交付要求 +- 预算要求 +- 其他要求 + +4.2 附录 +- 网络拓扑图 +- 设备配置文档 +- 操作手册 +- 项目进度表 + +--- + +5. 项目交付要求 +- 完整的网络拓扑设计及实施方案 +- 所有网络设备的安装、配置及调试 +- 网络安全策略的部署及测试 +- 网络管理系统的部署及培训 +- 项目文档(包括网络拓扑图、设备配置文档、操作手册等) +- 项目需在合同签订后3个月内完成,包括设计、采购、安装、调试及测试 + +--- + +6. 预算要求 +- 项目预算需在合理范围内,具体金额可根据设计方案进行调整 +- 确保在满足需求的同时控制成本,提供性价比高的解决方案 + +--- + +7. 其他要求 + +7.1 培训需求 +- 项目实施完成后,需为客户IT团队提供相关设备的操作和维护培训,确保其能够独立进行日常管理和故障排查 + +7.2 售后服务 +- 需提供至少1年的免费售后服务,包括设备维护、故障排查及技术支持 +- 需提供7x24小时的技术支持热线,确保在出现紧急问题时能够及时响应 + + +感谢您的详细说明!根据拓扑表中的信息,特别是“机上聚合接口”列中的 `CORE-x` 表示核心堆叠中的 `Eth-x` 接口,我们可以重新整理并替换教程中的配置。以下是修正后的配置: + +--- + +配置 CORE 的 Eth-Trunk 功能和接口 IP 地址 + + ++ 创建 Eth-Trunk1,用于连接 AR1,并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 1 +[CORE-Eth-Trunk1] mode lacp +[CORE-Eth-Trunk1] quit +[CORE] interface GigabitEthernet 0/0/3 +[CORE-GigabitEthernet0/0/3] Eth-Trunk 1 +[CORE-GigabitEthernet0/0/3] quit +[CORE] interface GigabitEthernet 1/0/3 +[CORE-GigabitEthernet1/0/3] Eth-Trunk 1 +[CORE-GigabitEthernet1/0/3] quit +``` ++ 创建 Eth-Trunk2,用于连接 AR2,并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 2 +[CORE-Eth-Trunk2] mode lacp +[CORE-Eth-Trunk2] quit +[CORE] interface GigabitEthernet 0/0/4 +[CORE-GigabitEthernet0/0/4] Eth-Trunk 2 +[CORE-GigabitEthernet0/0/4] quit +[CORE] interface GigabitEthernet 1/0/4 +[CORE-GigabitEthernet1/0/4] Eth-Trunk 2 +[CORE-GigabitEthernet1/0/4] quit +``` ++ 创建 Eth-Trunk3,用于连接 FW1(外侧),并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 3 +[CORE-Eth-Trunk3] mode lacp +[CORE-Eth-Trunk3] quit +[CORE] interface GigabitEthernet 0/0/8 +[CORE-GigabitEthernet0/0/8] Eth-Trunk 3 +[CORE-GigabitEthernet0/0/8] quit +[CORE] interface GigabitEthernet 1/0/8 +[CORE-GigabitEthernet1/0/8] Eth-Trunk 3 +[CORE-GigabitEthernet1/0/8] quit +``` ++ 创建 Eth-Trunk4,用于连接 FW1(内侧),并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 4 +[CORE-Eth-Trunk4] mode lacp +[CORE-Eth-Trunk4] quit +[CORE] interface GigabitEthernet 0/0/9 +[CORE-GigabitEthernet0/0/9] Eth-Trunk 4 +[CORE-GigabitEthernet0/0/9] quit +[CORE] interface GigabitEthernet 1/0/9 +[CORE-GigabitEthernet1/0/9] Eth-Trunk 4 +[CORE-GigabitEthernet1/0/9] quit +``` ++ 创建 Eth-Trunk5,用于连接 FW2(外侧),并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 5 +[CORE-Eth-Trunk5] mode lacp +[CORE-Eth-Trunk5] quit +[CORE] interface GigabitEthernet 0/0/10 +[CORE-GigabitEthernet0/0/10] Eth-Trunk 5 +[CORE-GigabitEthernet0/0/10] quit +[CORE] interface GigabitEthernet 1/0/10 +[CORE-GigabitEthernet1/0/10] Eth-Trunk 5 +[CORE-GigabitEthernet1/0/10] quit +``` ++ 创建 Eth-Trunk6,用于连接 FW2(内侧),并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 6 +[CORE-Eth-Trunk6] mode lacp +[CORE-Eth-Trunk6] quit +[CORE] interface GigabitEthernet 0/0/11 +[CORE-GigabitEthernet0/0/11] Eth-Trunk 6 +[CORE-GigabitEthernet0/0/11] quit +[CORE] interface GigabitEthernet 1/0/11 +[CORE-GigabitEthernet1/0/11] Eth-Trunk 6 +[CORE-GigabitEthernet1/0/11] quit +``` ++ 创建 Eth-Trunk7,用于连接 LSW5,并加入 Eth-Trunk 成员接口。 +``` +[CORE] interface Eth-Trunk 7 +[CORE-Eth-Trunk7] mode lacp +[CORE-Eth-Trunk7] quit +[CORE] interface GigabitEthernet 0/0/5 +[CORE-GigabitEthernet0/0/5] Eth-Trunk 7 +[CORE-GigabitEthernet0/0/5] quit +[CORE] interface GigabitEthernet 1/0/5 +[CORE-GigabitEthernet1/0/5] Eth-Trunk 7 +[CORE-GigabitEthernet1/0/5] quit +``` + +在 CORE 设备上创建 VLANIF 并配置 IP 地址 + + ++ 创建 VLAN 并配置 VLANIF 接口。 +``` +[CORE] vlan batch 10 20 30 110 120 130 +[CORE] interface Vlanif 10 +[CORE-Vlanif10] ip address 192.168.10.1 24 +[CORE-Vlanif10] quit + +[CORE] interface Vlanif 20 +[CORE-Vlanif20] ip address 192.168.20.1 24 +[CORE-Vlanif20] quit + +[CORE] interface Vlanif 30 +[CORE-Vlanif30] ip address 192.168.30.1 24 +[CORE-Vlanif30] quit + +[CORE] interface Vlanif 110 +[CORE-Vlanif110] ip address 192.168.110.1 24 +[CORE-Vlanif110] quit + +[CORE] interface Vlanif 120 +[CORE-Vlanif120] ip address 192.168.120.1 24 +[CORE-Vlanif120] quit + +[CORE] interface Vlanif 130 +[CORE-Vlanif130] ip address 192.168.130.1 24 +[CORE-Vlanif130] quit +``` + ++ 配置 Eth-Trunk 的 VLAN 允许列表 + - 配置 Eth-Trunk1 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 1 + [CORE-Eth-Trunk1] port link-type trunk + [CORE-Eth-Trunk1] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk1] quit + ``` + - 配置 Eth-Trunk2 允许 VLAN10。 + ``` + [CORE] interface Eth-Trunk 2 + [CORE-Eth-Trunk2] port link-type trunk + [CORE-Eth-Trunk2] port trunk allow-pass vlan 10 + [CORE-Eth-Trunk2] quit + ``` + - 配置 Eth-Trunk3 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 3 + [CORE-Eth-Trunk3] port link-type trunk + [CORE-Eth-Trunk3] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk3] quit + ``` + - 配置 Eth-Trunk4 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 4 + [CORE-Eth-Trunk4] port link-type trunk + [CORE-Eth-Trunk4] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk4] quit + ``` + - 配置 Eth-Trunk5 允许 VLAN20。 + ``` + [CORE] interface Eth-Trunk 5 + [CORE-Eth-Trunk5] port link-type trunk + [CORE-Eth-Trunk5] port trunk allow-pass vlan 20 + [CORE-Eth-Trunk5] quit + ``` + - 配置 Eth-Trunk6 允许 VLAN30。 + ``` + [CORE] interface Eth-Trunk 6 + [CORE-Eth-Trunk6] port link-type trunk + [CORE-Eth-Trunk6] port trunk allow-pass vlan 30 + [CORE-Eth-Trunk6] quit + ``` + - 配置 Eth-Trunk7 允许 VLAN130。 + ``` + [CORE] interface Eth-Trunk 7 + [CORE-Eth-Trunk7] port link-type trunk + [CORE-Eth-Trunk7] port trunk allow-pass vlan 130 + [CORE-Eth-Trunk7] quit + ``` + + +这是一段普通的文本。 + +

这是红色的文本。

+ +

这是蓝色的文本。

+ +

这是绿色的文本。

+ +这是一段普通的文本。 + + + + + + + +感谢您的详细说明!根据拓扑表中的信息,特别是设备名称和接口的对应关系,我们可以重新整理并替换教程中的配置。以下是修正后的配置: + +--- + + 配置 AR1 和 AR2 的 Eth-Trunk 功能和接口 IP 地址 + ++ 在 AR1 上创建 Eth-Trunk2,并加入成员接口。 + +```plaintext + system-view +[HUAWEI] sysname AR1 +[AR1] interface Eth-Trunk 2 +[AR1-Eth-Trunk2] undo portswitch +[AR1-Eth-Trunk2] mode lacp-static +[AR1-Eth-Trunk2] quit +[AR1] interface GigabitEthernet 0/0/4 // 连接到 CORE 的 Eth-Trunk2 +[AR1-GigabitEthernet0/0/4] Eth-Trunk 2 +[AR1-GigabitEthernet0/0/4] quit +[AR1] interface GigabitEthernet 0/0/5 // 连接到 CORE 的 Eth-Trunk2 +[AR1-GigabitEthernet0/0/5] Eth-Trunk 2 +[AR1-GigabitEthernet0/0/5] quit +``` + ++ 在 AR1 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + +```plaintext +[AR1] interface Eth-Trunk 2.10 +[AR1-Eth-Trunk2.10] ip address 192.168.10.2 24 +[AR1-Eth-Trunk2.10] dot1q termination vid 10 +[AR1-Eth-Trunk2.10] quit +``` + +--- + ++ 在 AR2 上创建 Eth-Trunk4,并加入成员接口。 + +```plaintext + system-view +[HUAWEI] sysname AR2 +[AR2] interface Eth-Trunk 4 +[AR2-Eth-Trunk4] undo portswitch +[AR2-Eth-Trunk4] mode lacp-static +[AR2-Eth-Trunk4] quit +[AR2] interface GigabitEthernet 0/0/4 // 连接到 CORE 的 Eth-Trunk4 +[AR2-GigabitEthernet0/0/4] Eth-Trunk 4 +[AR2-GigabitEthernet0/0/4] quit +[AR2] interface GigabitEthernet 0/0/5 // 连接到 CORE 的 Eth-Trunk4 +[AR2-GigabitEthernet0/0/5] Eth-Trunk 4 +[AR2-GigabitEthernet0/0/5] quit +``` + ++ 在 AR2 上配置 Dot1q 终结子接口及 IP 地址,并终结 VLAN10。 + +```plaintext +[AR2] interface Eth-Trunk 4.10 +[AR2-Eth-Trunk4.10] ip address 192.168.10.3 24 +[AR2-Eth-Trunk4.10] dot1q termination vid 10 +[AR2-Eth-Trunk4.10] quit +``` + + + +根据拓扑表中的信息,特别是设备名称和接口的对应关系,我们可以重新整理并替换教程中的配置。以下是修正后的配置: + +--- + + 配置 AR1 和 AR2 的路由 +1. 在 AR1 上配置 OSPF。 + +```plaintext +[AR1] ospf 100 router-id 1.1.1.1 +[AR1-ospf-100] area 0 +[AR1-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 +[AR1-ospf-100-area-0.0.0.0] quit +[AR1-ospf-100] quit +``` + + 2. 在 AR2 上配置 OSPF。 + +```plaintext +[AR2] ospf 100 router-id 2.2.2.2 +[AR2-ospf-100] area 0 +[AR2-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 CORE 的网段发布到 OSPF 中 +[AR2-ospf-100-area-0.0.0.0] quit +[AR2-ospf-100] quit +``` + +--- + + 总结: +1. AR1 配置: + - 配置 OSPF 进程 100,Router ID 为 `1.1.1.1`。 + - 在 OSPF Area 0 中发布网段 `192.168.10.0/24`(连接 CORE 的网段)。 + +2. AR2 配置: + - 配置 OSPF 进程 100,Router ID 为 `2.2.2.2`。 + - 在 OSPF Area 0 中发布网段 `192.168.10.0/24`(连接 CORE 的网段)。 + +--- + + 补充说明: +- 设备名称:根据拓扑表,将 RouterA 和 RouterB 替换为 AR1 和 AR2。 +- 网段替换:根据拓扑表中的 IP 地址信息,将 `10.10.4.0/24` 替换为 `192.168.10.0/24`,这是 AR1 和 AR2 连接 CORE 的网段。 +- Router ID:为 AR1 和 AR2 分别配置了唯一的 Router ID(`1.1.1.1` 和 `2.2.2.2`)。 + +希望这次的配置符合您的需求!如果还有其他问题,请随时告知。 + + + + + + +根据拓扑表中的信息,特别是设备名称和接口的对应关系,我们可以重新整理并替换教程中的配置。以下是修正后的配置,并补充了 FW2 的静态路由配置: + +--- + + 在 FW1 和 FW2 上配置静态路由 + ++ 在 FW1 上配置静态路由。 + + ```plaintext + [FW1] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW1] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW1] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` + ++ 在 FW2 上配置静态路由。 + + ```plaintext + [FW2] ip route-static 0.0.0.0 0.0.0.0 192.168.20.1 // 对于上行流量,缺省路由下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 + [FW2] ip route-static 192.168.110.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN110 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.120.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN120 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + [FW2] ip route-static 192.168.130.0 255.255.255.0 192.168.30.1 // 对于下行流量,目的地址为 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 + ``` + +--- + + 总结: +1. FW1 配置: + - 配置缺省路由,下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 `192.168.20.1`。 + - 配置静态路由,目的地址为 VLAN110、VLAN120 和 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 `192.168.30.1`。 + +2. FW2 配置: + - 配置缺省路由,下一跳为 CORE 的 Public 接口 VLANIF20 的 IP 地址 `192.168.20.1`。 + - 配置静态路由,目的地址为 VLAN110、VLAN120 和 VLAN130 网络,下一跳为 CORE 的 Private 接口 VLANIF30 的 IP 地址 `192.168.30.1`。 + +--- + + 补充说明: +- 设备名称:根据拓扑表,将 FWA 和 FWB 替换为 FW1 和 FW2。 +- IP 地址替换:根据拓扑表中的 IP 地址信息,将 `10.10.2.1` 替换为 `192.168.20.1`(CORE 的 Public 接口 VLANIF20 的 IP 地址),将 `10.10.3.1` 替换为 `192.168.30.1`(CORE 的 Private 接口 VLANIF30 的 IP 地址)。 +- 目的网段:根据拓扑表中的 VLAN 信息,将 `10.10.50.0/24` 和 `10.10.60.0/24` 替换为 `192.168.110.0/24`、`192.168.120.0/24` 和 `192.168.130.0/24`(分别对应 VLAN110、VLAN120 和 VLAN130)。 + +希望这次的配置符合您的需求!如果还有其他问题,请随时告知。 + + + + +根据拓扑表中的信息,特别是设备名称和接口的对应关系,我们可以重新整理并替换教程中的配置。以下是修正后的配置: + +--- + + 配置 FW1 和 FW2 的接口与安全区域 + + 1. 在 FW1 上配置接口与安全区域。 + +```plaintext +[FW1] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) +[FW1-Eth-Trunk3] ip address 192.168.20.2 24 +[FW1-Eth-Trunk3] mode lacp-static +[FW1-Eth-Trunk3] quit +[FW1] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 +[FW1-GigabitEthernet0/0/0] Eth-Trunk 3 +[FW1-GigabitEthernet0/0/0] quit +[FW1] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 +[FW1-GigabitEthernet0/0/2] Eth-Trunk 3 +[FW1-GigabitEthernet0/0/2] quit + +[FW1] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) +[FW1-Eth-Trunk4] ip address 192.168.30.2 24 +[FW1-Eth-Trunk4] mode lacp-static +[FW1-Eth-Trunk4] quit +[FW1] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 +[FW1-GigabitEthernet0/0/1] Eth-Trunk 4 +[FW1-GigabitEthernet0/0/1] quit +[FW1] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 +[FW1-GigabitEthernet0/0/3] Eth-Trunk 4 +[FW1-GigabitEthernet0/0/3] quit + +[FW1] interface Eth-Trunk 1 // 配置 FW1 与 FW2 连接的接口 +[FW1-Eth-Trunk1] ip address 10.1.1.1 24 +[FW1-Eth-Trunk1] mode lacp-static +[FW1-Eth-Trunk1] quit +[FW1] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 +[FW1-GigabitEthernet0/0/4] Eth-Trunk 1 +[FW1-GigabitEthernet0/0/4] quit +[FW1] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 +[FW1-GigabitEthernet0/0/5] Eth-Trunk 1 +[FW1-GigabitEthernet0/0/5] quit + +[FW1] firewall zone trust +[FW1-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 +[FW1-zone-trust] quit + +[FW1] firewall zone untrust +[FW1-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 +[FW1-zone-untrust] quit + +[FW1] firewall zone dmz +[FW1-zone-dmz] add interface Eth-Trunk 1 // 将 FW1 与 FW2 之间的接口加入 DMZ 区域 +[FW1-zone-dmz] quit +``` + + 2. 在 FW2 上配置接口与安全区域。 + +```plaintext + system-view +[sysname] sysname FW2 +[FW2] interface Eth-Trunk 3 // 配置与 CORE 连接的接口及 IP 地址(外侧) +[FW2-Eth-Trunk3] ip address 192.168.20.3 24 +[FW2-Eth-Trunk3] mode lacp-static +[FW2-Eth-Trunk3] quit +[FW2] interface GigabitEthernet 0/0/0 // 在 Eth-Trunk3 中加入成员接口 +[FW2-GigabitEthernet0/0/0] Eth-Trunk 3 +[FW2-GigabitEthernet0/0/0] quit +[FW2] interface GigabitEthernet 0/0/2 // 在 Eth-Trunk3 中加入成员接口 +[FW2-GigabitEthernet0/0/2] Eth-Trunk 3 +[FW2-GigabitEthernet0/0/2] quit + +[FW2] interface Eth-Trunk 4 // 配置与 CORE 连接的接口及 IP 地址(内侧) +[FW2-Eth-Trunk4] ip address 192.168.30.3 24 +[FW2-Eth-Trunk4] mode lacp-static +[FW2-Eth-Trunk4] quit +[FW2] interface GigabitEthernet 0/0/1 // 在 Eth-Trunk4 中加入成员接口 +[FW2-GigabitEthernet0/0/1] Eth-Trunk 4 +[FW2-GigabitEthernet0/0/1] quit +[FW2] interface GigabitEthernet 0/0/3 // 在 Eth-Trunk4 中加入成员接口 +[FW2-GigabitEthernet0/0/3] Eth-Trunk 4 +[FW2-GigabitEthernet0/0/3] quit + +[FW2] interface Eth-Trunk 1 // 配置 FW2 与 FW1 连接的接口 +[FW2-Eth-Trunk1] ip address 10.1.1.2 24 +[FW2-Eth-Trunk1] mode lacp-static +[FW2-Eth-Trunk1] quit +[FW2] interface GigabitEthernet 0/0/4 // 在 Eth-Trunk1 中加入成员接口 +[FW2-GigabitEthernet0/0/4] Eth-Trunk 1 +[FW2-GigabitEthernet0/0/4] quit +[FW2] interface GigabitEthernet 0/0/5 // 在 Eth-Trunk1 中加入成员接口 +[FW2-GigabitEthernet0/0/5] Eth-Trunk 1 +[FW2-GigabitEthernet0/0/5] quit + +[FW2] firewall zone trust +[FW2-zone-trust] add interface Eth-Trunk 4 // 将连接内网的 Eth-Trunk4 加入安全区域 +[FW2-zone-trust] quit + +[FW2] firewall zone untrust +[FW2-zone-untrust] add interface Eth-Trunk 3 // 将连接外网的 Eth-Trunk3 加入非安全区域 +[FW2-zone-untrust] quit + +[FW2] firewall zone dmz +[FW2-zone-dmz] add interface Eth-Trunk 1 // 将 FW2 与 FW1 之间的接口加入 DMZ 区域 +[FW2-zone-dmz] quit +``` + +--- + + 总结: +1. FW1 配置: + - 配置 Eth-Trunk3 和 Eth-Trunk4,分别用于连接 CORE 的外侧和内侧接口。 + - 配置 Eth-Trunk1,用于连接 FW2。 + - 将 Eth-Trunk4 加入安全区域(trust),Eth-Trunk3 加入非安全区域(untrust),Eth-Trunk1 加入 DMZ 区域。 + +2. FW2 配置: + - 配置 Eth-Trunk3 和 Eth-Trunk4,分别用于连接 CORE 的外侧和内侧接口。 + - 配置 Eth-Trunk1,用于连接 FW1。 + - 将 Eth-Trunk4 加入安全区域(trust),Eth-Trunk3 加入非安全区域(untrust),Eth-Trunk1 加入 DMZ 区域。 + +--- + + 补充说明: +- 设备名称:根据拓扑表,将 FWA 和 FWB 替换为 FW1 和 FW2。 +- 接口替换:根据拓扑表中的信息,FW1 和 FW2 的接口分别连接到 CORE 的 Eth-Trunk3 和 Eth-Trunk4。 +- IP 地址替换:根据拓扑表中的 IP 地址信息,将 `10.10.2.2` 替换为 `192.168.20.2`,将 `10.10.3.2` 替换为 `192.168.30.2`,将 `10.10.2.3` 替换为 `192.168.20.3`,将 `10.10.3.3` 替换为 `192.168.30.3`。 + +希望这次的配置符合您的需求!如果还有其他问题,请随时告知。 + + + + + + + + +根据您的要求,我们将 VRF-A 实例替换为 Private 实例,并调整相关配置。以下是修正后的配置: + +--- + + 配置 CORE 的路由 + + 1. 在 CORE 上创建 VPN 实例 Public,将连接路由器的接口和连接防火墙上行口的接口绑定到 Public。 + +```plaintext +[CORE] ip vpn-instance Public // 创建 Public +[CORE-vpn-instance-Public] ipv4-family +[CORE-vpn-instance-Public-af-ipv4] route-distinguisher 100:2 +[CORE-vpn-instance-Public-af-ipv4] vpn-target 222:2 both +[CORE-vpn-instance-Public-af-ipv4] quit +[CORE-vpn-instance-Public] quit + +[CORE] interface Vlanif 10 +[CORE-Vlanif10] ip binding vpn-instance Public // 将 CORE 连接路由器的接口 VLANIF10 绑定至 Public +[CORE-Vlanif10] ip address 192.168.10.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif10] quit + +[CORE] interface Vlanif 20 +[CORE-Vlanif20] ip binding vpn-instance Public // 将 CORE 连接防火墙上行口的接口 VLANIF20 绑定至 Public +[CORE-Vlanif20] ip address 192.168.20.1 24 // 将接口绑定到 Public 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif20] quit +``` + + 2. 对于上行流量,在 Public 中配置静态路由,路由下一跳指向路由器 VRRP 虚拟 IP。 + +```plaintext +[CORE] ip route-static vpn-instance Public 0.0.0.0 0.0.0.0 192.168.10.100 // 缺省路由下一跳指向 VRRP 虚拟 IP +``` + + 3. 对于下行流量,在 Public 中配置静态路由,路由下一跳指向防火墙上行 VRRP 1 的虚拟 IP(VRID1)。 + +```plaintext +[CORE] ip route-static vpn-instance Public 192.168.110.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN110 网络,下一跳指向 FW1 的上行接口 +[CORE] ip route-static vpn-instance Public 192.168.120.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN120 网络,下一跳指向 FW1 的上行接口 +[CORE] ip route-static vpn-instance Public 192.168.130.0 255.255.255.0 192.168.20.2 // 目的地址为 VLAN130 网络,下一跳指向 FW1 的上行接口 +``` + + 4. 对于下行流量,在 CORE 与 AR1、AR2 之间运行 OSPF 协议,用于 AR1、AR2 学习到业务网段的回程路由信息。 + +```plaintext +[CORE] ospf 100 router-id 1.1.1.1 vpn-instance Public +[CORE-ospf-100] area 0 +[CORE-ospf-100-area-0.0.0.0] network 192.168.10.0 0.0.0.255 // 将连接 AR1、AR2 的网段发布到 OSPF 中 +[CORE-ospf-100-area-0.0.0.0] quit +[CORE-ospf-100] import-route static // 在 OSPF 中引入静态路由 +[CORE-ospf-100] quit +``` + + 5. 对于上行流量,在 CORE 上创建 VPN 实例 Private,将连接业务网络的接口和连接防火墙下行的接口绑定到 Private,Private 的缺省路由下一跳指向防火墙下行 VRRP 虚拟 IP(VRID2)。 + +```plaintext +[CORE] ip vpn-instance Private // 创建 Private +[CORE-vpn-instance-Private] ipv4-family +[CORE-vpn-instance-Private-af-ipv4] route-distinguisher 100:1 +[CORE-vpn-instance-Private-af-ipv4] vpn-target 111:1 both +[CORE-vpn-instance-Private-af-ipv4] quit +[CORE-vpn-instance-Private] quit + +[CORE] interface Vlanif 110 +[CORE-Vlanif110] ip binding vpn-instance Private // 将 CORE 连接 VLAN110 的接口 VLANIF110 绑定至 Private +[CORE-Vlanif110] ip address 192.168.110.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif110] quit + +[CORE] interface Vlanif 120 +[CORE-Vlanif120] ip binding vpn-instance Private // 将 CORE 连接 VLAN120 的接口 VLANIF120 绑定至 Private +[CORE-Vlanif120] ip address 192.168.120.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif120] quit + +[CORE] interface Vlanif 130 +[CORE-Vlanif130] ip binding vpn-instance Private // 将 CORE 连接 VLAN130 的接口 VLANIF130 绑定至 Private +[CORE-Vlanif130] ip address 192.168.130.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif130] quit + +[CORE] interface Vlanif 30 +[CORE-Vlanif30] ip binding vpn-instance Private // 将 CORE 连接防火墙下行的接口 VLANIF30 绑定至 Private +[CORE-Vlanif30] ip address 192.168.30.1 24 // 将接口绑定到 Private 时,接口上的 IP 地址会被删除,需要重新配置 IP 地址 +[CORE-Vlanif30] quit +``` + + 6. 在 Private 中配置缺省路由,下一跳指向防火墙下行 VRRP 2 的虚拟 IP(VRID2)。 + +```plaintext +[CORE] ip route-static vpn-instance Private 0.0.0.0 0.0.0.0 192.168.30.2 // 缺省路由下一跳指向 FW1 的下行接口 +``` + +--- + + 总结: +1. Public VPN 实例: + - 创建 Public VPN 实例,绑定 VLANIF10 和 VLANIF20。 + - 配置静态路由,上行流量指向 VRRP 虚拟 IP `192.168.10.100`,下行流量指向 FW1 的上行接口 `192.168.20.2`。 + - 在 OSPF 中发布 `192.168.10.0/24` 网段,并引入静态路由。 + +2. Private VPN 实例: + - 创建 Private VPN 实例,绑定 VLANIF110、VLANIF120、VLANIF130 和 VLANIF30。 + - 配置缺省路由,下一跳指向 FW1 的下行接口 `192.168.30.2`。 + +--- + + 补充说明: +- 设备名称:根据拓扑表,将 RouterA 和 RouterB 替换为 AR1 和 AR2,将 FWA 和 FWB 替换为 FW1 和 FW2。 +- IP 地址替换:根据拓扑表中的 IP 地址信息,将 `10.10.4.1` 替换为 `192.168.10.1`,将 `10.10.2.1` 替换为 `192.168.20.1`,将 `10.10.50.1` 替换为 `192.168.110.1`,将 `10.10.60.1` 替换为 `192.168.120.1`,将 `10.10.3.1` 替换为 `192.168.30.1`。 +- VRRP 虚拟 IP:根据拓扑表,VRRP 虚拟 IP 为 `192.168.10.100`。 + +希望这次的配置符合您的需求!如果还有其他问题,请随时告知。 + + + + + + + + + + + + +根据拓扑表中的信息,特别是端口的 Access 和 Trunk 性质,我们可以补全接入层的配置。以下是详细的配置: + +--- + + 配置接入层 + + 1. 配置 LSW3 + +```plaintext + system-view +[HUAWEI] sysname LSW3 +[LSW3] vlan batch 110 // 创建 VLAN110 + +[LSW3] interface GigabitEthernet 0/0/1 // 配置连接 PC1 的接口为 Access 模式,加入 VLAN110 +[LSW3-GigabitEthernet0/0/1] port link-type access +[LSW3-GigabitEthernet0/0/1] port default vlan 110 +[LSW3-GigabitEthernet0/0/1] quit + +[LSW3] interface GigabitEthernet 0/0/2 // 配置连接 PC2 的接口为 Access 模式,加入 VLAN110 +[LSW3-GigabitEthernet0/0/2] port link-type access +[LSW3-GigabitEthernet0/0/2] port default vlan 110 +[LSW3-GigabitEthernet0/0/2] quit + +[LSW3] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN110 通过 +[LSW3-GigabitEthernet0/0/3] port link-type trunk +[LSW3-GigabitEthernet0/0/3] port trunk allow-pass vlan 110 +[LSW3-GigabitEthernet0/0/3] quit + +[LSW3] interface GigabitEthernet 0/0/4 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN110 通过 +[LSW3-GigabitEthernet0/0/4] port link-type trunk +[LSW3-GigabitEthernet0/0/4] port trunk allow-pass vlan 110 +[LSW3-GigabitEthernet0/0/4] quit +``` + + 2. 配置 LSW4 + +```plaintext + system-view +[HUAWEI] sysname LSW4 +[LSW4] vlan batch 120 // 创建 VLAN120 + +[LSW4] interface GigabitEthernet 0/0/1 // 配置连接 Asso 的接口为 Access 模式,加入 VLAN120 +[LSW4-GigabitEthernet0/0/1] port link-type access +[LSW4-GigabitEthernet0/0/1] port default vlan 120 +[LSW4-GigabitEthernet0/0/1] quit + +[LSW4] interface GigabitEthernet 0/0/2 // 配置连接 Boss 的接口为 Access 模式,加入 VLAN120 +[LSW4-GigabitEthernet0/0/2] port link-type access +[LSW4-GigabitEthernet0/0/2] port default vlan 120 +[LSW4-GigabitEthernet0/0/2] quit + +[LSW4] interface GigabitEthernet 0/0/3 // 配置连接 LSW1 的接口为 Trunk 模式,允许 VLAN120 通过 +[LSW4-GigabitEthernet0/0/3] port link-type trunk +[LSW4-GigabitEthernet0/0/3] port trunk allow-pass vlan 120 +[LSW4-GigabitEthernet0/0/3] quit + +[LSW4] interface GigabitEthernet 0/0/4 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN120 通过 +[LSW4-GigabitEthernet0/0/4] port link-type trunk +[LSW4-GigabitEthernet0/0/4] port trunk allow-pass vlan 120 +[LSW4-GigabitEthernet0/0/4] quit +``` + + 3. 配置 LSW5 + +```plaintext + system-view +[HUAWEI] sysname LSW5 +[LSW5] vlan batch 130 // 创建 VLAN130 + +[LSW5] interface GigabitEthernet 0/0/2 // 配置连接 DataServer 的接口为 Access 模式,加入 VLAN130 +[LSW5-GigabitEthernet0/0/2] port link-type access +[LSW5-GigabitEthernet0/0/2] port default vlan 130 +[LSW5-GigabitEthernet0/0/2] quit + +[LSW5] interface GigabitEthernet 0/0/3 // 配置连接 AP1 的接口为 Access 模式,加入 VLAN130 +[LSW5-GigabitEthernet0/0/3] port link-type access +[LSW5-GigabitEthernet0/0/3] port default vlan 130 +[LSW5-GigabitEthernet0/0/3] quit + +[LSW5] interface GigabitEthernet 0/0/4 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN130 通过 +[LSW5-GigabitEthernet0/0/4] port link-type trunk +[LSW5-GigabitEthernet0/0/4] port trunk allow-pass vlan 130 +[LSW5-GigabitEthernet0/0/4] quit + +[LSW5] interface GigabitEthernet 0/0/5 // 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN130 通过 +[LSW5-GigabitEthernet0/0/5] port link-type trunk +[LSW5-GigabitEthernet0/0/5] port trunk allow-pass vlan 130 +[LSW5-GigabitEthernet0/0/5] quit +``` + +--- + + 总结: +1. **LSW3 配置**: + - 创建 VLAN110。 + - 配置连接 PC1 和 PC2 的接口为 Access 模式,加入 VLAN110。 + - 配置连接 LSW1 和 LSW2 的接口为 Trunk 模式,允许 VLAN110 通过。 + +2. **LSW4 配置**: + - 创建 VLAN120。 + - 配置连接 Asso 和 Boss 的接口为 Access 模式,加入 VLAN120。 + - 配置连接 LSW1 和 LSW2 的接口为 Trunk 模式,允许 VLAN120 通过。 + +3. **LSW5 配置**: + - 创建 VLAN130。 + - 配置连接 DataServer 和 AP1 的接口为 Access 模式,加入 VLAN130。 + - 配置连接 LSW2 的接口为 Trunk 模式,允许 VLAN130 通过。 + +--- + + 补充说明: +- **Access 模式**:用于连接终端设备(如 PC、服务器、AP 等),端口仅允许一个 VLAN 通过。 +- **Trunk 模式**:用于连接交换机之间的链路,端口允许多个 VLAN 通过。 + +希望这次的配置符合您的需求!如果还有其他问题,请随时告知。 + + + + + + + + + + + +== 配置 CORE 作为 DHCP 服务器 +para[ + 在 CORE 上配置 DHCP 服务器,为 VLANIF110 和 VLANIF120 接口下的客户端分配 IP 地址和相关网络参数。 + + 配置 VLANIF110 接口的 DHCP 地址池 + + 配置 VLANIF110 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ```plaintext + [CORE] interface vlanif 110 + [CORE-Vlanif110] dhcp select interface + [CORE-Vlanif110] dhcp server gateway-list 192.168.110.1 + [CORE-Vlanif110] dhcp server lease day 1 + [CORE-Vlanif110] dhcp server domain-name huawei.com + [CORE-Vlanif110] dhcp server dns-list 192.168.110.1 + [CORE-Vlanif110] quit + ``` + + 2. 配置 VLANIF120 接口的 DHCP 地址池 + + 配置 VLANIF120 接口下的客户端从接口地址池中获取 IP 地址和相关网络参数。 + ```plaintext + [CORE] interface vlanif 120 + [CORE-Vlanif120] dhcp select interface + [CORE-Vlanif120] dhcp server gateway-list 192.168.120.1 + [CORE-Vlanif120] dhcp server lease day 1 + [CORE-Vlanif120] dhcp server domain-name huawei.com + [CORE-Vlanif120] dhcp server dns-list 192.168.120.1 + [CORE-Vlanif120] quit + ``` + + 3. 查看 DHCP 地址池信息 + + 使用 `display ip pool` 命令查看 DHCP 地址池的配置和状态。 + ```plaintext + [CORE] display ip pool + ------------------------------------------------------------------------------------- + Pool-name : Vlanif110 + Pool-No : 0 + Lease : 1 Days 0 Hours 0 Minutes + Position : Interface + Status : Unlocked + Gateway-0 : 192.168.110.1 + Network : 192.168.110.0 + Mask : 255.255.255.0 + VPN instance : Private + Conflicted address recycle interval: - + Address Statistic: Total :253 Used :2 + Idle :251 Expired :0 + Conflict :0 Disabled :0 + ------------------------------------------------------------------------------------- + Pool-name : Vlanif120 + Pool-No : 1 + Lease : 1 Days 0 Hours 0 Minutes + Position : Interface + Status : Unlocked + Gateway-0 : 192.168.120.1 + Network : 192.168.120.0 + Mask : 255.255.255.0 + IP address Statistic + Total :506 + Used :3 Idle :503 + Expired :0 Conflict :0 Disabled :0 + ``` +] \ No newline at end of file diff --git a/big1/untrust_dmz_after.png b/big1/untrust_dmz_after.png new file mode 100644 index 0000000..8835ab0 Binary files /dev/null and b/big1/untrust_dmz_after.png differ diff --git a/big1/untrust_dmz_ping.png b/big1/untrust_dmz_ping.png new file mode 100644 index 0000000..0f9456a Binary files /dev/null and b/big1/untrust_dmz_ping.png differ diff --git a/big1/主备备份(主).png b/big1/主备备份(主).png new file mode 100644 index 0000000..890c96d Binary files /dev/null and b/big1/主备备份(主).png differ diff --git a/big1/主备备份(备).png b/big1/主备备份(备).png new file mode 100644 index 0000000..17f5ce5 Binary files /dev/null and b/big1/主备备份(备).png differ diff --git a/big1/内网NAT地址转换.pcapng b/big1/内网NAT地址转换.pcapng new file mode 100644 index 0000000..66a5707 Binary files /dev/null and b/big1/内网NAT地址转换.pcapng differ diff --git a/big1/外网ping不通内网.png b/big1/外网ping不通内网.png new file mode 100644 index 0000000..1353a08 Binary files /dev/null and b/big1/外网ping不通内网.png differ diff --git a/big1/外网主机接boss网.png b/big1/外网主机接boss网.png new file mode 100644 index 0000000..f9a7470 Binary files /dev/null and b/big1/外网主机接boss网.png differ diff --git a/big1/外网主机无法自动获取IP.png b/big1/外网主机无法自动获取IP.png new file mode 100644 index 0000000..6751757 Binary files /dev/null and b/big1/外网主机无法自动获取IP.png differ diff --git a/big1/外网主机访问web-通过转换后地址.png b/big1/外网主机访问web-通过转换后地址.png new file mode 100644 index 0000000..f69aa39 Binary files /dev/null and b/big1/外网主机访问web-通过转换后地址.png differ diff --git a/big1/实验拓扑.png b/big1/实验拓扑.png new file mode 100644 index 0000000..e25797d Binary files /dev/null and b/big1/实验拓扑.png differ diff --git a/big1/无环路.png b/big1/无环路.png new file mode 100644 index 0000000..120002c Binary files /dev/null and b/big1/无环路.png differ diff --git a/big1/机柜正面接线图.jpg b/big1/机柜正面接线图.jpg new file mode 100644 index 0000000..c3f9620 Binary files /dev/null and b/big1/机柜正面接线图.jpg differ diff --git a/big1/机柜背面接线图.jpg b/big1/机柜背面接线图.jpg new file mode 100644 index 0000000..93620a4 Binary files /dev/null and b/big1/机柜背面接线图.jpg differ diff --git a/big1/激活1.jpg b/big1/激活1.jpg new file mode 100644 index 0000000..f6cbd69 Binary files /dev/null and b/big1/激活1.jpg differ diff --git a/big1/激活2.jpg b/big1/激活2.jpg new file mode 100644 index 0000000..db35444 Binary files /dev/null and b/big1/激活2.jpg differ diff --git a/big1/组网综合第三组.pdf b/big1/组网综合第三组.pdf new file mode 100644 index 0000000..1a1c402 Binary files /dev/null and b/big1/组网综合第三组.pdf differ diff --git a/big1/路由器双机热备份.jpg b/big1/路由器双机热备份.jpg new file mode 100644 index 0000000..b7acc5d Binary files /dev/null and b/big1/路由器双机热备份.jpg differ diff --git a/big1/逻辑拓扑.png b/big1/逻辑拓扑.png new file mode 100644 index 0000000..af8f068 Binary files /dev/null and b/big1/逻辑拓扑.png differ diff --git a/big1/长ping不断.png b/big1/长ping不断.png new file mode 100644 index 0000000..d9b0caa Binary files /dev/null and b/big1/长ping不断.png differ diff --git a/big1/防火墙工作时段时间截图.png b/big1/防火墙工作时段时间截图.png new file mode 100644 index 0000000..018dfcc Binary files /dev/null and b/big1/防火墙工作时段时间截图.png differ diff --git a/big1/防火墙工作时段策略命中次数截图(ping前).png b/big1/防火墙工作时段策略命中次数截图(ping前).png new file mode 100644 index 0000000..bcfc8b0 Binary files /dev/null and b/big1/防火墙工作时段策略命中次数截图(ping前).png differ diff --git a/big1/防火墙工作时段策略命中次数截图(ping后).png b/big1/防火墙工作时段策略命中次数截图(ping后).png new file mode 100644 index 0000000..dc927cc Binary files /dev/null and b/big1/防火墙工作时段策略命中次数截图(ping后).png differ diff --git a/big1/防火墙非工作时段时间截图.png b/big1/防火墙非工作时段时间截图.png new file mode 100644 index 0000000..5a02414 Binary files /dev/null and b/big1/防火墙非工作时段时间截图.png differ diff --git a/big1/防火墙非工作时段策略命中次数截图(ping前).png b/big1/防火墙非工作时段策略命中次数截图(ping前).png new file mode 100644 index 0000000..128d180 Binary files /dev/null and b/big1/防火墙非工作时段策略命中次数截图(ping前).png differ diff --git a/big1/防火墙非工作时段策略命中次数截图(ping后).png b/big1/防火墙非工作时段策略命中次数截图(ping后).png new file mode 100644 index 0000000..c6b624e Binary files /dev/null and b/big1/防火墙非工作时段策略命中次数截图(ping后).png differ diff --git a/big1/阶段性检验1.jpg b/big1/阶段性检验1.jpg new file mode 100644 index 0000000..af1101f Binary files /dev/null and b/big1/阶段性检验1.jpg differ diff --git a/experiment/屏幕截图_20251029_150441.png b/experiment/屏幕截图_20251029_150441.png new file mode 100644 index 0000000..10a0f62 Binary files /dev/null and b/experiment/屏幕截图_20251029_150441.png differ diff --git a/experiment/网络拓扑.drawio b/experiment/网络拓扑.drawio new file mode 100644 index 0000000..e660c24 --- /dev/null +++ b/experiment/网络拓扑.drawio @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/experiment/网络拓扑.png b/experiment/网络拓扑.png new file mode 100644 index 0000000..a86c5a4 Binary files /dev/null and b/experiment/网络拓扑.png differ