例:EX9200スイッチでのIRBソリューションを使用したEVPNの設定
この例では、イーサネットVPN(EVPN)導入でIRB(統合型ルーティングおよびブリッジング)ソリューションを設定する方法を示しています。
要件
この例では、以下のハードウェアとソフトウェアのコンポーネントを使用しています。
PE ルーターとして構成された 2 台の EX9200 スイッチ
すべての PE ルーターで実行されている Junos OS リリース 14.2 以降
開始する前に、以下を行います。
スイッチ インターフェイスを設定します。
OSPFまたはその他のIGPプロトコルを設定します。
BGPを設定します。
LDPを設定します。
MPLS を設定します。
概要
EVPN ソリューションでは、特定の EVPN インスタンス内で複数の VLAN を定義でき、1 つ以上の EVPN インスタンスを単一のレイヤー 3 VPN VRF に関連付けることができます。一般に、各データセンターのテナントには固有のレイヤー3 VPN仮想ルート転送(VRF)が割り当てられますが、テナントはEVPNインスタンスごとに1つ以上のEVPNインスタンスまたはVLANで構成できます。
この柔軟性と拡張性の要因をサポートするために、EVPN ソリューションは EX9200 スイッチ上の IRB インターフェイスをサポートし、仮想マシンのモビリティに加えて、最適なレイヤー 2 およびレイヤー 3 の転送を容易にします。IRB インターフェイスは、EVPN インスタンスのデフォルト VLAN を含め、設定された各 VLAN 上で設定されます。
IRB は、単一ノード内でレイヤー 2 スイッチングとレイヤー 3 ルーティングを実行する機能であり、サブネット間トラフィックに対する余分なホップを回避します。EVPN IRB ソリューションは、ゲートウェイ MAC と IP 同期を使用したデフォルト ゲートウェイの問題をなくし、テナント VRF で仮想マシン(VM)用の IP ホスト ルートを作成することで、レイヤー 3 の連携に関する三角ルーティングの問題を回避します。
構成
手順
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
CE1
set interfaces ge-1/1/7 vlan-tagging set interfaces ge-1/1/7 unit 0 vlan-id 10 set interfaces ge-1/1/7 unit 0 family inet address 10.0.0.1/24 set routing-options static route 198.51.100.0/24 next-hop 10.0.0.251
PE1
set interfaces ge-1/0/8 unit 0 family inet address 192.0.2.1/24 set interfaces ge-1/0/8 unit 0 family mpls set interfaces ge-1/1/8 flexible-vlan-tagging set interfaces ge-1/1/8 encapsulation flexible-ethernet-services set interfaces ge-1/1/8 unit 0 encapsulation vlan-bridge set interfaces ge-1/1/8 unit 0 vlan-id 10 set interfaces irb unit 0 family inet address 10.0.0.251/24 set interfaces lo0 unit 0 family inet address 203.0.113.1/32 set routing-options router-id 203.0.113.1 set routing-options autonomous-system 100 set routing-options forwarding-table chained-composite-next-hop ingress evpn set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 203.0.113.1 set protocols bgp group ibgp family evpn signaling set protocols bgp group ibgp neighbor 203.0.113.2 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set routing-instances evpna instance-type evpn set routing-instances evpna vlan-id 10 set routing-instances evpna interface ge-1/1/8.0 set routing-instances evpna l3-interface irb.0 set routing-instances evpna route-distinguisher 203.0.113.1:100 set routing-instances evpna vrf-target target:100:100 set routing-instances evpna protocols evpn interface ge-1/1/8.0 set routing-instances vrf instance-type vrf set routing-instances vrf interface irb.0 set routing-instances vrf route-distinguisher 203.0.113.1:300 set routing-instances vrf vrf-target target:100:300 set routing-instances vrf vrf-table-label
PE2
set interfaces ge-2/0/8 unit 0 family inet address 192.0.2.2/24 set interfaces ge-2/0/8 unit 0 family mpls set interfaces ge-2/1/8 flexible-vlan-tagging set interfaces ge-2/1/8 encapsulation flexible-ethernet-services set interfaces ge-2/1/8 unit 0 encapsulation vlan-bridge set interfaces ge-2/1/8 unit 0 vlan-id 20 set interfaces irb unit 0 family inet address 198.51.100.251/24 set interfaces lo0 unit 0 family inet address 203.0.113.2/32 set routing-options router-id 203.0.113.2 set routing-options autonomous-system 100 set routing-options forwarding-table chained-composite-next-hop ingress evpn set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 203.0.113.2 set protocols bgp group ibgp family evpn signaling set protocols bgp group ibgp neighbor 203.0.113.1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set routing-instances evpna instance-type evpn set routing-instances evpna vlan-id 20 set routing-instances evpna interface ge-2/1/8.0 set routing-instances evpna l3-interface irb.0 set routing-instances evpna route-distinguisher 203.0.113.2:100 set routing-instances evpna vrf-target target:200:100 set routing-instances evpna protocols evpn interface ge-2/1/8.0 set routing-instances vrf instance-type vrf set routing-instances vrf interface irb.0 set routing-instances vrf route-distinguisher 203.0.113.2:300 set routing-instances vrf vrf-target target:200:300 set routing-instances vrf vrf-table-label
CE2
set interfaces ge-2/1/7 unit 0 vlan-id 20 set interfaces ge-2/1/7 unit 0 family inet address 198.51.100.2/24 set routing-options static route 10.0.0.0/24 next-hop 198.51.100.251
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 設定モードでのCLIエディターの使用を参照してください。
ルーターPE1を設定するには:
適切なインターフェイス名、アドレス、およびその他のパラメーターを変更した後、ルーターPE2のこの手順を繰り返します。
ルーターPE1インターフェイスを設定します。
[edit interfaces]
user@PE1# set ge-1/0/8 unit 0 family inet address 192.0.2.1/24 user@PE1# set ge-1/0/8 unit 0 family mpls user@PE1# set ge-1/1/8 flexible-vlan-tagging user@PE1# set ge-1/1/8 encapsulation flexible-ethernet-services user@PE1# set ge-1/1/8 unit 0 encapsulation vlan-bridge user@PE1# set ge-1/1/8 unit 0 vlan-id 10 user@PE1# set irb unit 0 family inet address 10.0.0.251/24 user@PE1# set lo0 unit 0 family inet address 203.0.113.1/32ルーターPE1のルーターIDと自律システム番号を設定します。
[edit routing-options]
user@PE1# set router-id 203.0.113.1 user@PE1# set autonomous-system 100EVPNの連鎖された合成ネクストホップを設定します。
[edit routing-options]
user@PE1# set forwarding-table chained-composite-next-hop ingress evpn管理インターフェイスを除く、ルーターPE1のすべてのインターフェイスでLDPを有効にします。
[edit protocols]
user@PE1# set ldp interface all user@PE1# set ldp interface fxp0.0 disable管理インターフェイスを除く、ルーターPE1のすべてのインターフェイスでMPLSを有効にします。
[edit protocols]
user@PE1# set mpls interface all user@PE1# set mpls mpls interface fxp0.0 disableルーターPE1のBGPグループを設定します。
[edit protocols]
user@PE1# set bgp group ibgp type internalルーターPE1がルーターPE2とピアリングするために、ibgp BGPグループにローカルアドレスとネイバーアドレスを割り当てます。
[edit protocols]
user@PE1# set bgp group ibgp local-address 203.0.113.1 user@PE1# set bgp group ibgp neighbor 203.0.113.2ibgp BGP グループに EVPN シグナリングのネットワーク層到達可能性情報(NLRI)を含めます。
[edit protocols]
user@PE1# set bgp group ibgp family evpn signaling管理インターフェイスを除く、ルーターPE1のすべてのインターフェイスでOSPFを設定します。
[edit protocols]
user@PE1# set ospf area 0.0.0.0 interface all user@PE1# set ospf area 0.0.0.0 interface fxp0.0 disableEVPNルーティングインスタンスを設定します。
[edit routing-instances] user@PE1# set evpna instance-type evpn
evpnaルーティングインスタンスのブリッジングドメインのVLAN識別子を設定します。
[edit routing-instances] user@PE1# set evpna vlan-id 10
evpnaルーティングインスタンスのインターフェイス名を設定します。
[edit routing-instances] user@PE1# set evpna interface ge-1/1/8.0
IRB インターフェイスを evpna ルーティング インスタンスのルーティング インターフェイスとして設定します。
[edit routing-instances] user@PE1# set evpna l3-interface irb.0
evpnaルーティングインスタンスのルート区別を設定します。
[edit routing-instances] user@PE1# set evpna route-distinguisher 203.0.113.1:100
evpnaルーティングインスタンスのVPNルーティングおよび転送(VRF)ターゲットコミュニティを設定します。
[edit routing-instances] user@PE1# set evpna vrf-target target:100:100
PE1 サイトを VPN に接続するインターフェイス名を割り当てます。
[edit routing-instances] user@PE1# set evpna protocols evpn interface ge-1/1/8.0
VRFルーティングインスタンスを設定します。
[edit routing-instances] user@PE1# set vrf instance-type vrf
VRFルーティングインスタンスのルーティングインターフェイスとしてIRBインターフェイスを設定します。
[edit routing-instances] user@PE1# set vrf interface irb.0
vrfルーティングインスタンスのルート識別を設定します。
[edit routing-instances] user@PE1# set vrf route-distinguisher 203.0.113.1:300
vrfルーティングインスタンスのVRFラベルを設定します。
[edit routing-instances] user@PE1# set vrf vrf-table-label
結果
設定モードから、 、show protocols
show routing-options
および のコマンドをshow interfaces
入力して設定をshow routing-instances
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
user@PE1# show interfaces
ge-1/0/8 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
family mpls;
}
}
ge-1/1/8 {
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit 0 {
encapsulation vlan-bridge;
vlan-id 10;
}
}
irb {
unit 0 {
family inet {
address 10.0.0.251/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 203.0.113.1/32 {
}
}
}
}
user@PE1# show routing-options
router-id 203.0.113.1;
autonomous-system 100;
forwarding-table {
chained-composite-next-hop {
ingress {
evpn;
}
}
}
user@PE1# show protocols
ldp {
interface all;
interface fxp0.0 {
disable;
}
}
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
group ibgp {
type internal;
local-address 203.0.113.1;
family evpn {
signaling;
}
neighbor 203.0.113.2;
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
}
}
user@PE1# show routing-instances
evpna {
instance-type evpn;
vlan-id 10;
interface ge-1/1/8.0;
l3-interface irb.0;
route-distinguisher 203.0.113.1:100;
vrf-target target:100:100;
protocols {
evpn {
interface ge-1/1/8.0;
}
}
}
vrf {
instance-type vrf;
interface irb.0;
route-distinguisher 203.0.113.1:300;
vrf-target target:100:300;
vrf-table-label;
}
検証
設定が正しく機能していることを確認します。
ローカル IRB MAC の検証
目的
ローカル IRB MAC が L2ALD から学習されていることを確認します。
アクション
ルーター PE1 で、ローカル IRB インターフェイスの MAC アドレスを決定します。
運用モードから、 コマンドを show interfaces irb extensive | match "Current address"
実行します。
user@PE1> show interfaces irb extensive | match "Current address" Current address: a8:d0:e5:54:0d:10, Hardware address: a8:d0:e5:54:0d:10
運用モードから、 コマンドを show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10"
実行します。
user@PE1> show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10" 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10/384 (1 entry, 1 announced) TSI: Page 0 idx 0, (group PE type Internal) Type 1 val 0x2736568 (adv_entry) Advertised metrics: Flags: Nexthop Change Nexthop: Self Localpref: 100 AS path: [100] I Communities: target:100:100 evpn-default-gateway Path 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10 Vector len 4. Val: 0 *EVPN Preference: 170 Next hop type: Indirect Address: 0x26f8354 Next-hop reference count: 6 Protocol next hop: 10.255.0.1 Indirect next hop: 0x0 - INH Session ID: 0x0 State: <Active Int Ext> Age: 23:29:08 Validation State: unverified Task: evpna-evpn Announcement bits (1): 1-BGP_RT_Background AS path: I Communities: evpn-default-gateway Route Label: 299776
意味
ローカル IRB インターフェイスの MAC 専用ルートは、ルーター PE1 の EVPN インスタンス ルート テーブルに表示され、EVPN から学習され、デフォルト ゲートウェイ拡張コミュニティでタグ付けされます。
リモート IRB MAC の検証
目的
リモート IRB MAC が BGP から学習されていることを確認します。
アクション
ルーター PE1 で、ローカル IRB インターフェイスの MAC アドレスを決定します。
運用モードから、 コマンドを show interfaces irb extensive | match "Current address"
実行します。
user@PE1> show interfaces irb extensive | match "Current address" Current address: a8:d0:e5:54:0d:10, Hardware address: a8:d0:e5:54:0d:10
ルーターPE2で、リモートIRB MACが学習されていることを確認します。
運用モードから、 コマンドを show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10"
実行します。
user@PE2> show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10" 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10/384 (1 entry, 1 announced) *BGP Preference: 170/-101 Route Distinguisher: 2.91.223.24:100 Next hop type: Indirect Address: 0x26f8d6c Next-hop reference count: 10 Source: 10.255.0.1 Protocol next hop: 10.255.0.1 Indirect next hop: 0x2 no-forward INH Session ID: 0x0 State: <Secondary Active Int Ext> Local AS: 100 Peer AS: 100 Age: 23:22:17 Metric2: 1 Validation State: unverified Task: BGP_100.10.255.0.1 Announcement bits (1): 0-evpna-evpn AS path: I Communities: target:100:100 evpn-default-gateway Import Accepted Route Label: 299776 Localpref: 100 Router ID: 10.255.0.1 Primary Routing Table bgp.evpn.0 Indirect next hops: 1 Protocol next hop: 10.255.0.1 Metric: 1 Indirect next hop: 0x2 no-forward INH Session ID: 0x0 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 1.0.0.1 via ge-1/0/8.0 Session Id: 0x1 10.255.0.1/32 Originating RIB: inet.3 Metric: 1 Node path count: 1 Forwarding nexthops: 1 Nexthop: 1.0.0.1 via ge-1/0/8.0
意味
リモート IRB インターフェイスの MAC 専用ルートは、ルーター PE2 の EVPN インスタンス ルート テーブルに表示され、BGP から学習され、デフォルト ゲートウェイ拡張コミュニティでタグ付けされます。
ローカル IRB IP の検証
目的
ローカルIRB IPがRPDによってローカルで学習されていることを確認します。
アクション
ルーター PE1 で、ローカル IRB インターフェイスの MAC アドレスと IP アドレスを決定します。
運用モードから、 コマンドを show interfaces irb extensive | match "Current address"
実行します。
user@PE1> show interfaces irb extensive | match "Current address" Current address: a8:d0:e5:54:0d:10, Hardware address: a8:d0:e5:54:0d:10
運用モードから、 コマンドを show interfaces irb.0 terse | match inet
実行します。
user@PE1> show interfaces irb.0 terse | match inet irb.0 up up inet 10.0.0.251/24
運用モードから、 コマンドを show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10::10.0.0.251"
実行します。
user@PE2> show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10::10.0.0.251" 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10::10.0.0.251/384 (1 entry, 1 announced) TSI: Page 0 idx 0, (group PE type Internal) Type 1 val 0x27365a0 (adv_entry) Advertised metrics: Flags: Nexthop Change Nexthop: Self Localpref: 100 AS path: [100] I Communities: target:100:100 evpn-default-gateway Path 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10::10.0.0.251 Vector len 4. Val: 0 *EVPN Preference: 170 <<<<< Next hop type: Indirect Address: 0x26f8354 Next-hop reference count: 6 Protocol next hop: 10.255.0.1 Indirect next hop: 0x0 - INH Session ID: 0x0 State: <Active Int Ext> Age: 23:48:46 Validation State: unverified Task: evpna-evpn Announcement bits (1): 1-BGP_RT_Background AS path: I Communities: evpn-default-gateway Route Label: 299776
意味
ローカル IRB インターフェイスの MAC プラス IP ルートは、ルーター PE1 の EVPN インスタンス ルート テーブルに表示され、EVPN から学習され、デフォルト ゲートウェイ拡張コミュニティでタグ付けされます。
リモート IRB IP の検証
目的
リモート IRB IP が BGP から学習されていることを確認します。
アクション
ルーター PE1 で、ローカル IRB インターフェイスの MAC アドレスと IP アドレスを決定します。
運用モードから、 コマンドを show interfaces irb extensive | match "Current address"
実行します。
user@PE1> show interfaces irb extensive | match "Current address" Current address: a8:d0:e5:54:0d:10, Hardware address: a8:d0:e5:54:0d:10
運用モードから、 コマンドを show interfaces irb.0 terse | match inet
実行します。
user@PE1> show interfaces irb.0 terse | match inet irb.0 up up inet 10.0.0.251/24
ルーターPE2で、リモートIRB IPが学習されていることを確認します。
運用モードから、 コマンドを show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10::10.0.0.251"
実行します。
user@PE2> show route table evpna.evpn.0 extensive | find "a8:d0:e5:54:0d:10::10.0.0.251" 2:10.255.0.1:100::0::100::a8:d0:e5:54:0d:10::10.0.0.251/384 (1 entry, 1 announced) *BGP Preference: 170/-101 Route Distinguisher: 2.91.223.216:100 Next hop type: Indirect Address: 0x26f8d6c Next-hop reference count: 10 Source: 10.255.0.1 Protocol next hop: 10.255.0.1 Indirect next hop: 0x2 no-forward INH Session ID: 0x0 State: <Secondary Active Int Ext> Local AS: 100 Peer AS: 100 Age: 23:56:36 Metric2: 1 Validation State: unverified Task: BGP_100.10.255.0.1 Announcement bits (1): 0-evpna-evpn AS path: I Communities: target:100:100 evpn-default-gateway Import Accepted Route Label: 299776 Localpref: 100 Router ID: 10.255.0.1 Primary Routing Table bgp.evpn.0 Indirect next hops: 1 Protocol next hop: 10.255.0.1 Metric: 1 Indirect next hop: 0x2 no-forward INH Session ID: 0x0 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 1.0.0.1 via ge-1/0/8.0 Session Id: 0x1 10.255.0.1/32 Originating RIB: inet.3 Metric: 1 Node path count: 1 Forwarding nexthops: 1 Nexthop: 1.0.0.1 via ge-1/0/8.0
意味
リモート IRB インターフェイスの MAC プラス IP ルートは、ルーター PE2 の EVPN インスタンス ルート テーブルに表示され、デフォルト ゲートウェイ拡張コミュニティでタグ付けされます。
CE-CEのサブネット間転送の検証
目的
ルーターCE1とCE2間のサブネット間転送を検証します。
アクション
運用モードから、 コマンドを show route table inet.0
実行します。
user@CE1> show route table inet.0 inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 *[Static/5] 00:15:09 > to 10.0.0.251 via ge-1/1/7.0 10.0.0.0/24 *[Direct/0] 1d 23:24:30 > via ge-1/1/7.0 10.0.0.1/32 *[Local/0] 1d 23:24:38 Local via ge-1/1/7.0
運用モードから、 コマンドを ping
実行します。
user@CE1> ping 198.51.100.2 interval 0.1 count 10 PING 198.51.100.2 (20.0.0.2): 56 data bytes 64 bytes from 198.51.100.2: icmp_seq=0 ttl=63 time=0.919 ms 64 bytes from 198.51.100.2: icmp_seq=1 ttl=63 time=0.727 ms 64 bytes from 198.51.100.2: icmp_seq=2 ttl=63 time=0.671 ms 64 bytes from 198.51.100.2: icmp_seq=3 ttl=63 time=0.671 ms 64 bytes from 198.51.100.2: icmp_seq=4 ttl=63 time=0.666 ms 64 bytes from 198.51.100.2: icmp_seq=5 ttl=63 time=0.704 ms 64 bytes from 198.51.100.2: icmp_seq=6 ttl=63 time=0.763 ms 64 bytes from 198.51.100.2: icmp_seq=7 ttl=63 time=0.750 ms 64 bytes from 198.51.100.2: icmp_seq=8 ttl=63 time=12.967 ms 64 bytes from 198.51.100.2: icmp_seq=9 ttl=63 time=0.752 ms --- 198.51.100.2 ping statistics --- 10 packets transmitted, 10 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.666/1.959/12.967/3.670 ms
意味
ルーターCE1からルーターCE2へのPingに成功しました。