bxm's IT Story

IPv4와 IPv6의 통신을 위한 터널링 기법 본문

Network/Cisco (KEDU)

IPv4와 IPv6의 통신을 위한 터널링 기법

bxmsta9ram 2021. 7. 9. 16:23

## 일단 config 안에 있는 설정 파일 전부 삭제하고 다시 시작하기!!

## 처음부터 RIP 구현까지 해보기!!


공통]

ena

conf t

no ip domain lookup

line c 0

  logg sy

  exec-timeout 0

  exit

line vty 0 4

  pass cisco

  exit

 

int s1/0

no shut

 

encapsulation frame-relay

no frame-relay inverse-arp

 

clock rate 64000

end


## 먼저 IPv4 설정부터 하기 ##

R1]

conf t

int lo0

  ip add 9.9.1.1 255.255.255.0 

  exit

 

int s1/0.12 p

  ip add 9.9.12.1 255.255.255.0

  fram inter 102

  end

wr


R2]

conf t

int lo0

  ip add 9.9.2.2 255.255.255.0 

  exit

 

int s1/0.12 p

  ip add 9.9.12.2 255.255.255.0

  fram inter 201

  exit

 

int s1/0.23 p

  ip add 9.9.23.2 255.255.255.0

  fram int 203

  end

wr


R3]

conf t

int lo0

  ip add 9.9.3.3 255.255.255.0 

  exit

 

int s1/0.23 p

  ip add 9.9.23.3 255.255.255.0

  fram inter 302

  exit

 

int s1/0.34 p

  ip add 9.9.34.3 255.255.255.0

  fram int 304

  end

wr

 

 

R4]

conf t

int lo0

  ip add 9.9.4.4 255.255.255.0 

  exit

 

int s1/0.34 p

  ip add 9.9.34.4 255.255.255.0

  fram inter 403

  end

wr


## PING TEST ##

R1]

ping 9.9.12.2


R2]

ping 9.9.23.3


R3]

ping 9.9.34.4


## RIP 돌리기 ##

R1, R2, R3, R4]

conf t

router rip

  ver 2

  net 9.0.0.0

  no auto

  passive-interface lo0


## RIP 이후, PING TEST ##

R1]

ping 9.9.34.4         ## 끝에서 끝으로 PING TEST


## 터널링 기법 __양 끝단에다가 OSPF Version3를 돌릴 것임 ## 

## IPv4 구간과, IPv6 구간을 개통할 것임.

 

R1]

conf t

ipv6 unicast-routing

 

int lo0

  ipv6 address 3000:1:1:1::1/64

  exit

 

int tunnel 14                     ## 의미없음. R1 <-> R4 간의 가상터널이라는 뜻임.

  tunnel source 9.9.12.1       ## 터널을 R1부터 R4까지 맺으므로, R1(출발지)를 넣어준 것임.

  tunnel destination 9.9.34.4

  ipv6 unnumbered lo0       ## lo0의 IPv6 주소를 이 터널에 빌려서 쓰겠다는 뜻임.

  tunnel mode ipv6ip         ## IPv6가 왼쪽에 있고, IPv4가 오른쪽에 있다는 뜻임.


R4]

conf t

ipv6 unicast-routing

 

int lo0

  ipv6 address 3000:1:1:4::4/64

  exit

 

int tunnel 14

  tunnel source 9.9.34.4       ## 출발지

  tunnel destination 9.9.12.1 ## 목적지

  ipv6 unnumbered lo0

  tunnel mode ipv6ip


 

R1]

conf t

ipv6 router ospf 1

  router-id 1.1.1.1

  exit

 

int lo0

  ipv6 ospf 1 area 0

  ipv6 ospf network point-to-point

  exit

 

int tunnel 14

  ipv6 ospf 1 area 0

  end

wr


R4]

conf t

ipv6 router ospf 1

  router-id 4.4.4.4

  exit

 

int lo0

  ipv6 ospf 1 area 0

  ipv6 ospf network point-to-point

  exit

 

int tunnel 14

  ipv6 ospf 1 area 0

  end

wr


## Neighbor가 맺어졌음!! ##

Hello가 10초여서 거의 치자마자 바로 맺어짐.

R1]

show ipv6 ospf nei

## Tunnel14를 통해 Neighbor가 맺어졌음.

 

ping 3000:1:1:4::4 source lo0

## 가면 성공한것임.