BGP-4 設定例 5


5. IBGPで経路を広告する

この例は、IBGPのもっとも簡単な設定例です。

ネットワークの構成

                   |                           |
            +------+------+             +------+------+
            |    RT A     |  AS 64002   |    RT B     |  AS 64003
            +------+------+             +------+------+
                   |  172.16.0.1               |  172.16.1.1
                   |                           |
                   |  1.5Mbit/s 専用線         |  1.5Mbit/s 専用線
                   |                           |
    +--------------|---------------------------|------------------+
    |              |                           |                  |
    |              |  172.16.0.2               |  172.16.1.2      |
    |       +------+------+             +------+------+           |
    |       |     RT1     |             |     RT2     |           |
    |       +------+------+             +------+------+           |
    |              |  192.168.0.1/24           |  192.168.0.2/24  |
    |              |                           |                  |
    |              +---------------------------+                  |
    |                         AS 64001                            |
    +-------------------------------------------------------------+

設定のポイント

設定例

RT1の設定例

    #
    # LANの設定
    #
    ip lan1 address 192.168.0.1/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

    #
    # ネイバへの経路の設定
    #
    ip route 192.168.102.1 gateway 192.168.0.2

    #
    # 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 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.0.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

    #
    # ネイバへの経路の設定
    #
    ip route 192.168.101.1 gateway 192.168.0.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 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

設定例のトップへ