当前位置: 首页 > news >正文

hcip二层综合实验

1、内网IP地址使用172.16.0.0/16分配
2、sW1和sw2之间互为备份
3、VRRP/STP/VLAN/Eth-trunk均使用
4、所有pc均通过oHcP获取IP地址
5、ISP只能配置IP地址
6、所有电脑可以正常访问IsP路由器环回

注:以下并非ensp内容,原实验配置较为混乱,补全错误,由AI做整理。

SW1

system-view sysname sw1 vlan batch 2 3 10 20 interface Eth-Trunk 0 trunkport GigabitEthernet 0/0/1 to 0/0/2 port link-type trunk port trunk allow-pass vlan 2 3 10 20 quit port-group group-member GigabitEthernet 0/0/3 to GigabitEthernet 0/0/4 port link-type trunk port trunk allow-pass vlan 2 3 quit interface GigabitEthernet 0/0/5 port link-type access port default vlan 10 quit stp enable stp mode mstp stp region-configuration region-name aa instance 1 vlan 2 instance 2 vlan 3 active region-configuration quit stp instance 1 root primary interface Vlanif 2 ip address 172.16.0.1 255.255.255.192 vrrp vrid 1 virtual-ip 172.16.0.62 vrrp vrid 1 priority 120 vrrp vrid 1 track interface GigabitEthernet 0/0/5 reduced 30 quit interface Vlanif 3 ip address 172.16.0.65 255.255.255.192 vrrp vrid 2 virtual-ip 172.16.0.126 quit dhcp enable ip pool aa network 172.16.0.0 mask 255.255.255.192 gateway-list 172.16.0.62 dns-list 8.8.8.8 quit ip pool bb network 172.16.0.64 mask 255.255.255.192 gateway-list 172.16.0.126 dns-list 8.8.8.8 quit interface Vlanif 2 dhcp select global quit interface Vlanif 3 dhcp select global quit interface Vlanif 10 ip address 172.16.0.129 255.255.255.192 quit ip route-static 0.0.0.0 0.0.0.0 172.16.0.130 return

SW2

system-view sysname sw2 vlan batch 2 3 10 20 interface Eth-Trunk 0 trunkport GigabitEthernet 0/0/1 to 0/0/2 port link-type trunk port trunk allow-pass vlan 2 3 10 20 quit port-group group-member GigabitEthernet 0/0/3 to GigabitEthernet 0/0/4 port link-type trunk port trunk allow-pass vlan 2 3 quit interface GigabitEthernet 0/0/5 port link-type access port default vlan 20 quit stp enable stp mode mstp stp region-configuration region-name aa instance 1 vlan 2 instance 2 vlan 3 active region-configuration quit stp instance 1 root secondary stp instance 2 root primary interface Vlanif 2 ip address 172.16.0.2 255.255.255.192 vrrp vrid 1 virtual-ip 172.16.0.62 quit interface Vlanif 3 ip address 172.16.0.66 255.255.255.192 vrrp vrid 2 virtual-ip 172.16.0.126 vrrp vrid 2 priority 120 vrrp vrid 2 track interface GigabitEthernet 0/0/5 reduced 30 quit dhcp enable ip pool aa network 172.16.0.0 mask 255.255.255.192 gateway-list 172.16.0.62 dns-list 8.8.8.8 quit ip pool bb network 172.16.0.64 mask 255.255.255.192 gateway-list 172.16.0.126 dns-list 8.8.8.8 quit interface Vlanif 2 dhcp select global quit interface Vlanif 3 dhcp select global quit interface Vlanif 20 ip address 172.16.0.193 255.255.255.192 quit ip route-static 0.0.0.0 0.0.0.0 172.16.0.194 return

SW3

system-view sysname sw3 vlan batch 2 3 interface GigabitEthernet 0/0/3 port link-type access port default vlan 2 quit interface GigabitEthernet 0/0/4 port link-type access port default vlan 3 quit port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 port link-type trunk port trunk allow-pass vlan 2 3 quit stp enable stp mode mstp stp region-configuration region-name aa instance 1 vlan 2 instance 2 vlan 3 active region-configuration quit port-group group-member GigabitEthernet 0/0/3 to GigabitEthernet 0/0/4 stp edged-port enable quit stp bpdu-protection return

SW4

system-view sysname sw4 vlan batch 2 3 interface GigabitEthernet 0/0/3 port link-type access port default vlan 2 quit interface GigabitEthernet 0/0/4 port link-type access port default vlan 3 quit port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 port link-type trunk port trunk allow-pass vlan 2 3 quit stp enable stp mode mstp stp region-configuration region-name aa instance 1 vlan 2 instance 2 vlan 3 active region-configuration quit port-group group-member GigabitEthernet 0/0/3 to GigabitEthernet 0/0/4 stp edged-port enable quit stp bpdu-protection return

R1

system-view sysname r1 interface GigabitEthernet 0/0/1 ip address 172.16.0.130 255.255.255.192 quit interface GigabitEthernet 0/0/0 ip address 172.16.0.194 255.255.255.192 quit interface GigabitEthernet 0/0/2 ip address 12.0.0.1 255.255.255.0 quit ip route-static 172.16.0.0 255.255.255.192 172.16.0.129 ip route-static 172.16.0.0 255.255.255.192 172.16.0.193 ip route-static 172.16.0.64 255.255.255.192 172.16.0.193 ip route-static 172.16.0.64 255.255.255.192 172.16.0.129 ip route-static 0.0.0.0 0.0.0.0 12.0.0.2 acl 2000 rule permit source 172.16.0.0 0.0.255.255 quit interface GigabitEthernet 0/0/2 nat outbound 2000 quit return

ISP

测试

http://www.gsyq.cn/news/1587135.html

相关文章:

  • AI领域每日资讯报告(2026年6月24日)
  • TFRecord写入最佳实践:从数据序列化到生产级稳定性
  • 2026降AI率工具红黑榜:降AI率网站怎么选?这份榜单够用!
  • 从C到C++:从结构体到类,面向对象初体验
  • UVa 599 The Forrest for the Trees
  • FlyOOBE:为老旧硬件开启Windows 11升级新纪元的技术伙伴
  • 大模型微调缺数据?合成数据实战指南
  • 1000 tokens/s 到底有多快?我用 8 次 API 请求,测了 4 款国产大模型
  • ICLR 2026 Oral 用 RL 训 Embedder 而非 LLM:Q-RAG 把多步检索成本砍到几乎免费
  • billd-desk终极指南:如何构建企业级远程桌面控制与游戏串流平台
  • AI 编程时代,UI 设计系统也需要工程化:从 Google DESIGN.md 说起
  • VisualCppRedist AIO:Windows运行库的“瑞士军刀“如何解决你的软件兼容性难题
  • Java应用启动慢、接口超时、频繁Full GC?别再把锅甩给JVM了!
  • Android Studio中文汉化终极指南:5分钟打造母语级开发环境
  • ROS嵌入式部署实战:在Jetson/RPi上稳定运行机器人系统
  • 服装贴口袋工序自动化科普:慧拿线上激光模板机全面解析
  • AI案例:选AI还是选人
  • 白领 16 亿 tokens
  • Fastjson反序列化漏洞:从原理到实战防护的Java安全必修课
  • 从高维数据中提取本质特征:秩提取与鲁棒子空间设计实践
  • 银河麒麟V10 SP3 源码编译部署 PostgreSQL 18.4
  • 跨平台资源下载神器:5分钟掌握res-downloader完整使用指南
  • 计算机小程序毕设实战-基于 SpringBoot+UniApp 的区域文旅(冀鲁豫)旅行推荐系统设计与实现 基于 SpringBoot+UniA【完整源码+LW+部署说明+演示视频,全bao一条龙等】
  • 智人曾经这样灭绝猛犸象:AI入侵与行业灭绝
  • Loop Engineering :从提示词工程到循环工程,AI 编程的范式革命
  • 终极免费解锁:如何用Ohook完整激活Microsoft 365所有功能
  • 电梯里同事问我:“你觉得RAG落地最难的地方在哪?”,我愣了,保安转头:“我以前干过,主要就文档预处理、召回质量、生成忠诚度”
  • 终极SPT-AKI存档编辑器:免费开源的游戏进度管理神器
  • 深度剖析SQL注入攻防:从MySQL语法特性到多层防护体系
  • 淘宝闪购 AI 应用研发二面,我笑了!!!