DX 로케이션 경유하여 AWS와 사설 네트워크를 연결
AWS Cloud -(AWS 백본)- AWS DX location - IDC
1) DX 연결
: Connections > State: ordering > Accept
- Pending → available: 계정과 물리 연결이 활성화됨
AWS Cloud - AWS DX <-> onPrem 간 호스팅 연결 활성화
2) Direct Connect Gateway(DXGW) 생성
: Direct Connect gateways > Create > dxgw1, ASN 65011
- DXGW - AWS DX
3) DXGW에 VGW(VGW1, VGW2) 연결
: 생성한 GW ID 클릭(dxgw1) > Gateway associations - Associate > Gateways: VGW1, VGW2
(Allowed prefiexs를 입력하지 않으면 자동으로 VPC1과 VPC2의 CIDR 대역이 자동으로 할당됨, DXGW는 이렇게 허용된 접두사를 온프렘(고객 라우터)으로 전파(광고)) > 5~7분 대기(State: associated로 변경됨)
- AWS Cloud 내 VPC - VGW - DXGW 연결
4) Private VIF 생성 (on DX1/DX2)
: Virtual Interfaces > Create > 인터페이스 유형 선택, dx1-pri-v157, connection/DXGW/VLAN, ASN(65000)
+ Additional settings: user/Amazon router peer IP, BGP 인증키 입력 후 생성
- AWS DX <-> onPrem connect 간 VIF 생성
5) 온프렘 라우터 설정 (VLAN 인터페이스 및 BGP Peering 설정)
# 라우터 버전 정보 확인
show version
# 설정 모드 진입
config terminal # or conf t
# 명령어 입력(exec) 모드로 나오기
end
라우터 콘솔 명령 - 인터페이스 IP 설정
- dot1Q: IEEE 802.1Q 표준, 802.1Q VLAN 태깅을 사용하여 VLAN 157에 대한 캡슐화 설정
# (config)#
interface InterfaceEthernet1.157
# (config-subif)#
encapsulation dot1Q 157
ip address 10.0.1.1 255.255.255.252
end
show ip interface brief
sh ip int br
Interface IP-Address OK? Method Status Protocol
InterfaceEthernet1 unassigned YES NVRAM up up
InterfaceEthernet1.157 10.0.1.1 YES manual up up
AWS 라우터까지 통신 확인
#ping 10.0.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Your router peer IP: 10.0.1.1/30
Amazon router peer IP: 10.0.1.2/30
라우터에서 BGP peering 설정
- AWS console의 VIF 정보를 확인하여 BGP 설정
# AS 번호는 네트워크를 식별하는 고유 번호
# 64512-65534는 프라이빗 AS 번호 범위
# (config)#
# BGP 라우팅 프로세스 시작, 65000은 자신의 AS(Autonomous System) 번호
router bgp 65000
# (config-router)#
# BGP 피어(neighbor) 설정, 10.0.1.2: peer router의 ip 주소, 65011: 피어의 AS 번호
neighbor 10.0.1.2 remote-as 65011
neighbor 10.0.1.2 password BGPauthPW123!
# BGP로 광고할 네트워크 설정, 자신의 네트워크를 다른 AS에 알림
network 172.20.0.0 mask 255.255.0.0
end
(1) show ip bgp summary
AWS BGP peer 라우터(10.0.1.2)와 Peering이 정상적으로 이루어졌는지 확인
정상인 경우 'State/PfxRcd'에 전달받은 Prefix의 개수가 표시됨
# bgp peer(neighbor) 연결 상태
show ip bgp summary
# results
BGP router identifier 172.20.57.1, local AS number 65000
BGP table version is 4, main routing table version 4
3 network entries using 744 bytes of memory
3 path entries using 408 bytes of memory
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1752 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs
3 networks peaked at 18:02:26 May 14 2025 KST (4d19h ago)
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.1.2 4 65011 14335 15133 4 0 0 4d19h 2
(2) show ip bgp
AWS 측 라우터(10.0.1.2)로부터 전달받은 Prefix를 확인
VGW1와 VGW2에 연결된 VPC1와 VPC2의 CIDR 대역(10.1.1.0/24, 10.1.2.0/24)이 온프렘 라우터로 전파된 것 확인
# bgp로 전달 받은 경로
show ip bgp
BGP table version is 4, local router ID is 172.20.57.1
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,
t secondary path, L long-lived-stale,
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.1.0/24 10.0.1.2 0 65011 i
*> 10.1.2.0/24 10.0.1.2 0 65011 i
*> 172.20.0.0 0.0.0.0 0 32768 i
# 라우터에서 참조하는 라우팅 경로
show ip route
on-prem과 EC2 instance 통신 확인 (ping test)
- VPC(10.1.1.0/24) 내 EC2 인스턴스 IP 주소: 10.1.1.10
'Networking > AWS' 카테고리의 다른 글
[AWS] ALB listener server response header on|off (0) | 2025.05.19 |
---|---|
[AWS] EC2 SSM Agent connection lost (0) | 2025.05.12 |
BIND server 구성 (0) | 2025.04.17 |
[AWS] 사설 인증서 생성 및 등록 (0) | 2025.04.16 |
[AWS] Create an IPAM pool with accounts in an organization (0) | 2025.04.10 |