0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【忘備録】CCIE勉強メモ_20250902

Posted at

参考資料・時間

資料:
CCIE Enterprise Infrastructure Foundation lab
BGP lab 1

勉強時間:
約2.5時間

学習内容

BGPピアを張る前提として、TCP 3wayハンドシェイクを行う。

以下はBGPピアを張る前の状態

R2#show tcp brief all
TCB       Local Address               Foreign Address             (state)
16767AC0  2.2.2.2.179                1.1.1.1.11365               ESTAB
16685280  0.0.0.0.179                1.1.1.1.*                   LISTEN

eBGPはTTLが1の場合、ピアが張れない。
TTLを変更する場合はebgp-multihopを使う。
しかし、物理IFからloopbackへのルーティングではTTLを消費しないため、
disable-connected-checkオプションでも同様にピアを張ることが可能となる。

router bgp 200
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 100
 neighbor 1.1.1.1 disable-connected-check
 neighbor 1.1.1.1 update-source Loopback0

しかし、物理IFからloopbackへのルーティングではTTLを消費しないため、
disable-connected-checkオプションでも同様にピアを張ることが可能となる。

じゃあTTLを2以上にするとBGPピア張れるのおかしくね?
と思うが、
TTLが1の場合はconnected-checkが有効化されるが、
TTLが2の場合は暗黙の内に無効化される。
なにそれ…

変更前

R1#sh run | sec router 100
router bgp 100
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0

R1#
R1#do show ip bgp neighbor 2.2.2.2 | i   External BGP neighbor
  External BGP neighbor configured for connected checks (single-hop no-disable-connected-check)

DISABLE-CONNECTED-CHECK適用後

R1#sh run | sec router 100
router bgp 100
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 disable-connected-check

R1#
R1#do show ip bgp neighbor 2.2.2.2 | i   External BGP neighbor
  External BGP neighbor NOT configured for connected checks (single-hop disable-connected-check)

EBGP-MULTIHOP適用後

R1#sh run | sec router 100
router bgp 100
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 ebgp-multihop 255

R1#
R1#do show ip bgp neighbor 2.2.2.2 | i   External BGP neighbor
  External BGP neighbor NOT configured for connected checks (multi-hop no-disable-connected-check)

設定後、NOT configured for conneected checksになってるのが分かる。

これはピアからTTL2を受けた際にConnected checkが無効になるのでなく、自分がTTLを2以上にした際に無効になる。


ttl-security hops オプション

受信できるTTLの最小を指定するとともに、送出するTTLを255にする。

neighbor 1.1.1.1 ttl-security hops [1-254]
注意点としては、最小TTLを2にしたい場合、
neighbor 1.1.1.1 ttl-security hops 252とする必要がある。
最小TTLは 「255 - 設定数」で決まる。ややこしい。
また、送出TTLを255にする都合 ebgp-multihopオプションとは同時に設定できない。

R1#sh run | sec router bgp 100
router bgp 100
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 ttl-security hops 10
 neighbor 2.2.2.2 update-source Loopback0

 R1#sh ip bgp neighbors 2.2.2.2 | i TTL
Connection is ECN Disabled, Mininum incoming TTL 245, Outgoing TTL 255

明日は朝早いんでここまで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?