HCIP Super-vlan&eth-trunk

实验拓扑

实验需求及解法

本实验模拟某企业内网,多个部门分隔为不同的 vlan,但是每个部门主机数量都较少。 为了简化 IP 地址规划,节省 IP 地址,需配置 Super-vlan。

一、配置 Eth-trunk

SW1 是核心交换机,与 SW2/3 之间部署 eth-trunk 增加链路带宽,同时提高可靠性。

1.1 配置 SW1

1.1.1 创建 Eth-trunk0 和 1 两个接口。

1.1.2 使用 lacp 静态模式,负载均衡算法为源目 mac。

1.1.3 与 SW2 互联的接口加入 Eth-trunk0

1.1.4 与 SW3 互联的接口加入 Eth-trunk1

interface Eth-Trunk0
mode lacp-static
load-balance src-dst-mac

interface Eth-Trunk1
mode lacp-static
load-balance src-dst-mac

interface GigabitEthernet0/0/21
eth-trunk 0

interface GigabitEthernet0/0/22
eth-trunk 0

interface GigabitEthernet0/0/23
eth-trunk 1

interface GigabitEthernet0/0/24
eth-trunk 1

1.2 配置 SW2/3

1.2.1 分别创建 Eth-trunk0 接口。

1.2.2 使用 lacp 静态模式,负载均衡算法为源目 mac。

1.2.3 与 SW1 互联接口加入 Eth-trunk。

1.2.4 确认 Eth-trunk 建立成功。

SW2:
interface Eth-Trunk0
mode lacp-static
load-balance src-dst-mac

interface GigabitEthernet0/0/21
eth-trunk 0

interface GigabitEthernet0/0/22
eth-trunk 0

Eth-trunk 是否建立成功主要看状态是否为“UP”,物理接口是否为“Selected”(被选中)

SW3:
interface Eth-Trunk0
mode lacp-static
load-balance src-dst-mac

interface GigabitEthernet0/0/23
eth-trunk 0

interface GigabitEthernet0/0/24
eth-trunk 0

二、配置 Super-vlan

2.1 创建 vlan

2.1.1 SW1 创建 vlan10,vlan3001 和 vlan3002

2.1.2 将 vlan10 设置为 Super-vlan,vlan3001 和 3002 为子 vlan。

SW1:
vlan batch 10 3001 3002
vlan 10
aggregate-vlan
access-vlan 3001 to 3002

2.1.3 SW2/3 创建 vlan3001 和 vlan3002

SW2/3:
vlan batch 3001 3002

2.2 划分 vlan

2.2.1 SW1/2/3 之间使用 trunk 链路,并允许 vlan3001 和 3002 通过。

SW1:
interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 3001 to 3002

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 3001 to 3002

SW2/3:
interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 3001 to 3002

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 3001 to 3002

2.2.2 SW2/3 与 PC 之间使用 access 链路,并划入对应 vlan。

SW2:
interface GigabitEthernet0/0/1
port link-type access
port default vlan 3001
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3001

SW3:
interface GigabitEthernet0/0/1
port link-type access
port default vlan 3002
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3002

2.2.3 验证通信:

PC1 可以与 PC2 通信,PC3 可以与 PC4 通信 PC1/2 不能与 PC3/4 通信。

2.3 跨子 vlan 通

2.3.1 在 SW1 上创建网关 vlanif10,IP 地址为 192.168.10.254/24。

2.3.2 开启子 vlan 间代理 ARP 功能。

SW1:
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable

2.3.3 验证通信:

PC1 可以与 PC3 通信,且使用 tracert 命令验证需先经过网关。

猜你喜欢

转载自blog.csdn.net/weixin_59151049/article/details/142911909