キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
3162
閲覧回数
1
いいね!
0
コメント
Daijiro Kido
Cisco Employee
Cisco Employee

[toc:faq]

フォント等がくずれて見辛い場合は Cisco Learning Network の同ドキュメントもご参照ください。

外部 L3 接続の簡易設定 (BGP)

 

概要

本ドキュメントでは BGP を用いた L3 out の動作確認を目的とした、最小限の構成の簡易設定例をご紹介します。

注意:商用環境等でご利用いただく際には本ドキュメントではなく Cisco.com のコンフィギュレーションガイド等をご確認の上、適切な設定をご検討ください。

 

本ドキュメントで使用している APIC バージョンは 2.2(1n) となります。

 

構成

2017-05-10_211504.png

<通信確認用の N9K stand-alone について>

対向接続機器に通信確認用の N9K stand-alone を用いています。一台のスイッチに BGP接続ルータ(RP_Ent_VRF) と ACI内のホスト(RP_Int_VRF) を疑似するVRFを分けていますが、通信確認用のルータ・ホストをそれぞれ用意できるようであれば VRF は不要です。

 

以下ドキュメントのように Leaf スイッチを NX-OS モードに変更することで流用可能です。

ACI モードの Nexus9300 を NX-OS モードにする手法

 

N9K 以外の Nexus シリーズや IOS ルータを用いて代用することも可能ですが、 IOS ルータでは後述の設定例が大きく異なりますのでご注意ください。

 

 

設定の目的

本ドキュメントの設定はACIファブリック内の疑似ホスト(172.16.1.1@RP_Int_VRF) から、 BGP により接続された L3 Out を経由し、疑似外部ネットワーク (112.1.1.1@RP_Ent_VRF)  との ping 通信を成功することを目的としています。

 

 

 

手順1. ACI ファブリック共通設定

 

1-1. Route Reflector の設定 (省略可)

  1. Fabric > Fabric Policies >  Pod Policies >  Policies >  BGP Route Reflector default
    Autonomous System Number: 100
  2. Create Route REflector Node Policy Ep
    Spine Node: 201
  3. Fabric >  Fabric Policies >  Pod Policies >  Policy Groups > Create Pod Policy Group
    Name: Pod_Policy_default
    BGP Rout Reflector Policy: default
  4. Fabric >  Fabric Policies >  Pod Policies >  Profiles > Pod Profile default > Pod Selectors
    Name: pod1-profile
    Blocks: 1
    Policy Group: Pod_Policy_default

 

1-2. Fabric Access の設定

  1. Fabric > Access Policies > Pools > VLAN > Create VLAN Pool
    Name: RP_VLAN
  2. Create Ranges
    Range: VLAN 100 - VLAN 200
  3. Fabric > Access Policies > Physical and External Domains > Physical Domains > Create Physical Domain
    Name: RP_Domain
    VLAN Pool: RP_VLAN
    Associated Attachable Entity Profile: Create Attachable Access Entity Profile
  4. Create Attachable Access Entity Profile
    Name: RP_AEP
  5. Fabric > Access Policies > Interface Policies > Policy Groups > Leaf Policy Groups > Create Leaf Access Port Policy Group
    Name: RP_Port_Policy
    Attached Entity Profile: RP_AEP
  6. Fabric > Access Policies > Interface Policies > Profiles > Leaf Profiles > Create Leaf Interface Profile
    Name: RP_IF
  7. Create Interface Selectors
    Name: RP_Port
    Interface IDs: 1/9
    Interface Policy Group: RP_Port_Policy
  8. Fabric > Access Policies > Switch Policies > Profiles > Leaf Profiles > Create Leaf Profiles
    <1.Profile>
    Name: RP_Leaf
    [Leaf Selectors]
    Name: RP_Leaf101
    Blocks: 101
    <2.Associations>
    Interface Selector Profiles: RP_IF

1-3. Tenant の設定 (省略可)

  1. (Optional) Tenants > Crate Tenant
    Name: RP_demo
    VRF Name: RP_VRF
  2. Tenants > Networking > Bridge Domains > Create Bridge Domain
    <1.Main>
    Name: RP_BD
    VRF: RP_demo/RP_VRF
    <2.L3 Configurations>
    (Click) Subnets > Create Subnet
    Gateway IP: 172.16.1.254/24
    (Check) Advertised Externally
    <3.Advanced/Troubleshooting>
    Skip

1-4. ACI ファブリック内のホスト接続用の EPG 設定

  1. Tenants > Application Profiles > Create Application Profiles
    Name: RP_Applications
    [EPG]
    Name: RP_Int_EPG
    BD: RP_BD
    Domain: RP_Domain
    Static Path: 101/1/9
    Static Path VLAN: vlan-111

1-5. (対向機器側) ACI Fabric 内 ホスト側の設定

  1. ACI側 VRF のネットワーク設定
     
    1. vlan 111  
    2. vrf context RP_Int_VRF  
    3.   ip route 0.0.0.0/0 172.16.1.254  
    4.   
    5. interface Ethernet1/41  
    6.   switchport  
    7.   switchport mode trunk  
    8.   switchport trunk allowed vlan 111  
    9.   
    10. interface Vlan111  
    11.   no shutdown  
    12.   mac-address 0000.0000.0111  
    13.   vrf member RP_Int_VRF  
    14.   ip address 172.16.1.1/24  
  2. ACI ファブリック内 Bridge Domain のゲートウェイに対して ping 通信を確認
     
    1. # ping 172.16.1.254 vrf RP_Int_VRF  
    2. PING 172.16.1.254 (172.16.1.254): 56 data bytes  
    3. 64 bytes from 172.16.1.254: icmp_seq=0 ttl=62 time=0.817 ms  
    4. 64 bytes from 172.16.1.254: icmp_seq=1 ttl=62 time=0.569 ms  
    5. 64 bytes from 172.16.1.254: icmp_seq=2 ttl=62 time=0.564 ms  
    6. 64 bytes from 172.16.1.254: icmp_seq=3 ttl=62 time=0.595 ms  
    7. 64 bytes from 172.16.1.254: icmp_seq=4 ttl=62 time=0.533 ms  

 

 

手順2. iBGP Peer 設定

 

2-1. iBGP Node/IF 設定

Tenants > Networking > External Routed Networks > Create Routed Outside

  1. Identity
    Name: iBGP_demo
    VRF: RP_demo/RP_VRF
    (Check) BGP
    (Click) Node And Interface Protocol Profiles

    <Create Node Profile>

    Name: iBGP_Node
    1. (Click) Nodes > Select Node
      Node ID: topology/pod-1/node-102
      Router ID: 1.1.1.1
      (Click) Static Route
      <Create Static Route>
      Prefix: 2.2.2.2/32
      Next Hop Addresses: 192.168.1.2
    2. (Click) Interface Profiles > Create Interface Profile
      <1. Identity>
      Name: iBGP_IF
      <2. Protocol Profiles>
      Skip
      <3. Interfaces>
      (Select) SVI
      (Click) SVI Interfaces
      <Select SVI>
      Path: topology/pod-1/paths-102/patheup-[eth1/9]
      Encap: VLAN 112
      IPv4 Primary / IPv6 Preferred Address: 192.168.1.1/24
  2. External EPG Networks
    (Click) External EPG Networks
    <Create External Network>
    Name: Ext_Network
    (Click) Subnet
    <Create Subnet>
    IP Address: 0.0.0.0/0

2-2. (対向機器側) Interface 設定

  1. N9K Stand-alone の設定
     
    1. vlan 112  
    2. vrf context RP_Ext_VRF  
    3.   
    4. interface Ethernet1/42  
    5.   switchport  
    6.   switchport mode trunk  
    7.   switchport trunk allowed vlan 112  
    8.   
    9. interface Vlan112  
    10.   no shutdown  
    11.   mac-address 0000.0000.0112  
    12.   vrf member RP_Ext_VRF  
    13.   ip address 192.168.1.2/24  
  2. ping による IF の接続性確認
     
    1. # ping 192.168.1.1 vrf RP_Ext_VRF  
    2. PING 192.168.1.1 (192.168.1.1): 56 data bytes  
    3. 64 bytes from 192.168.1.1: icmp_seq=0 ttl=62 time=0.717 ms  
    4. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=62 time=0.434 ms  
    5. 64 bytes from 192.168.1.1: icmp_seq=2 ttl=62 time=0.435 ms  
    6. 64 bytes from 192.168.1.1: icmp_seq=3 ttl=62 time=0.438 ms  
    7. 64 bytes from 192.168.1.1: icmp_seq=4 ttl=62 time=0.619 ms  

2-3. iBGP peer の確立と外部ネットワークのインポート

  1. Tenants > Network > External Routed Networks > iBGP_demo > Logical Node Profiles > iBGP_Node > BGP Peer Connectivity > loopback ( select the "interface" if it's eBGP peer)
    Peer Address: 2.2.2.2
    Remote Autonomous System Number: 100
  2. (対向機器側) N9K Stand-alone の BGP 設定
     
    1. feature bgp  
    2. vrf context RP_Ext_VRF  
    3.   ip route 1.1.1.1/32 192.168.1.1  
    4.   
    5. interface loopback2  
    6.   vrf member RP_Ext_VRF  
    7.   ip address 2.2.2.2/32  
    8.   
    9. interface loopback112  
    10.   vrf member RP_Ext_VRF  
    11.   ip address 112.1.1.1/32  
    12.   
    13. router bgp 10  
    14.   vrf RP_Ext_VRF  
    15.     local-as 100  
    16.     address-family ipv4 unicast  
    17.       network 112.1.1.1/32  
    18.     neighbor 192.168.1.1  
    19.       remote-as 100  
    20.       address-family ipv4 unicast  
    21.     neighbor 1.1.1.1  
    22.       remote-as 100  
    23.       update-source loopback2  
    24.       address-family ipv4 unicast  
  3. BGP Peer が確立していることを確認
    2-3-3.png
  4. 外部ネットワークアドレスが ACI 側へインポートされていることを確認
    2-3-4.png
  5. (省略可能) 外部ネットワークアドレスが ACI ファブリック内の MP-BGP を経由し、Leaf101 で受信していることを確認
    Leaf101 へ ssh ログインし、show ip route を確認
     
    1. leaf101# show ip route vrf RP_demo:RP_VRF  
    2. 1.1.1.1/32, ubest/mbest: 1/0  
    3.     *via 10.0.248.27%overlay-1, [1/0], 5d18h, bgp-100, internal, tag 100  
    4. 112.1.1.1/32, ubest/mbest: 1/0  
    5.     *via 10.0.248.27%overlay-1, [200/128576], 5d18h, bgp-100, internal, tag 100  
    6. 172.16.1.0/24, ubest/mbest: 1/0, attached, direct, pervasive  
    7.     *via 10.0.112.65%overlay-1, [1/0], 02w19d, static  
    8. 172.16.1.254/32, ubest/mbest: 1/0, attached, pervasive  
    9.     *via 172.16.1.254, vlan24, [1/0], 02w19d, local, local  
    10. 192.168.1.0/24, ubest/mbest: 1/0  
    11.     *via 10.0.248.27%overlay-1, [200/0], 5d18h, bgp-100, internal, tag 100  

 

 

手順3. Contract の設定

 

3-1. Contract の作成

  1. Tenants > Security Policies > Contracts > Create Contract
    Name: BGP_Contract
  2. Create Contract Subject
    Name: BGP_Subject
    Filters: icmp

3-2. EPG へ Contract の割り当て

  1. Tenants > Application Profiles > RP_Application > Appliction EPGs > Contracts > Add Provided Contract
    Contract: RP_demo/BGP_contract

3-3. BGP へ Contract の割り当て

  1. Tenants > Networking > External Routed Networks > iBGP_demo > Networks > Ext_Network > Contracts > Consumed Contracts
    Name: BGP_contract
    Tenant: RP_demo

3-4. BD へ L3Out の割り当て

  1. Tenants > Networking > Bridge Domains > RP_BD > L3 Configurations
    Associated L3 Outs: iBGP_demo

3-5. (対向機器側) BGP 接続ルータ側で ACI ファブリック内経路を受信していることを確認

 
  1. # show ip route vrf RP_Ext_VRF  
  2. IP Route Table for VRF "RP_Ext_VRF"  
  3.   
  4. 1.1.1.1/32, ubest/mbest: 1/0  
  5.   *via 192.168.1.1, [1/0], 03:14:11, static  
  6. 2.2.2.2/32, ubest/mbest: 2/0, attached  
  7.   *via 2.2.2.2, Lo2, [0/0], 03:13:15, local  
  8.   *via 2.2.2.2, Lo2, [0/0], 03:13:15, direct  
  9. 112.1.1.1/32, ubest/mbest: 2/0, attached  
  10.   *via 112.1.1.1, Lo112, [0/0], 02:12:14, local  
  11.   *via 112.1.1.1, Lo112, [0/0], 02:12:14, direct  
  12. 172.16.1.0/24, ubest/mbest: 1/0  
  13.   *via 1.1.1.1, [200/0], 00:07:37, bgp-10, internal, tag 100  
  14. 192.168.1.0/24, ubest/mbest: 1/0, attached  
  15.   *via 192.168.1.2, Vlan112, [0/0], 15:33:42, direct  
  16. 192.168.1.2/32, ubest/mbest: 1/0, attached  
  17.   *via 192.168.1.2, Vlan112, [0/0], 15:33:42, local  

3-6. (対向機器側) ACIファブリック内ホストから外部ネットワークへ ping による通信確認

 
  1. # ping 112.1.1.1 vrf RP_Int_VRF  
  2. PING 112.1.1.1 (112.1.1.1): 56 data bytes  
  3. 64 bytes from 112.1.1.1: icmp_seq=0 ttl=251 time=0.808 ms  
  4. 64 bytes from 112.1.1.1: icmp_seq=1 ttl=251 time=0.687 ms  
  5. 64 bytes from 112.1.1.1: icmp_seq=2 ttl=251 time=0.619 ms  
  6. 64 bytes from 112.1.1.1: icmp_seq=3 ttl=251 time=0.656 ms  
  7. 64 bytes from 112.1.1.1: icmp_seq=4 ttl=251 time=0.601 ms  

 

設定画面キャプチャ

 

<1-1>

1-1.png

<1-2-1>1-2-1.png
<1-2-3>

 

1-2-3.png
<1-2-5>
1-2-5.png

<1-2-6>1-2-6.png

<1-2-8>1-2-8.png

<1-3>

1-3-.png
<1-4>
1-4.png<2-1-1>
2-1-1.png

<2-1-1-1>2-1-1-1f.png
<2-1-1-2>
2-1-1-2f.png

<2-1-2>2-1-2f.png

<2-3-1>2-3-1f.png

<3-1>3-1f.png

<3-2>3-2.png

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします