# EIGRP 재분배
R2(config)#router eigrp 100
R2(config-router)#redistribute eigrp 200
R2(config)#router eigrp 200
R2(config-router)#redistribute eigrp 100
# GRE 프로토콜 생성
1 라우터 1번에서 가상 인터페이스를 만든다. (통신이 확인이 될 때 켜짐. no sh으로 켤 수 없다.)
R1(config)#int tunnel 100
*Mar 1 00:30:46.895: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel100, changed state to down
R3(config)#int tunnel 200(번호 달라도 상관 없음)
*Mar 1 00:35:04.467: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel200, changed state to down
2. 터널의 출발지& 목적지를 만들어 준다.
R1(config-if)#tunnel source s0/0 // 출발지
R1(config-if)#tunnel destination 10.10.20.1 //목적지
*Mar 1 00:32:45.415: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel100, changed state to up
R3(config-if)#tunnel source s0/1
R3(config-if)#tunnel destination 10.10.10.1
*Mar 1 00:35:23.523: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel200, changed state to up
3. 터널 IP 설정
R1(config-if)#ip add 172.16.10.1 255.255.255.252
R3(config-if)#ip add 172.16.10.2 255.255.255.252
4. 터널을 통해서 갈 수 있는 라우팅 테이블이 존재해야한다. (본사 내부와 지사 내부를 연결해준다)
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.10.0
R1(config-router)#network 172.16.10.0
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.20.0
R3(config-router)#network 172.16.10.0
터널 200을 타고 바로 본사로 들어감 (실제 트래픽이 터널을 타고 이동함 2번 라우터를 안 거치고 간다는 말임.) 와이어 샤크에서는 라우터를 거치고 들어감. GRE에서 캡슐화(터널 소스, 터널 목적지를 다시 캡슐화 시켜서 라우터로 보냄.)
#ACL 설정
R1(config)#access-list 101 pe
R1(config)#$ 101 permit ip 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.255
R3(config)#acc
R3(config)#$ 101 permit ip 192.168.20.0 0.0.0.255 192.168.10.0 0.0.0.255
# 정책 설정
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#authentication ?
pre-share Pre-Shared Key
R1(config-isakmp)#authentication pre-share
R1(config)#crypto isakmp key aws address 10.10.20.1
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#authen
R3(config-isakmp)#authentication pre
R3(config-isakmp)#authentication pre-share
R3(config-isakmp)#crypto isa
R3(config-isakmp)#crypto isakmp key aws address 10.10.10.1
#ipSec 설정
R1(config)#crypto ipsec transform-set IPSEC ?
ah-md5-hmac AH-HMAC-MD5 transform
ah-sha-hmac AH-HMAC-SHA transform
comp-lzs IP Compression using the LZS compression algorithm
esp-3des ESP transform using 3DES(EDE) cipher (168 bits)
esp-aes ESP transform using AES cipher
esp-des ESP transform using DES cipher (56 bits)
esp-md5-hmac ESP transform using HMAC-MD5 auth
esp-null ESP transform w/o cipher
esp-seal ESP transform using SEAL cipher (160 bits)
esp-sha-hmac ESP transform using HMAC-SHA auth
R1(config)#crypto ipsec transform-set IPSEC esp-aes
R1(config)#crypto ipsec transform-set IPSEC esp-aes 256
IpSec 설정시 암호화를 통해 패킷의 내용을 안전하게 전송해주기 위해 ESP 프로토콜을 사용했다.
R1(config)#crypto map TUNNEL 10 ipsec-isakmp // 암호화 규칙을 구성하기 위한 명령어 수행
R1(config-crypto-map)#set peer 10.10.20.1 // ipsec 설정 될 상대방 ip
R1(config-crypto-map)#set transform-set IPSEC //암호화 인증을 위한 알고리즘 세트 설정
R1(config-crypto-map)#match address 101 // IpSec이 보호할 트래픽 설정
R1(config-crypto-map)#exit
R1(config)#int tunnel 100
R1(config-if)#crypto map TUNNEL
*Mar 1 02:02:09.031: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#authentication pre-share
R3(config-isakmp)#crypto isakmp key aws address 10.10.10.1
R3(config)#crypto ipsec transform-set IPSEC esp-aes 256
R3(config)#crypto map TUNNEL 10 ipsec-isakmp
R3(config-crypto-map)#set peer 10.10.10.1
R3(config-crypto-map)#set transform-set IPSEC
R3(config-crypto-map)#match address 101
R3(config-crypto-map)#exit
R3(config)#int tunnel 200
R3(config-if)#crypto map TUNNEL
*Mar 1 02:03:28.819: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
'Network > Network[GNS3, Packet]' 카테고리의 다른 글
[GNS3] EIGRP, OSPF - Virtual Link (0) | 2024.10.20 |
---|---|
[GNS3] OSPF - Virtual Link 실습 (0) | 2024.10.19 |
[Packet] VLAN 실습 (0) | 2024.10.16 |
[OSPF] Multi-Area(Loopback , EIGRP, 축약, 재분배, 디폴트) (0) | 2024.10.14 |
[OSPF] OSPF 실습 -2 (1) | 2024.10.10 |