キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
5066
閲覧回数
1
いいね!
0
コメント
shokada
Cisco Employee
Cisco Employee

 

はじめに

Nexus (NX-OS) での BGP は、IOS と比べ設定方法が一部異なります。
このドキュメントでは、NX-OS における BGP の基本設定及び設定方法を紹介いたします。

 

 

使用するトポロジ

nexus-bgp-basic.png

 

 

設定方法

STEP1, 事前設定

今回は各 Nexus の Eth1/5 を routed port として接続しているため、
それぞれの Nexus に設定を行います。

N9K-1(config)#interface Ethernet 1/5
N9K-1(config-if)#no switchport
N9K-1(config-if)#ip address 192.168.12.1/24
N9K-1(config-if)#no shutdown

N9K-2(config)#interface Ethernet 1/5
N9K-2(config-if)#no switchport
N9K-2(config-if)#ip address 192.168.12.2/24
N9K-2(config-if)#no shutdown

 

続いて、 BGP で広報するLoopback I/F を設定します。

N9K-1(config)#interface loopback0
N9K-1(config-if)#ip address 1.1.1.1/32

N9K-2(config)#interface loopback0
N9K-2(config-if)#ip address 2.2.2.2/32

 

 

STEP2, BGP を設定

デフォルトでは BGP 機能が無効化されているため、これを有効化します。
※有効化にはライセンスが必要となるため、詳細はご利用機器のConfiguration Guideをご参照ください。

N9K-1(config)#feature bgp

 

今回は N9K-1 と N9K-2 で eBGP neighbor を形成するため、
N9K-1 では AS 番号を10000 、N9K-2 では AS 番号20000で設定します。

N9K-1(config)#router bgp 10000
N9K-1(config-router)#neighbor 192.168.12.2
N9K-1(config-router-neighbor)remote-as 20000

 

N9K-2(config)#router bgp 20000
N9K-2(config-router)#neighbor 192.168.12.1
N9K-2(config-router-neighbor)remote-as 10000

 


IOS と異なり、続いて IPv4 を有効化させます。
NX-OS では、この設定がなければ BGP neighborが構築できません。

N9K-1(config-router-neighbor)# address-family ipv4 unicast


最後に、Loopback I/F のアドレスを BGPで広報します。

N9K-1(config-router)# address-family ipv4 unicast
N9K-1(config-router-af)# network 1.1.1.1/32

 

 

STEP3, 確認

これらの設定により、問題なく eBGP neighbor が形成され、経路情報が交換でき、
疎通性が取れることが確認できます。

 

N9K-1# show ip bgp summary
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 1.1.1.1, local AS number 10000
BGP table version is 5, IPv4 Unicast config peers 1, capable peers 1
2 network entries and 2 paths using 480 bytes of memory
BGP attribute entries [2/336], BGP AS path entries [1/6]
BGP community entries [0/0], BGP clusterlist entries [0/0]

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.2    4 20000       7       6        5    0    0 00:00:18 1

 

N9K-1# show ip route
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>

1.1.1.1/32, ubest/mbest: 2/0, attached
    *via 1.1.1.1, Lo0, [0/0], 08:33:19, local
    *via 1.1.1.1, Lo0, [0/0], 08:33:19, direct
2.2.2.2/32, ubest/mbest: 1/0
    *via 192.168.12.2, [20/0], 00:01:03, bgp-10000, external, tag 20000
192.168.12.0/24, ubest/mbest: 1/0, attached
    *via 192.168.12.1, Eth1/5, [0/0], 00:01:17, direct
192.168.12.1/32, ubest/mbest: 1/0, attached
    *via 192.168.12.1, Eth1/5, [0/0], 00:01:17, local

 

N9K-1# ping 2.2.2.2 source 1.1.1.1
PING 2.2.2.2 (2.2.2.2) from 1.1.1.1: 56 data bytes
64 bytes from 2.2.2.2: icmp_seq=0 ttl=254 time=1.157 ms
64 bytes from 2.2.2.2: icmp_seq=1 ttl=254 time=0.659 ms
64 bytes from 2.2.2.2: icmp_seq=2 ttl=254 time=0.621 ms
64 bytes from 2.2.2.2: icmp_seq=3 ttl=254 time=0.621 ms
64 bytes from 2.2.2.2: icmp_seq=4 ttl=254 time=0.614 ms

--- 2.2.2.2 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.614/0.734/1.157 ms

 

 

設定例

N9K-1 :
conf t
!
feature bgp
!
interface Ethernet1/5
  ip address 192.168.12.1/24
  no shutdown
!
interface loopback0
  ip address 1.1.1.1/32
!
router bgp 10000
  address-family ipv4 unicast
    network 1.1.1.1/32
  neighbor 192.168.12.2
    remote-as 20000
    address-family ipv4 unicast

 

N9K-2 :
conf t
!
feature bgp
!
interface Ethernet1/5
  ip address 192.168.12.2/24
  no shutdown
!
interface loopback0
  ip address 2.2.2.2/32
!
router bgp 20000
  address-family ipv4 unicast
    network 2.2.2.2/32
  neighbor 192.168.12.1
    remote-as 10000
    address-family ipv4 unicast

 

 

関連コンテンツ

Nexus スイッチ (NX-OS) : 設定例

 

 

参考情報

Configuration Guide : Configuring BGP Basic

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします