반응형

1. 배경 상황
AWS 네트워크 서비스 중 Direct Connect 관련 실습을 진행할 때, 온프렘 환경이 vyos 기반의 라우터였는데 설정값이 잘못 들어가서 BGP가 맺어지지 않는 상황이었다.
아래와 같이 Direct Connect의 Connection 상태가 down인 상태였다. 설정값을 보면 AWS측의 VLAN은 263으로 잡혀있는데,

온프렘 라우터에서는 VLAN을 261로 잘못 잡은 상황.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vyos@router:~$ show interface | |
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down | |
Interface IP Address S/L Description | |
--------- ---------- --- ----------- | |
eth0 192.168.100.82/24 u/u Internet via ISP | |
eth1 - u/u AWS Direct Connect via Partner | |
eth1.261 169.254.100.1/30 u/u | |
eth2 10.0.0.1/24 u/u On-prem LAN | |
lo 127.0.0.1/8 u/u | |
::1/128 |
2. 해결 방법
del interface 명령어로 eth1.261 인터페이스에 할당된 IP주소를 삭제하고,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vyos@router# del interfaces ethernet eth1 vif 261 address 169.254.100.1/30 | |
[edit] | |
vyos@router# commit | |
[edit] | |
vyos@router# exit | |
Warning: configuration changes have not been saved. | |
exit | |
vyos@router:~$ show interface | |
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down | |
Interface IP Address S/L Description | |
--------- ---------- --- ----------- | |
eth0 192.168.100.82/24 u/u Internet via ISP | |
eth1 - u/u AWS Direct Connect via Partner | |
eth1.261 - u/u | |
eth2 10.0.0.1/24 u/u On-prem LAN | |
lo 127.0.0.1/8 u/u | |
::1/128 |
set interface 명령어로 eth1.263에 해당 IP 주소를 다시 할당했다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vyos@router:~$ show interface | |
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down | |
Interface IP Address S/L Description | |
--------- ---------- --- ----------- | |
eth0 192.168.100.82/24 u/u Internet via ISP | |
eth1 - u/u AWS Direct Connect via Partner | |
eth1.261 - u/u | |
eth1.263 169.254.100.1/30 u/u | |
eth2 10.0.0.1/24 u/u On-prem LAN | |
lo 127.0.0.1/8 u/u | |
::1/128 |
5~10분 가량지나고나면 BGP status가 up으로 변경된 것을 콘솔에서 확인할 수 있다.

온프레미스 라우터에서도 AWS 상의 경로를 잘 받아오는 것을 확인할 수 있다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vyos@router:~$ show ip bgp ipv4 unicast | |
BGP table version is 5, local router ID is 192.168.100.82, vrf id 0 | |
Default local pref 100, local AS 64513 | |
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, | |
i internal, r RIB-failure, S Stale, R Removed | |
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self | |
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.0.0.0/24 0.0.0.0 0 32768 i | |
*> 10.1.0.0/16 169.254.100.2 0 64514 i | |
*> 10.2.0.0/16 169.254.100.2 0 64514 i | |
*> 10.3.0.0/16 169.254.100.2 0 64514 i | |
*> 10.4.0.0/16 169.254.100.2 0 64514 i | |
Displayed 5 routes and 5 total paths |
'DevOps' 카테고리의 다른 글
PKOS 스터디 3주차: 쿠버네티스 Storage & Ingress (1) | 2023.02.05 |
---|---|
PKOS 스터디 2주차: 쿠버네티스 네트워크 (0) | 2023.01.29 |
리눅스(Linux) 다중 명령어(;, &&, ||) (0) | 2023.01.13 |
AWS CodeBuild “EEXIST: file already exists” 에러 해결 (0) | 2023.01.12 |
AWS Amplify/React 에러 발생: Module Not Found: Can’t resolve ‘faker’ (0) | 2023.01.11 |