NEC IX BGP ルーティングの設定例 (IPv4とIPv6のデュアルスタック構成)

スポンサーリンク

NEC IX ルータにおけるBGP routingの設定例を紹介します。BGPは、IPv6, multicastなどの様々なアドレス体系を伝播できるプロトコルですが、現時点(2014/02/02)のNEC IXルータ(Version 8.8.22)ではIPv4しかサポートしていないようです。

コマンド一覧

このシナリオで重要なコマンド一覧は以下の通りです。

Router(config)# router bgp <own_as>
Router(config-bgp)# neighbor <remote_addr> remote <remote_as> 
Router(config-bgp)# neighbor <remote_addr> password <passwd>
Router(config-bgp)# neighbor <remote_addr> route-reflector-client
Router(config-bgp)# neighbor <remote_addr> update-source <passwd>

仕様説明

BGP

以下のコマンドでBGP neighborを確立する事ができます。

Router(config)# router bgp <own_as>
Router(config-bgp)# neighbor <remote_addr> remote <remote_as> 

以下のようなコマンド群でneihgborに関する詳細な設定ができます。

Router(config)# router bgp <own_as>
Router(config-bgp)# neighbor <remote_addr> password <passwd>
Router(config-bgp)# neighbor <remote_addr> route-reflector-client
Router(config-bgp)# neighbor <remote_addr> update-source <passwd>

以下はBGP設定に関するヘルプストリングです。Cisco機に比べると設定可能な項目はかなり少ないと思います。

Router(config-bgp)# neighbor X.X.X.X ?
  advertisement-interval  -- Minimum interval between route advertisement
  connect-interval        -- BGP per neighbor connect interval
  description             -- Neighbor specific description
  ebgp-multihop           -- Allow EBGP neighbors not directly connected
  password                -- Set a password for TCP MD5 signature option
  receive-capability      -- Override receive capability
  remote-as               -- Specify a BGP neighbor
  route-reflector-client  -- Configure a neighbor as Route Reflector client
  send-capability         -- Send-capability configuration
  shutdown                -- Administratively shut down this neighbor
  timers                  -- BGP per neighbor timers
  update-source           -- Source of routing updates
Router(config-bgp)# neighbor  X.X.X.X

また、現時点(2014/02/03)ではIPv6 BGPはサポートされていないようでした。

Router(config-bgp)# address-family ?
  ipv4  -- Address family IPv4
Router(config-bgp)# address-family ipv6 unicast
% ipv6  -- Invalid command.
Router(config-bgp)#

動作確認環境

以下の構成で動作確認を行います。

NEC IX BGPルーティング構成

 [R1:Cisco]
interface Ethernet0/0
 ip address 192.168.0.1 255.255.255.0
 ipv6 address 2001::1/64
 ipv6 address FE80::1 link-local
interface Loopback0
 ip address 10.1.1.1 255.255.255.255
 ipv6 address 2001:1::1/128
 ipv6 address FE80::1 link-local

 [R2:Cisco]
interface Ethernet0/0
 ip address 192.168.0.2 255.255.255.0
 ipv6 address 2001::2/64
 ipv6 address FE80::2 link-local
interface Loopback0
 ip address 10.2.2.2 255.255.255.255
 ipv6 address 2001:2::2/128
 ipv6 address FE80::2 link-local

 [R254:IX2215]
interface GigaEthernet1.0
  ip address 192.168.0.254/24
  ipv6 address 2001::254/64
  no shutdown

初期設定の全文は以下を参照下さい。

R1 config (Cisco 3640)
!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ipv6 unicast-routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.255
 ipv6 address 2001:1::1/128
 ipv6 address FE80::1 link-local
!
interface Ethernet0/0
 ip address 192.168.0.1 255.255.255.0
 half-duplex
 ipv6 address 2001::1/64
 ipv6 address FE80::1 link-local
!
!
no ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
R2 config (Cisco 3640)
!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ipv6 unicast-routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
interface Loopback0
 ip address 10.2.2.2 255.255.255.255
 ipv6 address 2001:2::2/128
 ipv6 address FE80::2 link-local
!
interface Ethernet0/0
 ip address 192.168.0.2 255.255.255.0
 half-duplex
 ipv6 address 2001::2/64
 ipv6 address FE80::2 link-local
!
!
no ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
R254 config (IX2215)
! NEC Portable Internetwork Core Operating System Software
! IX Series IX2215 (magellan-sec) Software, Version 8.8.22, RELEASE SOFTWARE
! Compiled Jul 04-Wed-2012 13:57:25 JST #2
! Last updated Feb 02-Sun-2014 23:24:17 JST
!
!
hostname R254
timezone +09 00
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
device GigaEthernet0
!
device GigaEthernet1
!
device GigaEthernet2
!
device BRI0
  isdn switch-type hsd128k
!
device USB0
  shutdown
!
interface GigaEthernet0.0
  no ip address
  shutdown
!
interface GigaEthernet1.0
  ip address 192.168.0.254/24
  ipv6 address 2001::254/64
  no shutdown
!
interface GigaEthernet2.0
  no ip address
  shutdown
!
interface BRI0.0
  encapsulation ppp
  no auto-connect
  no ip address
  shutdown
!
interface USB-Serial0.0
  encapsulation ppp
  no auto-connect
  no ip address
  shutdown
!
interface Loopback0.0
  no ip address
!
interface Null0.0
  no ip address

BGP

Cisco機 設定投入

NEC機側とスポークとするiBGP neighborを確立させます。Cisco機に以下のBGPに関する設定を投入します。

 [R1:Cisco3640]
router bgp 100
 network 10.1.1.1 mask 255.255.255.255
 neighbor 192.168.0.254 remote-as 100

 [R2:Cisco3640]
router bgp 100
 network 10.2.2.2 mask 255.255.255.255
 neighbor 192.168.0.254 remote-as 100

NEC機 BGP 設定投入

NEC機にiBGP neighborを確立する設定を投入します。NEC機側がスポークとなりますので、route reflectorの設定も忘れずに投入しましょう。

 [R254:IX2215]
router bgp 100
 neighbor 192.168.0.1 remote-as 100
 neighbor 192.168.0.1 route-reflector-client
 neighbor 192.168.0.2 remote-as 100
 neighbor 192.168.0.2 route-reflector-client

BGP 設定確認

BGPテーブルを確認し、互いに経路を交換できている事を確認します。

 [R1:Cisco3640]
R1#show ip bgp
BGP table version is 3, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.1/32      0.0.0.0                  0         32768 i
*>i10.2.2.2/32      192.168.0.2              0    100      0 i
R1#

 [R2:Cisco3640]

R2#show ip bgp
BGP table version is 4, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.1/32      192.168.0.1              0    100      0 i
*> 10.2.2.2/32      0.0.0.0                  0         32768 i
R2#

 [R254:IX2215]
R254(config)# show ip bgp
BGP table version is 4, local router ID is 192.168.0.254
Local AS number 100, local cluster ID is 192.168.0.254(3232235774)
Status codes: s - suppressed, * - valid, h - history
              > - best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network            Next Hop            Metric     LocPrf  Path
*>i10.1.1.1/32        192.168.0.1              0        100  i
*>i10.2.2.2/32        192.168.0.2              0        100  i

Total number of prefixes 2
R254(config)#
タイトルとURLをコピーしました