top of page

JANOG 57NETCON 問題解説 Level1-11

  • 39 分前
  • 読了時間: 4分

JANOG 57 にスタッフ(NETCON委員)として参加させていただきました。

作成した問題について、回答と解説を記載します。






Level1-11


SV-01から SV-02 のIPアドレス 192.168.20.200 に対してPingが通りません。

RT-02 の設定を修正して、ping が通るようにしてください。


達成条件

SV-01:192.168.10.100 から SV-02:192.168.20.200 に対してping が通ること。

パケットは RT-01、RT-02、RT-03、RT-04 によって転送されること。

SV-01:~# ping -c 5 192.168.20.200
PING 192.168.20.200 (192.168.20.200) 56(84) bytes of data.
64 bytes from 192.168.20.200: icmp_seq=1 ttl=60 time=2.77 ms
64 bytes from 192.168.20.200: icmp_seq=2 ttl=60 time=2.80 ms
64 bytes from 192.168.20.200: icmp_seq=3 ttl=60 time=3.00 ms
64 bytes from 192.168.20.200: icmp_seq=4 ttl=60 time=2.87 ms
64 bytes from 192.168.20.200: icmp_seq=5 ttl=60 time=3.07 ms

--- 192.168.20.200 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 2.770/2.904/3.073/0.116 ms

RT-02 は、RT-01 / RT-03 の両方とBGPネイバーを確立していること


制約

すべてのノードにアクセスできますが、設定を変更できるのは RT-02 だけです

インターフェースを追加したり、既存のインターフェースの設定を変更してはいけません

PBRを使用してはいけません

機器のmgmポートをパケット転送に使用して通信OKとすることは禁止



解説 初期状態では、RT-01 と RT-02 間でBGPネイバーが確立できていません。

SV-01:~# ping -c 5 192.168.20.200
PING 192.168.20.200 (192.168.20.200) 56(84) bytes of data.
From 192.168.10.1 icmp_seq=1 Destination Net Unreachable
From 192.168.10.1 icmp_seq=2 Destination Net Unreachable
From 192.168.10.1 icmp_seq=3 Destination Net Unreachable
From 192.168.10.1 icmp_seq=4 Destination Net Unreachable
From 192.168.10.1 icmp_seq=5 Destination Net Unreachable

--- 192.168.20.200 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4083ms

SV-01:~# traceroute -n 192.168.20.200
traceroute to 192.168.20.200 (192.168.20.200), 30 hops max, 46 byte packets
 1  192.168.10.1  0.869 ms !N  *  0.744 ms !N


RP/0/RP0/CPU0:RT-01#sh ip bgp su | be Nei
Mon Dec  8 10:18:41.991 UTC
Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.0.12.2         0 65020       8       8            0    0    0 00:00:00  Idle


RP/0/RP0/CPU0:RT-02#sh ip bgp su | be Nei
Mon Dec  8 10:19:20.697 UTC
Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.0.12.1         0 65001       8       9            0    0    0 00:00:00  Idle
10.0.23.3         0 65003       8       6            5    0    0 00:03:41          1

RT-01 は AS 65001 ではなく AS 65010 として設定されています。また、RT-02に対する remote-as も 65020 となっています。

RP/0/RP0/CPU0:RT-01#sh run router bgp
Mon Dec  8 10:21:23.730 UTC
router bgp 65010
 bgp router-id 1.1.1.1
 address-family ipv4 unicast
  network 192.168.10.0/24
 !
 neighbor 10.0.12.2
  remote-as 65020
  address-family ipv4 unicast
   route-policy BGP-IN-ALL in
   route-policy BGP-OUT-ALL out

しかし RT-02 は AS 65002 として設定されており、すでに RT-03:AS 65003 とネイバーを確立しています。

RP/0/RP0/CPU0:RT-02#sh run router bgp
Sat Dec 27 04:29:49.891 UTC
router bgp 65002
 bgp router-id 2.2.2.2
 address-family ipv4 unicast
 !
 neighbor 10.0.12.1
  remote-as 65001
  address-family ipv4 unicast
   route-policy BGP-IN-ALL in
   route-policy BGP-OUT-ALL out
  !
 !
 neighbor 10.0.23.3
  remote-as 65003
  address-family ipv4 unicast
   route-policy BGP-IN-ALL in
   route-policy BGP-OUT-ALL out
  !
 !
!

RT-01、RT-03 の設定は変更できないため、RT-02 のBGP設定を修正して以下を満たす必要があります。

・RT-01 に対しては AS 65020 として振る舞う・RT-03 に対しては AS 65002 として振る舞う



neighbor に対して異なるASと見せかけて動作させるためには local-as を使用します。

RT-02
router bgp 65002
 neighbor 10.0.12.1
  local-as 65020

これにより、RT-01(AS 65010) とneighborが確立し、RT-01に 192.168.20.0/24 のルートがBGPでインストールされSV-01 からpingが飛ぶようになります。

RP/0/RP0/CPU0:RT-02#sh ip bgp su | be Nei
Sat Dec 27 04:31:46.874 UTC
Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.0.12.1         0 65010      18      20            5    0    0 00:00:07          1
10.0.23.3         0 65003      14      13            6    0    0 00:08:40          1
RP/0/RP0/CPU0:RT-02#sh ip bgp | be Net
Mon Dec  8 10:28:18.173 UTC
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.10.0/24    10.0.12.1                0             0 65020 65010 i
*> 192.168.20.0/24    10.0.23.3                              0 65003 65004 i

Processed 2 prefixes, 2 paths

RP/0/RP0/CPU0:RT-01#sh ip bgp | be Net
Mon Dec 8 10:28:34.471 UTC
Network Next Hop Metric LocPrf Weight Path
*> 192.168.10.0/24 0.0.0.0 0 32768 i
*> 192.168.20.0/24 10.0.12.2 0 65020 65002 65003 65004 i

Processed 2 prefixes, 2 paths

RP/0/RP0/CPU0:RT-01#sh ip route 192.168.20.0
Mon Dec 8 10:29:09.910 UTC

Routing entry for 192.168.20.0/24
Known via "bgp 65010", distance 20, metric 0
Tag 65020, type external
Installed Dec 8 10:27:05.334 for 00:02:04
Routing Descriptor Blocks
10.0.12.2, from 10.0.12.2, BGP external
Route metric is 0, Wt is 1
No advertising protos.


SV-01:~# ping -c 5 192.168.20.200
PING 192.168.20.200 (192.168.20.200) 56(84) bytes of data.
64 bytes from 192.168.20.200: icmp_seq=1 ttl=60 time=4.18 ms
64 bytes from 192.168.20.200: icmp_seq=2 ttl=60 time=3.09 ms
64 bytes from 192.168.20.200: icmp_seq=3 ttl=60 time=2.97 ms
64 bytes from 192.168.20.200: icmp_seq=4 ttl=60 time=2.71 ms
64 bytes from 192.168.20.200: icmp_seq=5 ttl=60 time=2.90 ms

--- 192.168.20.200 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 2.706/3.168/4.181/0.521 ms


SV-01:~# traceroute -n 192.168.20.200
traceroute to 192.168.20.200 (192.168.20.200), 30 hops max, 46 byte packets
1 192.168.10.1 0.883 ms 0.469 ms 0.381 ms
2 10.0.12.2 1.195 ms 0.845 ms 0.806 ms
3 10.0.23.3 1.851 ms 1.388 ms 1.273 ms
4 10.0.34.4 2.362 ms 1.829 ms 1.883 ms
5 192.168.20.200 1.858 ms 1.988 ms 1.713 ms

正答例

RT-02
router bgp 65002
 neighbor 10.0.12.1
  remote-as 65010
  local-as 65020

--- or ---

no router bgp 65002

router bgp 65020
bgp router-id 2.2.2.2
address-family ipv4 unicast
!
neighbor 10.0.12.1
remote-as 65010
address-family ipv4 unicast
route-policy BGP-IN-ALL in
route-policy BGP-OUT-ALL out
!
!
neighbor 10.0.23.3
remote-as 65003
local-as 65002
address-family ipv4 unicast
route-policy BGP-IN-ALL in
route-policy BGP-OUT-ALL out

 
 
 

コメント


最新記事
アーカイブ
タグから検索
ソーシャルメディア
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

© 2023 by Name of Site. Proudly created with Wix.com

  • Facebook Social Icon
  • Twitter Social Icon
  • Google+ Social Icon
bottom of page