Настройка сети центра данных на базе VS и VRRP
Поддерживаемые продукты и версии
Данный пример относится к модели CE12800 по версии V100R002C00 и более поздней версии.
Требования к сети
В сети ЦОД на Figure 1-9 коммутатор CE12800 соединен с несколькими коммутаторами доступа. Нужно создать устройства VS на CE12800, чтобы они выполняли функции коммутатора агрегации и функции базового коммутатора и создать сеть с трехуровневой архитектурой с одним базовым коммутатором, двумя коммутаторами агрегации и несколькими коммутаторами доступа. В трехуровневой сети коммутатор доступа должен иметь два соединения (dual-home) с двумя коммутаторами агрегации, при этом на коммутаторах агрегации нужно настроить VRRP для резервирования шлюза.
Имя устройства |
Номер интерфейса |
IP-адрес |
Связанное устройство и номер интерфейса |
---|---|---|---|
Маршрутизатор | Eth-Trunk1
|
10.10.10.1/24 |
vs1: Eth-Trunk1 |
VS1 |
Eth-Trunk1
|
10.10.10.2/24 |
Маршрутизатор: Eth-Trunk1 |
Eth-Trunk2
|
10.10.20.1/24 |
vs2: Eth-Trunk2 |
|
Eth-Trunk3
|
10.10.30.1/24 |
vs3: Eth-Trunk3 |
|
VS2 |
Eth-Trunk2
|
10.10.20.2/24 |
vs1: Eth-Trunk2 |
10GE2/0/3 |
VLANIF 10: 10.10.40.1/24 |
SwitchB: 10GE1/0/1 |
|
10GE2/0/4 |
VLANIF 20: 10.10.50.1/24 |
SwitchC: 10GE1/0/1 |
|
vs3 |
Eth-Trunk3
|
10.10.30.2/24 |
vs1: Eth-Trunk3 |
10GE3/0/3 |
VLANIF 10: 10.10.40.2/24 |
SwitchB: 10GE1/0/2 |
|
10GE3/0/4 |
VLANIF 20: 10.10.50.2/24 |
SwitchC: 10GE1/0/2 |
|
SwitchB |
10GE1/0/1 |
- |
vs2: 10GE2/0/3 |
10GE1/0/2 |
- |
vs3: 10GE3/0/3 |
|
SwitchC |
10GE1/0/1 |
- |
vs2: 10GE2/0/4 |
10GE1/0/2 |
- |
vs3: 10GE3/0/4 |
План конфигурации
- Создайте VS как коммутатор агрегации и базовый коммутатор.
- Настройте VRRP на VS коммутаторов агрегации для резервирования шлюзов.
- Настройте маршруты между устройствами в нисходящем и восходящем направлении для реализации взаимодействия на уровнях 2 и 3.
Procedure
- На Switch A настройте vs1 в
качестве коммутатора опорной сети, а vs2 и vs3 - в качестве коммутаторов
агрегации.
NOTE:
Функция VS контролируется лицензией и по умолчанию отключена на новом устройстве. Чтобы использовать функцию VS, подайте заявку и приобретите лицензию в местном представительстве Huawei или у агента Huawei.
# Создайте VS1, VS2 и VS3 в групповом режиме, и присвойте интерфейсы в слотах 1, 2 и 3 устройствам VS 1, 2 и 3 соответственно.
<HUAWEI>system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] admin [~SwitchA-admin] virtual-system vs1 [*SwitchA-admin-vs:vs1] port-mode group [*SwitchA-admin-vs:vs1] assign interface 10ge 1/0/0 Warning: All configurations of the interfaces will be deleted. Interfaces 10GE1/0/0-23 of the same group will be assigned. Continue? [Y/N]: y [*SwitchA-admin-vs:vs1] quit [*SwitchA-admin] virtual-system vs2 [*SwitchA-admin-vs:vs2] port-mode group [*SwitchA-admin-vs:vs2] assign interface 10ge 2/0/0 Warning: All configurations of the interfaces will be deleted. Interfaces 10GE2/0/0-23 of the same group will be assigned. Continue? [Y/N]: y [*SwitchA-admin-vs:vs2] quit [*SwitchA-admin] virtual-system vs3 [*SwitchA-admin-vs:vs3] port-mode group [*SwitchA-admin-vs:vs3] assign interface 10ge 3/0/0 Warning: All configurations of the interfaces will be deleted. Interfaces 10GE3/0/0-23 of the same group will be assigned. Continue? [Y/N]: y [*SwitchA-admin-vs:vs3] commit [~SwitchA-admin-vs:vs3] return
# Настройте управляющие IP-адреса и управляющие учетные записи для VS.
<SwitchA>switch virtual-system vs1 <SwitchA-vs1>system-view [~SwitchA-vs1] interface MEth 0/0/0 [~SwitchA-vs1-MEth0/0/0] ip address 10.1.1.10 24 [*SwitchA-vs1-MEth0/0/0] quit [*SwitchA-vs1] user-interface vty 0 4 [*SwitchA-vs1-ui-vty0-4] authentication-mode aaa [*SwitchA-vs1-ui-vty0-4] user privilege level 3 [*SwitchA-vs1-ui-vty0-4] quit [*SwitchA-vs1] aaa [*SwitchA-vs1-aaa] local-user vs1_user password cipher VS1_password [*SwitchA-vs1-aaa] local-user vs1_user service-type telnet [*SwitchA-vs1-aaa] local-user vs1_user level 3 [*SwitchA-vs1-aaa] quit [*SwitchA-vs1] undo telnet server disable [*SwitchA-vs1] commit [~SwitchA-vs1] quit <SwitchA-vs1>quit
# Конфигурации vs2 и vs3 аналогичны конфигурации vs1, поэтому они здесь не упоминаются.
- Настройте
VLAN на уровнях доступа и агрегации для реализации совместимости на
уровне 2.
# На vs2 и vs3 настройте интерфейсы, соединенные с SwitchB, чтобы устройства пропускали пакеты из VLAN 10.
<SwitchA>switch virtual-system vs2 <SwitchA-vs2>system-view [~SwitchA-vs2] vlan batch 10 [*SwitchA-vs2] interface 10ge 2/0/3 [*SwitchA-vs2-10GE2/0/3] description To_SwitchB [*SwitchA-vs2-10GE2/0/3] port link-type trunk [*SwitchA-vs2-10GE2/0/3] undo port trunk allow-pass vlan 1 [*SwitchA-vs2-10GE2/0/3] port trunk allow-pass vlan 10 [*SwitchA-vs2-10GE2/0/3] quit [*SwitchA-vs2] interface vlanif 10 [*SwitchA-vs2-Vlanif10] ip address 10.10.40.1 24 [*SwitchA-vs2-Vlanif10] commit [~SwitchA-vs2-Vlanif10] return <SwitchA-vs2>quit <SwitchA>switch virtual-system vs3 <SwitchA-vs3>system-view [~SwitchA-vs3] vlan batch 10 [*SwitchA-vs3] interface 10ge 3/0/3 [*SwitchA-vs3-10GE2/0/3] description To_SwitchB [*SwitchA-vs3-10GE2/0/3] port link-type trunk [*SwitchA-vs3-10GE2/0/3] undo port trunk allow-pass vlan 1 [*SwitchA-vs3-10GE2/0/3] port trunk allow-pass vlan 10 [*SwitchA-vs3] interface vlanif 10 [*SwitchA-vs3-Vlanif10] ip address 10.10.40.2 24 [*SwitchA-vs3-Vlanif10] commit [~SwitchA-vs3-Vlanif10] return <SwitchA-vs3>quit
# На SwitchB настройте интерфейсы, соединенные с vs2 и vs3, чтобы устройства пропускали пакеты из VLAN 10.
<HUAWEI>system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] vlan batch 10 [*SwitchB] interface 10ge 1/0/1 [*SwitchB-10GE1/0/1] description To_vs2 [*SwitchB-10GE1/0/1] port link-type trunk [*SwitchB-10GE1/0/1] undo port trunk allow-pass vlan 1 [*SwitchB-10GE1/0/1] port trunk allow-pass vlan 10 [*SwitchB-10GE1/0/1] quit [*SwitchB] interface 10ge 1/0/2 [*SwitchB-10GE1/0/2] description To_vs3 [*SwitchB-10GE1/0/2] port link-type trunk [*SwitchB-10GE1/0/2] undo port trunk allow-pass vlan 1 [*SwitchB-10GE1/0/2] port trunk allow-pass vlan 10 [*SwitchB-10GE1/0/2] quit [*SwitchB] commit
# На vs2 и vs3 настройте интерфейсы, соединенные с SwitchC, чтобы устройства пропускали пакеты из VLAN 20 в соответствии с предыдущей конфигурацией. Конфигурация здесь не упоминается.
- Настройте VRRP на vs2 и vs3 на уровне агрегации.
# На vs2 и vs3 создайте VRRP group 1. Для vs2 задайте приоритет 120, а для vs3 - приоритет 100, чтобы устройство vs2 стало ведущим и передавало трафик SwitchB в восходящем направлении.
<SwitchA>switch virtual-system vs2 <SwitchA-vs2>system-view [~SwitchA-vs2] interface vlanif 10 [~SwitchA-vs2-Vlanif10] vrrp vrid 1 virtual-ip 10.10.40.100 [*SwitchA-vs2-Vlanif10] vrrp vrid 1 priority 120 [*SwitchA-vs2-Vlanif10] commit [~SwitchA-vs2-Vlanif10] return <SwitchA-vs2>quit <SwitchA>switch virtual-system vs3 <SwitchA-vs3>system-view [~SwitchA-vs3] interface vlanif 10 [~SwitchA-vs3-Vlanif10] vrrp vrid 1 virtual-ip 10.10.40.100 [*SwitchA-vs3-Vlanif10] commit [~SwitchA-vs3-Vlanif10] return <SwitchA-vs3>quit
# На vs2 и vs3 создайте VRRP group 2. Для vs3 задайте приоритет 120, а для vs2 - приоритет 100, чтобы устройство vs3 стало ведущим и передавало трафик SwitchС в восходящем направлении.
<SwitchA>switch virtual-system vs2 <SwitchA-vs2>system-view [~SwitchA-vs2] interface vlanif 20 [~SwitchA-vs2-Vlanif20] vrrp vrid 2 virtual-ip 10.10.50.100 [*SwitchA-vs2-Vlanif20] commit [~SwitchA-vs2-Vlanif20] return <SwitchA-vs2>quit <SwitchA>switch virtual-system vs3 <SwitchA-vs3>system-view [~SwitchA-vs3] interface vlanif 20 [~SwitchA-vs3-Vlanif20] vrrp vrid 2 virtual-ip 10.10.50.100 [*SwitchA-vs2-Vlanif20] vrrp vrid 2 priority 120 [*SwitchA-vs3-Vlanif20] commit [~SwitchA-vs3-Vlanif20] return <SwitchA-vs3>quit
- Настройте маршруты между маршрутизатором,
коммутаторами агрегации и базовым коммутатором для реализации соединения
уровня 3.
# Задайте IP-адрес для каждого интерфейса. Ниже приводится пример конфигурирования vs1.
<SwitchA>switch virtual-system vs1 <SwitchA-vs1>system-view [~SwitchA-vs1] interface eth-trunk 1 [*SwitchA-vs1-Eth-Trunk1] description To_Router [*SwitchA-vs1-Eth-Trunk1] trunkport 10ge 1/0/1 1/0/2 [*SwitchA-vs1-Eth-Trunk1] undo portswitch [*SwitchA-vs1-Eth-Trunk1] ip address 10.10.10.2 24 [*SwitchA-vs1-Eth-Trunk1] quit [*SwitchA-vs1] interface eth-trunk 2 [*SwitchA-vs1-Eth-Trunk2] description To_vs2 [*SwitchA-vs1-Eth-Trunk2] trunkport 10ge 1/0/3 1/0/4 [*SwitchA-vs1-Eth-Trunk2] undo portswitch [*SwitchA-vs1-Eth-Trunk2] ip address 10.10.20.1 24 [*SwitchA-vs1-Eth-Trunk2] quit [*SwitchA-vs1] interface eth-trunk 3 [*SwitchA-vs1-Eth-Trunk3] description To_vs3 [*SwitchA-vs1-Eth-Trunk3] trunkport 10ge 1/0/5 1/0/6 [*SwitchA-vs1-Eth-Trunk3] undo portswitch [*SwitchA-vs1-Eth-Trunk3] ip address 10.10.30.1 24 [*SwitchA-vs1-Eth-Trunk3] commit [~SwitchA-vs1-Eth-Trunk3] return <SwitchA-vs1>quit
# Конфигурации маршрутизатора, vs2 и vs3 аналогичны конфигурации vs1, поэтому они здесь не упоминаются.
# Настройте OSPF на маршрутизаторе, vs1, vs2 и vs3. Ниже приводится пример настройки vs1.
<SwitchA>switch virtual-system vs1 <SwitchA-vs1>system-view [~SwitchA-vs1] ospf 1 [*SwitchA-vs1-ospf-1] area 0 [*SwitchA-vs1-ospf-1-area-0.0.0.0] network 10.10.10.0 0.0.0.255 [*SwitchA-vs1-ospf-1-area-0.0.0.0] network 10.10.20.0 0.0.0.255 [*SwitchA-vs1-ospf-1-area-0.0.0.0] network 10.10.30.0 0.0.0.255 [*SwitchA-vs1-ospf-1-area-0.0.0.0] commit [~SwitchA-vs1-ospf-1-area-0.0.0.0] return <SwitchA-vs1>quit
# Конфигурации маршрутизатора, vs2 и vs3 аналогичны конфигурации vs1, поэтому они здесь не упоминаются.
Проверка конфигурации
После выполнения конфигурирования проверьте, могут ли серверы успешно выполнить операцию ping маршрутизатора (нужно установить шлюз по умолчанию для серверов). В этом примере серверы выполняют ping маршрутизатора.
PC>ping 10.10.10.1 Ping 10.10.10.1: 32 data bytes, Press Ctrl_C to break From 10.10.10.1: bytes=32 seq=1 ttl=253 time=93 ms From 10.10.10.1: bytes=32 seq=2 ttl=253 time=125 ms From 10.10.10.1: bytes=32 seq=3 ttl=253 time=94 ms From 10.10.10.1: bytes=32 seq=4 ttl=253 time=47 ms From 10.10.10.1: bytes=32 seq=5 ttl=253 time=109 ms --- 10.10.10.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 47/93/125 ms
Файлы конфигурации
Файл конфигурации Router
# sysname Router # interface Eth-Trunk1 ip address 10.10.10.1 255.255.255.0 # interface XGigabitEthernet1/0/1 eth-trunk 1 # interface XGigabitEthernet1/0/2 eth-trunk 1 # ospf 1 area 0.0.0.0 network 10.10.10.0 0.0.0.255 # return
Файл конфигурации SwitchA
# sysname SwitchA # admin virtual-system vs1 port-mode group resource u4route upper-limit 60000 resource m4route upper-limit 1000 resource u6route upper-limit 16000 resource m6route upper-limit 100 resource vlan upper-limit 4063 resource mpls enable resource trill enable resource mcast enable resource vpn-instance upper-limit 4096 resource cpu weight 5 resource memory ratio-threshold 100 assign interface 10GE1/0/0 assign interface 10GE1/0/1 assign interface 10GE1/0/2 assign interface 10GE1/0/3 assign interface 10GE1/0/4 assign interface 10GE1/0/5 assign interface 10GE1/0/6 assign interface 10GE1/0/7 assign interface 10GE1/0/8 assign interface 10GE1/0/9 assign interface 10GE1/0/10 assign interface 10GE1/0/11 assign interface 10GE1/0/12 assign interface 10GE1/0/13 assign interface 10GE1/0/14 assign interface 10GE1/0/15 assign interface 10GE1/0/16 assign interface 10GE1/0/17 assign interface 10GE1/0/18 assign interface 10GE1/0/19 assign interface 10GE1/0/20 assign interface 10GE1/0/21 assign interface 10GE1/0/22 assign interface 10GE1/0/23 virtual-system vs2 port-mode group resource u4route upper-limit 60000 resource m4route upper-limit 1000 resource u6route upper-limit 16000 resource m6route upper-limit 100 resource vlan upper-limit 4063 resource mpls enable resource trill enable resource mcast enable resource vpn-instance upper-limit 4096 resource cpu weight 5 resource memory ratio-threshold 100 assign interface 10GE2/0/0 assign interface 10GE2/0/1 assign interface 10GE2/0/2 assign interface 10GE2/0/3 assign interface 10GE2/0/4 assign interface 10GE2/0/5 assign interface 10GE2/0/6 assign interface 10GE2/0/7 assign interface 10GE2/0/8 assign interface 10GE2/0/9 assign interface 10GE2/0/10 assign interface 10GE2/0/11 assign interface 10GE2/0/12 assign interface 10GE2/0/13 assign interface 10GE2/0/14 assign interface 10GE2/0/15 assign interface 10GE2/0/16 assign interface 10GE2/0/17 assign interface 10GE2/0/18 assign interface 10GE2/0/19 assign interface 10GE2/0/20 assign interface 10GE2/0/21 assign interface 10GE2/0/22 assign interface 10GE2/0/23 virtual-system vs3 port-mode group resource u4route upper-limit 60000 resource m4route upper-limit 1000 resource u6route upper-limit 16000 resource m6route upper-limit 100 resource vlan upper-limit 4063 resource mpls enable resource trill enable resource mcast enable resource vpn-instance upper-limit 4096 resource cpu weight 5 resource memory ratio-threshold 100 assign interface 10GE3/0/0 assign interface 10GE3/0/1 assign interface 10GE3/0/2 assign interface 10GE3/0/3 assign interface 10GE3/0/4 assign interface 10GE3/0/5 assign interface 10GE3/0/6 assign interface 10GE3/0/7 assign interface 10GE3/0/8 assign interface 10GE3/0/9 assign interface 10GE3/0/10 assign interface 10GE3/0/11 assign interface 10GE3/0/12 assign interface 10GE3/0/13 assign interface 10GE3/0/14 assign interface 10GE3/0/15 assign interface 10GE3/0/16 assign interface 10GE3/0/17 assign interface 10GE3/0/18 assign interface 10GE3/0/19 assign interface 10GE3/0/20 assign interface 10GE3/0/21 assign interface 10GE3/0/22 assign interface 10GE3/0/23 # return
Файл конфигурации vs1
# sysname vs1 # aaa local-user vs1_user password cipher %^%#TT4N+w]%[C+rM>)S8Ti!'p1iV@RZh(3MO7QGd96Z%^%# local-user vs1_user service-type telnet local-user vs1_user level 3 # interface MEth0/0/0 ip address 10.1.1.10 255.255.255.0 # interface Eth-Trunk1 undo portswitch description To_Router ip address 10.10.10.2 255.255.255.0 # interface Eth-Trunk2 undo portswitch description To_vs2 ip address 10.10.20.1 255.255.255.0 # interface Eth-Trunk3 undo portswitch description To_vs3 ip address 10.10.30.1 255.255.255.0 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 2 # interface 10GE1/0/4 eth-trunk 2 # interface 10GE1/0/5 eth-trunk 3 # interface 10GE1/0/6 eth-trunk 3 # ospf 1 area 0.0.0.0 network 10.10.10.0 0.0.0.255 network 10.10.20.0 0.0.0.255 network 10.10.30.0 0.0.0.255 # user-interface vty 0 4 authentication-mode aaa user privilege level 3 # return
Файл конфигурации vs2
# sysname vs2 # vlan batch 10 20 # aaa local-user vs2_user password cipher %^%#%j]%Lv%StAqIveR"YfuS<{^%;~p*$D<&&@X/Xs(/%^%# local-user vs2_user service-type telnet local-user vs2_user level 3 # interface Vlanif10 ip address 10.10.40.1 24 vrrp vrid 1 virtual-ip 10.10.40.100 vrrp vrid 1 priority 120 # interface Vlanif20 ip address 10.10.50.1 24 vrrp vrid 2 virtual-ip 10.10.50.100 # interface MEth0/0/0 ip address 10.1.1.20 255.255.255.0 # interface Eth-Trunk2 undo portswitch description To_vs1 ip address 10.10.20.2 255.255.255.0 # interface 10GE2/0/1 eth-trunk 2 # interface 10GE2/0/2 eth-trunk 2 # interface 10GE2/0/3 description To_SwitchB port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 # interface 10GE2/0/4 description To_SwitchC port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 # ospf 1 area 0.0.0.0 network 10.10.20.0 0.0.0.255 network 10.10.40.0 0.0.0.255 network 10.10.50.0 0.0.0.255 # user-interface vty 0 4 authentication-mode aaa user privilege level 3 # return
Файл конфигурации vs3
# sysname vs3 # vlan batch 10 20 # aaa local-user vs3_user password cipher %^%#UcmwI^>OxIF$(.XyM&%I0J}ASW#3:OxGvM;^.yF!%^%# local-user vs3_user service-type telnet local-user vs3_user level 3 # interface Vlanif10 ip address 10.10.40.2 24 vrrp vrid 1 virtual-ip 10.10.40.100 # interface Vlanif20 ip address 10.10.50.2 24 vrrp vrid 2 virtual-ip 10.10.50.100 vrrp vrid 2 priority 120 # interface MEth0/0/0 ip address 10.1.1.30 255.255.255.0 # interface Eth-Trunk3 undo portswitch description To_vs1 ip address 10.10.30.2 255.255.255.0 # interface 10GE3/0/1 eth-trunk 3 # interface 10GE3/0/2 eth-trunk 3 # interface 10GE3/0/3 description To_SwitchB port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 # interface 10GE3/0/4 description To_SwitchC port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 # ospf 1 area 0.0.0.0 network 10.10.30.0 0.0.0.255 network 10.10.40.0 0.0.0.255 network 10.10.50.0 0.0.0.255 # user-interface vty 0 4 authentication-mode aaa user privilege level 3 # return
Файл конфигурации SwitchB на уровне доступа
# sysname SwitchB # vlan batch 10 # interface 10GE1/0/1 description To_vs2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 # interface 10GE1/0/2 description To_vs3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 # return
Файл конфигурации SwitchС на уровне доступа
# sysname SwitchC # vlan batch 20 # interface 10GE1/0/1 description To_vs2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 # interface 10GE1/0/2 description To_vs3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 # return