H3C IRF2配置

更新时间:2024-01-16 14:37:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

前言

IRF2(Intelligent Resilient Framework,智能弹性架构)是H3C自主研发的软件虚拟化技术,通过将多台设备虚拟为一台设备,可以简化网络拓扑,提高管理效率,并能提供1:N的设备级备份,帮助您实现业界领先的企业网、数据中心汇聚/核心层解决方案。本章将为您介绍如果使用多台S5820V2&S5830V2系列交换机组建基于IRF技术的虚拟化设备。

配置要求

本次试验通过2台支持虚拟化交换机进行配置,将两台物理设备进行虚拟化后逻辑合成一台设备。

试验环境

配置过程

主机一:

system-view

[Sysname] interface range ten-gigabitethernet 1/0/49 to ten-gigabitethernet 1/0/50

[Sysname-if-range] shutdown [Sysname-if-range] quit

[Sysname] irf-port 1/1

[Sysname-irf-port1/1] port group interface ten-gigabitethernet 1/0/49 [Sysname-irf-port1/1] port group interface ten-gigabitethernet 1/0/50 [Sysname-irf-port1/1] quit

[Sysname] interface range ten-gigabitethernet 1/0/49 to ten-gigabitethernet 1/0/50

[Sysname-if-range] undo shutdown [Sysname-if-range] quit

[Sysname] irf member 1 priority 31 [Sysname] irf-port-configuration active [Sysname]save

主机二

system-view

[Sysname] irf member 1 renumber 2

Warning: Renumbering the member ID may result in configuration change or loss. Continue? [Y/N]:y [Sysname] quit reboot system-view

[Sysname] interface range ten-gigabitethernet 2/0/49 to ten-gigabitethernet 2/0/50

[Sysname-if-range] shutdown [Sysname-if-range] quit [Sysname] irf-port 2/2

[Sysname-irf-port2/2] port group interface ten-gigabitethernet 2/0/25 [Sysname-irf-port2/2] port group interface ten-gigabitethernet 2/0/26 [Sysname-irf-port2/2] quit

[Sysname] interface range ten-gigabitethernet 2/0/49 to ten-gigabitethernet 2/0/50

[Sysname-if-range] undo shutdown [Sysname-if-range] quit save system-view

[Sysname] irf-port-configuration active

二层利用LACP进行检测,在数据中心组网中,为了实现更简单的拓扑结构,一般在接入层和汇聚层均采用IRF技术进行整合。先将核心交换机与接入交换机之间互连的4个端口进行两两捆绑,然后开启LACP检测。 [Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation2] link-aggregation mode dynamic [Sysname-Bridge-Aggregation2] mad enable [Sysname-Bridge-Aggregation2]1

二层也还可以利用BFD进行快速检测,在用于BFD MAD检测的接口下必须使用mad ip address命令配置MAD IP地址,而不要配置其它IP地址(包括使用ip address命令配置的普通IP地址、VRRP虚拟IP地址等),以免影响MAD检测功能。(但不推荐,因要将端口如G1/0/1,G2/0/1,G3/0/1,以及接入设备G1/0/1-4划入同一VLAN内,实际情况中很少有有将多个端口划入同一个VLAN)

system-view [Sysname] vlan 1000

[Sysname-vlan1000] port ten-gigabitethernet 1/0/1 ten-gigabitethernet 2/0/1 ten-gigabitethernet 3/0/1 ten-gigabitethernet 4/0/1

[Sysname-vlan3] quit

[Sysname] interface vlan-interface 1000 [Sysname-Vlan-interface1000] mad bfd enable

[Sysname-Vlan-interface1000] mad ip address 192.168.2.1 24 member 1 [Sysname-Vlan-interface1000] mad ip address 192.168.2.2 24 member 2 [Sysname-Vlan-interface1000] mad ip address 192.168.2.3 24 member 3 [Sysname-Vlan-interface1000] mad ip address 192.168.2.4 24 member 4 [Sysname-Vlan-interface1000] quit

因为BFD MAD和生成树功能互斥,所以在用于BFD MAD检测的端口上关闭生成树协议。 [Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-Gigabitethernet-1/0/1] undo stp enable [Sysname-Ten-Gigabitethernet-1/0/1] quit [Sysname] interface ten-gigabitethernet 2/0/1

[Sysname-Ten-Gigabitethernet-2/0/1] undo stp enable [Sysname-Ten-Gigabitethernet-2/0/1] quit [Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-Gigabitethernet-3/0/1] undo stp enable [Sysname-Ten-Gigabitethernet-3/0/1] quit [Sysname] interface ten-gigabitethernet 4/0/1

[Sysname-Ten-Gigabitethernet-4/0/1] undo stp enable [Sysname-Ten-Gigabitethernet-4/0/1] quit

重点

实际环境中,往往是以上环境进行检测配置,具体配置如下: (1) 配置RouterA # 创建VLAN40和VLAN42。 system-view [RouterA] vlan 40 [RouterA-vlan40] quit [RouterA] vlan 42 [RouterA-vlan42] quit # 创建一个动态聚合接口40。

[RouterA] interface bridge-aggregation 40

[RouterA-Bridge-Aggregation40] link-aggregation mode dynamic [RouterA-Bridge-Aggregation40] quit

# 在聚合接口中添加成员端口Ten-GigabitEthernet1/0/1、Ten-GigabitEthernet1/0/2、Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4。 [RouterA] interface ten-gigabitethernet 1/0/1

[RouterA-Ten-GigabitEthernet1/0/1] port link-aggregation group 40 [RouterA-Ten-GigabitEthernet1/0/1] quit [RouterA] interface ten-gigabitethernet 1/0/2

[RouterA-Ten-GigabitEthernet1/0/2] port link-aggregation group 40 [RouterA-Ten-GigabitEthernet1/0/2] quit [RouterA] interface ten-gigabitethernet 1/0/3

[RouterA-Ten-GigabitEthernet1/0/3] port link-aggregation group 40 [RouterA-Ten-GigabitEthernet1/0/3] quit [RouterA] interface ten-gigabitethernet 1/0/4

[RouterA-Ten-GigabitEthernet1/0/4] port link-aggregation group 40 [RouterA-Ten-GigabitEthernet1/0/4] quit # 将聚合接口40加入VLAN40。

[RouterA] interface bridge-aggregation 40

[RouterA-Bridge-Aggregation40] port access vlan 40 # 创建一个动态聚合接口42。

[RouterA] interface bridge-aggregation 42

[RouterA-Bridge-Aggregation42] link-aggregation mode dynamic [RouterA-Bridge-Aggregation42] quit

# 在聚合接口中添加成员端口Ten-GigabitEthernet1/0/5、Ten-GigabitEthernet1/0/6。 [RouterA] interface ten-gigabitethernet 1/0/5

[RouterA-Ten-GigabitEthernet1/0/5] port link-aggregation group 42 [RouterA-Ten-GigabitEthernet1/0/5] quit [RouterA] interface ten-gigabitethernet 1/0/6

[RouterA-Ten-GigabitEthernet1/0/6] port link-aggregation group 42 [RouterA-Ten-GigabitEthernet1/0/6] quit # 将聚合接口42加入VLAN42。

[RouterA] interface bridge-aggregation 42

[RouterA-Bridge-Aggregation42] port access vlan 42

[RouterA-Bridge-Aggregation42] quit

# 为VLAN40和VLAN42创建VLAN接口,并配置IP地址。 [RouterA] interface vlan-interface 40

[RouterA-Vlan-interface40] ip address 10.214.50.2 30 [RouterA-Vlan-interface40] quit [RouterA] interface vlan-interface 42

[RouterA-Vlan-interface42] ip address 10.214.50.9 30 [RouterA-Vlan-interface42] quit # 配置OSPF,发布本地三个直连网段。 [RouterA] ospf

[RouterA-ospf-1] import-route direct [RouterA-ospf-1] area 0

[RouterA-ospf-1-area-0.0.0.0] network 10.214.60.0 0.0.0.3 [RouterA-ospf-1-area-0.0.0.0] network 10.214.50.0 0.0.0.3 [RouterA-ospf-1-area-0.0.0.0] network 10.214.50.8 0.0.0.3 [RouterA-ospf-1-area-0.0.0.0] quit [RouterA-ospf-1] quit (2) 配置RouterB # 创建VLAN41、VLAN42。 system-view [RouterB] vlan 41 to 42 # 创建一个动态聚合接口41。

[RouterB] interface bridge-aggregation 41

[RouterB-Bridge-Aggregation41] link-aggregation mode dynamic [RouterB-Bridge-Aggregation41] quit

# 在聚合接口中添加成员端口Ten-GigabitEthernet1/0/1、Ten-GigabitEthernet1/0/2、Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4。 [RouterB] interface ten-gigabitethernet 1/0/1

[RouterB-Ten-GigabitEthernet1/0/1] port link-aggregation group 41 [RouterB-Ten-GigabitEthernet1/0/1] quit [RouterB] interface ten-gigabitethernet 1/0/2

[RouterB-Ten-GigabitEthernet1/0/2] port link-aggregation group 41 [RouterB-Ten-GigabitEthernet1/0/2] quit [RouterB] interface ten-gigabitethernet 1/0/3

[RouterB-Ten-GigabitEthernet1/0/3] port link-aggregation group 41 [RouterB-Ten-GigabitEthernet1/0/3] quit [RouterB] interface ten-gigabitethernet 1/0/4

[RouterB-Ten-GigabitEthernet1/0/4] port link-aggregation group 41 [RouterB-Ten-GigabitEthernet1/0/4] quit # 将聚合接口41加入VLAN41。

[RouterB] interface bridge-aggregation 41

[RouterB-Bridge-Aggregation41] port access vlan 41 [RouterB-Bridge-Aggregation41] quit # 创建一个动态聚合接口42。

[RouterB] interface bridge-aggregation 42

[RouterB-Bridge-Aggregation42] link-aggregation mode dynamic [RouterB-Bridge-Aggregation42] port access vlan 42 [RouterB-Bridge-Aggregation42] quit

# 在聚合接口中添加成员端口Ten-GigabitEthernet1/0/5、Ten-GigabitEthernet1/0/6。 [RouterB] interface ten-gigabitethernet 1/0/5

[RouterB-Ten-GigabitEthernet1/0/5] port link-aggregation group 42 [RouterB-Ten-GigabitEthernet1/0/5] quit [RouterB] interface ten-gigabitethernet 1/0/6

[RouterB-Ten-GigabitEthernet1/0/6] port link-aggregation group 42 [RouterB-Ten-GigabitEthernet1/0/6] quit # 将聚合接口42加入VLAN42。

[RouterB] interface bridge-aggregation 42

[RouterB-Bridge-Aggregation42] port access vlan 42 [RouterB-Bridge-Aggregation42] quit

# 为VLAN41和VLAN42创建VLAN接口,并配置IP地址。 [RouterB] interface vlan-interface 41

[RouterB-Vlan-interface41] ip address 10.214.50.6 30 [RouterB-Vlan-interface41] quit [RouterB] interface vlan-interface 42

[RouterB-Vlan-interface42] ip address 10.214.50.10 30 [RouterB-Vlan-interface42] quit # 配置OSPF,发布本地三个直连网段。 [RouterB] ospf

[RouterB-ospf-1] import-route direct [RouterB-ospf-1] area 0

[RouterB-ospf-1-area-0.0.0.0] network 10.214.70.0 0.0.0.3 [RouterB-ospf-1-area-0.0.0.0] network 10.214.50.0 0.0.0.3 [RouterB-ospf-1-area-0.0.0.0] network 10.214.50.8 0.0.0.3 [RouterB-ospf-1-area-0.0.0.0] quit [RouterB-ospf-1] quit (3) 配置IRF

# 创建VLAN10、VLAN20、VLAN40、VLAN41。 system-view [Sysname] vlan 10 [Sysname-vlan10] quit [Sysname] vlan 20 [Sysname-vlan20] quit [Sysname] vlan 40 [Sysname-vlan40] quit

[Sysname] vlan 41 [Sysname-vlan41] quit # 创建一个动态聚合接口10。

[Sysname] interface bridge-aggregation 10

[Sysname-Bridge-Aggregation10] link-aggregation mode dynamic [Sysname-Bridge-Aggregation10] quit

# 在聚合接口中添加成员端口,包括Ten-GigabitEthernet1/0/10、Ten-GigabitEthernet2/0/10、Ten-GigabitEthernet3/0/10、Ten-GigabitEthernet4/0/10。 [Sysname] interface ten-gigabitethernet 1/0/10

[Sysname-Ten-GigabitEthernet1/0/10] port link-aggregation group 10 [Sysname-Ten-GigabitEthernet1/0/10] quit [Sysname] interface ten-gigabitethernet 2/0/10

[Sysname-Ten-GigabitEthernet2/0/10] port link-aggregation group 10 [Sysname-Ten-GigabitEthernet2/0/10] quit [Sysname] interface ten-gigabitethernet 3/0/10

[Sysname-Ten-GigabitEthernet3/0/10] port link-aggregation group 10 [Sysname-Ten-GigabitEthernet3/0/10] quit [Sysname] interface ten-gigabitethernet 4/0/10

[Sysname-Ten-GigabitEthernet4/0/10] port link-aggregation group 10 [Sysname-Ten-GigabitEthernet4/0/10] quit # 将聚合接口10加入VLAN10。

[Sysname] interface bridge-aggregation 10

[Sysname-Bridge-Aggregation10] port access vlan 10 [Sysname-Bridge-Aggregation10] quit

# 请按2. 图12下方表格中的内容配置聚合接口20、40、41,并将聚合组加入相应VLAN,以及在聚合组中加入相应的端口,配置过程不再赘述。

# 为VLAN10、VLAN20、VLAN40、VLAN41创建VLAN接口,并配置IP地址。 [Sysname] interface vlan-interface 10

[Sysname-Vlan-interface10] ip address 10.214.10.1 24

[Sysname-Vlan-interface10] quit [Sysname] interface vlan-interface 20

[Sysname-Vlan-interface20] ip address 10.214.20.1 24 [Sysname-Vlan-interface20] quit [Sysname] interface vlan-interface 40

[Sysname-Vlan-interface40] ip address 10.214.50.1 30 [Sysname-Vlan-interface40] quit [Sysname] interface vlan-interface 41

[Sysname-Vlan-interface41] ip address 10.214.50.5 30 [Sysname-Vlan-interface41] quit # 配置OSPF,发布本地所有直连网段。 [Sysname] ospf

[Sysname-ospf-1] import-route direct [Sysname-ospf-1] area 0

[Sysname-ospf-1-area-0.0.0.0] network 10.214.10.0 0.0.0.255 [Sysname-ospf-1-area-0.0.0.0] network 10.214.20.0 0.0.0.255 [Sysname-ospf-1-area-0.0.0.0] network 10.214.50.0 0.0.0.3 [Sysname-ospf-1-area-0.0.0.0] network 10.214.50.4 0.0.0.3 [Sysname-ospf-1-area-0.0.0.0] quit [Sysname-ospf-1] quit (4) 配置DeviceE

# 创建一个动态聚合接口10。

[DeviceE] interface bridge-aggregation 10

[DeviceE-Bridge-Aggregation10] link-aggregation mode dynamic [DeviceE-Bridge-Aggregation10] quit

# 在聚合接口中添加成员端口Ten-GigabitEthernet1/0/49、Ten-GigabitEthernet1/0/50、Ten-GigabitEthernet1/0/51和Ten-GigabitEthernet1/0/52。 [DeviceE] interface ten-gigabitethernet 1/0/49

[DeviceE-Ten-GigabitEthernet1/0/49] port link-aggregation group 10 [DeviceE-Ten-GigabitEthernet1/0/49] quit [DeviceE] interface ten-gigabitethernet 1/0/50

[DeviceE-Ten-GigabitEthernet1/0/50] port link-aggregation group 10 [DeviceE-Ten-GigabitEthernet1/0/50] quit [DeviceE] interface ten-gigabitethernet 1/0/51

[DeviceE-Ten-GigabitEthernet1/0/51] port link-aggregation group 10 [DeviceE-Ten-GigabitEthernet1/0/51] quit [DeviceE] interface ten-gigabitethernet 1/0/52

[DeviceE-Ten-GigabitEthernet1/0/52] port link-aggregation group 10 [DeviceE-Ten-GigabitEthernet1/0/52] quit

本文来源:https://www.bwwdw.com/article/v6do.html

Top