使用服务提供商样式接口配置的 VXLAN 第 3 层网关
在平台即服务 (PaaS) 和基础架构即服务 (IaaS) 部署中,客户云和私有云提供商通常使用同一叶设备通过 VXLAN 核心网络转发网络流量。客户云和私有云提供商现在可以使用服务提供商样式的接口配置 CLI 来配置叶设备,以充当第 3 层网关。他们还可以使用服务提供商风格的 CLI 配置多个接口,这些接口可映射到同一叶设备上的同一 VLAN。
服务提供商样式的 CLI 可在以下设备上使用:
-
EX4650、QFX5110、QFX5120-32C、QFX5120-48T、QFX5120-48Y、QFX5120-48YM — 从 Junos OS 22.2R1 版开始
您可以使用服务提供商样式的 CLI 来执行以下任务:
-
在单个物理接口上配置多个逻辑接口。
-
将叶设备配置为边缘路由桥接 (ERB) 和中心路由桥接 (CRB) 叠加中的第 3 层网关。
-
将集成路由和桥接 (IRB) 接口映射到虚拟网络标识符 (VNI)。
-
执行 VXLAN 路由。
-
配置 ERB 叠加。
-
配置 CRB 叠加。
-
配置 VLAN ID。
-
将 VLAN ID 配置为 none。
-
配置 VLAN 感知捆绑服务。
-
配置虚拟网关地址。
注意:我们要求您在
no-gateway-community
其中使用虚拟网关地址配置 IRB 接口的每个 EVPN 路由实例的[edit routing-instances EVPN-instance-name protocols evpn default-gateway]
层次结构级别配置选项。或者,您也可以在支持此级别配置的平台上,[edit protocols evpn default-gateway]
在层次结构级别全局配置no-gateway-community
该选项,如此示例所示。有关使用no-gateway-community
选项的详细信息,请参阅 default-gateway。 -
将一个 IRB 接口映射到一个 VLAN,或将多个 IRB 接口映射到多个 VLAN。
- 将 VLAN ID 分配给 VLAN ID 与 VLAN ID 相同的 IRB 接口,或分配不同的 VLAN ID。
好处
-
您可以使用服务提供商样式接口样式将叶设备配置为充当第 3 层网关。
-
您还可以使用服务提供商样式接口配置在单个叶设备上配置多个接口,并将其映射到同一 VLAN。
使用服务提供商样式接口配置的 ERB 叠加网络中的第 3 层网关
枝叶 1
set chassis aggregated-devices ethernet device-count 20 set interfaces et-2/0/5 description "To PORT-1 --> 1/13" set interfaces et-2/0/5 flexible-vlan-tagging set interfaces et-2/0/5 encapsulation extended-vlan-bridge set interfaces et-2/0/5 unit 100 vlan-id 100 set interfaces et-2/0/5 unit 200 vlan-id 200 set interfaces et-2/0/8 description "To Spine-1 in ae31" set interfaces et-2/0/8 ether-options 802.3ad ae31 set interfaces et-2/0/11 description "To Spine-1 in ae31" set interfaces et-2/0/11 ether-options 802.3ad ae31 set interfaces ae31 description "To Spine-1" set interfaces ae31 aggregated-ether-options lacp active set interfaces ae31 aggregated-ether-options lacp periodic fast set interfaces ae31 aggregated-ether-options lacp system-id 11:11:11:11:11:11 set interfaces ae31 unit 0 family inet address 10.40.1.2/24 set interfaces et-2/0/9 description "To spine-2" set interfaces et-2/0/9 unit 0 family inet address 10.50.1.2/24 set interfaces et-2/0/12:0 description "To CE-1 in ae12" set interfaces et-2/0/12:0 ether-options 802.3ad ae12 set interfaces ae12 description "To CE-1" set interfaces ae12 flexible-vlan-tagging set interfaces ae12 encapsulation extended-vlan-bridge set interfaces ae12 esi 00:12:12:12:12:12:12:12:12:12 set interfaces ae12 esi all-active set interfaces ae12 aggregated-ether-options lacp active set interfaces ae12 aggregated-ether-options lacp periodic fast set interfaces ae12 aggregated-ether-options lacp system-id 12:12:12:12:12:12 set interfaces ae12 unit 100 vlan-id 100 set interfaces ae12 unit 200 vlan-id 200 set interfaces lo0 unit 0 family inet address 10.10.10.10/24 primary set interfaces irb unit 100 virtual-gateway-accept-data set interfaces irb unit 100 family inet address 10.100.1.1/24 preferred set interfaces irb unit 100 family inet address 10.100.1.1/24 virtual-gateway-address 10.100.1.254 set interfaces irb unit 100 family inet6 address abcd::0010:0100:0001:0001/96 preferred set interfaces irb unit 100 family inet6 address abcd::abcd::0010:0100:0001:0001/96 virtual-gateway-address abcd::0192:0100:0001:0254 set interfaces irb unit 100 virtual-gateway-v4-mac 00:10:01:00:01:fe set interfaces irb unit 100 virtual-gateway-v6-mac 00:10:01:00:02:fe set interfaces irb unit 200 virtual-gateway-accept-data set interfaces irb unit 200 family inet address 10.200.1.1/24 preferred set interfaces irb unit 200 family inet address 10.200.1.1/24 virtual-gateway-address 10.200.1.254 set interfaces irb unit 200 family inet6 address abcd::abcd::0010:0200:0001:0001/24 preferred set interfaces irb unit 200 family inet6 address abcd::abcd::0010:0200:0001:0001/24 virtual-gateway-address abcd::0010:0200:0001:0254 set interfaces irb unit 200 virtual-gateway-v4-mac 00:10:01:00:01:fe set interfaces irb unit 200 virtual-gateway-v6-mac 00:10:01:00:00:01:fe set routing-instances evpn_vlan_aware instance-type mac-vrf set routing-instances evpn_vlan_aware protocols evpn encapsulation vxlan set routing-instances evpn_vlan_aware protocols evpn default-gateway no-gateway-community set routing-instances evpn_vlan_aware vtep-source-interface lo0.0 set routing-instances evpn_vlan_aware service-type vlan-aware set routing-instances evpn_vlan_aware route-distinguisher 1010:100200 set routing-instances evpn_vlan_aware vrf-target target:666:100200 set routing-instances evpn_vlan_aware vlans V100 vlan-id 100 set routing-instances evpn_vlan_aware vlans V100 interface et-2/0/5.100 set routing-instances evpn_vlan_aware vlans V100 interface ae12.100 set routing-instances evpn_vlan_aware vlans V100 l3-interface irb.100 set routing-instances evpn_vlan_aware vlans V100 vxlan vni 1100 set routing-instances evpn_vlan_aware vlans V200 vlan-id 200 set routing-instances evpn_vlan_aware vlans V200 interface et-2/0/5.200 set routing-instances evpn_vlan_aware vlans V200 interface ae12.200 set routing-instances evpn_vlan_aware vlans V200 l3-interface irb.200 set routing-instances evpn_vlan_aware vlans V200 vxlan vni 1200 set routing-options router-id 10.10.10.10 set routing-options autonomous-system 666 set protocols bgp group vteps type internal set protocols bgp group vteps local-address 10.10.10.10 set protocols bgp group vteps family evpn signaling set protocols bgp group vteps neighbor 10.30.30.30 set protocols bgp group vteps neighbor 10.20.20.20 set protocols ospf area 0.0.0.0 interface et-2/0/9.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ae31.0
主干 1
set chassis aggregated-devices ethernet device-count 20 set interfaces et-0/0/10 description "To Leaf-1 in ae31" set interfaces et-0/0/10 ether-options 802.3ad ae31 set interfaces et-0/0/13 description "To Leaf-1 in ae31" set interfaces et-0/0/13 ether-options 802.3ad ae31 set interfaces ae31 description "To Leaf-1" set interfaces ae31 aggregated-ether-options lacp active set interfaces ae31 aggregated-ether-options lacp periodic fast set interfaces ae31 aggregated-ether-options lacp system-id 30:30:30:30:30:30 set interfaces ae31 unit 0 family inet address 10.40.1.1/24 set interfaces et-0/0/1 description "To Leaf-2" set interfaces et-0/0/1 unit 0 family inet address 10.30.1.1/24 set interfaces et-0/0/16 description "To Leaf-3" set interfaces et-0/0/16 unit 0 family inet address 10.40.1.1/24 set interfaces lo0 unit 0 family inet address 10.50.40.1/24 primary set protocols ospf area 0.0.0.0 interface et-0/0/1.0 set protocols ospf area 0.0.0.0 interface et-0/0/16.0 set protocols ospf area 0.0.0.0 interface ae31.0
使用服务提供商样式接口配置的 CRB 叠加配置中的第 3 层网关
在此示例配置中,您将使用服务提供商样式接口配置创建第 3 层网关、CRB 叠加网络、虚拟网关地址、MAC-VRF 实例和具有 VLAN ID 的 VLAN。为简洁起见,我们仅提供一个叶设备和一个主干的配置。
枝叶 1
set chassis aggregated-devices ethernet device-count 20 set interfaces et-2/0/5 description "To PORT-1 --> 1/13" set interfaces et-2/0/5 flexible-vlan-tagging set interfaces et-2/0/5 encapsulation extended-vlan-bridge set interfaces et-2/0/5 unit 100 vlan-id 100 set interfaces et-2/0/5 unit 200 vlan-id 200 set interfaces et-2/0/8 description "To Spine-1 in ae31" set interfaces et-2/0/8 ether-options 802.3ad ae31 set interfaces et-2/0/11 description "To Spine-1 in ae31" set interfaces et-2/0/11 ether-options 802.3ad ae31 set interfaces ae31 description "To Spine-1" set interfaces ae31 aggregated-ether-options lacp active set interfaces ae31 aggregated-ether-options lacp periodic fast set interfaces ae31 aggregated-ether-options lacp system-id 11:11:11:11:11:11 set interfaces ae31 unit 0 family inet address 10.4.1.2/24 set interfaces et-2/0/9 description "To spine-2" set interfaces et-2/0/9 unit 0 family inet address 10.5.1.2/24 set interfaces et-2/0/12:0 description "To CE-1 in ae12" set interfaces et-2/0/12:0 ether-options 802.3ad ae12 set interfaces ae12 description "To CE-1" set interfaces ae12 flexible-vlan-tagging set interfaces ae12 encapsulation extended-vlan-bridge set interfaces ae12 esi 00:12:12:12:12:12:12:12:12:12 set interfaces ae12 esi all-active set interfaces ae12 aggregated-ether-options lacp active set interfaces ae12 aggregated-ether-options lacp periodic fast set interfaces ae12 aggregated-ether-options lacp system-id 12:12:12:12:12:12 set interfaces ae12 unit 100 vlan-id 100 set interfaces ae12 unit 200 vlan-id 200 set interfaces lo0 unit 0 family inet address 10.10.10.10/24 primary set routing-instances evpn_vlan_aware instance-type mac-vrf set routing-instances evpn_vlan_aware protocols evpn encapsulation vxlan set routing-instances evpn_vlan_aware vtep-source-interface lo0.0 set routing-instances evpn_vlan_aware service-type vlan-aware set routing-instances evpn_vlan_aware route-distinguisher 1010:100200 set routing-instances evpn_vlan_aware vrf-target target:666:100200 set routing-instances evpn_vlan_aware vlans V100 interface et-2/0/5.100 set routing-instances evpn_vlan_aware vlans V100 interface ae12.100 set routing-instances evpn_vlan_aware vlans V100 vxlan vni 1100 set routing-instances evpn_vlan_aware vlans V200 interface et-2/0/5.200 set routing-instances evpn_vlan_aware vlans V200 interface ae12.200 set routing-instances evpn_vlan_aware vlans V200 vxlan vni 1200 set routing-options router-id 10.10.10.10 set routing-options autonomous-system 666 set protocols bgp group vteps type internal set protocols bgp group vteps local-address 10.10.10.10 set protocols bgp group vteps family evpn signaling set protocols bgp group vteps neighbor 10.1.1.30 set protocols bgp group vteps neighbor 10.5.5.50 set protocols bgp group vteps neighbor 10.4.4.40 set protocols bgp group vteps neighbor 10.2.2.20 set protocols ospf area 0.0.0.0 interface et-2/0/9.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ae31.0
主干 1
set chassis aggregated-devices ethernet device-count 20 set interfaces et-0/0/0 description "To CE-3 in ae34" set interfaces et-0/0/0 ether-options 802.3ad ae34 set interfaces ae34 description "To CE-1" set interfaces ae34 flexible-vlan-tagging set interfaces ae34 encapsulation extended-vlan-bridge set interfaces ae34 esi 00:34:34:34:34:34:34:34:34:34 set interfaces ae34 esi all-active set interfaces ae34 aggregated-ether-options lacp active set interfaces ae34 aggregated-ether-options lacp periodic fast set interfaces ae34 aggregated-ether-options lacp system-id 34:34:34:34:34:34 set interfaces ae34 unit 100 vlan-id 100 set interfaces ae34 unit 200 vlan-id 200 set interfaces et-0/0/10 description "To Leaf-1 in ae31" set interfaces et-0/0/10 ether-options 802.3ad ae31 set interfaces ae31 description "To Leaf-1" set interfaces ae31 aggregated-ether-options lacp active set interfaces ae31 aggregated-ether-options lacp periodic fast set interfaces ae31 aggregated-ether-options lacp system-id 30:30:30:30:30:30 set interfaces ae31 unit 0 family inet address 10.40.1.1/24 set interfaces et-0/0/11 description "To PORT-5 --> 1/1" set interfaces et-0/0/11 flexible-vlan-tagging set interfaces et-0/0/11 speed 40g set interfaces et-0/0/11 encapsulation extended-vlan-bridge set interfaces et-0/0/11 unit 100 vlan-id 100 set interfaces et-0/0/11 unit 200 vlan-id 200 set interfaces et-0/0/12 description "To PORT- --> 1/5" set interfaces et-0/0/12 flexible-vlan-tagging set interfaces et-0/0/12 encapsulation extended-vlan-bridge set interfaces et-0/0/12 unit 100 vlan-id 100 set interfaces et-0/0/12 unit 200 vlan-id 200 set interfaces et-0/0/13 description "To Leaf-1 in ae31" set interfaces et-0/0/13 ether-options 802.3ad ae31 set interfaces et-0/0/1 description "To Leaf-2" set interfaces et-0/0/1 unit 0 family inet address 10.40.1.1/24 set interfaces et-0/0/16 description "To Leaf-3" set interfaces et-0/0/16 unit 0 family inet address 10.30.1.1/24 set interfaces irb unit 100 virtual-gateway-accept-data set interfaces irb unit 100 family inet address 10.100.1.1/16 preferred set interfaces irb unit 100 family inet address 10.100.1.1/16 virtual-gateway-address 10.100.1.254 set interfaces irb unit 100 family inet6 address abcd::0010:0100:0001:0001/16 preferred set interfaces irb unit 100 family inet6 address abcd::0010:0100:0001:0001/96 virtual-gateway-address abcd::0010:0100:0001:0254 set interfaces irb unit 100 virtual-gateway-v4-mac 00:10:01:00:01:fe set interfaces irb unit 100 virtual-gateway-v6-mac 00:10:01:00:02:fe set interfaces irb unit 200 virtual-gateway-accept-data set interfaces irb unit 200 family inet address 10.200.1.1/16 preferred set interfaces irb unit 200 family inet address 10.200.1.1/16 virtual-gateway-address 10.200.1.254 set interfaces irb unit 200 family inet6 address abcd::0010:0200:0001:0001/96 preferred set interfaces irb unit 200 family inet6 address abcd::0010:0200:0001:0001/96 virtual-gateway-address abcd::0010:0200:0001:0254 set interfaces irb unit 200 virtual-gateway-v4-mac 00:20:02:00:01:fe set interfaces irb unit 200 virtual-gateway-v6-mac 00:20:02:00:02:fe set interfaces lo0 unit 0 family inet address 10.300.40.40/32 primary set routing-instances evpn_vlan_aware instance-type mac-vrf set routing-instances evpn_vlan_aware protocols evpn encapsulation vxlan set routing-instances evpn_vlan_aware vtep-source-interface lo0.0 set routing-instances evpn_vlan_aware service-type vlan-aware set routing-instances evpn_vlan_aware route-distinguisher 4040:100200 set routing-instances evpn_vlan_aware vrf-target target:666:100200 set routing-instances evpn_vlan_aware vlans V100 vlan-id 100 set routing-instances evpn_vlan_aware vlans V100 interface et-0/0/11.100 set routing-instances evpn_vlan_aware vlans V100 interface et-0/0/12.100 set routing-instances evpn_vlan_aware vlans V100 interface ae34.100 set routing-instances evpn_vlan_aware vlans V100 l3-interface irb.100 set routing-instances evpn_vlan_aware vlans V100 vxlan vni 1100 set routing-instances evpn_vlan_aware vlans V200 vlan-id 200 set routing-instances evpn_vlan_aware vlans V200 interface et-0/0/11.200 set routing-instances evpn_vlan_aware vlans V200 interface et-0/0/12.200 set routing-instances evpn_vlan_aware vlans V200 interface ae34.200 set routing-instances evpn_vlan_aware vlans V200 l3-interface irb.200 set routing-instances evpn_vlan_aware vlans V200 vxlan vni 1200 set routing-options router-id 40.40.40.40 set routing-options autonomous-system 666 set protocols bgp group vteps type internal set protocols bgp group vteps local-address 10.10.10.10 set protocols bgp group vteps family evpn signaling set protocols bgp group vteps neighbor 10.20.30.30 set protocols bgp group vteps neighbor 10.30.50.50 set protocols bgp group vteps neighbor 10.40.10.10 set protocols bgp group vteps neighbor 10.50.20.20 set protocols ospf area 0.0.0.0 interface et-0/0/1.0 set protocols ospf area 0.0.0.0 interface et-0/0/16.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ae31.0