allowas-in, #show ip bgp, Weight

構成

昨日のRouter3に新たにRouter4を接続
Router3|Gi0/1------Gi0/0|Router4
Gi0/1: 150.1.0.1/24, Gi0/0: 150.1.0.2/24

Router1: AS100
Router2: AS200
Router3: AS200
Router4: AS100

結果

Router4にて
始め#show ip bgp を入れるもRouter3からのアップデートのAS_PATHに自身のAS番号であるAS100が含まれているため何も表示しない。
そして(config-router)#neighbor 150.1.0.1(ピア) allowas-inを設定すると「Path」欄に「100」を含んだ情報が追加された。

Router4#show ip bgp
Router4#
Router4#conf t

Router4(config)#router bgp 100
Router4(config-router)#neighbor 150.1.0.1 allowas-in
Router4(config-router)#end
Router4#show ip bgp
BGP table version is 4, local router ID is 150.1.0.2
Status codes: (略)

 Network          Next Hop            Metric LocPrf Weight Path

*>   192.168.0.0      150.1.0.1                              0 200 100 i
*>   192.168.1.0      150.1.0.1                              0 200 100 i
*>   192.168.2.0      150.1.0.1                              0 200 100 i

感想

入力自体は(config-router)#neighbor 150.1.0.1 allowas-inの1行だけだったけれども、参考書にトポロジの例が載っていないため自分で考えて検証することができた。この「自分で構成を考えて検証する」が少しできたのは成長だと思う。

おまけ#show ip bgp

Router2
Network          Next Hop                Metric LocPrf Weight Path
 * i  172.16.0.0/24    150.1.0.2                0    100      0 100 i
 * i  172.16.1.0/24    150.1.0.2                0    100      0 100 i
 *>   192.168.0.0      100.1.0.1                0             0 100 i
 *>   192.168.1.0      100.1.0.1                0             0 100 i
 *>   192.168.2.0      100.1.0.1                0             0 100 i

Router3
Network          Next Hop                Metric LocPrf Weight Path
 *>    172.16.0.0/24   150.1.0.2                0             0 100 i
 *>    172.16.1.0/24   150.1.0.2                0             0 100 i
 *> i  192.168.0.0     100.1.0.1                0    100      0 100 i
 *> i  192.168.1.0     100.1.0.1                0    100      0 100 i
 *> i  192.168.2.0     100.1.0.1                0    100      0 100 i

Router4
Network          Next Hop                Metric LocPrf Weight Path
 *>   172.16.0.0/24    0.0.0.0                  0         32768 i
 *>   172.16.1.0/24    0.0.0.0                  0         32768 i
 *>   192.168.0.0      150.1.0.1                              0 200 100 i
 *>   192.168.1.0      150.1.0.1                              0 200 100 i
 *>   192.168.2.0      150.1.0.1                              0 200 100 i

allowas-inの検証のあとに、Router4のGi0/1,2に172.16.0-1.1/24を追加した。
するとRouter2~4で「Network」欄や「Weight」が異なるのでそれの勉強。(特にNetworkがよくわかっていない)

参考

>

>はベストパスとして選択されたルート(ルーティングテーブルに載る)
そのため、Router2ではルーティングテーブルに172.16.0-1.0/24の情報がない。

Router2#show ip route
Codes: (略)
Gateway of last resort is not set

         1.0.0.0/32 is subnetted, 1 subnets

S        1.1.1.1 [1/0] via 100.1.0.1
2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
S        3.3.3.3 [1/0] via 200.1.0.2
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        100.1.0.0/24 is directly connected, GigabitEthernet0/0
L        100.1.0.2/32 is directly connected, GigabitEthernet0/0
B     192.168.0.0/24 [20/0] via 100.1.0.1, 00:26:50
B     192.168.1.0/24 [20/0] via 100.1.0.1, 00:26:50
B     192.168.2.0/24 [20/0] via 100.1.0.1, 00:26:50
200.1.0.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.1.0.0/24 is directly connected, GigabitEthernet0/1
L        200.1.0.1/32 is directly connected, GigabitEthernet0/1


Router3#show ip route
Codes: (略)
Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
S        2.2.2.2 [1/0] via 200.1.0.1
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      100.0.0.0/24 is subnetted, 1 subnets
S        100.1.0.0 [1/0] via 200.1.0.1
      150.1.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        150.1.0.0/24 is directly connected, GigabitEthernet0/1
L        150.1.0.1/32 is directly connected, GigabitEthernet0/1
      172.16.0.0/24 is subnetted, 2 subnets
B        172.16.0.0 [20/0] via 150.1.0.2, 00:21:14
B        172.16.1.0 [20/0] via 150.1.0.2, 00:20:44
B     192.168.0.0/24 [200/0] via 100.1.0.1, 00:27:30
B     192.168.1.0/24 [200/0] via 100.1.0.1, 00:27:30
B     192.168.2.0/24 [200/0] via 100.1.0.1, 00:27:30
      200.1.0.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.1.0.0/24 is directly connected, GigabitEthernet0/0
L        200.1.0.2/32 is directly connected, GigabitEthernet0/0

i

iは>の右側に表示されるとiBGPで、表示されなければeBGP。
Router2の172ネットワークにiが付いているのは同じAS内のRouter3から広告されたもので、Router3の192ネットワークにiがついているのはRouter2から広告されたため。

s

aggregate-addressのsummary-onlyで抑制されている状態。
注意すべきは、抑制しているルータでsが表示されて、他のルータでは特に表示されない。
そのためsummary-onlyを設定したRouter2ではsが表示されるが、その影響でRouter3の192ネットワークは192.168.0.0/22のみになるがsは表示されない。

Router2#sh ip bgp
Network          Next Hop                 Metric LocPrf Weight Path
*>i  172.16.0.0/24    200.1.0.2                0    100      0 100 i
*>i  172.16.1.0/24    200.1.0.2                0    100      0 100 i
s>   192.168.0.0      100.1.0.1                0             0 100 i
*>   192.168.0.0/22   0.0.0.0                            32768 i
s>   192.168.1.0      100.1.0.1                0             0 100 i
s>   192.168.2.0      100.1.0.1                0             0 100 i

Router3#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>   172.16.0.0/24    150.1.0.2                0             0 100 i
 *>   172.16.1.0/24    150.1.0.2                0             0 100 i
 *>i  192.168.0.0/22   200.1.0.1                0    100      0 i

おまけのおまけWeight(3/28追記)

上のRouter2の#sh ip bgpをみると、192.168.0.0/22のWeightだけ32768となっている。32768はルータ自身で生成した経路のWeightのデフォルト値。

この記事が気に入ったらサポートをしてみませんか?