IP パケット ヘッダーの TTL 値が BGP ネイバー セッション用に設定された TTL 値以上の場合のみ BGP がセッションを確立または維持できるようにするには、次の作業を実行します。
![](https://www.cisco.com/content/dam/en/us/td/i/templates/note.gif) (注) |
- TTL セキュリティ チェックに対する BGP サポート機能がマルチホップ ネイバー セッション用に設定されている場合、neighbor ebgp-multihop コマンドは必要なく、この機能を設定する前にこのコマンドを無効にする必要があります。
- 大きい直径のマルチホップ ピアリングでは、TTL セキュリティ チェックに対する BGP サポート機能の効果は下がります。大きい直径のピアリング用に設定された BGP ルータに対する CPU 利用率に基づく攻撃の場合は、影響を受けたネイバー セッションをシャットダウンして、この攻撃に対処する必要がある場合があります。
- この機能は、ローカル ネットワークおよびリモート ネットワーク内部が損なわれているピアからの攻撃には効果的ではありません。この制約事項には、ローカル ネットワークとリモート ネットワークの間のネットワーク セグメント上のピアも含まれます。
|
手順の概要
- enable
- trace [protocol ] destination
- configure terminal
- router bgp autonomous-system-number
- neighbor ip-address ttl-security hops hop-count
- end
- show running-config
- show ip bgp neighbors [ip-address ]
手順の詳細
|
コマンドまたはアクション |
目的 |
ステップ 1 |
enable
|
|
ステップ 2 |
trace [protocol ] destination
Device# trace ip 10.1.1.1
|
パケットが宛先に移動中、実際に通過する指定されたプロトコルのルートを検出します。
|
ステップ 3 |
configure terminal
Device# configure terminal
|
グローバル コンフィギュレーション モードを開始します。
|
ステップ 4 |
router bgp autonomous-system-number
Device(config)# router bgp 65000
|
ルータ コンフィギュレーション モードを開始して、BGP ルーティング プロセスを作成します。
|
ステップ 5 |
neighbor ip-address ttl-security hops hop-count
Device(config-router)# neighbor 10.1.1.1 ttl-security hops 2
|
2 つのピアを区切るホップの最大数を設定します。
-
hop-count 引数は、ローカル ピアとリモート ピアを区切るホップ カウントに設定されます。IP パケット ヘッダーの予想される TTL 値が 254 の場合、数値 1 を hop-count 引数に設定する必要があります。値の範囲は、1 ~ 254 の数番です。
-
TTL セキュリティ チェックに対する BGP サポート機能が有効な場合、BGP は、予想値以上の TTL 値を持つ着信 IP パケットを受け入れます。受け入れられないパケットは廃棄されます。
-
この設定例では、予想される着信 TTL 値が 253(255 引く TTL 値の 2)以上に設定されます。これは、BGP ピアから予想される最小 TTL 値です。ローカル ルータは、10.1.1.1 ネイバーが 1 または 2 ホップ離れている場合だけ、このネイバーからのピアリング
セッションを受け入れます。
|
ステップ 6 |
end
Device(config-router)# end
|
ルータ コンフィギュレーション モードを終了して、特権 EXEC モードを開始します。
|
ステップ 7 |
show running-config
Device# show running-config | begin bgp
|
(任意)現在実行中のコンフィギュレーション ファイルの内容を表示します。
(注)
|
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
|
|
ステップ 8 |
show ip bgp neighbors [ip-address ]
Device# show ip bgp neighbors 10.4.9.5
|
(任意)ネイバーへの TCP 接続および BGP 接続の情報を表示します。
(注)
|
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
|
|
例
TTL セキュリティ チェックに対する BGP サポート機能の設定は、show running-config コマンドおよび show ip bgp neighbors コマンドを使用して確認できます。この機能は、各ピアでローカルに設定されるため、確認するリモート設定はありません。
次に、show running-config コマンドの出力例を示します。この出力は、着信 IP パケットの予想される TTL カウントが 253 または 254 の場合だけ、ネイバー 10.1.1.1 がネイバー セッションを確立または維持するように設定されていることを示します。
Router# show running-config
| begin bgp
router bgp 65000
no synchronization
bgp log-neighbor-changes
neighbor 10.1.1.1 remote-as 55000
neighbor 10.1.1.1 ttl-security hops 2
no auto-summary
.
.
.
次に、show ip bgp neighbors コマンドの出力例を示します。この出力は、10.1.1.1 ネイバーが 2 ホップ以下離れている場合だけ、ローカル ルータがパケットをこのネイバーから受け入れることを示します。この機能の設定は、出力のアドレス ファミリ セクションに表示されます。関連行は、出力に太字で表示されます。
Router# show ip bgp neighbors 10.1.1.1
BGP neighbor is 10.1.1.1, remote AS 55000, external link
BGP version 4, remote router ID 10.2.2.22
BGP state = Established, up for 00:59:21
Last read 00:00:21, 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: 2 2
Notifications: 0 0
Updates: 0 0
Keepalives: 226 227
Route Refresh: 0 0
Total: 228 229
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1/0
Output queue sizes : 0 self, 0 replicated
Index 1, Offset 0, Mask 0x2
Member of update-group 1
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 0 0
Prefixes Total: 0 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Total: 0 0
Number of NLRIs in the update sent: max 0, min 0
Connections established 2; dropped 1
Last reset 00:59:50, due to User reset
External BGP neighbor may be up to 2 hops away.
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 10.2.2.22, Local port: 179
Foreign host: 10.1.1.1, Foreign port: 11001
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0xCC28EC):
Timer Starts Wakeups Next
Retrans 63 0 0x0
TimeWait 0 0 0x0
AckHold 62 50 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 712702676 snduna: 712703881 sndnxt: 712703881 sndwnd: 15180
irs: 2255946817 rcvnxt: 2255948041 rcvwnd: 15161 delrcvwnd: 1223
SRTT: 300 ms, RTTO: 607 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 76 (out of order: 0), with data: 63, total data bytes: 1223
Sent: 113 (retransmit: 0, fastretransmit: 0), with data: 62, total data bytes: 4