三层交换机的热备实验

用的是小凡模拟器
各设备配置命令
路由器配置命令
EN
CONF T
HOSTNAME BJ-R-1
IP ROUTING
INT E0/1
IP ADD 192.168.10.1 255.255.255.252
NO SHUT
EXIT
INT E0/2
IP ADD 192.168.20.1 255.255.255.252
NO SHUT
EXIT
第一台三层交换机的配置命令
设置接口 IP(IOS 需用 unzip-c3640-js-mz.124-10,IOS c3640-is-mz.123-13a 不支持三层功能 )
EN
CONF T
HOSTNAME BJ-RS-1
IP ROUTING
INT F0/15
NO SWITCHPORT
IP ADD 192.168.10.2 255.255.255.252
NO SHUT
EXIT
EXIT
设置 VTP 和添加 VLAN
VLAN DATABASE
VTP DOMAIN YHL
VTP SERVER
VTP PASSWORD 321
VTP PRUNING
VTP V2
VLAN 2 NAME SALES
VLAN 3 NAME ENGIN
EXIT
VLAN 配置 IP
CONF T
INT VLAN 1
IP ADD 172.16.10.11 255.255.255.0
NO SHUT
EXIT
INT VLAN 2
IP ADD 172.16.20.11 255.255.255.0
NO SHUT
EXIT
INT VLAN 3
IP ADD 172.16.30.11 255.255.255.0
NO SHUT
EXIT
配置中继接口
INT F0/1
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/2
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/13
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/14
SWITCHPORT MODE TRUNK
NO SHUT
EXIT
配置以太网通道
INT RANGE F0/13 - 14
CHANNEL-GROUP 1 MODE ON
VLAN1 加入热备组 1
INT VLAN 1
STANDBY 1 IP 172.16.10.1
NO SHUT
VLAN2 加入热备组 2
INT VLAN2
STANDBY 2 IP 172.16.20.1
NO SHUT
VLAN3 加入热备组 3
INT VLAN 3
STANDBY 3 IP 172.16.30.1
NO SHUT
设置 VLAN1 VLAN3 分别为热备组 1 3 的活跃路由器
INT VLAN 1
STANDBY 1 PRIORITY 105
EXIT
INT VLAN 3
STANDBY 3 PRIORITY 105
EXIT
设置 VLAN2 为热备组 2 的备份路由器 (不用配置,优先级默认为 100 ,只需将 BJ-RS-2 VLAN2 分别设置为热备组 2 的活跃路由器就行了)
设置 VLAN1 有热备组 1 3 的占先权
INT VLAN 1
STANDBY 1 PREEMPT
INT VLAN 3
STANDBY 3 PREEMPT
设置热备组 1 3 的端口跟踪
INT VLAN 1
STANDBY 1 TRACK F0/15 10
EXIT
INT VLAN 3
STANDBY 3 TRACK F0/15 10
关闭端口重定向
INT VLAN 1
NO IP REDIRECTS
EXIT
INT VLAN 2
NO IP REDIRECTS
EXIT
INT VLAN 3
NO IP REDIRECTS
EXIT
 
 
第二台三层交换机的配置命令
设置接口 IP
EN
CONF T
HOSTNAME BJ-RS-2
IP ROUTING
INT F0/15
NO SWITCHPORT
IP ADD 192.168.20.2 255.255.255.252
NO SHUT
EXIT
EXIT
设置 VTP 和添加 VLAN
VLAN DATABASE
VTP DOMAIN YHL
VTP SERVER
VTP PASSWORD 321
VTP PRUNING
VTP V2
VLAN 2 NAME SALES
VLAN 3 NAME ENGIN
EXIT         
VLAN 配置 IP
CONF T
INT VLAN 1
IP ADD 172.16.10.12 255.255.255.0
NO SHUT
EXIT
INT VLAN 2
IP ADD 172.16.20.12 255.255.255.0
NO SHUT
EXIT
INT VLAN 3
IP ADD 172.16.30.12 255.255.255.0
NO SHUT
EXIT
配置中继接口
INT F0/1
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/2
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/13
SWITCHPORT MODE TRUNK
NO SHUT
INT F0/14
SWITCHPORT MODE TRUNK
NO SHUT
EXIT
配置以太网通道
INT RANGE F0/13 - 14
CHANNEL-GROUP 1 MODE ON
VLAN1 加入热备组 1
INT VLAN 1
STANDBY 1 IP 172.16.10.1
NO SHUT
VLAN2 加入热备组 2
INT VLAN2
STANDBY 2 IP 172.16.20.1
NO SHUT
VLAN3 加入热备组 3
INT VLAN 3
STANDBY 3 IP 172.16.30.1
NO SHUT
设置 VLAN2 为热备组 2 的活跃路由器
INT VLAN 2
STANDBY 2 PRIORITY 105
EXIT
设置 VLAN1 3 为热备组 1 3 的备份路由器 (不用配置,优先级默认为 100 ,只需将 BJ-RS-1 VLAN1 3 分别设置为热备组 1 3 的活跃路由器就行了)
设置 VLAN2 有热备组 2 的占先权
INT VLAN 2
STANDBY 2 PREEMPT
设置热备组 2 的端口跟踪
INT VLAN 2
STANDBY 2 TRACK F0/15 10
EXIT
关闭端口重定向
INT VLAN 1
NO IP REDIRECTS
EXIT
INT VLAN 2
NO IP REDIRECTS
EXIT
INT VLAN 3
NO IP REDIRECTS
EXIT
 
 
二层交换机BJ-S-1 的配置
EN
CONF T
NO IP ROUTING
HOSTNAME BJ-S-1
设置中继接口
INT F0/15
SWITCHPORT MODE TRUNK
NO SH
INT F0/14
SWITCHPORT MODE TRUNK
NO SH
设置 VLAN1 的管理 IP
INT VLAN 1
IP ADD 172.16.10.13 255.255.255.0
NO SH
EXIT
EXIT
设置 VTP 和添加 VLAN
VLAN DATABASE
VTP DOMAIN YHL
VTP CLIENT
VTP PASSWORD 321
VTP PRUNING
VTP V2
VLAN 2 NAME SALES
VLAN 3 NAME ENGIN
EXIT         
设置接入接口加入各自 VLAN
CONF T
INT F0/1
SWITCHPORT ACCESS VLAN 2
NO SH
EXIT
INT F0/2
SWITCHPORT ACCESS VLAN 3
NO SH
EXIT
 
二层交换机BJ-S-2 的配置
EN
CONF T
NO IP ROUTING
HOSTNAME BJ-S-2
设置中继接口
INT F0/15
SWITCHPORT MODE TRUNK
NO SH
INT F0/14
SWITCHPORT MODE TRUNK
NO SH
设置 VLAN1 的管理 IP
INT VLAN 1
IP ADD 172.16.10.14 255.255.255.0
NO SH
EXIT
EXIT
设置 VTP 和添加 VLAN
VLAN DATABASE
VTP DOMAIN YHL
VTP CLIENT
VTP PASSWORD 321
VTP PRUNING
VTP V2
VLAN 2 NAME SALES
VLAN 3 NAME ENGIN
EXIT         
设置接入接口加入各自 VLAN
CONF T
INT F0/1
SWITCHPORT ACCESS VLAN 2
NO SH
EXIT
INT F0/2
SWITCHPORT ACCESS VLAN 3
NO SH
EXIT
 
PC1 的配置
EN
CONF T
NO IP ROUTING
HOSTNAME PC1
INT F0/0
IP ADD 172.16.20.101 255.255.255.0
NO SHUT
EXIT
IP DEFAULT-GATEWAY 172.16.20.1
 
PC4 的配置
EN
CONF T
NO IP ROUTING
HOSTNAME PC4
INT F0/0
IP ADD 172.16.30.102 255.255.255.0
NO SHUT
EXIT
IP DEFAULT-GATEWAY 172.16.30.1
 
验证
关闭 BJ-RS-1 的所有接口
INT RANGE F0/0 �C 15
SHUTDOWN
如果 VLAN1 PC1 仍然能 PING VLAN3 PC3, 则说明热备成功
 
设置两个三层交换机为根网桥
RS-1
SPANNING-TREE VLAN 1 ROOT PRIMARY
SPANNING-TREE VLAN 3 ROOT PRIMARY
SPANNING-TREE VLAN 2 ROOT SECONDARY
 
RS-2
SPANNING-TREE VLAN 2 ROOT PRIMARY
SPANNING-TREE VLAN 1 ROOT SECONDARY
SPANNING-TREE VLAN 3 ROOT SECONDARY
 
使用TFTP 下载配置
需要和真机网卡桥接并打开 TFTP
COPY RUN TFTP
本文出自 “ hehe my” 博客,请务必保留此出处 http://yhlt024.blog.51cto.com/532582/201588
本文出自 51CTO.COM技术博客

你可能感兴趣的:(职场,休闲)