! ! ! 特権ユーザモードに移行します。 ! Router> enable Enter password: super ←パスワードを入力します(実際は何も表示されません)。 Router# ! ! ! 基本設定モードに移行します。 ! Router# configure terminal Router(config)# ! ! ! ホスト名を設定します。 ! Router(config)# hostname Router-DX ! ! ! LAN1インタフェースの設定を行います。 ! Router-DX(config)# interface lan 1 Router-DX(config-if lan 1)# description To-On-Premises Router-DX(config-if lan 1)# ip address 192.168.10.200 255.255.255.0 Router-DX(config-if lan 1)# exit ! ! ! VLANIF1インタフェース(VPC1と接続)の設定を行います。 ! (物理ポートEWAN1をVLANIF1に割り当て) ! Router-DX(config)# interface vlanif 1 Router-DX(config-if vlanif 1)# description To-DX_VPC1 Router-DX(config-if vlanif 1)# bridge-group ewan 1 Router-DX(config-if vlanif 1)# vlan-id 3003 ! "VLAN Assigned:"で指定されたVLAN-ID Router-DX(config-if vlanif 1)# ip address 169.254.100.2 255.255.255.252 ! "Your Peer IP:"で指定されたIPアドレス Router-DX(config-if vlanif 1)# exit ! ! ! VLANIF2インタフェース(VPC2と接続)の設定を行います。 ! (物理ポートEWAN1をVLANIF2に割り当て) ! Router-DX(config)# interface vlanif 2 Router-DX(config-if vlanif 2)# description To-DX_VPC2 Router-DX(config-if vlanif 2)# bridge-group ewan 1 Router-DX(config-if vlanif 2)# vlan-id 3004 ! "VLAN Assigned:"で指定されたVLAN-ID Router-DX(config-if vlanif 2)# ip address 169.254.100.6 255.255.255.252 ! "Your Peer IP:"で指定されたIPアドレス Router-DX(config-if vlanif 2)# exit ! ! ! BGPの設定を行います。 ! Router-DX(config)# router bgp 65001 ! "BGP ASN:"で指定されたAS番号 Router-DX(config-bgp)# bgp log-neighbor-changes Router-DX(config-bgp)# neighbor 169.254.100.1 remote-as 10124 ! VPC1と接続するVirtualInterfaceのネイバ設定 ! "Amazon Peer IP:"で指定されたIPアドレス Router-DX(config-bgp)# neighbor 169.254.100.1 password XXXXXX ! 指定されたBGP MD5パスワード(VPC1と接続するVirtual Interfaceのパラメタ) Router-DX(config-bgp)# neighbor 169.254.100.5 remote-as 10124 ! VPC2と接続するVirtualInterfaceのネイバ設定 ! "Amazon Peer IP:"で指定されたIPアドレス Router-DX(config-bgp)# neighbor 169.254.100.5 password YYYYYY ! 指定されたBGP MD5パスワード(VPC2と接続するVirtual Interfaceのパラメタ) Router-DX(config-bgp)# network 192.168.10.0 255.255.255.0 ! AWS側に広告する社内ネットワーク側の経路情報を指定 Router-DX(config-bgp)# exit ! ! ! 特権ユーザモードに戻ります。 ! Router-DX(config)# end ! ! ! 設定を保存します。 ! Router-DX# save SIDE-A.cfg % saving working-config % finished saving Router-DX# ! ! ! 設定を有効にするために再起動します。 ! Router-DX# reset Are you OK to cold start?(y/n) y
AWS側とのBGPセッションが確立できたことを確認します。
確認内容 | 画面表示例 |
---|---|
BGPネイバの情報を表示 "BGP state = Established"となっていることを確認します。 (VPC1との接続のネイバ) |
Router-DX#show ip bgp neighbors BGP neighbor is 169.254.100.1, remote AS 10124, local AS 65001, external link BGP version 4, remote router ID 169.254.100.1 BGP state = Established, up for 00:00:08 Last read 00:00:08, hold time is 90, keepalive interval is 30 seconds Neighbor capabilities: Route refresh: advertised and received (old and new) Address family IPv4 Unicast: advertised and received Received 98 messages, 0 notifications, 0 in queue Sent 95 messages, 1 notifications, 0 in queue Route refresh request: received 0, sent 0 Minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast Index 1, Offset 0, Mask 0x2 Community attribute sent to this neighbor (both) 1 accepted prefixes 1 announced prefixes Connections established 2; dropped 1 Local host: 169.254.100.2, Local port: 64633 Foreign host: 169.254.100.1, Foreign port: 179 Nexthop: 169.254.100.2 Nexthop global: :: Nexthop local: :: BGP connection: non shared network Read thread: on Write thread: off |
"BGP state = Established"となっていることを確認します。 (VPC2との接続のネイバ) |
BGP neighbor is 169.254.100.5, remote AS 10124, local AS 65001, external link BGP version 4, remote router ID 169.254.100.5 BGP state = Established, up for 00:14:11 Last read 00:00:00, hold time is 90, keepalive interval is 30 seconds Neighbor capabilities: Route refresh: advertised and received (old and new) Address family IPv4 Unicast: advertised and received Received 33 messages, 0 notifications, 0 in queue Sent 33 messages, 0 notifications, 0 in queue Route refresh request: received 0, sent 0 Minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast Index 2, Offset 0, Mask 0x4 Community attribute sent to this neighbor (both) 1 accepted prefixes 2 announced prefixes Connections established 1; dropped 0 Local host: 169.254.100.6, Local port: 65526 Foreign host: 169.254.100.5, Foreign port: 179 Nexthop: 169.254.100.6 Nexthop global: :: Nexthop local: :: BGP connection: non shared network Read thread: on Write thread: off |
VPCの経路を受信していることを確認します。
確認内容 | 画面表示例 |
---|---|
BGP受信経路の情報を表示 AWS側からVPC1の経路(172.16.0.0/16)を受信していることを確認します。 |
Router-DX#show ip bgp neighbors 169.254.100.1 routes BGP table version is 0, local router ID is 192.168.10.200 Status codes: s suppressed, d damped, h history, p stale, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.16.0.0 169.254.100.1 0 10124 i Total number of prefixes 1 |
AWS側からVPC2の経路(172.17.0.0/16)を受信していることを確認します。 |
Router-DX#show ip bgp neighbors 169.254.100.5 routes BGP table version is 0, local router ID is 192.168.10.200 Status codes: s suppressed, d damped, h history, p stale, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.17.0.0 169.254.100.5 0 10124 i Total number of prefixes 1 |
社内ネットワーク側の経路を送信していることを確認します。
確認内容 | 画面表示例 |
---|---|
BGP送信経路の情報を表示 社内ネットワーク側の経路(192.168.10.0/24)をVPC1側のネイバへ送信していることを確認します。 ※172.17.0.0/16 の経路は対向側で自分のAS番号と同じAS_PATH属性となるため廃棄されます。 |
Router-DX#show ip bgp neighbors 169.254.100.1 advertised-routes BGP table version is 0, local router ID is 192.168.10.200 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.17.0.0 169.254.100.2 0 10124 i *> 192.168.10.0 169.254.100.2 32768 i Total number of prefixes 1 |
社内ネットワーク側の経路(192.168.10.0/24)をVPC2側のネイバへ送信していることを確認します。 ※172.16.0.0/16 の経路は対向側で自分のAS番号と同じAS_PATH属性となるため廃棄されます。 |
Router-DX#show ip bgp neighbors 169.254.100.5 advertised-routes BGP table version is 0, local router ID is 192.168.10.200 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.16.0.0 169.254.100.6 0 10124 i *> 192.168.10.0 169.254.100.6 32768 i Total number of prefixes 2 |