このページで解説している内容は、以下の YouTube 動画の解説で見ることができます。

演習ファイルのダウンロード

 ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習で使用するファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。

BGPの基本設定(ベストパスの確認)

BGPの基本設定」の続きです。

ここでは、BGPのベストパスを確認していきます。ネットワークは、引き続き下図のネットワークを使用します。

ベストパスの確認

BGPテーブルを確認してみます。BGPテーブルの内容を確認するには、以下のコマンドを使用します。

Router#show ip bgp

●R1ルータのBGPテーブル

R1#show ip bgp
BGP table version is 3, local router ID is 172.16.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.10.10.0/24     0.0.0.0                  0     0 32768 i
*> 20.20.20.0/24     172.16.0.2               0     0     0 200 i

AS200内の「20.20.20.0/24」の経路情報があります。

「*」は、その経路情報が有効であることを示しており、「>」は、ベストパスであることを示しています。

近接ルータの情報を確認する

近接ルータの情報を確認するには、以下のコマンドを使用します。

Router#show ip bgp summary

●R1ルータの「show ip bgp summary」の出力

R1#show ip bgp summary 
BGP router identifier 172.16.0.1, local AS number 100
BGP table version is 3, main routing table version 6
2 network entries using 264 bytes of memory
2 path entries using 104 bytes of memory
1/1 BGP path/bestpath attribute entries using 184 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 632 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.0.2      4   200       7       6        3    0    0 00:04:56        4

近接ルータの詳細情報を確認する

ピア接続について、さらに詳細情報を確認したい場合には、次のコマンドを使用します。

Router#show ip bgp neighbors

●R1ルータの「show ip bgp neighbors」の出力

R1#show ip bgp neighbors 
BGP neighbor is 172.16.0.2,  remote AS 200, external link
  BGP version 4, remote router ID 172.16.0.2
  BGP state = Established, up for 00:07:31
  Last read 00:07:31, last write 00:07:31, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0

                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          1
    Keepalives:             8          8
    Route Refresh:          0          0
    Total:                 10         10
  Default minimum time between advertisements runs is 30 seconds

 For address family: IPv4 Unicast
  BGP table version 3, neighbor version 6/0
  Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  1 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               1          1 (Consumes 46 bytes)
    Prefixes total:                 1          1
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0

                                       Outbound    Inbound
      Local Policy Denied Prefixes:    --------    -------
        Total:                                0          0
      Number of NLRIs in the update sent: max 3, min 1

  Address tracking is enabled, the RIB does have a route to 172.16.0.2
  Connections established 1; dropped 1
  Last reset never
  Transport(tcp) path-mtu-discovery is enabled
Connection state is ESTAB, I/O status: 1, unread input bytes: 0 
Connection is ECN Disabled, Minimum incoming TTL 0, Outgoing TTL 1
Local host: 172.16.0.1, Local port: 179
Foreign host: 172.16.0.2, Foreign port: 1025
Connection tableid (VRF): 0

Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)

Event Timers (current time is 0xC69F4):
Timer          Starts    Wakeups            Next
Retrans             0          0             0x0
TimeWait            0          0             0x0
AckHold             9          0             0x0
SendWnd             0          0             0x0
KeepAlive           8          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0
Linger              0          0             0x0
ProcessQ            0          0             0x0

iss: 2057115318  snduna: 2057115748  sndnxt: 2057115748     sndwnd:  15955
irs: 3480424370  rcvnxt: 3480424751  rcvwnd:      16004  delrcvwnd:    380

SRTT: 259 ms, RTTO: 579 ms, RTV: 320 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Status Flags: passive open, gen tcbs
Option Flags: nagle, path mtu capable
IP Precedence value : 6

Datagrams (max data segment is 1460 bytes):
Rcvd: 10 (out of order: 0), with data: 0, total data bytes: 0
Sent: 9 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 1, total data bytes: 24
 Packets received in fast path: 0, fast processed: 0, slow path: 0
 fast lock acquisition failures: 0, slow path: 0

 「show ip bgp neighbors」の出力結果の黄色のマークの部分から分かるように、R1ルータは、R2ルータと経路情報を送受信していることが確認できます。

 この次のコンテンツでは、BGPが奥が深いということを体験するために、もう少し複雑なBGPネットワークを構築していきます。

関連コンテンツ