【HCIP 03】Super-vlan eth-trunk (超级vlan与链路聚合)

背景:本实验模拟某企业内网,多个部门分隔为不同的 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  

SW1:
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
#

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 命令验证需先经过网关。

PC1>tracert 192.168.10.3
traceroute to 192.168.10.3, 8 hops max
(ICMP), press Ctrl+C to stop
 1  192.168.10.254   47 ms  47 ms  31 ms
 2  192.168.10.3   62 ms  109 ms  94 ms

  • 7
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值