ネットワーク部1年生チーム、iBGPに翻弄される | 活動記録

ネットワーク部1年生チーム、iBGPに翻弄される

ネットワーク部1年生チームの活動記録です

開催日時

2025年10月17日(金)16:50〜

参加者

ConvivialNet ネットワーク部メンバー4名

活動内容

OSPF、iBGPを使ったひし形ネットワークでのiBGPフルメッシュを目指しました。

背景

前回のリベンジということで、4台のルータを用いたひし形ネットワークの構築に挑戦しました。

手順

1.ルータ1から4にloopback interfaceを設定

2.ルータ1から4にOSPFを設定

3.ルータ1から4にiBGPを設定

使用例

以下、RT1で使用したコマンドを一部紹介します。

//1. ルータ1から4にloopback interfaceを設定

RT1(config)# interface Loopback0
RT1(config-if)# ip address 10.255.1.1 255.255.255.255

//2. ルータ1から4にOSPFを設定

RT1(config)# router ospf 1
RT1(config-router)#passive-interface Loopback0
RT1(config-router)# network 10.255.1.1 0.0.0.0 area 0
RT1(config-router)# network 192.168.2.0 0.0.0.255 area 0

//3. ルータ1から4にiBGPをつなぐ

RT1(config)# router bgp 65000
RT1(config-router)# neighbor 10.255.1.2 remote-as 65000
RT1(config-router)# neighbor 10.255.1.2 update-source Loopback0
RT1(config-router)# redistribute ospf 1

show running config実行結果

RT3のshow running configを一部抜粋します。

!
interface Loopback0
 ip address 10.255.1.1 255.255.255.255
!
interface GigabitEthernet0/0
 no ip address
!
interface GigabitEthernet0/1
 no ip address
!
interface GigabitEthernet0/2
 no ip address
!
interface GigabitEthernet0/3
 no ip address
!
interface GigabitEthernet0/4
 ip address 192.168.4.1 255.255.255.0
 duplex auto
 speed auto
!
interface GigabitEthernet0/5
 ip address 192.168.2.1 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
!
router ospf 1
 passive-interface Loopback0
 network 10.255.1.1 0.0.0.0 area 0
 network 192.168.2.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 0
 network 192.168.5.0 0.0.0.255 area 0
!
router bgp 65000
 bgp log-neighbor-changes
 redistribute ospf 1
 neighbor 10.255.1.2 remote-as 65000
 neighbor 10.255.1.2 update-source Loopback0
 neighbor 10.255.1.3 remote-as 65000
 neighbor 10.255.1.3 update-source Loopback0
 neighbor 10.255.1.4 remote-as 65000
 neighbor 10.255.1.4 update-source Loopback0
!

show ip bgp summaryの実行結果

RT1のshow ip bgp summaryの実行結果を紹介します。

RT1#show ip bgp summary
BGP router identifier 10.255.1.1, local AS number 65000
BGP table version is 8, main routing table version 8
7 network entries using 1008 bytes of memory
7 path entries using 560 bytes of memory
3/3 BGP path/bestpath attribute entries using 480 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2048 total bytes of memory
BGP activity 7/0 prefixes, 14/7 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.255.1.2      4        65000     119     116        8    0    0 01:38:55        0
10.255.1.3      4        65000       0       0        1    0    0 never    Idle
10.255.1.4      4        65000      47      50        8    0    0 00:37:07        0

まとめ

iBGPフルメッシュを試みましたが、最後にshow ip bgp summaryを実行したところ一部のステートがnever idleと表示されてしまいました。 次回はこの現象の原因を追究していきたいと思います。

今回も先輩に遅くまで手伝ってもらいました。 1年生チームの独り立ちはまだまだ先になりそうです。 先輩に頼り切りになってしまわぬように、独り立ちを目指してこれからも頑張って活動していきたいと思います!

▶【追記 (20:38)】 解決しました!

Router1#show ip bgp summary
BGP router identifier 10.255.1.1, local AS number 65000
BGP table version is 16, main routing table version 16

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.255.1.2      4        65000     163     161       16    0    0 02:18:33        0
10.255.1.3      4        65000      16      19       16    0    0 00:13:18        0
10.255.1.4      4        65000      91      96       16    0    0 01:16:45        0

・ ルータ1に不要なネットワークコマンドが残っていた

・ ルータ3と4でOSPFのループバックインターフェイスの経路をアドバタイズしていなかった

のいずれか、もしくは両方が原因となっていたと考えられます(両方試したためどちらかはわかりませんでした、、、)