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

HCIP VRRP MSTP 交换综合实验

1.拓扑图

2.实验要求

1.内网IP地址使用172.16.0.0/16分配

2.sw1和sw2之间互为备份

3.VRRP/STP/VLAN/Eth-trunk均使用

4.所以PC均通过DHCP获取IP地址

5.ISP只能配置地址

6.所以电脑可以正常访问Isp路由器环回

3.实验需求大纲

1.首先需要划分网段以及分配IP地址

2.使用vrrp和mstp互为备份

3.需要使用动态路由或者静态路由以及nat

4.对isp做环回和配IP地址

4.具体步骤

1.sw3---将各个接口对vlan2 3 进行划分以及通过

vlan batch 2 to 3

[sw3-GigabitEthernet0/0/1]dispaly this
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 2
 port hybrid untagged vlan 2

[sw3-GigabitEthernet0/0/2]dispaly this
interface GigabitEthernet0/0/2
 port hybrid pvid vlan 3
 port hybrid untagged vlan 3
[sw3-GigabitEthernet0/0/3]dis this
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 3

[sw3-GigabitEthernet0/0/4]dis this
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 3

2.sw4---同sw3

vlan batch 2 to 3

[sw4-GigabitEthernet0/0/1]dispaly this
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 2
 port hybrid untagged vlan 2

[sw4-GigabitEthernet0/0/2]dispaly this
interface GigabitEthernet0/0/2
 port hybrid pvid vlan 3
 port hybrid untagged vlan 3
[sw4-GigabitEthernet0/0/3]dis this
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 3

[sw4-GigabitEthernet0/0/4]dis this
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 3

3.sw1---使用DHCP充当网关并配置划分的网段获取ip

vlan batch 2 to 3
stp instance 1 root primary
stp instance 2 root secondary

dhcp enable
ip route-static 0.0.0.0 0.0.0.0 172.16.4.1

[sw1]int Eth-Trunk 0
[sw1-Eth-Trunk0]dis this
interface Eth-Trunk0
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
[sw1-GigabitEthernet0/0/3]dis this
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
[sw1-GigabitEthernet0/0/4]dis this
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
[sw1-GigabitEthernet0/0/5]dis this
interface GigabitEthernet0/0/5
 port hybrid untagged vlan 2 to 3

[sw1]int vlanif 1
[sw1-Vlanif1]ip add 172.16.4.2 24

[sw1]rip

[sw1-rip-1]v 2

[sw1-rip-1]network 172.16.0.0

4.sw2---同sw1

stp instance 1 root secondary
stp instance 2 root primary    

dhcp enable
ip route-static 0.0.0.0 0.0.0.0 172.16.5.1
[sw2]int Vlanif 1
[sw2-Vlanif1]ip address 172.16.5.2 24

[sw2]rip 1
[sw2-rip-1]v 2
[sw2-rip-1]network 172.16.0.0

5.ISP

[ISP]int l    
[ISP]int LoopBack 1
[ISP]ip add 1.1.1.1 24

6.路由器R1---添加ip以及nat

[r1-GigabitEthernet0/0/1]ip add 172.16.4.1 24

[r1-GigabitEthernet0/0/1]int g0/0/2
[r1-GigabitEthernet0/0/2]ip add 172.16.5.1 24
[r1-GigabitEthernet0/0/2]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]network 172.16.0.0
[r1-rip-1]network 12.0.0.0
[r1]ip route-static 0.0.0.0 0 12.1.1.2

[r1]acl 2000
[r1-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255 
[r1-acl-basic-2000]int g0/0/0

[r1-GigabitEthernet0/0/0]nat outbound 2000

5.1查看生成树

1.sw1

2.sw2

3.sw3

4.sw4

5.2查看VRRP

5.3查看IP

1.R1

2.sw1

2.sw2

6.设备之间的连通性测试

pc1和pc2---pc1 ping pc2(vlan2 3)

内网访问外网

pc1和R1(广播域)


http://www.kler.cn/a/613089.html

相关文章:

  • 5.Matplotlib:高级绘图
  • SvelteKit 最新中文文档教程(13)—— Hooks
  • RHCA核心课程技术解析4:红帽服务管理与自动化深度实践
  • Java EE 进阶:MyBatis案例练习
  • 有价值的面试问题
  • 端到端自动驾驶VLM模型:LMDrive: Closed-Loop End-to-End Driving with Large Language Models
  • 通过Bioconductor/BiocManager安装生物r包详解(问题汇总)
  • 01 相机标定与相机模型介绍
  • 25大唐杯赛道一本科B组大纲总结(上)
  • 【OCR】技术
  • 【新手初学】读取数据库数据
  • VMware 安装 Ubuntu 实战分享
  • 2025美国网络专线国内服务商推荐
  • Qt SQL-2
  • 陪伴就诊 APP 功能架构:如何通过特定模块筛选优秀陪诊师
  • vscode在使用 alt + tab 切换程序窗口时,输入法总是自动变为中文模式
  • 电脑切换不同WiFi时,ip地址会自动切换吗?‌
  • Spring Boot添加全局异常处理器捕捉异常 跳转登录页面
  • 多少双手套 - 小米机试真题题解
  • Leetcode 使用最小花费爬楼梯