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?

More than 1 year has passed since last update.

【BGP】ベストパス選択 ①WEIGHT設定動作確認

Last updated at Posted at 2022-10-23

前提環境

ネットワーク構成図
スクリーンショット (215).png

今回の目的

ISP3(192.51.100.0)へのルートはISP1を経由したい
経路制御する際はWEIGHT属性で制御

現状

ISP3(192.168.100.0)へのルートはGW1はISP1(209.165.201.2)を経由しており、問題無いが、GW2はISP2(209.165.201.6)を経由している。

GW1 show ip bgp
BGP table version is 5, local router ID is 192.168.11.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.11.0     0.0.0.0                  0         32768 i
 *>i 192.168.22.0     192.168.2.2              0    100      0 i
 * i 198.51.100.0     209.165.201.6            0    100      0 65200 65300 i
 *>                   209.165.201.2                          0 65100 65300 i
 * i 203.0.113.0      209.165.201.6            0    100      0 65200 65300 i
 *>                   209.165.201.2                          0 65100 65300 i
GW2 show ip bgp
BGP table version is 5, local router ID is 192.168.22.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 192.168.11.0     192.168.1.1              0    100      0 i
 *>  192.168.22.0     0.0.0.0                  0         32768 i
 * i 198.51.100.0     209.165.201.2            0    100      0 65100 65300 i
 *>                   209.165.201.6                          0 65200 65300 i
 * i 203.0.113.0      209.165.201.2            0    100      0 65100 65300 i
 *>                   209.165.201.6                          0 65200 65300 i
GW2からISP3へ
GW2#traceroute 198.51.100.1 source lo 1
Type escape sequence to abort.
Tracing the route to 198.51.100.1
VRF info: (vrf in name/id, vrf out name/id)
  1 209.165.201.6 9 msec 9 msec 9 msec
  2 209.165.201.14 6 msec *  9 msec

設定

GW2(config-router)#neighbor 192.168.1.1 weight 10

ネイバー192.168.1.1からアドバタイズされるルートはWEIGHT属性10を付与する。

WEIGHT属性はローカルルータのみ適用
他ルータへ属性を付与するものではないので注意!

動作確認

BGPテーブル上の”Weight”の項目を見るとGW1から受け取っているルートに対して10が付与されていることがわかる
tracerouteコマンドにてISP3(198.51.100.0)へは、ISP1(209.165.201.2)を経由している.

GW2 show ip bgp
BGP table version is 8, local router ID is 192.168.22.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 192.168.11.0     192.168.1.1              0    100     10 i
 *>  192.168.22.0     0.0.0.0                  0         32768 i
 *>i 198.51.100.0     209.165.201.2            0    100     10 65100 65300 i
 *                    209.165.201.6                          0 65200 65300 i
 *>i 203.0.113.0      209.165.201.2            0    100     10 65100 65300 i
 *                    209.165.201.6                          0 65200 65300 i
GW2#traceroute 198.51.100.1 source lo 1
Type escape sequence to abort.
Tracing the route to 198.51.100.1
VRF info: (vrf in name/id, vrf out name/id)
  1 172.16.12.1 1 msec 0 msec 1 msec
  2 209.165.201.2 0 msec 1 msec 0 msec
  3 209.165.201.10 4 msec *  5 msec

次回

LOCAL_PREFの設定動作確認をしていきます!

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?