标签:bat 链路 process -o cto 实验 级联 技术分享 img
一、级联简介 级联是交换机组网的一种结构,级联技术可以实现两台或两台以上交换机之间的互联,在多种网络中被广泛应用
实验拓扑:
1-1,1-2,1-3三台交换机级联至1-3;2-1,2-2两台级联至2-2;1-3和2-2上联至HX,所有网段网关都在HX上。
Server1A:10.3.1.1/24 10.3.1.254 vlan 10
Server1B:10.3.1.2/24 10.3.1.254 vlan10
Server2A:10.3.2.1/24 10.3.2.254 vlan 20
Server2B:10.3.2.2/24 10.3.2.254 vlan 20
Server3A:10.3.3.1/24 10.3.3.254 vlan 30
Server3B:10.3.3.2/24 10.3.3.254 vlan 30
开始配置:
交换机1-1配置:1口级联1-2,2口vlan30
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
交换机1-2配置:4口级联1-1,2口级联1-3,1口vlan10,3口vlan20
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交换机1-3配置:2口级联1-2,3口上联HX,1口vlan20
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交换机2-2配置:1口上联HX,2口级联2-1
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交换机2-1配置:1口级联2-2,2口vlan10
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
HX配置:2口Trunk至1-3,3口Trunk至2-2,3类server的网关配置,1口vlan30
vlan batch 10 20 30
#
interface Vlanif1
#
interface Vlanif10
ip address 10.3.1.254 255.255.255.0
#
interface Vlanif20
ip address 10.3.2.254 255.255.255.0
#
interface Vlanif30
ip address 10.3.3.254 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
1、trunk链路允许所有vlan通过,但级联的交换机需起相应vlan
2、vlan间通信依靠HX(三层交换)的直连路由
标签:bat 链路 process -o cto 实验 级联 技术分享 img
原文地址:http://blog.51cto.com/jiayimeng/2312433