BGP-4 設定例 7


7. 複数のルーターとIBGPで接続する

IBGPで複数のルーターと接続する場合はフルメッシュで接続します。
IBGPで接続されたルーターから受信した経路をIBGP内で再度広告しません。
この例は、RIPで広告された経路を経由してIBGPを構成します。

ネットワークの構成

                   |                           |                             |
            +------+------+             +------+------+               +------+------+
            |    RT A     |  AS 64002   |    RT B     |  AS 64003     |    RT C     |  AS 64004
            +------+------+             +------+------+               +------+------+
                   |  172.16.0.1               |  172.16.1.1                 |  172.16.2.1
                   |                           |                             |
                   |  1.5Mbit/s 専用線         |  1.5Mbit/s 専用線           |  1.5Mbit/s 専用線
                   |                           |                             |
    +--------------|---------------------------|-----------------------------|------------------+
    | AS 64001     |                           |                             |                  |
    |              |  172.16.0.2               |  172.16.1.2                 |  172.16.2.2      |
    |       +------+------+             +------+------+               +------+------+           |
    |       |     RT1     |             |     RT2     |               |     RT3     |           |
    |       +------+------+             +------+------+               +------+------+           |
    |              |  192.168.0.2/24           |  192.168.1.2/24             |  192.168.2.2/24  |
    |              |                           |                             |                  |
    +--------------|---------------------------|-----------------------------|------------------+
                   |  192.168.0.1/24           |  192.168.1.1/24             |  192.168.2.1/24
                   |      +-------------+      |                             |
                   +------+    RT D     +------+                             |
                          +------+------+                                    |
                                 |                                           |
                                 +-------------------------------------------+

設定のポイント

設定例

RT1の設定例

    #
    # LANの設定
    #
    ip lan1 address 192.168.0.2/24

    #
    # LOOPBACKインタフェースの設定
    #
    ip loopback1 address 192.168.101.1

    #
    # WANの設定
    #
    line type bri1.1 l128
    pp select 1
    pp bind bri1.1
    ip pp remote address 172.16.0.1
    ip pp local address 172.16.0.2
    pp enable 1

    #
    # RIPの設定
    #
    rip use on
    ip lan1 rip send on version 2
    ip lan1 rip receive on version 2
    pp select 1
    ip pp rip send off
    ip pp rip receive off
    pp enable 1

    #
    # BGPの設定
    #
    bgp use on
    bgp autonomous-system 64001
    bgp neighbor 1 64001 192.168.102.1 local-address=192.168.101.1
    bgp neighbor 2 64001 192.168.103.1 local-address=192.168.101.1
    bgp neighbor 3 64002 172.16.0.1
    bgp router id 192.168.101.1
    bgp import filter 1 include all
    bgp import 64001 bgp 64002 filter 1
    bgp import 64002 bgp 64001 filter 1
    bgp export filter 1 include all
    bgp export 64001 filter 1
    bgp export 64002 filter 1

RT2の設定例

    #
    # LANの設定
    #
    ip lan1 address 192.168.1.2/24

    #
    # LOOPBACKインタフェースの設定
    #
    ip loopback1 address 192.168.102.1

    #
    # WANの設定
    #
    line type bri1.1 l128
    pp select 1
    pp bind bri1.1
    ip pp remote address 172.16.1.1
    ip pp local address 172.16.1.2
    pp enable 1

    #
    # RIPの設定
    #
    rip use on
    ip lan1 rip send on version 2
    ip lan1 rip receive on version 2
    pp select 1
    ip pp rip send off
    ip pp rip receive off
    pp enable 1

    #
    # BGPの設定
    #
    bgp use on
    bgp autonomous-system 64001
    bgp neighbor 1 64001 192.168.101.1 local-address=192.168.102.1
    bgp neighbor 2 64001 192.168.103.1 local-address=192.168.102.1
    bgp neighbor 3 64003 172.16.1.1
    bgp router id 192.168.102.1
    bgp import filter 1 include all
    bgp import 64001 bgp 64003 filter 1
    bgp import 64003 bgp 64001 filter 1
    bgp export filter 1 include all
    bgp export 64001 filter 1
    bgp export 64003 filter 1

RT3の設定例

    #
    # LANの設定
    #
    ip lan1 address 192.168.2.2/24

    #
    # LOOPBACKインタフェースの設定
    #
    ip loopback1 address 192.168.103.1

    #
    # WANの設定
    #
    line type bri1.1 l128
    pp select 1
    pp bind bri1.1
    ip pp remote address 172.16.2.1
    ip pp local address 172.16.2.2
    pp enable 1

    #
    # RIPの設定
    #
    rip use on
    ip lan1 rip send on version 2
    ip lan1 rip receive on version 2
    pp select 1
    ip pp rip send off
    ip pp rip receive off
    pp enable 1

    #
    # BGPの設定
    #
    bgp use on
    bgp autonomous-system 64001
    bgp neighbor 1 64001 192.168.101.1 local-address=192.168.103.1
    bgp neighbor 2 64001 192.168.102.1 local-address=192.168.103.1
    bgp neighbor 3 64004 172.16.2.1
    bgp router id 192.168.103.1
    bgp import filter 1 include all
    bgp import 64001 bgp 64004 filter 1
    bgp import 64004 bgp 64001 filter 1
    bgp export filter 1 include all
    bgp export 64001 filter 1
    bgp export 64004 filter 1

設定例のトップへ