[index] SwitchBlade x8100シリーズ コマンドリファレンス 5.4.3
Note - BGPを使用するにはフィーチャーライセンスが必要です。
| スタブAS(Stub AS) | 1つのASとだけ1点で接続しているAS。自AS宛てのトラフィックだけを受け入れる。 | 
| マルチホームAS(Multihomed AS) | 1つのASと複数点で接続している、あるいは、複数のASと接続しているASのうち、自AS宛てのトラフィックだけを受け入れ、他AS宛てのトラフィックは通過させないもの | 
| トランジットAS(Transit AS) | 複数のASと接続しており、自AS宛てのトラフィックだけでなく、他AS宛てのトラフィックも(ポリシーに応じて)通過を許可するAS | 
172.16.10.0/24
172.16.10.0/255.255.255.0
| 1 | OPEN | BGPセッションを開始するためのメッセージ。ルーター間にTCPコネクションが確立した直後に送られる。各ルーターの所属ASを通知しあったり、タイマー値のネゴシエーションを行ったりする | 
| 2 | UPDATE | 経路情報の通知に使うメッセージ。新規プレフィックスの通知や無効になったプレフィックスの取り消し依頼などを相手に通知する | 
| 3 | NOTIFICATION | プロトコル上のエラーを相手に通知するためのメッセージ。BGPセッションの終了通知にも使われる | 
| 4 | KEEPALIVE | BGPセッションが有効であることを確認するためのメッセージ。定期的に送信される | 
| 5 | ROUTE-REFRESH | BGPピアに対し、すべての経路情報を送信しなおすよう要求するためのメッセージ(RFC2918による拡張) | 
| 1 | ORIGIN | well-known mandatory | プレフィックスがどのようにしてBGPに取り込まれたかを示す | 
| 2 | AS_PATH | well-known mandatory | プレフィックスがどのような経路をたどって通知されてきたかを示す | 
| 3 | NEXT_HOP | well-known mandatory | プレフィックス宛トラフィックのネクストホップアドレスを示す | 
| 4 | MULTI_EXIT_DISC | optional non-transitive | 隣接ASと複数点で接続している場合に、特定プレフィックス宛トラフィックのNEXTHOPとしてどちらが適切であるかを(隣接ASに対して)示す一種のメトリック(コスト)。小さいほどコストが低い(優先度が高い) | 
| 5 | LOCAL_PREF | well-known discretionary | AS内における(iBGP)経路選択のための優先度。大きいほど優先度が高い | 
| 6 | ATOMIC_AGGREGATE | well-known discretionary | プレフィックスが集約されたものであることを示す | 
| 7 | AGGREGATOR | optional transitive | プレフィックスを集約したASおよびBGPスピーカーのBGP識別子を示す | 
| 8 | COMMUNITIES | optional transitive | コミュニティーを示す(RFC1997による拡張属性) | 
| 9 | ORIGINATOR_ID | optional non-transitive | 該当経路を最初に学習したiBGPピアのBGP識別子(ルーターID)を示す。ルートリフレクション使用時に経路情報のループを防ぐために使われる(RFC2796による拡張属性) | 
| 10 | CLUSTER_LIST | optional non-transitive | AS内における該当経路のリフレクトパスを示す。ルートリフレクターは、経路を再通知(リフレクト)するときに自身のクラスターID(CLUSTER_ID)を本属性に付加する。ルートリフレクション使用時に経路情報のループを防ぐために使われる(RFC2796による拡張属性) | 




| awplus(config)# router bgp 65010 ↓ | 
| awplus(config-router)# bgp router-id 10.10.10.1 ↓ | 
| awplus(config-router)# redistribute connected ↓ awplus(config-router)# redistribute static ↓ | 
| awplus(config-router)# network 192.168.10.0/24 ↓ | 
| awplus(config-router)# neighbor 10.10.10.5 remote-as 65050 ↓ | 
| awplus(config)# router bgp 65010 ↓ | 
| awplus(config-router)# bgp router-id 10.10.10.1 ↓ | 
| awplus(config)# interface lo ↓ awplus(config-if)# ip address 10.10.10.1/32 ↓ | 
| awplus(config-router)# redistribute connected ↓ awplus(config-router)# redistribute static route-map imp_static ↓ | 
| awplus(config-router)# network 172.16.10.0/24 ↓ awplus(config-router)# network 172.16.20.0/24 ↓ | 
| awplus(config-router)# aggregate-address 172.16.0.0/16 summary-only ↓ | 
| awplus(config-router)# neighbor 10.10.10.5 remote-as 65050 ↓ | 
| awplus(config-router)# neighbor 10.10.10.5 shutdown ↓ awplus(config-router)# no neighbor 10.10.10.5 shutdown ↓ | 
| awplus(config-router)# neighbor 10.10.10.5 distribute-list AS65050_in ↓ | 
| awplus# clear ip bgp 10.10.10.5 soft ↓ | 
Note - softオプションを付けずに実行すると、BGPセッションがいったん切断されるのでご注意ください(ハードリセット)。softオプションを付けた場合は、BGPセッションを保持したまま経路情報を更新します。詳しくはclear ip bgpコマンドの説明をご覧ください。
nSess = N × (N - 1) ÷ 2



| awplus(config)# router bgp 65010 ↓ awplus(config-router)# neighbor 10.10.10.5 remote-as 65010 ↓ awplus(config-router)# neighbor 10.10.10.5 route-reflector-client ↓ | 
| awplus(config)# router bgp 65010 ↓ awplus(config-router)# neighbor 10.10.10.7 remote-as 65010 ↓ | 
Note - ルートリフレクションに対応している必要があるのはRRだけです。RR以外のCP、NCPは通常のiBGPの動作をするだけなので、RRをピアとして指定するときにも特殊な設定は必要ありません。また、CP、NCPは、ルートリフレクションに対応していない機器でもかまいません。
Note - neighbor route-reflector-clientコマンドはiBGPピアに対してのみ有効です。eBGPピアに対して実行した場合はエラーになります。
| RR1(config-router)# bgp cluster-id 10.10.10.1 ↓ | 
| RR2(config-router)# bgp cluster-id 10.10.10.1 ↓ | 

| awplus> show ip bgp neighbors 10.10.10.5 ↓
BGP neighbor is 10.10.10.5, remote AS 65010, local AS 65010, internal link
  BGP version 4, remote router ID 10.10.10.5
  BGP state = Established, up for 00:02:48
  Last read 00:02:48, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received (old and new)
    Address family IPv4 Unicast: advertised and received
  Received 13 messages, 0 notifications, 0 in queue
  Sent 16 messages, 3 notifications, 0 in queue
  Route refresh request: received 0, sent 2
  Minimum time between advertisement runs is 5 seconds
 For address family: IPv4 Unicast
  BGP table version 6, neighbor version 6
  Index 1, Offset 0, Mask 0x2
  Route-Reflector Client
  Community attribute sent to this neighbor (both)
  1 accepted prefixes
  10 announced prefixes
...
 | 

Note - ASコンフェデレーションを使用する場合は、コンフェデレーション内のすべてのBGPスピーカーにASコンフェデレーションの設定をする必要があります。
| awplus(config)# router bgp 65012 ↓ awplus(config-router)# | 
| awplus(config-router)# bgp confederation identifier 65010 ↓ | 
| awplus(config-router)# neighbor 10.10.10.2 remote-as 65012 ↓ | 
| awplus(config-router)# bgp confederation peers 65011 ↓ awplus(config-router)# neighbor 10.10.10.1 remote-as 65011 ↓ | 
| awplus(config-router)# neighbor 10.10.10.8 remote-as 65080 ↓ | 
| awplus> show ip bgp neighbors 10.10.10.2 ↓ BGP neighbor is 10.10.10.9, remote AS 65012, local AS 65012, internal link BGP version 4, remote router ID 10.10.10.2 BGP state = Established, up for 00:48:23 ... | 
| awplus> show ip bgp neighbors 10.10.10.1 ↓ BGP neighbor is 10.10.10.1, remote AS 65011, local AS 65012, external link BGP version 4, remote router ID 10.10.10.1 Neighbor under common administration BGP state = Established, up for 00:45:57 ... | 
| awplus> show ip bgp neighbors 10.10.10.8 ↓ BGP neighbor is 10.10.10.8, remote AS 65080, local AS 65010, external link BGP version 4, remote router ID 10.10.10.8 BGP state = Established, up for 00:28:07 ... | 
| awplus> show ip bgp regexp .+ ↓
BGP table version is 67, local router ID is 10.10.10.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.0.0       10.10.10.1               0    100      0 (65011) ?
*> 172.22.0.0       10.10.10.1               0    100      0 (65011 65013) i
*> 172.23.0.0       10.10.10.8               0             0 65080 i
*> 172.24.0.0       10.10.10.8               0             0 65080 65090 i
Total number of prefixes 4
 | 
awplus(config)# router bgp 1 ↓
awplus(config-router)# neighbor 10.10.10.10 password 3 manager ↓
| awplus(config-router)# neighbor 10.10.10.8 remote-as 12345 ↓ awplus(config-router)# neighbor 10.10.10.8 remove-private-as ↓ | 
Note - neighbor remove-private-asコマンドはeBGPピアに対してのみ有効です。iBGPピアに対して実行した場合はエラーになります。
| awplus> show ip bgp neighbors 10.10.10.8 ↓ | 
| awplus(config-router)# neighbor INT peer-group ↓ | 
| awplus(config-router)# neighbor INT remote-as 65010 ↓ | 
| awplus(config-router)# neighbor INT update-source lo ↓ awplus(config-router)# neighbor INT route-map INT_in in ↓ awplus(config-router)# neighbor INT route-map INT_out out ↓ | 
| awplus(config-router)# neighbor 10.0.0.5 peer-group INT ↓ awplus(config-router)# neighbor 10.0.0.7 peer-group INT ↓ awplus(config-router)# neighbor 10.0.0.8 peer-group INT ↓ | 
| awplus(config-router)# no neighbor 10.0.0.8 peer-group INT ↓ | 
| awplus> show ip bgp neighbors 10.0.0.5 ↓
BGP neighbor is 10.0.0.5, remote AS 65010, local AS 65010, internal link
 Member of peer-group INT for session parameters
  BGP version 4, remote router ID 10.0.0.5
  BGP state = Established, up for 00:03:01
  Last read 00:03:01, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received (old and new)
    Address family IPv4 Unicast: advertised and received
  Received 7 messages, 0 notifications, 0 in queue
  Sent 8 messages, 0 notifications, 0 in queue
  Route refresh request: received 0, sent 0
  Minimum time between advertisement runs is 5 seconds
  Update source is lo
 For address family: IPv4 Unicast
  BGP table version 5, neighbor version 5
  Index 1, Offset 0, Mask 0x2
  INT peer-group member
...
 | 
| awplus(config-router)# neighbor 10.10.10.8 capability graceful-restart ↓ | 
| awplus(config-router)# bgp graceful-restart ↓ | 
| awplus(config-router)# neighbor 10.10.10.8 capability graceful-restart ↓ | 
| awplus(config-router)# bgp graceful-restart ↓ awplus(config-router)# bgp graceful-restart graceful-reset ↓ | 
| awplus# restart bgp graceful ↓ | 
| awplus(config)# bgp nexthop-trigger enable ↓ | 
| awplus(config-router)# bgp memory maxallocation 30 ↓ | 
| awplus> show bgp memory maxallocation ↓ BGP maximum RAM allocation is 30% | 
| awplus# show running-config bgp ↓ | 
| awplus# show running-config access-list ↓ awplus# show running-config prefix-list ↓ awplus# show running-config as-path access-list ↓ awplus# show running-config community-list ↓ awplus# show running-config route-map ↓ | 
| awplus> show ip bgp neighbors ↓ awplus> show ip bgp summary ↓ | 
| awplus> show ip bgp ↓ | 
| awplus> show ip route database ↓ | 
| awplus> show ip route ↓ | 
(C) 2012 - 2013 アライドテレシスホールディングス株式会社
PN: 613-001735 Rev.H