ネットワーク備忘録

アラフォーエンジニアのネットワーク系の備忘録。twitter:@deigo25374582

MP-BGP

キャリアのIP-VPNサービスを使う際に、使用可能なルーティングプロトコルでBGPをよく聞くので、これを機会にちょっと確認

 

構成は下図

f:id:klock_3rd:20160406225954p:plain

ここでR1、R6が拠点側のルータ・・・要は、サービス申込者が用意するCEルータ
R2、R3、R4、R5はキャリアのIP-VPN網と想定

 

全部のConfigを乗っけたら結構な量になるので、R1、R2、R5の必要な点だけメモ
因みに、R3、R4はIF上でMPLSを有効にして、OSPFでR2~R5間の経路を広告するだけの設定

 

 

<R1>

 router bgp 1
no synchronization
bgp log-neighbor-changes
network 10.1.1.1 mask 255.255.255.255
neighbor 192.168.1.254 remote-as 2
neighbor 192.168.1.254 soft-reconfiguration inbound
no auto-summary
!

<R2> 

ip vrf MPLS1
rd 1:100
route-target export 1:100
route-target import 1:100
!
interface FastEthernet0/0
ip vrf forwarding MPLS1
ip address 192.168.1.254 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf MPLS1
neighbor 192.168.1.1 remote-as 1
neighbor 192.168.1.1 activate
no synchronization
exit-address-family
!

 <R5>

ip vrf MPLS1
rd 1:100
route-target export 1:100
route-target import 1:100
!
interface FastEthernet0/0
ip vrf forwarding MPLS1
ip address 192.168.5.1 255.255.255.0
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf MPLS1
neighbor 192.168.5.254 remote-as 5
neighbor 192.168.5.254 activate
no synchronization
exit-address-family
!

 

この状態で、R6の経路を確認すると、R1のloop0のアドレスの経路が通知される。

R6#sho ip route

B       10.1.1.1 [20/0] via 192.168.5.1,

tracerouteは

 

R6#traceroute 10.1.1.1 source loopback 0

1 192.168.5.1 [AS 1] 52 msec 48 msec 20 msec
2 192.168.4.1 [AS 1] [MPLS: Labels 17/16 Exp 0] 100 msec 100 msec 80 msec
3 192.168.3.1 [AS 1] [MPLS: Labels 16/16 Exp 0] 80 msec 60 msec 60 msec
4 192.168.1.254 [AS 1] [MPLS: Label 16 Exp 0] 72 msec 68 msec 60 msec
5 192.168.1.1 [AS 1] 100 msec 76 msec 120 msec

 

R2側からのR1とのネイバー接続確認は、show ip bgp neighborsでは表示されない点に注意

R2#show ip bgp vpnv4 vrf MPLS1 neighbors
BGP neighbor is 192.168.1.1, vrf MPLS1, remote AS 1, external link
BGP version 4, remote router ID 10.1.1.1
BGP state = Established, up for 01:18:33

(中略)

 

新規でIP-VPN網を使った拠点NW構築というのは経験なかったけど、拠点側に関しては難しく考えず、BGPで経路を伝えればいい。

とりあえず確認終わり。