兩組Juniper數據核心經過配置MC-LAG實現防止環路的出現網絡
1、背景ide
有兩組數據核心交換機部署在兩個不一樣的網絡機房,目前狀態爲單模光纖三層網絡互連,可是業務部門提出了一個新的網絡需求,要把建三個網段、網關啓用在A座機房的核心交換機上,C座機房也要使用這三個網段,幸虧在同一個園區,能夠再部署兩根單模光纖,經過打通二層網絡的方式實現,若是兩個機房在異地就只能經過vpls的方式實現了。spa
2、網絡拓撲orm
A座核心交換機是兩臺Juniper的EX9200系列的核心交換機組成的VRRP,C座核心是兩臺Juniper的ip
EX9200系列的核心交換機組成的VRRP,新添加的三個網段的網關配置在A座核心上,若是沒有配置mc-lag,四臺核心組成了環路,經過配置mc-lag,實現防環機制。在匯聚層上因爲雙線分別上聯兩臺核心交換機,也有環路出現,這兒能夠使用Juniper自帶的防環配置RTG,而不採用生成樹協議。RTG的使用比MC-LAG要簡單,可是隻有一端爲單臺設備時才能使用,所以兩組核心之間不能使用RTG配置進行防環。部署
3、配置get
一、在A核心交換機上it
(1)在主機上io
set vlans vlan452 vlan-id 452ast
set vlans vlan452 l3-interface irb.452
set vlans vlan452 description "XinXiFaBu-VLAN"
set interfaces irb unit 452 family inet address x.x.152.60/26
set interfaces irb unit 452 family inet address x.x.152.60/26 vrrp-group 63 virtual-address x.x.152.62
set interfaces irb unit 452 family inet address x.x.152.60/26 vrrp-group 63 priority 150
set interfaces irb unit 452 family inet address x.x.152.60/26 vrrp-group 63 preempt
set interfaces irb unit 452 family inet address x.x.152.60/26 vrrp-group 63 accept-data
set vlans vlan652 vlan-id 652
set vlans vlan652 l3-interface irb.652
set vlans vlan652 description "HuLianHuTong-VLAN"
set interfaces irb unit 652 family inet address x.x.152.92/27 vrrp-group 64 virtual-address x.x.152.94
set interfaces irb unit 652 family inet address x.x.152.92/27 vrrp-group 64 priority 150
set interfaces irb unit 652 family inet address x.x.152.92/27 vrrp-group 64 preempt
set interfaces irb unit 652 family inet address x.x.152.92/27 vrrp-group 64 accept-data
set vlans vlan752 vlan-id 752
set vlans vlan752 l3-interface irb.752
set vlans vlan752 description "LuBo-VLAN"
set interfaces irb unit 752 family inet address x.x.152.252/25 vrrp-group 65 virtual-address x.x.152.254
set interfaces irb unit 752 family inet address x.x.152.252/25 vrrp-group 65 priority 150
set interfaces irb unit 752 family inet address x.x.152.252/25 vrrp-group 65 preempt
set interfaces irb unit 752 family inet address x.x.152.252/25 vrrp-group 65 accept-data
set protocols iccp peer x.x.x.18 redundancy-group-id-list 4 // 指向A組的備核心
set interfaces ge-3/0/9 ether-options 802.3ad ae4
set interfaces ge-3/0/9 description "To xxx-EX92xx-1_ge-5/0/9" // 指向C組的主核心
set interfaces ae4 vlan-tagging
set interfaces ae4 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae4 unit 0 family ethernet-switching vlan members 452 //新添加的三個網段
set interfaces ae4 unit 0 family ethernet-switching vlan members 652
set interfaces ae4 unit 0 family ethernet-switching vlan members 752
set interfaces ae4 description "To xxx-EX92xx-1-ae1"
set interfaces ae4 aggregated-ether-options lacp active
set interfaces ae4 aggregated-ether-options lacp periodic fast
set interfaces ae4 aggregated-ether-options lacp system-id 00:01:02:03:04:07
set interfaces ae4 aggregated-ether-options lacp admin-key 4
set interfaces ae4 aggregated-ether-options mc-ae mc-ae-id 4
set interfaces ae4 aggregated-ether-options mc-ae redundancy-group 4
set interfaces ae4 aggregated-ether-options mc-ae chassis-id 0
set interfaces ae4 aggregated-ether-options mc-ae mode active-standby
set interfaces ae4 aggregated-ether-options mc-ae status-control active
set interfaces ae4 aggregated-ether-options mc-ae switchover-mode revertive
(2)在備機上
set vlans vlan452 vlan-id 452
set vlans vlan452 l3-interface irb.452
set vlans vlan452 description "XinXiFaBu-VLAN"
set interfaces irb unit 452 family inet address x.x.152.61/26 vrrp-group 63 virtual-address x.x.152.62
set interfaces irb unit 452 family inet address x.x.152.61/26 vrrp-group 63 priority 100
set interfaces irb unit 452 family inet address x.x.152.61/26 vrrp-group 63 accept-data
set vlans vlan652 vlan-id 652
set vlans vlan652 l3-interface irb.652
set vlans vlan652 description "HuLianHuTong-VLAN"
set interfaces irb unit 652 family inet address x.x.152.93/27 vrrp-group 64 virtual-address x.x.152.94
set interfaces irb unit 652 family inet address x.x.152.93/27 vrrp-group 64 priority 100
set interfaces irb unit 652 family inet address x.x.152.93/27 vrrp-group 64 accept-data
set vlans vlan752 vlan-id 752
set vlans vlan752 l3-interface irb.752
set vlans vlan752 description "LuBo-VLAN"
set interfaces irb unit 752 family inet address x.x.152.253/25
set interfaces irb unit 752 family inet address x.x.152.253/25 vrrp-group 65 virtual-address x.x.152.254
set interfaces irb unit 752 family inet address x.x.152.253/25 vrrp-group 65 priority 100
set interfaces irb unit 752 family inet address x.x.152.253/25 vrrp-group 65 accept-data
set protocols iccp peer x.x.x.17 redundancy-group-id-list 4 // 指向A組的主核心
set interfaces ge-3/0/9 description "To xx-C-x-EX92xx-2_ge-5/0/9" // 指向C組的備核心
set interfaces ge-3/0/9 ether-options 802.3ad ae4
set interfaces ae4 description "To xx-C-EX92xx-2-ae1"
set interfaces ae4 vlan-tagging
set interfaces ae4 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae4 unit 0 family ethernet-switching vlan members 452
set interfaces ae4 unit 0 family ethernet-switching vlan members 652
set interfaces ae4 unit 0 family ethernet-switching vlan members 752
set interfaces ae4 aggregated-ether-options lacp active
set interfaces ae4 aggregated-ether-options lacp periodic fast
set interfaces ae4 aggregated-ether-options lacp system-id 00:01:02:03:04:07
set interfaces ae4 aggregated-ether-options lacp admin-key 4
set interfaces ae4 aggregated-ether-options mc-ae mc-ae-id 4
set interfaces ae4 aggregated-ether-options mc-ae redundancy-group 4
set interfaces ae4 aggregated-ether-options mc-ae chassis-id 1
set interfaces ae4 aggregated-ether-options mc-ae mode active-standby
set interfaces ae4 aggregated-ether-options mc-ae status-control standby
二、在C核心交換機上
set interfaces ae1 vlan-tagging
set interfaces ae1 aggregated-ether-options lacp active
set interfaces ae1 aggregated-ether-options lacp periodic fast
三、在匯聚層上
set ethernet-switching-options redundant-trunk-group group RTG-1 interface ge-0/1/0.0 primary
set ethernet-switching-options redundant-trunk-group group RTG-1 interface ge-0/1/1.0
set ethernet-switching-options storm-control interface all