5
0

More than 1 year has passed since last update.

Oracle Cloud: ECMP有効にして IPSec VPN接続してみてみた

Last updated at Posted at 2021-07-19

Equal-Cost Multi-Path Routing (ECMP)は、BGPを使用して、複数の FastConnect仮想回線または複数の IPSec Tunnelを介した ネットワークトラフィック の Flow-Based Load Balancingを可能にする機能です。
これにより、Active-Active Load Balancing と、最大8つの回線間のネットワーク・トラフィックのフェイルオーバーが可能になります。
また、冗長性が重要でない場合でも、暗号化処理のオーバーヘッドのために通常1 Gbpsに制限されている IPSec接続の速度を向上させることができ、ECMPを使用すると最大8つの IPSec接続を組み合わせて Multi-Gigabit レベルのスループットを実現できるようになります。
ということで、前回使用した Cisco 841M ルーターを使用して、Oracle Cloud Infrastructure(OCI)へ 8 Tunnelの IPSec VPN接続を行い、ECMP有効にして Route情報の変化を確認してみてみます。

■ 構成イメージ

ECMP構成.png
ECMPは、プロトコル、宛先IP、ソースIP、宛先ポートおよびソース・ポートを利用した一貫性のあるアルゴリズムでフローを区別しロードバランスします。したがって、使用可能なすべての帯域幅を利用するには、複数のフローが必要です。

■ 事前設定

今回は、ECMPの設定から実施します。
事前に次を参考に1つの CPE(Customer Premises Equipment)に対して4つの IPSec Connectionを作成し、8つのIPSec Tunnelを設定しておきます。
・参考: Oracle Cloud: Cisco 841M ルーターを IKEv2 と BGPで IPSec VPN接続してみてみた

OCI-IPSec設定01.jpg

■ ECMP設定前確認

IPSec BGPルーターに接続して、BGPとRoute情報を確認

● BGP情報確認

1) DRG送信 Route情報確認
BGP Neighbors の DRG から受信した OCI側 Route情報を確認
VCN Subnet (10.1.0.0/24) と Object Storage (34.70.80.0/23, 134.70.82.0/23) の CIDRを Ciscoルーターへ送信していることを確認できます

C841M#show ip bgp neighbors 192.168.254.102 received-routes
	BGP table version is 4360, local router ID is 192.168.254.145
	Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
				r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
				x best-external, a additional-path, c RIB-compressed,
	Origin codes: i - IGP, e - EGP, ? - incomplete
	RPKI validation codes: V valid, I invalid, N Not found

		Network          Next Hop            Metric LocPrf Weight Path
	*>  10.1.0.0/24      192.168.254.102                        0 31898 i
	*>  134.70.80.0/23   192.168.254.102                        0 31898 i
	*>  134.70.82.0/23   192.168.254.102                        0 31898 i

	Total number of prefixes 3

2) BGP Routing情報確認
OCI から受信した全IPSec Tunnelの Route情報を確認
IPSec BGPルーターに接続して、OCIの Subnet情報(Network) と使用 BGP Peer IP(Next Hop)を確認
今回 8 Tunnel接続しているので、各OCI Subnetに対して、8つのBGP Peer IPで構成されていることを確認できます

C841M#show ip bgp
      BGP table version is 14, local router ID is 192.168.254.145
      Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
      Origin codes: i - IGP, e - EGP, ? - incomplete
      RPKI validation codes: V valid, I invalid, N Not found

      Network          Next Hop            Metric LocPrf Weight Path
      *   10.1.0.0/24      192.168.254.134                        0 31898 i
      *                    192.168.254.138                        0 31898 i
      *                    192.168.254.126                        0 31898 i
      *                    192.168.254.122                        0 31898 i
      *                    192.168.254.106                        0 31898 i
      *                    192.168.254.142                        0 31898 i
      *                    192.168.254.146                        0 31898 i
      *>                   192.168.254.102                        0 31898 i
      Network          Next Hop            Metric LocPrf Weight Path
      *                    192.168.254.146                        0 31898 i
      *>                   192.168.254.102                        0 31898 i
      *   134.70.80.0/23   192.168.254.134                        0 31898 i
      *                    192.168.254.138                        0 31898 i
      *                    192.168.254.126                        0 31898 i
      *                    192.168.254.122                        0 31898 i
      *                    192.168.254.106                        0 31898 i
      *                    192.168.254.142                        0 31898 i
      *                    192.168.254.146                        0 31898 i
      *>                   192.168.254.102                        0 31898 i
      *   134.70.82.0/23   192.168.254.134                        0 31898 i
      *                    192.168.254.138                        0 31898 i
      *                    192.168.254.126                        0 31898 i
      *                    192.168.254.122                        0 31898 i
      *                    192.168.254.106                        0 31898 i
      *                    192.168.254.142                        0 31898 i
      *                    192.168.254.146                        0 31898 i
      *>                   192.168.254.102                        0 31898 i
      *>  192.168.0.0/25 0.0.0.0                  0         32768 i

● Routerの Route情報確認

IPSec BGPルーターに接続して、OCIの Subnet に対してどの Tunnel#のBGP Peer IPを使用しているか確認
今回 ECMP(Multi-Path)設定無効なので、1つのOCI Subnet(10.1.0.0) に対して 1つの Tunnel11 (BGP Peer IP:192.168.254.102) を使用していることを確認できます

C841M#show ip route
      Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
            D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
            N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
            E1 - OSPF external type 1, E2 - OSPF external type 2
            i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
            ia - IS-IS inter area, * - candidate default, U - per-user static route
            o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
            a - application route
            + - replicated route, % - next hop override, p - overrides from PfR

      Gateway of last resort is 0.0.0.0 to network 0.0.0.0

      S*    0.0.0.0/0 is directly connected, Dialer1
            10.0.0.0/24 is subnetted, 2 subnets
      B        10.1.0.0 [20/0] via 192.168.254.102, 00:40:22
            100.0.0.0/32 is subnetted, 1 subnets
      C        100.100.100.101 is directly connected, Dialer1
            134.70.0.0/23 is subnetted, 2 subnets
      B        134.70.80.0 [20/0] via 192.168.254.102, 00:40:22
      B        134.70.82.0 [20/0] via 192.168.254.102, 00:40:22
		・・・
            192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
      C        192.168.0.0/25 is directly connected, Vlan1
      L        192.168.0.1/32 is directly connected, Vlan1
            192.168.254.0/24 is variably subnetted, 16 subnets, 2 masks
      C        192.168.254.100/30 is directly connected, Tunnel11
      L        192.168.254.101/32 is directly connected, Tunnel11
      C        192.168.254.104/30 is directly connected, Tunnel12
      L        192.168.254.105/32 is directly connected, Tunnel12
      C        192.168.254.120/30 is directly connected, Tunnel21
      L        192.168.254.121/32 is directly connected, Tunnel21
      C        192.168.254.124/30 is directly connected, Tunnel22
      L        192.168.254.125/32 is directly connected, Tunnel22
      C        192.168.254.132/30 is directly connected, Tunnel31
      L        192.168.254.133/32 is directly connected, Tunnel31
      C        192.168.254.136/30 is directly connected, Tunnel32
      L        192.168.254.137/32 is directly connected, Tunnel32
      C        192.168.254.140/30 is directly connected, Tunnel41
      L        192.168.254.141/32 is directly connected, Tunnel41
      C        192.168.254.144/30 is directly connected, Tunnel42
      L        192.168.254.145/32 is directly connected, Tunnel42

■ OCI側 DRG ECMP設定

DRG の IPSec VPN用 Route Tableにある ECMP項目を設定

● OCI ECMP設定

1) DRG画面
設定するDRGを選択し、Resources > DRG Route Tables をクリックし、
IPSec Attachmentsの DRG Route Talesをクリック
01_ECMP有効01.jpg

2) Autogenerated Drg Route Table画面
[Edit] をクリックし、Edit DRG Route Table画面にある [Enable ECMP]へチェックして[Save Changes]をクリック
01_ECMP有効03.jpg

■ オンプレミス側ルーター ECMP(等コストマルチパス)有効化

● Multi-Path設定

Cisco IOSの場合、等コストマルチパスの maximum-paths を設定してRouteing Table に設定できるパラレルの BGPルートの数8を設定
また、AS Path Prepend等で使用Tunnelへ優先度つけて経路制御している設定がある場合は削除しておきます

1) 設定
router bgp セクションへ "maximum-paths 8" を設定

C841M(config)#router bgp 65000
C841M(config-router)#maximum-paths 8

2) 設定確認
router bgpセクションへ”maximum-paths 8” が設定されていることを確認

C841M#show running-config | section router bgp
	router bgp 65000
	bgp log-neighbor-changes
	neighbor 192.168.254.102 remote-as 31898
	neighbor 192.168.254.106 remote-as 31898
	neighbor 192.168.254.122 remote-as 31898
	neighbor 192.168.254.126 remote-as 31898
	neighbor 192.168.254.134 remote-as 31898
	neighbor 192.168.254.138 remote-as 31898
	neighbor 192.168.254.142 remote-as 31898
	neighbor 192.168.254.146 remote-as 31898
	!
	address-family ipv4
	network 192.168.0.0 mask 255.255.255.0
	neighbor 192.168.254.102 activate
	neighbor 192.168.254.102 soft-reconfiguration inbound
	neighbor 192.168.254.106 activate
	neighbor 192.168.254.106 soft-reconfiguration inbound
	neighbor 192.168.254.122 activate
	neighbor 192.168.254.122 soft-reconfiguration inbound
	neighbor 192.168.254.126 activate
	neighbor 192.168.254.126 soft-reconfiguration inbound
	neighbor 192.168.254.134 activate
	neighbor 192.168.254.134 soft-reconfiguration inbound
	neighbor 192.168.254.138 activate
	neighbor 192.168.254.138 soft-reconfiguration inbound
	neighbor 192.168.254.142 activate
	neighbor 192.168.254.142 soft-reconfiguration inbound
	neighbor 192.168.254.146 activate
	neighbor 192.168.254.146 soft-reconfiguration inbound
	maximum-paths 8
	exit-address-family

● OCI ECMP設定確認

1) Autogenerated Drg Route Table画面
画面上にある ECMPが Enabled であることを確認し、[Get All Route Rules]をクリック
01_ECMP有効04.jpg

2)Route Rules for Autogenerated Drg Route Table画面
8つの IPSec Tunnelの Route StatusがActiveであることを確認
02_ECMP有効確認.jpg

■ オンプレミス側ルーター ECMP有効化確認

IPSec BGPルーターに接続して、BGPとRoute情報を確認

● Route情報確認

1) bgp neighbors の DRGから受信した OCI側 Route情報を確認
VCN Subnet (10.1.0.0/24) と Object Storage (34.70.80.0/23, 134.70.82.0/23) の CIDRを確認

C841M#show ip bgp neighbors 192.168.254.102 received-routes
	BGP table version is 4360, local router ID is 192.168.254.145
	Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
				r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
				x best-external, a additional-path, c RIB-compressed,
	Origin codes: i - IGP, e - EGP, ? - incomplete
	RPKI validation codes: V valid, I invalid, N Not found

		Network          Next Hop            Metric LocPrf Weight Path
	*>  10.1.0.0/24      192.168.254.102                        0 31898 i
	*>  134.70.80.0/23   192.168.254.102                        0 31898 i
	*>  134.70.82.0/23   192.168.254.102                        0 31898 i

	Total number of prefixes 3

IPSec BGPルーターに接続して、OCIのSubnet に対してどの Tunnel# を使用しているか確認
ECMP(Multi-Path)設定有効なため、VCN Subnet(10.1.0.0) と Object Storage (34.70.80.0/23, 134.70.82.0/23) それぞれに対して 8つの Tunnelの Routeを使用していることを確認できます

C841M#show ip route
	Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
		D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
		N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
		E1 - OSPF external type 1, E2 - OSPF external type 2
		i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
		ia - IS-IS inter area, * - candidate default, U - per-user static route
		o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
		a - application route
		+ - replicated route, % - next hop override, p - overrides from PfR

	Gateway of last resort is 0.0.0.0 to network 0.0.0.0

	S*    0.0.0.0/0 is directly connected, Dialer1
		10.0.0.0/24 is subnetted, 2 subnets
	B        10.1.0.0 [20/0] via 192.168.254.146, 00:11:29
					[20/0] via 192.168.254.142, 00:11:29
					[20/0] via 192.168.254.138, 00:11:29
					[20/0] via 192.168.254.134, 00:11:29
					[20/0] via 192.168.254.126, 00:11:29
					[20/0] via 192.168.254.122, 00:11:29
					[20/0] via 192.168.254.106, 00:11:29
					[20/0] via 192.168.254.102, 00:11:29
		100.0.0.0/32 is subnetted, 1 subnets
	C        100.100.100.101 is directly connected, Dialer1
		134.70.0.0/23 is subnetted, 2 subnets
	B        134.70.80.0 [20/0] via 192.168.254.146, 00:11:29
						[20/0] via 192.168.254.142, 00:11:29
						[20/0] via 192.168.254.138, 00:11:29
						[20/0] via 192.168.254.134, 00:11:29
						[20/0] via 192.168.254.126, 00:11:29
						[20/0] via 192.168.254.122, 00:11:29
						[20/0] via 192.168.254.106, 00:11:29
						[20/0] via 192.168.254.102, 00:11:29
	B        134.70.82.0 [20/0] via 192.168.254.146, 00:11:29
						[20/0] via 192.168.254.142, 00:11:29
						[20/0] via 192.168.254.138, 00:11:29
						[20/0] via 192.168.254.134, 00:11:29
						[20/0] via 192.168.254.126, 00:11:29
						[20/0] via 192.168.254.122, 00:11:29
						[20/0] via 192.168.254.106, 00:11:29
						[20/0] via 192.168.254.102, 00:11:29
		・・・
		192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
	C        192.168.0.0/25 is directly connected, Vlan1
	L        192.168.0.1/32 is directly connected, Vlan1
		192.168.254.0/24 is variably subnetted, 16 subnets, 2 masks
	C        192.168.254.100/30 is directly connected, Tunnel11
	L        192.168.254.101/32 is directly connected, Tunnel11
	C        192.168.254.104/30 is directly connected, Tunnel12
	L        192.168.254.105/32 is directly connected, Tunnel12
	C        192.168.254.120/30 is directly connected, Tunnel21
	L        192.168.254.121/32 is directly connected, Tunnel21
	C        192.168.254.124/30 is directly connected, Tunnel22
	L        192.168.254.125/32 is directly connected, Tunnel22
	C        192.168.254.132/30 is directly connected, Tunnel31
	L        192.168.254.133/32 is directly connected, Tunnel31
	C        192.168.254.136/30 is directly connected, Tunnel32
	L        192.168.254.137/32 is directly connected, Tunnel32
	C        192.168.254.140/30 is directly connected, Tunnel41
	L        192.168.254.141/32 is directly connected, Tunnel41
	C        192.168.254.144/30 is directly connected, Tunnel42
	L        192.168.254.145/32 is directly connected, Tunnel42

■ 参考

Dynamic Routing Gateways (DRGs)
動的ルーティング・ゲートウェイの概要
Introducing global connectivity and enhanced cloud networking with the dynamic routing gateway
Equal-Cost Multi-Path (ECMP) Routing on OCI DRGv2

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0