
라우팅이 다 되어있는 환경에서의 명령어입니다.
==========================================================================
HQ Router Command
Tunnel 0 (HQ → BR1 Tunnel)
HQ(config)#int tunnel 0 //tunnel 0 생성
HQ(config-if)#ip address 10.0.0.1 255.255.255.252 //가상의 터널 IP 설정
HQ(config-if)#ip mtu 1476 //Maximum Transmission Unit = 네트워크에 연결된 장치가 받아들일 수 있는 최대의 패킷 크기
HQ(config-if)#tunnel source 100.0.0.2 //물리적인 터널의 출발지
HQ(config-if)#tunnel destination 100.0.0.3 //물리적인 터널의 목적지
HQ(config-if)#tunnel protection ipsec profile PF
Tunnel 1 (HQ → BR2 Tunnel)
HQ(config)#int tunnel 1 //tunnel 1 생성
HQ(config-if)#ip address 10.0.0.5 255.255.255.252 //가상의 터널 IP 설정
HQ(config-if)#ip mtu 1476 //Maximum Transmission Unit = 네트워크에 연결된 장치가 받아들일 수 있는 최대의 패킷 크기
HQ(config-if)#tunnel source 100.0.0.2 //물리적인 터널의 출발지
HQ(config-if)#tunnel destination 100.0.0.4 //물리적인 터널의 목적지
HQ(config-if)#tunnel protection ipsec profile PF
HQ → BR1 Tunnel Encryption
HQ(config)#crypto isakmp policy 10
HQ(config-isakmp)#encryption aes //대칭키 알고리즘인 aes를 암호화로 사용
HQ(config-isakmp)#authentication pre-share //pre-share를 인증으로 사용
HQ(config-isakmp)#group 2 //group 2로 암호화 설정
HQ(config)#crypto isakmp key cisco address 100.0.0.3 //100.0.0.3와 같이 cisco로 암호화 키 설정
HQ(config)#crypto ipsec transform-set TS esp-aes esp-sha-hmac //IPsec 통신을 하기 위해 Transform-set 정의하고, esp-sha-hmac 알고리즘 지정
HQ(cfg-crypto-trans)#mode tunnel //mode를 tunnel로 설정
HQ → BR2 Tunnel Encryption
HQ(config)#crypto isakmp policy 10
HQ(config-isakmp)#encryption aes //대칭키 알고리즘인 aes를 암호화로 사용
HQ(config-isakmp)#authentication pre-share //pre-share를 인증으로 사용
HQ(config-isakmp)#group 2 //group 2로 암호화 설정
HQ(config)#crypto isakmp key cisco address 100.0.0.3 //100.0.0.3와 같이 cisco로 암호화 키 설정
HQ(config)#crypto ipsec transform-set TS esp-aes esp-sha-hmac //IPsec 통신을 하기 위해 Transform-set 정의하고, esp-sha-hmac 알고리즘 지정
HQ(cfg-crypto-trans)#mode tunnel //mode를 tunnel로 설정
==========================================================================
BR1 Router Command
Tunnel 0 (BR1 → HQ Tunnel)
BR1(config)#int tunnel 0 //tunnel 0 생성
BR1(config-if)#ip address 10.0.0.2 255.255.255.252 //가상의 터널 IP 설정
BR1(config-if)#ip mtu 1476 //Maximum Transmission Unit = 네트워크에 연결된 장치가 받아들일 수 있는 최대의 패킷 크기
BR1(config-if)#tunnel source 100.0.0.3 //물리적인 터널의 출발지
BR1(config-if)#tunnel destination 100.0.0.2 //물리적인 터널의 목적지
BR1(config-if)#tunnel protection ipsec profile PF
BR1 → HQ Tunnel Encryption
BR1(config)#crypto isakmp policy 10
BR1(config-isakmp)#encryption aes //대칭키 알고리즘인 aes를 암호화로 사용
BR1(config-isakmp)#authentication pre-share //pre-share를 인증으로 사용
BR1(config-isakmp)#group 2 //group 2로 암호화 설정
BR1(config)#crypto isakmp key cisco address 100.0.0.2 //100.0.0.2와 같이 cisco로 암호화 키 설정
BR1(config)#crypto ipsec transform-set TS esp-aes esp-sha-hmac //IPsec 통신을 하기 위해 Transform-set 정의하고, esp-sha-hmac 알고리즘 지정
BR1(cfg-crypto-trans)#mode tunnel //mode를 tunnel로 설정
==========================================================================
BR2 Router Command
Tunnel 0 (BR2 → HQ Tunnel)
BR1(config)#int tunnel 0 //tunnel 0 생성
BR1(config-if)#ip address 10.0.0.6 255.255.255.252 //가상의 터널 IP 설정
BR1(config-if)#ip mtu 1476 //Maximum Transmission Unit = 네트워크에 연결된 장치가 받아들일 수 있는 최대의 패킷 크기
BR1(config-if)#tunnel source 100.0.0.4 //물리적인 터널의 출발지
BR1(config-if)#tunnel destination 100.0.0.2 //물리적인 터널의 목적지
BR1(config-if)#tunnel protection ipsec profile PF
BR2 → HQ Tunnel Encryption
BR1(config)#crypto isakmp policy 10
BR1(config-isakmp)#encryption aes //대칭키 알고리즘인 aes를 암호화로 사용
BR1(config-isakmp)#authentication pre-share //pre-share를 인증으로 사용
BR1(config-isakmp)#group 2 //group 2로 암호화 설정
BR1(config)#crypto isakmp key cisco address 100.0.0.2 //100.0.0.2와 같이 cisco로 암호화 키 설정
BR1(config)#crypto ipsec transform-set TS esp-aes esp-sha-hmac //IPsec 통신을 하기 위해 Transform-set 정의하고, esp-sha-hmac 알고리즘 지정
BR1(cfg-crypto-trans)#mode tunnel //mode를 tunnel로 설정
==========================================================================
mtu를 1476byte으로 설정 하는 이유 = GRE Header를 붙혔을 때 24byte를 초과하기 때문에 mtu를 1476byte으로 설정함
IPSEC은 유니캐스트만 지원하지만 GRE-over-IPSEC은 멀티캐스트도 지원
group = DH Group: 인증 정보를 암호화할 키를 생성하는 대칭키 교환 알고리즘으로 Phase 2에서 사용
'ITNSA' 카테고리의 다른 글
| 2023년 기능경기대회 후기 (2) | 2023.04.10 |
|---|---|
| 2022 Theory of ITNSA Service (Container Monitioring Service) (0) | 2023.02.27 |
| [GNS3] DMVPN Setting (0) | 2022.11.15 |
| 패킷트레이서 라우팅 총 명령어집 (0) | 2022.11.09 |
| 리눅스 vi 에디터 명령어 (1) | 2022.08.30 |