[AIX 네트워크 관리 9] TCP/IP (3) 프로토콜 계층과 IPv6
https://archive.horanglab.com/posts/aix-net-tcpip-3
핵심 정리
- TCP/IP는 응용 → 전송(TCP·UDP) → 네트워크(IP) → 네트워크 인터페이스 → 하드웨어 계층으로 데이터를 내려보내며, 계층마다 머리글을 붙이고 받는 쪽은 거꾸로 떼어 냅니다.
- IPv6는 주소를 32비트에서 128비트로 늘리고, 유니캐스트(링크 로컬·사이트 로컬·전역,
::/128미지정,::1/128루프백)·멀티캐스트(ff::/8)·애니캐스트 주소를 둡니다. 브로드캐스트는 없습니다. - 링크 로컬 주소는 MAC에서 만든 식별자로 스스로 만들고, 중복 주소 감지 뒤 씁니다. 이웃 탐색(NDP, ICMPv6)이 IPv4의 ARP·라우터 탐색·리다이렉트를 대신하며, 라우터가 알린 접두사로 상태 없는 자동 구성을 합니다.
- 헤더에서 길이·식별·플래그·조각 오프셋·체크섬을 없애고 옵션은 확장 헤더로 옮겼습니다. 우선순위(0~7)와 흐름 레이블로 트래픽을 구분합니다. IPv4 망을 넘을 때는 자동 터널(IPv4 호환 주소,
sit0)이나 구성 터널(cti,smit ctinet6)을 씁니다. - 올리기: 호스트는
autoconf6(또는-A)와startsrc -s ndpd-host, 라우터는ifconfig en0 inet6 접두사/64 eui64 alias,no -o ip6forwarding=1,startsrc -s ndpd-router. 재부팅 뒤에도 쓰려면/etc/rc.tcpip의 해당 줄 주석을 풉니다. 다중 홈 동작은no의main_if6·main_site6과 옵션 0~3으로 정합니다(기본 1).
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 IPv6 정적 구성 시나리오가 더해짐) |
| 원문 | Networks and communication management — 5.3판 7391쪽, 6.1판 118135쪽 |
| 파일 | /etc/rc.tcpip |
| 관련 명령어 | autoconf6, ndpd-host, ndpd-router, ifconfig ... inet6, no -o ip6forwarding=1, chdev -l en0 -a netaddr6=, smit ctinet6 |
프로토콜은 기계와 응용 프로그램이 정보를 주고받게 하는 메시지 형식과 절차의 규칙 모음입니다. 받는 호스트가 메시지를 이해하려면 통신에 참여하는 기계마다 이 규칙을 따라야 합니다. TCP/IP 프로토콜 묶음은 계층(또는 수준)으로 이해할 수 있습니다.
TCP/IP 프로토콜의 계층은 위에서부터 응용 계층, 전송 계층, 네트워크 계층, 네트워크 인터페이스 계층, 하드웨어입니다(그림 4. TCP/IP 프로토콜 묶음).
TCP/IP는 정보가 보내는 쪽에서 받는 쪽으로 움직이는 방식을 자세히 정합니다. 먼저 응용 프로그램이 메시지나 데이터 스트림을 인터넷 전송 계층 프로토콜인 UDP(User Datagram Protocol)나 TCP(Transmission Control Protocol) 가운데 하나로 보냅니다. 이 프로토콜은 응용 프로그램에서 데이터를 받아 패킷이라는 작은 조각으로 나누고, 목적지 주소를 붙여 다음 프로토콜 계층인 인터넷 네트워크 계층으로 넘깁니다.
인터넷 네트워크 계층은 패킷을 IP(Internet Protocol) 데이터그램으로 감싸고, 데이터그램 머리글과 꼬리말을 넣고, 데이터그램을 어디로 보낼지(목적지로 바로 또는 게이트웨이로) 정해 네트워크 인터페이스 계층으로 넘깁니다.
네트워크 인터페이스 계층은 IP 데이터그램을 받아 이더넷이나 토큰링 같은 특정 네트워크 하드웨어로 프레임으로 전송합니다.
호스트가 받은 프레임은 프로토콜 계층을 거꾸로 거칩니다. 각 계층은 해당 머리글 정보를 떼어 내며, 마지막에 데이터가 응용 계층에 돌아옵니다(그림 5. 보내는 응용 프로그램에서 받는 호스트로의 정보 이동).
프레임은 네트워크 인터페이스 계층(이 경우 이더넷 어댑터)이 받습니다. 네트워크 인터페이스 계층은 이더넷 머리글을 떼어 내고 데이터그램을 네트워크 계층으로 올립니다. 네트워크 계층에서는 IP가 IP 머리글을 떼어 내고 패킷을 전송 계층으로 올립니다. 전송 계층에서는 (이 경우) TCP가 TCP 머리글을 떼어 내고 데이터를 응용 계층으로 올립니다(그림 6. 호스트에서 응용 프로그램으로의 정보 이동).
네트워크의 호스트는 정보를 동시에 보내고 받습니다. 다음 그림 7이 통신하는 호스트를 더 정확하게 나타냅니다.
보내는 쪽 받는 쪽
APPLICATION LAYER 메시지·데이터 스트림 ↑ 머리글을 떼어 냄
TRANSPORT LAYER TCP Header | DATA ↑
NETWORK LAYER IP Header | TCP Header | DATA
NETWORK INTERFACE Ethernet Header | IP Header | TCP Header | DATA (이더넷 프레임)
PHYSICAL NETWORK ──────────────────────────────
참고: 호스트가 데이터를 보내고 받을 때 각 프로토콜 계층에서 머리글을 붙이고 떼어 냅니다.
그림 7. 호스트의 데이터 송수신(원문 그림을 글자로 다시 그림)
영어 원문
TCP/IP protocols
Protocols are sets of rules for message formats and procedures that allow machines and application programs to exchange information. These rules must be followed by each machine involved in the communication in order for the receiving host to be able to understand the message. The TCP/IP suite of protocols can be understood in terms of layers (or levels).
This figure depicts the layers of the TCP/IP protocol. From the top they are, Application Layer, Transport Layer, Network Layer, Network Interface Layer, and Hardware.
TCP/IP carefully defines how information moves from sender to receiver. First, application programs send messages or streams of data to one of the Internet Transport Layer Protocols, either the User Datagram Protocol (UDP) or the Transmission Control Protocol (TCP). These protocols receive the data from the application, divide it into smaller pieces called packets, add a destination address, and then pass the packets along to the next protocol layer, the Internet Network layer.
The Internet Network layer encloses the packet in an Internet Protocol (IP) datagram, puts in the datagram header and trailer, decides where to send the datagram (either directly to a destination or else to a gateway), and passes the datagram on to the Network Interface layer.
The Network Interface layer accepts IP datagrams and transmits them as frames over a specific network hardware, such as Ethernet or Token-Ring networks. Figure 4. TCP/IP suite of protocols
This figure shows the flow of information down the TCP/IP protocol layers from the Sender to the Host.
Frames received by a host go through the protocol layers in reverse. Each layer strips off the corresponding header information, until the data is back at the application layer. Figure 5. Movement of information from sender application to receiver host
This figure shows the flow of information up the TCP/IP protocol layers from the Host to the Sender.
Frames are received by the Network Interface layer (in this case, an Ethernet adapter). The Network Interface layer strips off the Ethernet header, and sends the datagram up to the Network layer. In the Network layer, the Internet Protocol strips off the IP header and sends the packet up to the Transport layer. In the Transport layer, the TCP (in this case) strips off the TCP header and sends the data up to the Application layer.
Hosts on a network send and receive information simultaneously. Figure 7 on page 121 more accurately represents a host as it communicates. Figure 6. Movement of information from host to application
This figure shows data flowing both ways through the TCP/IP layers.
IP 버전 6(IPv6)
IPv6(IPng)는 차세대 IP로, IPv4에서 점진적으로 발전하도록 설계되었습니다.
IPv4 덕분에 전 세계 인터넷이 발전했지만, 두 가지 근본 요인, 곧 부족한 주소 공간과 라우팅의 복잡성 때문에 먼 미래까지 쓸 수는 없습니다. IPv4의 32비트 주소는 전 세계 인터넷 라우팅에 충분한 유연성을 주지 못합니다. CIDR(Classless InterDomain Routing)을 도입해 IPv4 라우팅의 수명을 몇 년 늘렸지만, 라우팅을 더 잘 관리하려는 노력은 계속될 것입니다. IPv4 라우팅을 늘릴 수 있다 해도 인터넷은 결국 네트워크 번호가 바닥날 것입니다.
IETF(Internet Engineering Task Force)는 IPv4가 인터넷의 놀라운 성장을 감당하지 못하리라 보고 IETF IPng 작업 그룹을 만들었습니다. 제안 가운데 SIPP(Simple Internet Protocol Plus)가 IP 발전의 점진적 단계로 뽑혔고, 이름이 IPng로 바뀌었으며, RFC1883이 1995년 12월에 확정되었습니다.
IPv6는 계속 늘어나는 인터넷 사용자를 감당하도록 인터넷 주소의 최대 개수를 늘립니다. IPv4에서 점진적으로 바뀐 것이므로 새것과 옛것이 같은 네트워크에 함께 있을 수 있다는 장점이 있습니다. 이 공존 덕분에 운영 중인 네트워크에서 IPv4(32비트 주소)에서 IPv6(128비트 주소)로 질서 있게 옮겨 갈 수 있습니다.
이 개요는 IPng 프로토콜을 대략 이해하도록 돕는 것이 목적입니다. 자세한 내용은 RFC 2460, 2373, 2465, 1886, 2461, 2462, 2553을 봅니다.
Security에는 IPv6를 포함한 TCP/IP 프로토콜 묶음의 보안 정보가 있습니다. IP 보안(버전 4와 6)의 자세한 내용은 Internet Protocol security를 봅니다.
IPv6의 확장된 라우팅과 주소 지정
IPv6는 IP 주소 크기를 32비트에서 128비트로 늘려, 주소 계층 수준을 더 많이, 주소를 줄 수 있는 노드를 훨씬 많이 지원하고 주소 자동 구성을 더 간단하게 합니다.
IPv6의 세 가지 주소 종류
| 종류 | 설명 |
|---|---|
| unicast(유니캐스트) | 유니캐스트 주소로 보낸 패킷은 그 주소가 가리키는 인터페이스로 배달됩니다. 유니캐스트 주소에는 링크 로컬, 사이트 로컬, 전역의 범위(scope)가 있습니다. 특수 유니캐스트 주소가 두 개 있습니다: ::/128(미지정 주소), ::1/128(루프백 주소) |
| multicast(멀티캐스트) | 멀티캐스트 주소로 보낸 패킷은 그 주소가 가리키는 모든 인터페이스로 배달됩니다. 멀티캐스트 주소는 접두사 ff::/8로 알아봅니다. 유니캐스트 주소처럼 노드 로컬, 링크 로컬, 사이트 로컬, 조직 로컬 범위가 있습니다. |
| anycast(애니캐스트) | 보내는 쪽은 하나, 듣는 쪽은 여럿이지만 응답하는 쪽은 하나(보통 라우팅 프로토콜의 거리로 "가장 가까운" 것)인 주소입니다. 예를 들어 웹 서버 여러 대가 애니캐스트 주소에서 기다리면, 그 주소로 요청을 보낼 때 하나만 응답합니다. 애니캐스트 주소는 유니캐스트 주소와 구별되지 않으며, 둘 이상의 인터페이스에 같은 유니캐스트 주소를 구성하면 애니캐스트 주소가 됩니다. |
참고: IPv6에는 브로드캐스트 주소가 없습니다. 그 기능은 멀티캐스트 주소가 대신합니다.
IPv6 자동 구성
IPv4 네트워크에서 노드가 시작해 다른 노드와 통신하게 하는 주요 방법은 하드코딩, BOOTP, DHCP입니다.
IPv6는 IP 주소에 범위 개념을 도입했으며, 그 가운데 하나가 링크 로컬입니다. 이 덕분에 호스트는 미리 정해진 링크 로컬 접두사와 자기 로컬 식별자로 올바른 주소를 만들 수 있습니다. 로컬 식별자는 보통 구성할 인터페이스의 MAC(medium access control) 주소에서 만듭니다. 이 주소로 노드는 같은 서브넷의 다른 호스트와 통신할 수 있으며, 완전히 고립된 서브넷이라면 다른 주소 구성이 필요 없을 수도 있습니다.
IPv6의 의미 있는 주소
IPv4 주소에서 일반적으로 알아볼 수 있는 의미는 브로드캐스트(보통 모두 1이나 모두 0)와 클래스(예: 클래스 D는 멀티캐스트)뿐입니다. IPv6에서는 접두사를 보면 범위(예: 링크 로컬), 멀티캐스트인지 유니캐스트인지, 할당 방식(제공자 기반이나 지역 기반)을 바로 알 수 있습니다.
주소의 상위 비트에 라우팅 정보를 명시적으로 넣을 수도 있지만, IETF가 아직 확정하지 않았습니다(제공자 기반 주소에는 라우팅 정보가 주소에 암묵적으로 들어 있습니다).
IPv6 중복 주소 감지
인터페이스를 초기화하거나 다시 초기화하면 자동 구성으로 링크 로컬 주소를 그 인터페이스에 임시로 연결합니다(이 시점에서는 전통적인 의미로 주소가 인터페이스에 할당된 것은 아닙니다). 이때 인터페이스는 all-nodes와 solicited-nodes 멀티캐스트 그룹에 가입하고 이 그룹들에 이웃 탐색 메시지를 보냅니다. 멀티캐스트 주소를 쓰면 노드는 그 링크 로컬 주소가 이미 할당되었는지 판단하고 다른 주소를 고를 수 있습니다.
이렇게 해서 같은 링크의 서로 다른 인터페이스 두 개에 같은 주소를 실수로 주는 일을 없앱니다(같은 링크에 있지 않은 노드에는 여전히 중복된 전역 범위 주소를 만들 수 있습니다).
이웃 탐색과 상태 없는 주소 자동 구성
IPv6의 NDP(Neighbor Discovery Protocol)는 노드(호스트와 라우터)가 붙어 있는 링크에 있는 것으로 알려진 이웃의 링크 계층 주소를 알아내고, 활성 연결에 대한 목적지별 라우팅 표를 유지하는 데 씁니다. IPv6는 상태 있는(stateful) 주소 자동 구성과 상태 없는(stateless) 주소 자동 구성을 모두 정의합니다. 상태 없는 자동 구성은 호스트를 손으로 구성할 필요가 없고, 라우터 구성은 있더라도 최소한이며, 추가 서버도 필요 없습니다.
호스트는 NDP로 자기 대신 패킷을 전달해 줄 이웃 라우터를 찾고 바뀐 링크 계층 주소를 감지합니다. NDP는 자체 메시지 유형이 있는 ICMP(Internet Control Message Protocol) 버전 6을 씁니다. 대체로 IPv6 이웃 탐색 프로토콜은 IPv4의 ARP(Address Resolution Protocol), ICMP 라우터 탐색(RDISC), ICMP 리다이렉트(ICMPv4)를 합친 것에 해당하지만, 이 IPv4 프로토콜들보다 크게 개선되었습니다.
상태 없는 방식에서는 호스트가 로컬에서 얻을 수 있는 정보와 라우터가 알리는 정보를 합쳐 자기 주소를 만듭니다. 라우터는 링크에 연결된 서브넷을 나타내는 접두사를 알리고, 호스트는 서브넷에서 인터페이스를 고유하게 나타내는 인터페이스 토큰을 만듭니다. 둘을 합쳐 주소가 됩니다. 라우터가 없으면 호스트는 링크 로컬 주소만 만들 수 있습니다. 그러나 링크 로컬 주소만으로도 같은 링크에 붙은 노드 사이의 통신에는 충분합니다.
라우팅 단순화
라우팅 문제를 단순하게 하려고 IPv6 주소는 접두사(prefix)와 ID 두 부분으로 봅니다. IPv4의 네트워크·호스트 주소 구분과 같아 보이지만 두 가지 장점이 있습니다.
| 장점 | 설명 |
|---|---|
| no class(클래스 없음) | 접두사나 ID에 정해진 비트 수가 없으므로 지나친 할당으로 인한 낭비가 줄어듭니다. |
| nesting(중첩) | 다른 비트 수를 접두사로 보면 원하는 만큼 나눌 수 있습니다. |
Case 1: | 128 bits node address |
Case 2: | n bits Subnet prefix | 128-n bits Interface ID |
Case 3: | n bits Subscriber prefix | 80-n bits Subnet ID | 48 bits Interface ID |
Case 4: | s bits Subscriber prefix | n bits Area ID | m bits Subnet ID | 128-s-n-m bits Interface ID |
일반적으로 IPv4는 VLSM(Variable Length Subnet Mask, 네트워크 전체에 같은 규칙이 아니라 서브넷마다 필요에 따라 IP 주소 자원을 나누는 방법)을 써도 Case 3을 넘지 못합니다. 이는 가변 길이 접두사의 정의 때문이기도 하지만 주소 길이가 짧아서 생기는 결과이기도 하다는 점은 짚어 둘 만합니다.
머리글 형식 단순화
IPv6는 IPv4 머리글의 일부 필드를 아예 없애거나 확장 머리글로 옮겨 IP 머리글을 단순하게 합니다. 선택 정보에는 더 유연한 형식(확장 머리글)을 정의합니다.
특히 다음이 없습니다.
- 머리글 길이(길이가 고정됨)
- 식별(identification)
- 플래그
- 조각 오프셋(조각 확장 머리글로 옮김)
- 머리글 체크섬(데이터 무결성은 상위 계층 프로토콜이나 보안 확장 머리글이 처리)
IPv4 머리글 (표 53)
+---------+-----+-----------------+----------------------------+
| Version | IHL | Type of Service | Total Length |
+---------+-----+-----------------+-------+--------------------+
| Identification | Flags | Fragment Offset |
+--------------+------------------+-------+--------------------+
| Time to Live | Protocol | Header Checksum |
+--------------+------------------+----------------------------+
| Source Address |
| Destination Address |
| Options | Padding |
+--------------------------------------------------------------+
IPv6 머리글 (표 54)
+---------+------+----------------------------------------------+
| Version | Prio | Flow Label |
+---------+------+------------------+-------------+------------+
| Payload Length | Next Header | Hop Limit |
+-----------------------------------+-------------+------------+
| Source Address (128비트) |
| Destination Address (128비트) |
+--------------------------------------------------------------+
IPng에는 IPv4보다 개선된 옵션 방식이 있습니다. IPv6 옵션은 패킷에서 IPv6 머리글과 전송 계층 머리글 사이에 있는 별도 확장 머리글에 들어갑니다. 대부분의 확장 머리글은 패킷이 최종 목적지에 닿을 때까지 경로의 어떤 라우터도 살펴보거나 처리하지 않습니다. 덕분에 옵션이 든 패킷에 대한 라우터 성능이 크게 좋아집니다. IPv4에서는 옵션이 하나라도 있으면 라우터가 모든 옵션을 살펴봐야 합니다.
또 IPv4 옵션과 달리 IPv6 확장 머리글은 길이가 자유롭고, 패킷 하나에 실을 수 있는 옵션의 총량이 40바이트로 제한되지 않습니다. 이 특징과 처리 방식 덕분에 IPv6 인증과 보안 캡슐화 옵션처럼 IPv4에서는 실용적이지 않던 기능에 IPv6 옵션을 쓸 수 있습니다.
뒤따르는 옵션 머리글과 전송 프로토콜을 처리할 때의 성능을 높이려고, IPv6 옵션은 늘 8옥텟의 정수배 길이여서 뒤따르는 머리글의 정렬을 유지합니다.
프로토콜 지정자와 옵션 필드 대신 확장 머리글을 쓰므로 새로 정의한 확장을 더 쉽게 통합할 수 있습니다.
현재 규격은 확장 머리글을 다음처럼 정의합니다.
- 경로의 홉(라우터)마다 적용하는 Hop-by-hop 옵션
- 느슨한/엄격한 출발지 라우팅용 라우팅 머리글(드물게 씀)
- 패킷이 조각임을 정하고 조각 정보를 담는 조각(fragment) 머리글(IPv6 라우터는 조각을 나누지 않음)
- 인증(Security의 TCP/IP security 참고)
- 암호화(Security의 TCP/IP security 참고)
- 목적지 노드용 목적지 옵션(라우터는 무시)
개선된 서비스 품질·트래픽 제어
서비스 품질은 RSVP 같은 제어 프로토콜로 제어할 수 있지만, IPv6는 IP 머리글의 우선순위 필드로 패킷의 우선순위를 명시적으로 정하게 합니다.
노드는 이 값을 설정해 특정 패킷이나 패킷 묶음의 상대 우선순위를 나타낼 수 있으며, 노드, 하나 이상의 라우터, 목적지가 이 값으로 패킷에 관한 선택(곧 버릴지 말지)을 할 수 있습니다.
IPv6는 혼잡 제어 트래픽과 혼잡 제어를 하지 않는 트래픽의 두 가지 우선순위를 정합니다. 두 종류 사이에는 상대적인 순서가 없습니다.
혼잡 제어 트래픽은 혼잡에 "물러서기(back-off)"나 다른 제한 알고리즘으로 반응하는 트래픽입니다. 혼잡 제어 트래픽의 우선순위는 다음과 같습니다.
| 값 | 트래픽 |
|---|---|
| 0 | 특성을 정하지 않은 트래픽 |
| 1 | "채움(filler)" 트래픽(예: netnews) |
| 2 | 무인 데이터 전송(예: 메일) |
| 3 | (예약) |
| 4 | 사람이 지켜보는 대량 전송(예: FTP) |
| 5 | (예약) |
| 6 | 대화형 트래픽(예: Telnet) |
| 7 | 제어 트래픽(예: 라우팅 프로토콜) |
혼잡 제어를 하지 않는 트래픽은 동영상, 음성, 그 밖의 실시간 트래픽처럼 혼잡에 패킷을 버리는(또는 다시 보내지 않는) 것으로 반응하는 트래픽입니다. 예를 든 명시적 수준은 정의되어 있지 않지만, 순서는 혼잡 제어 트래픽과 비슷합니다.
- 보내는 쪽이 가장 기꺼이 버려도 좋은 트래픽에는 가장 낮은 값을 씁니다.
- 보내는 쪽이 가장 버리기 싫은 트래픽에는 가장 높은 값을 씁니다.
이 우선순위 제어는 특정 출발지 주소의 트래픽에만 적용됩니다. 한 주소의 제어 트래픽이 다른 주소의 대량 전송보다 명시적으로 우선순위가 높은 것은 아닙니다.
흐름 레이블
기본적인 트래픽 우선순위 말고도, IPv6는 특정 패킷 흐름을 지정하는 방식을 정의합니다. IPv6에서 흐름은 특정 출발지에서 특정 (유니캐스트나 멀티캐스트) 목적지로 보내는 패킷의 연속이며, 출발지는 중간 라우터가 이를 특별하게 다뤄 주기를 원합니다.
이 흐름 식별은 우선순위 제어에 쓸 수 있지만 다른 여러 제어에도 쓸 수 있습니다.
흐름 레이블은 무작위로 고르며, 그 트래픽이 속한 흐름 말고는 트래픽의 어떤 특성도 나타내지 않습니다. 그래서 라우터는 흐름 레이블을 보고 패킷이 특정 종류인지 판단할 수 없습니다. 그러나 그 레이블을 가진 마지막 패킷과 같은 패킷 연속의 일부임은 판단할 수 있습니다.
참고: IPv6가 널리 쓰이기 전까지 흐름 레이블은 대체로 실험 단계입니다. 흐름 레이블의 쓰임과 제어는 아직 정의되지도 표준화되지도 않았습니다.
IPv6 터널링
터널링은 기존 IPv4 라우팅 기반 구조로 IPv6 트래픽을 나르는 방법입니다.
IPv6로 잘 옮겨 가는 열쇠는 이미 설치된 IPv4 호스트와 라우터와의 호환성입니다. IPv6를 배포하면서 IPv4와의 호환성을 유지하면 인터넷을 IPv6로 옮기는 일이 쉬워집니다. IPv6 기반 구조를 배포하는 동안 기존 IPv4 라우팅 기반 구조는 계속 동작하며 IPv6 트래픽을 나르는 데 쓸 수 있습니다.
IPv6나 IPv4 호스트와 라우터는 IPv6 데이터그램을 IPv4 패킷으로 감싸 IPv4 라우팅 토폴로지 구간을 넘어가게(터널링) 할 수 있습니다. 터널링은 여러 방법으로 쓸 수 있습니다.
| 방식 | 설명 |
|---|---|
| Router-to-Router | IPv4 기반 구조로 서로 연결된 IPv6/IPv4 라우터가 자기들끼리 IPv6 패킷을 터널링합니다. 이때 터널은 IPv6 패킷이 거치는 종단 간 경로의 한 구간에 걸칩니다. |
| Host-to-Router | IPv6/IPv4 호스트가 IPv4 기반 구조로 닿을 수 있는 중간 IPv6/IPv4 라우터로 IPv6 패킷을 터널링합니다. 이 터널은 패킷의 종단 간 경로 첫 구간에 걸칩니다. |
| Host-to-Host | IPv4 기반 구조로 서로 연결된 IPv6/IPv4 호스트가 자기들끼리 IPv6 패킷을 터널링합니다. 이때 터널은 패킷이 거치는 종단 간 경로 전체에 걸칩니다. |
| Router-to-Host | IPv6/IPv4 라우터가 최종 목적지인 IPv6/IPv4 호스트까지 IPv6 패킷을 터널링합니다. 이 터널은 종단 간 경로의 마지막 구간에만 걸칩니다. |
터널링 기법은 보통 캡슐화하는 노드가 터널 끝 노드의 주소를 정하는 방식에 따라 나눕니다. 라우터 간이나 호스트-라우터 방식에서는 IPv6 패킷이 라우터까지 터널링됩니다. 호스트 간이나 라우터-호스트 방식에서는 IPv6 패킷이 최종 목적지까지 터널링됩니다.
터널의 입구 노드(캡슐화 노드)는 감싸는 IPv4 머리글을 만들어 캡슐화한 패킷을 보냅니다. 터널의 출구 노드(캡슐 해제 노드)는 캡슐화한 패킷을 받아 IPv4 머리글을 떼고, IPv6 머리글을 갱신하고, 받은 IPv6 패킷을 처리합니다. 다만 캡슐화 노드는 터널로 전달하는 IPv6 패킷을 처리하려고 터널의 최대 전송 단위(MTU) 같은 터널별 소프트 상태 정보를 유지해야 합니다.
IPv6의 터널은 두 종류입니다.
| 종류 | 설명 |
|---|---|
| 자동 터널(automatic tunnels) | IPv6 주소에 들어 있는 IPv4 주소 정보로 구성합니다. 목적지 호스트의 IPv6 주소에 패킷을 어느 IPv4 주소로 터널링할지 정보가 들어 있습니다. |
| 구성 터널(configured tunnels) | 손으로 구성해야 합니다. IPv4 정보가 들어 있지 않은 IPv6 주소를 쓸 때 씁니다. 터널 양 끝의 IPv6와 IPv4 주소를 지정해야 합니다. |
자동 터널과 구성 터널을 구성하는 방법은 아래 "IPv6에서 터널링 설정하기"를 봅니다.
IPv6 다중 홈 링크 로컬과 사이트 로컬 지원
호스트에는 인터페이스를 둘 이상 정의할 수 있습니다. 활성 인터페이스가 둘 이상인 호스트를 다중 홈(multihomed)이라고 합니다. 인터페이스마다 링크 로컬 주소가 붙어 있습니다.
링크 로컬 주소만으로도 같은 링크에 붙은 노드 사이의 통신에는 충분합니다.
다중 홈 호스트에는 링크 로컬 주소가 둘 이상 있습니다. AIX IPv6 구현에는 다중 홈 호스트에서 링크 계층 주소 풀이를 처리하는 옵션 4가지가 있으며, 기본은 옵션 1입니다.
| 옵션 | 동작 |
|---|---|
| 옵션 0 | 다중 홈 동작을 하지 않습니다. 첫 링크 로컬 인터페이스로 내보냅니다. 이웃 탐색 프로토콜(NDP)이 주소 풀이를 해야 하면 링크 로컬 주소가 정의된 인터페이스마다 Neighbor Solicitation 메시지를 멀티캐스트합니다. NDP는 첫 Neighbor Advertisement 메시지를 받을 때까지 데이터 패킷을 큐에 넣고, 받으면 그 링크로 패킷을 보냅니다. |
| 옵션 1 | NDP가 주소 풀이를 해야 할 때, 곧 데이터 패킷을 목적지로 보내는데 다음 홉의 링크 계층 정보가 이웃 캐시에 없을 때, 링크 로컬 주소가 정의된 인터페이스마다 Neighbor Solicitation 메시지를 멀티캐스트합니다. NDP는 링크 계층 정보를 얻을 때까지 데이터 패킷을 큐에 넣고, 인터페이스마다 응답을 받을 때까지 기다립니다. 이렇게 하면 데이터 패킷이 알맞은 나가는 인터페이스로 보내집니다. NDP가 기다리지 않고 첫 Neighbor Advertisement에 응답하면 패킷의 출발지 주소와 관련 없는 링크로 패킷이 나갈 수 있습니다. NDP가 기다려야 하므로 첫 패킷을 보내는 데 지연이 생기지만, 어차피 첫 응답을 기다리는 동안 지연은 생깁니다. |
| 옵션 2 | 다중 홈 동작을 허용하지만 데이터 패킷은 main_if6로 지정한 인터페이스로만 보냅니다. NDP가 주소 풀이를 해야 하면 링크 로컬 주소가 정의된 인터페이스마다 Neighbor Solicitation 메시지를 멀티캐스트하고, main_if6로 지정한 인터페이스(no 명령 참고)에서 오는 Neighbor Advertisement를 기다립니다. 이 인터페이스에서 응답을 받으면 그 링크로 데이터 패킷을 보냅니다. |
| 옵션 3 | 다중 홈 동작을 허용하지만 데이터 패킷은 main_if6로 지정한 인터페이스로만 보내고, 사이트 로컬 주소는 main_site6(no 명령 참고)로 지정한 인터페이스로만 라우팅합니다. NDP는 옵션 2와 똑같이 동작합니다. 다중 홈 호스트에서 사이트 로컬 주소로 데이터 패킷을 라우팅하는 응용 프로그램은 main_site6로 지정한 사이트 로컬 주소만 씁니다. |
IPv4가 구성된 상태에서 IPv6로 올리기
IPv4에서 IPv6로 손으로 올리는 시나리오입니다.
이 예의 네트워크는 라우터 하나와 서브넷 두 개로 이루어집니다. 서브넷마다 호스트가 둘(라우터와 다른 호스트 하나) 있습니다. 이 네트워크의 기계를 모두 IPv6로 올립니다. 시나리오를 마치면 라우터는 네트워크 인터페이스 en0에서 접두사 3ffe:0:0:aaaa::/64를, en1에서 접두사 3ffe:0:0:bbbb::/64를 알립니다. 먼저 시험할 수 있도록 기계가 IPv6를 임시로 지원하게 구성한 다음, 부팅 때 IPv6가 준비되도록 구성합니다.
AIX를 쓰는데 IPv4 설정이 구성되어 있지 않으면 "IPv4가 구성되지 않은 상태에서 IPv6로 올리기"를 봅니다.
고려할 점
- 이 따라 하기의 정보는 특정 AIX 버전으로 시험했습니다. AIX 버전과 수준에 따라 결과가 크게 다를 수 있습니다.
1단계: 호스트에 IPv6 설정하기
두 서브넷의 호스트에서 다음을 합니다.
- 다음 명령으로 IPv4가 구성되어 있는지 확인합니다.
netstat -ni
결과는 다음과 비슷해야 합니다.
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279393 0 2510 0 0
en0 1500 9.3.230.64 9.3.230.117 279393 0 2510 0 0
lo0 16896 link#1 913 0 919 0 0
lo0 16896 127 127.0.0.1 913 0 919 0 0
lo0 16896 ::1 913 0 919 0 0
- root 권한으로 다음 명령을 입력해 IPv6 설정을 구성합니다.
autoconf6
- 다음 명령을 다시 실행합니다.
netstat -ni
결과는 다음과 비슷해야 합니다.
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279679 0 2658 0 0
en0 1500 9.3.230.64 9.3.230.117 279679 0 2658 0 0
en0 1500 fe80::206:29ff:fe04:55ec 279679 0 2658 0 0
sit0 1480 link#3 9.3.230.117 0 0 0 0 0
sit0 1480 ::9.3.230.117 0 0 0 0 0
lo0 16896 link#1 2343 0 2350 0 0
lo0 16896 127 127.0.0.1 2343 0 2350 0 0
lo0 16896 ::1 2343 0 2350 0 0
- 다음 명령으로 ndpd-host 데몬을 시작합니다.
startsrc -s ndpd-host
2단계: 라우터에 IPv6 설정하기
- 다음 명령으로 IPv4 설정이 구성되어 있는지 확인합니다.
netstat -ni
- root 권한으로 다음 명령을 입력합니다.
autoconf6
- 다음 명령으로 두 서브넷에 속한 라우터 인터페이스에 전역 주소를 손으로 구성합니다.
# ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
# ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
라우터가 패킷을 보내는 서브넷마다 이렇게 해야 합니다.
- IPv6 전달(forwarding)을 켜려면 다음을 입력합니다.
no -o ip6forwarding=1
- ndpd-router 데몬을 시작하려면 다음을 입력합니다.
startsrc -s ndpd-router
ndpd-router 데몬은 라우터에 구성한 전역 주소에 해당하는 접두사를 알립니다. 이 경우 en0에서 3ffe:0:0:aaaa::/64, en1에서 3ffe:0:0:bbbb::/64를 알립니다.
3단계: 부팅 때 호스트에 IPv6가 구성되게 하기
새로 구성한 IPv6는 기계를 다시 부팅하면 지워집니다. 다시 부팅할 때마다 IPv6 호스트 기능을 켜려면 다음을 합니다.
- 즐겨 쓰는 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. - 그 파일에서 다음 줄들의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
# Start up ndpd-host daemon
start /usr/sbin/ndpd-host "$src_running"
start /usr/sbin/autoconf6 ""에-A플래그를 더합니다.
start /usr/sbin/autoconf6 "" -A
다시 부팅하면 IPv6 구성이 설정됩니다. 호스트마다 이 과정을 되풀이합니다.
4단계: 부팅 때 라우터에 IPv6가 구성되게 하기
새로 구성한 IPv6는 다시 부팅하면 지워집니다. 다시 부팅할 때마다 IPv6 라우터 기능을 켜려면 다음을 합니다.
- 즐겨 쓰는 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. - 그 파일에서 다음 줄의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
- 앞 단계에서 주석을 푼 줄 바로 뒤에 다음 줄들을 더합니다.
# Configure global addresses for router
ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
이 시나리오의 네트워크에는 서브넷이 en0과 en1 둘뿐입니다. 라우터가 패킷을 보내는 서브넷마다 이 파일에 줄을 하나씩 더해야 합니다.
- 파일에서 다음 줄의 주석을 풉니다.
# Start up ndpd-router daemon
start /usr/sbin/ndpd- router "$src_running"
다시 부팅하면 IPv6가 자동으로 시작됩니다.
IPv4가 구성되지 않은 상태에서 IPv6로 올리기
IPv4 설정 없이 호스트와 라우터에 IPv6를 설정하는 시나리오입니다.
이 예의 네트워크는 라우터 하나와 서브넷 두 개로 이루어지며, 서브넷마다 호스트가 둘(라우터와 다른 호스트 하나) 있습니다. 시나리오를 마치면 라우터는 en0에서 3ffe:0:0:aaaa::/64, en1에서 3ffe:0:0:bbbb::/64 접두사를 알립니다. 먼저 시험할 수 있도록 IPv6를 임시로 지원하게 구성한 다음, 부팅 때 IPv6가 준비되도록 구성합니다.
이 시나리오는 bos.net.tcp.client 파일 세트가 설치되어 있다고 가정합니다.
IPv4가 이미 구성된 상태에서 IPv6로 올리려면 앞의 "IPv4가 구성된 상태에서 IPv6로 올리기"를 봅니다.
고려할 점
- 이 따라 하기의 정보는 특정 AIX 버전으로 시험했습니다. AIX 버전과 수준에 따라 결과가 크게 다를 수 있습니다.
1단계: 호스트에 IPv6 설정하기
- root 권한으로 서브넷의 호스트마다 다음 명령을 입력합니다.
autoconf6 -A
시스템의 IPv6를 쓸 수 있는 인터페이스가 모두 올라옵니다.
참고: 일부 인터페이스만 올리려면 -i 플래그를 씁니다. 예를 들어 autoconf6 -i en0 en1은 en0과 en1 인터페이스를 올립니다.
- 다음 명령으로 인터페이스를 봅니다.
netstat -ni
결과는 다음과 비슷해야 합니다.
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#3 0.4.ac.17.b4.11 7 0 17 0 0
en0 1500 fe80::204:acff:fe17:b411 7 0 17 0 0
lo0 16896 link#1 436 0 481 0 0
lo0 16896 127 127.0.0.1 436 0 481 0 0
lo0 16896 ::1 436 0 481 0 0
- 다음 명령으로 ndpd-host 데몬을 시작합니다.
startsrc -s ndpd-host
2단계: 라우터에 IPv6 설정하기
- root 권한으로 라우터 호스트에서 다음 명령을 입력합니다.
autoconf6 -A
시스템의 IPv6를 쓸 수 있는 인터페이스가 모두 올라옵니다.
참고: 일부 인터페이스만 올리려면 -i 플래그를 씁니다. 예를 들어 autoconf6 -i en0 en1은 en0과 en1을 올립니다. 결과는 다음과 비슷해야 합니다.
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en1 1500 link#2 0.6.29.dc.15.45 0 0 7 0 0
en1 1500 fe80::206:29ff:fedc:1545 0 0 7 0 0
en0 1500 link#3 0.4.ac.17.b4.11 7 0 17 0 0
en0 1500 fe80::204:acff:fe17:b411 7 0 17 0 0
lo0 16896 link#1 436 0 481 0 0
lo0 16896 127 127.0.0.1 436 0 481 0 0
lo0 16896 ::1 436 0 481 0 0
- 다음 명령으로 두 서브넷에 속한 라우터 인터페이스에 전역 주소를 손으로 구성합니다.
# ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
# ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
참고: 라우터가 패킷을 보내는 서브넷마다 이렇게 해야 합니다.
- IPv6 전달을 켜려면 다음을 입력합니다.
no -o ip6forwarding=1
- ndpd-router 데몬을 시작하려면 다음을 입력합니다.
startsrc -s ndpd-router
ndpd-router 데몬은 라우터에 구성한 전역 주소에 해당하는 접두사를 알립니다. 이 경우 en0에서 3ffe:0:0:aaaa::/64, en1에서 3ffe:0:0:bbbb::/64를 알립니다.
- Enter를 눌러 계속합니다.
- Enter를 한 번 더 눌러 결정을 확인하고 소프트웨어 번들 설치를 시작합니다(원문에 남은 다른 절차의 단계로 보입니다).
3단계: 부팅 때 호스트에 IPv6가 구성되게 하기
호스트마다 1단계를 마친 뒤 기계를 다시 부팅하면 IPv6가 지워집니다. 다시 부팅할 때마다 IPv6 호스트 기능을 켜려면 다음을 합니다.
- 즐겨 쓰는 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. - 그 파일에서 다음 줄들의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
# Start up ndpd-host daemon
start /usr/sbin/ndpd-host "$src_running"
start /usr/sbin/autoconf6 ""에-A플래그를 더합니다.
start /usr/sbin/autoconf6 "" -A
- 호스트마다 이 과정을 되풀이합니다.
다시 부팅하면 IPv6가 자동으로 시작됩니다.
4단계: 부팅 때 라우터에 IPv6가 구성되게 하기
라우터에서 2단계를 마친 뒤 다시 부팅하면 IPv6가 지워집니다. 다시 부팅할 때마다 IPv6 라우터 기능을 켜려면 다음을 합니다.
- 즐겨 쓰는 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. - 그 파일에서 다음 줄의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
- 그 줄에
-A플래그를 더합니다.
start /usr/sbin/autoconf6 "" -A
- 앞 단계에서 주석을 푼 줄 바로 뒤에 다음 줄들을 더합니다.
# Configure global addresses for router
ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
이 시나리오의 네트워크에는 서브넷이 en0과 en1 둘뿐입니다. 라우터가 패킷을 보내는 서브넷마다 이 파일에 줄을 하나씩 더해야 합니다.
- 파일에서 다음 줄의 주석을 풉니다.
# Start up ndpd-router daemon
start /usr/sbin/ndpd-router "$src_running"
- 부팅 때 IP 전달을 켜도록 다음 명령을 실행합니다.
no -r -o ip6forwarding=1
다시 부팅하면 IPv6가 자동으로 시작됩니다.
(6.1) 실행 시간 정적 구성
정적 IP와 경로로 노드를 실행 시간에 구성하는 시나리오입니다.
이 예의 네트워크는 호스트 하나와 라우터 하나로 이루어집니다. 시나리오를 마치면 호스트에 IPv6 인터페이스가 설정됩니다. 먼저 시험할 수 있도록 기계가 IPv6를 임시로 지원하게 구성한 다음, 부팅 때 IPv6가 준비되도록 구성합니다.
고려할 점
- 이 따라 하기의 정보는 특정 AIX 버전으로 시험했습니다. AIX 버전과 수준에 따라 결과가 크게 다를 수 있습니다.
- 이 예는 IANA(Internet Assigned Numbers Authority)가 제공자에게 할당한 IPv6 인터페이스의 집합 전역 유니캐스트 주소(Aggregate Global Unicast Address)가 2001:1:2::/48이라고 가정합니다. 2001:1:2:3:4::/64는 네트워크 관리자가 49~64비트를 써서 할당한 서브넷입니다.
- IPv6 전역 유니캐스트 주소 형식을 이해하려면 RFC 3587을 봐야 합니다.
관련 정보
Run-Time Configuration Commands, autoconf6 Command
1단계: 호스트에 IPv6 설정하기
- root 권한으로 다음 명령을 입력해 IPv6 설정을 구성합니다.
# autoconf6
- 다음 명령을 다시 실행합니다.
# netstat -ni
결과는 다음과 비슷해야 합니다.
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279679 0 2658 0 0
en0 1500 9.3.230.64 9.3.230.117 279679 0 2658 0 0
en0 1500 fe80::206:29ff:fe04:55ec 279679 0 2658 0 0
sit0 1480 link#3 9.3.230.117 0 0 0 0 0
sit0 1480 ::9.3.230.117 0 0 0 0 0
lo0 16896 link#1 2343 0 2350 0 0
lo0 16896 127 127.0.0.1 2343 0 2350 0 0
lo0 16896 ::1 2343 0 2350 0 0
chdev명령으로 호스트 인터페이스에 IPv6 주소를 더합니다. 이 예에서 하위 64비트는autoconf6가 인터페이스 en0에 만든 링크 로컬 IP의 하위 64비트에서 가져왔습니다.
# chdev -l en0 -a netaddr6='2001:2:3:4:206:29ff:fe04:55ec' -a prefixlen=64
- 다음 접두사에 대한 기존 접두사 링크 경로를 모두 지웁니다.
# route delete -inet6 2001:2:3:4::/64
- 호스트에 접두사 정적 경로를 구성해 라우터에 닿을 수 있게 합니다. fe80::206:29ff:fe04:66e는 라우터이거나 라우터에 연결된 게이트웨이입니다.
# route add -inet6 -net 2001:2:3:4::/64 fe80::206:29ff:fe04:66e -static
참고: 기본 경로를 바꿔야 하면 노드의 기본 경로를 더하거나 덮어쓰지 않게 하는 -R 옵션으로 autoconf6를 실행한 다음 3~5단계를 되풀이합니다.
2단계: 라우터에 IPv6 설정하기
- 다음 명령으로 IPv4 설정이 구성되어 있는지 확인합니다.
# netstat -ni
- root 권한으로 다음 명령을 입력합니다.
# autoconf6
- IPv6 전달을 켜려면 다음 명령을 입력합니다.
# no -o ip6forwarding=1
- 다음 명령으로 라우터 인터페이스에 전역 IP를 구성합니다.
# chdev -l en0 -a netaddr6='2001:4:5:6:207:30ff:fe05:66ec' -a prefixlen=64
- 패킷이 정확히 배달되도록 라우터에 경로를 손으로 구성합니다. 예를 들어 fe803ca6:70ff:fe00:3004/64가 접두사 2001:2:3:4/64의 게이트웨이면 다음처럼 접두사 경로를 더합니다.
# route add -inet6 -net 2001:2:3:4::/64 fe80::3ca6:70ff:fe00:3004 -static
3단계: 다시 시작할 때마다 호스트에 IPv6가 구성되게 하기
1단계에서 구성한 IPv6 호스트 설정은 기계를 다시 시작하면 지워집니다. 다시 시작할 때마다 IPv6 호스트 기능을 켜려면 다음 절차를 따릅니다.
- 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. /etc/rc.tcpip파일에서 다음 줄의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
참고: 이 줄이 /etc/rc.tcpip 파일에 없으면 더합니다.
start /usr/sbin/autoconf6 ""에-A플래그를 더합니다.
start /usr/sbin/autoconf6 "" -A
- 주석을 푼(또는 더한) 줄 뒤에 다음 줄을 더합니다.
chdev -l en0 -a netaddr6='2001:2:3:4:206:29ff:fe04:55ec' -a prefixlen=64
- 다음 명령으로 이전에 있던 접두사 경로를 지웁니다.
chdev -l inet0 -a delrout6='-net, 2001:2:3:4::/64'
- 다음 명령으로 경로를 설정합니다.
chdev -l inet0 -a rout6='-net, 2001:2:3:4::/64 ,fe80::206:29ff:fe04:66e,-static'
기계를 다시 시작하면 IPv6 구성이 설정됩니다.
참고: 호스트마다 이 절차를 되풀이해야 합니다.
4단계: 다시 시작할 때마다 라우터에 IPv6가 구성되게 하기
2단계에서 구성한 IPv6 라우터 설정은 기계를 다시 시작하면 지워집니다. 다시 시작할 때마다 IPv6 라우터 기능을 켜려면 다음 절차를 따릅니다.
- 텍스트 편집기로
/etc/rc.tcpip파일을 엽니다. /etc/rc.tcpip파일에서 다음 줄의 주석을 풉니다.
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
참고: 이 줄이 /etc/rc.tcpip 파일에 없으면 더합니다.
start /usr/sbin/autoconf6 ""에-A플래그를 더합니다.
start /usr/sbin/autoconf6 "" -A
- 2단계에서 주석을 푼(또는 더한) 줄 뒤에 다음 줄들을 더해 라우터의 전역 IP와 접두사 경로를 구성합니다.
chdev -l en0 -a netaddr6='2001:4:5:6:207:30ff:fe05:66ec' -a prefixlen=64
chdev -l inet0 -a rout6='-net,2001:2:3:4::/64,fe80::3ca6:70ff:fe00:3004,-static'
이 시나리오의 네트워크에는 서브넷이 en0 하나뿐입니다. 라우터가 패킷을 보내는 서브넷마다 이 파일에 줄을 하나씩 더해야 합니다.
기계를 다시 시작하면 IPv6가 자동으로 시작됩니다.
참고: 정적 구성을 ndpd-host와 함께 쓸 때는, 필요하면 정적 IP와 경로가 유지되도록 ndpd-host의 여러 플래그를 살펴봅니다.
IPv6에서 터널링 설정하기
IPv6 터널링은 두 방법으로 설정할 수 있습니다. 첫째는 자동 터널, 둘째는 구성 터널입니다.
고려할 점
- 이 따라 하기의 정보는 특정 AIX 버전으로 시험했습니다. AIX 버전과 수준에 따라 결과가 크게 다를 수 있습니다.
IPv6 자동 터널 설정하기
이 시나리오에서는 autoconf6 명령으로 IPv6를 구성하고 주 인터페이스 en2로 자동 터널을 설정합니다. 그다음 autoconf6 명령으로 보조 인터페이스 en0으로 터널을 구성합니다.
다음은 시스템의 현재 네트워크 구성을 보여 주는 netstat -ni 명령의 결과입니다.
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
- IPv6와 자동 터널 하나를 켜려면 다음 명령을 입력합니다.
autoconf6
이제 netstat -ni 명령을 실행하면 다음 결과가 나옵니다.
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 10.1.1.1 0 0 0 0 0
sit0 1480 ::10.1.1.1
en2(IP 주소 10.1.1.1)가 주 인터페이스면 이제 주소 ::10.1.1.1로 en2 인터페이스를 거치는 자동 터널링을 쓸 수 있습니다.
- 인터페이스
en0을 거치는 자동 터널을 켜려면 다음 명령을 입력합니다.
autoconf6 -s -i en0
이제 netstat -ni 명령을 실행하면 다음 결과가 나옵니다.
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 1.1.1.3 0 0 3 0 0
sit0 1480 ::10.1.1.1 0 0 3 0 0
sit0 1480 ::1.1.1.3 0 0 3 0 0
이렇게 하면 기존 SIT 인터페이스 sit0에 IPv4 호환 IPv6 주소가 더해집니다. 이제 주소 ::1.1.1.3으로 인터페이스 en0의 터널링도 켜집니다. 두 터널 모두 같은 인터페이스 sit0을 씁니다.
참고: 자동 터널은 시스템을 다시 시작하면 지워집니다. 부팅 때 자동 터널이 있게 하려면 /etc/rc.tcpip 파일의 autoconf6 명령에 필요한 인수를 더합니다.
구성 터널 설정하기
이 시나리오에서는 SMIT로 구성 터널을 설정합니다. 이 터널은 ODM에 저장되므로 시스템을 다시 시작해도 쓸 수 있습니다. 시스템 alpha와 beta 사이에 터널을 구성합니다. alpha의 IPv4 주소는 10.1.1.1, beta의 IPv4 주소는 10.1.1.2입니다.
구성 터널을 설정하는 단계는 다음과 같습니다.
alpha와beta사이에 터널을 구성하려면 두 시스템에서 다음을 입력합니다.
smit ctinet6
- 두 시스템에서 Add an IPV6 in IPV4 Tunnel Interface를 고릅니다.
autoconf6
- 이 시나리오에서는 IPv4 주소를 바탕으로
alpha에서 다음과 같이 값을 채웠습니다.
* IPV4 SOURCE ADDRESS (dotted decimal) [10.1.1.1]
* IPV4 DESTINATION ADDRESS (dotted decimal) [10.1.1.2]
IPV6 SOURCE ADDRESS (colon separated) []
IPV6 DESTINATION ADDRESS (colon separated) []
beta에서는 다음 값을 넣었습니다.
* IPV4 SOURCE ADDRESS (dotted decimal) [10.1.1.2]
* IPV4 DESTINATION ADDRESS (dotted decimal) [10.1.1.1]
IPV6 SOURCE ADDRESS (colon separated) []
IPV6 DESTINATION ADDRESS (colon separated) []
- 구성한 인터페이스를 보려면 다음 명령을 입력합니다.
ifconfig cti X
X는 인터페이스 번호입니다. 이 시나리오에서는 다음 결과가 나왔습니다. alpha에서:
cti0: flags=8080051<UP,POINTOPOINT,RUNNING,MULTICAST>
inet6 fe80::a01:101/128 --> fe80::a01:102
beta에서:
cti0: flags=8080051 <UP,POINTOPOINT,RUNNING,MULTICAST>
inet6 fe80::a01:102/128 --> fe80::a01:101
SMIT는 다음 방법으로 터널 양 끝의 IPv6 주소를 자동으로 만듭니다.
- 하위 32비트에 IPv4 주소를 넣습니다.
- 상위 96비트에 접두사
fe80::/96을 넣습니다.
원하면 특정 IPv6 주소를 넣을 수 있습니다.
영어 원문
Internet Protocol (IP) version 6
Internet Protocol (IP) version 6 (IPv6 or IPng) is the next generation of IP and has been designed to be an evolutionary step from IP version 4 (IPv4).
While IPv4 has allowed the development of a global Internet, it is not capable of carrying much farther into the future because of two fundamental factors: limited address space and routing complexity. The IPv4 32-bit addresses do not provide enough flexibility for global Internet routing. The deployment of Classless InterDomain Routing (CIDR) has extended the lifetime of IPv4 routing by a number of years, but the effort to better manage the routing will continue. Even if IPv4 routing could be scaled up, the Internet will eventually run out of network numbers.
The Internet Engineering Task Force (IETF) recognized that IPv4 would not be able to support the phenomenal growth of the Internet, so the IETF IPng working group was formed. Of the proposals that were made, Simple Internet Protocol Plus (SIPP) was chosen as an evolutionary step in the development of IP. This was renamed to IPng, and RFC1883 was finalized in December of 1995.
IPv6 extends the maximum number of Internet addresses to handle the ever increasing Internet user population. As an evolutionary change from IPv4, IPv6 has the advantage of allowing the new and the old to coexist on the same network. This coexistence enables an orderly migration from IPv4 (32 bit addressing) to IPv6 (128 bit addressing) on an operational network.
This overview is intended to give the reader a general understanding of the IPng protocol. For detailed information, please see RFCs 2460, 2373, 2465, 1886, 2461, 2462, and 2553.
Security provides security information on the TCP/IP suite of protocols, including IPv6. For details about IP Security, versions 4 and 6, see Internet Protocol security. DATA
DATA
DATA
DATA TCP Header
TCP Header
TCP Header IP Header
Ethernet Header IP Header APPLICATION LAYER
TRANSPORT LAYER
NETWORK LAYER Message or Stream of Data
Transport Protocol Packet
Network Layer Datagram
PHYSICAL NETWORK NETWORK INTERFACE
Ethernet Frame
Note: Headers are added and stripped in each protocol layer as data is transmitted and received by a host
Figure 7. Host data transmissions and receptions
IPv6 expanded routing and addressing
IPv6 increases the IP address size from 32 bits to 128 bits, thereby supporting more levels of addressing hierarchy, a much greater number of addressable nodes, and simpler autoconfiguration of addresses.
IPv6 has three types of addresses
- unicast — A packet sent to a unicast address is delivered to the interface identified by that address. A unicast address has a particular scope: link-local, site-local, global. There are also two special unicast addresses: • ::/128 (unspecified address) • ::1/128 (loopback address)
- multicast — A packet sent to a multicast address is delivered to all interfaces identified by that address. A multicast address is identified by the prefix ff::/8. As with unicast addresses, multicast addresses have a similar scope: node-local, link-local, site-local, and organization-local.
- anycast — An anycast address is an address that has a single sender, multiple listeners, and only one responder (normally the "nearest" one, according to the routing protocols' measure of distance). For example, several web servers listening on an anycast address. When a request is sent to the anycast address, only one responds. An anycast address is indistinguishable from a unicast address. A unicast address becomes an anycast address when more than one interface is configured with that address.
- Note: There are no broadcast addresses in IPv6. Their function has been superseded by the multicast
address.
IPv6 autoconfiguration:
The primary mechanisms available that enable a node to start up and communicate with other nodes over an IPv4 network are hard-coding, BOOTP, and DHCP.
IPv6 introduces the concept of scope to IP addresses, one of which is link-local. This allows a host to construct a valid address from the predefined link-local prefix and its local identifier. This local identifier is typically derived from the medium access control (MAC) address of the interface to be configured. Using this address, the node can communicate with other hosts on the same subnet and, for a fully-isolated subnet, might not need any other address configuration.
IPv6 meaningful addresses:
With IPv4, the only generally recognizable meaning in addresses are broadcast (typically all 1s or all 0s), and classes (for example, a class D is multicast). With IPv6, the prefix can be quickly examined to determine scope (for example, link-local), multicast versus unicast, and a mechanism of assignment (provider-based or geography-based).
Routing information might be explicitly loaded into the upper bits of addresses as well, but this has not yet been finalized by the IETF (for provider-based addresses, routing information is implicitly present in the address).
IPv6 duplicate address detection:
When an interface is initialized or reinitialized, it uses autoconfiguration to tentatively associate a link-local address with that interface (the address is not yet assigned to that interface in the traditional sense). At this point, the interface joins the all-nodes and solicited-nodes multicast groups, and sends a neighbor discovery message to these groups. By using the multicast address, the node can determine whether that particular link-local address has been previously assigned, and choose an alternate address.
This eliminates accidentally assigning the same address to two different interfaces on the same link. (It is still possible to create duplicate global-scope addresses for nodes that are not on the same link.)
Neighbor discovery/stateless address autoconfiguration:
Neighbor Discovery Protocol (NDP) for IPv6 is used by nodes (hosts and routers) to determine the link-layer addresses for neighbors known to reside on attached links, and maintain per-destination routing tables for active connections. IPv6 defines both a stateful and a stateless address autoconfiguration mechanism. Stateless autoconfiguration requires no manual configuration of hosts; minimal, if any, configuration of routers; and no additional servers.
Hosts also use NDP to find neighboring routers that are willing to forward packets on their behalf and detect changed link-layer addresses. NDP uses the Internet Control Message Protocol (ICMP) Version 6 with its own unique message types. In general terms, the IPv6 Neighbor Discovery protocol corresponds to a combination of the IPv4 Address Resolution Protocol (ARP), ICMP Router Discovery (RDISC), and ICMP Redirect (ICMPv4), but with many improvements over these IPv4 protocols.
The stateless mechanism allows a host to generate its own addresses using a combination of locally available information and information advertised by routers. Routers advertise prefixes that identify the subnets associated with a link, while hosts generate an interface token that uniquely identifies an interface on a subnet. An address is formed by combining the two. In the absence of routers, a host can only generate link-local addresses. However, link-local addresses are sufficient for allowing communication among nodes attached to the same link.
Routing simplification
To simplify routing issues, IPv6 addresses are considered in two parts: a prefix and an ID. This might seem the same as the IPv4 net-host address breakdown, but it has two advantages.
- no class — No fixed number of bits for prefix or ID, which allows for a reduction in loss due to over-allocation
- nesting — An arbitrary number of divisions can be employed by considering different numbers of bits as the prefix.
Case 1
128 bits node address
Case 2
n bits—128-n bitsSubnet prefix—Interface ID
Case 3:
n bits—80-n bits 48 bitsSubscriber prefix—Subnet ID Interface ID
Case 4:
s bits—n bits m bits 128-s-n-m bitsSubscribe prefix—Area ID Subnet ID Interface ID
Generally, IPv4 cannot go beyond Case 3, even with Variable Length Subnet Mask (VLSM is a means of allocating IP addressing resources to subnets according to their individual need rather than some general network-wide rule). This is as much an artifact of the shorter address length as the definition of variable length prefixes, but is worth noting nonetheless.
Header format simplification
IPv6 simplifies the IP header by removing entirely or by moving to an extension header some of the fields found in the IPv4 header. It defines a more flexible format for optional information (the extension headers).
Specifically, note the absence of:
header length (length is constant)
identification
flags
fragment offset (moved into fragmentation extension headers)
header checksum (upper-layer protocol or security extension header handles data integrity).
Table 53. IPv4 header
| Item | Description | Description | Description | Description |
|---|---|---|---|---|
Version |
IHL |
Type of Service |
Total Length |
|
Identification |
Identification |
Identification |
Flags |
Fragment Offset |
Time to Live |
Time to Live |
Protocol |
Header Checksum |
Header Checksum |
Source Address |
Source Address |
Source Address |
Source Address |
Source Address |
Destination Address |
Destination Address |
Destination Address |
Destination Address |
Destination Address |
Options |
Options |
Options |
Options |
Padding |
| Table 54. IPv6 header | ||||
Version |
Prio |
Flow Label |
||
Payload Length |
Payload Length |
Payload Length |
Next Header |
Hop Limit |
Source Address |
Source Address |
Source Address |
Source Address |
Source Address |
Destination Address |
Destination Address |
Destination Address |
Destination Address |
Destination Address |
IPng includes an improved options mechanism over IPv4. IPv6 options are placed in separate extension headers that are located between the IPv6 header and the transport-layer header in a packet. Most extension headers are not examined or processed by any router along a packet delivery path until it arrives at its final destination. This mechanism facilitates a major improvement in router performance for packets containing options. In IPv4 the presence of any options requires the router to examine all options.
Another improvement is that, unlike IPv4 options, IPv6 extension headers can be of arbitrary length and the total amount of options carried in a packet is not limited to 40 bytes. This feature, plus the manner in which it is processed, permits IPv6 options to be used for functions that were not practical in IPv4, such as the IPv6 Authentication and Security Encapsulation options.
To improve the performance when handling subsequent option headers and the transport protocol that follows, IPv6 options are always an integer multiple of eight octets long to retain this alignment for subsequent headers.
By using extension headers instead of a protocol specifier and options fields, newly defined extensions can be integrated more easily.
Current specifications define extension headers in the following ways:
Hop-by-hop options that apply to each hop (router) along the path
Routing header for loose/strict source routing (used infrequently)
A fragment defines the packet as a fragment and contains information about the fragment (IPv6 routers do not fragment)
Authentication (See TCP/IP security in Security
Encryption (See TCP/IP security in Security
Destination options for the destination node (ignored by routers).
Improved quality-of-service/traffic control
While quality of service can be controlled by use of a control protocol such as RSVP, IPv6 provides for explicit priority definition for packets by using the priority field in the IP header.
A node can set this value to indicate the relative priority of a particular packet or set of packets, which can then be used by the node, one or more routers, or the destination to make choices concerning the packet (that is, dropping it or not).
IPv6 specifies two types of priorities, those for congestion-controlled traffic, and those for non-congestion-controlled traffic. No relative ordering is implied between the two types.
Congestion-controlled traffic is defined as traffic that responds to congestion through some sort of "back-off" or other limiting algorithm. Priorities for congestion-controlled traffic are:
- 0 — uncharacterized traffic
- 1 — "filler" traffic (for example, netnews)
- 2 — unattended data transfer (for example, mail)
- 3 — (reserved)
- 4 — attended bulk transfer (for example, FTP)
- 5 — (reserved)
- 6 — interactive traffic (for example, Telnet)
- 7 — control traffic (for example, routing protocols)
- Non-congestion-controlled traffic is defined as traffic that responds to congestion by dropping (or simply not
resending) packets, such as video, audio, or other real-time traffic. Explicit levels are not defined with examples, but the ordering is similar to that for congestion-controlled traffic:
The lowest value that the source is most willing to have discarded should be used for traffic.
The highest value that the source is least willing to have discarded should be used for traffic.
This priority control is only applicable to traffic from a particular source address. Control traffic from one address is not an explicitly higher priority than attended bulk transfer from another address.
Flow labeling:
Outside of basic prioritization of traffic, IPv6 defines a mechanism for specifying a particular flow of packets. In IPv6 terms, a flow is defined as a sequence of packets sent from a particular source to a particular (unicast or multicast) destination for which the source desires special handling by the intervening routers.
This flow identification can be used for priority control, but might also be used for any number of other controls.
The flow label is chosen randomly, and does not identify any characteristic of the traffic other than the flow to which it belongs. This means that a router cannot determine that a packet is a particular type by examining the flow label. It can, however, determine that it is part of the same sequence of packets as the last packet containing that label.
Note: Until IPv6 is in general use, the flow label is mostly experimental. Uses and controls involving flow labels have not yet been defined nor standardized.
IPv6 tunneling
Tunneling provides a way to use an existing IPv4 routing infrastructure to carry IPv6 traffic.
The key to a successful IPv6 transition is compatibility with the existing installed base of IPv4 hosts and routers. Maintaining compatibility with IPv4 while deploying IPv6 streamlines the task of transitioning the Internet to IPv6. While the IPv6 infrastructure is being deployed, the existing IPv4 routing infrastructure can remain functional, and can be used to carry IPv6 traffic.
IPv6 or IPv4 hosts and routers can tunnel IPv6 datagrams over regions of IPv4 routing topology by encapsulating them within IPv4 packets. Tunneling can be used in a variety of ways:
- Router-to-Router — IPv6 or IPv4 routers interconnected by an IPv4 infrastructure can tunnel IPv6 packets between themselves. In this case, the tunnel spans one segment of the end-to-end path that the IPv6 packet takes.
- Host-to-Router — IPv6 or IPv4 hosts can tunnel IPv6 packets to an intermediary IPv6 or IPv4 router that is reachable through an IPv4 infrastructure. This type of tunnel spans the first segment of the packet's end-to-end path.
- Host-to-Host — IPv6 or IPv4 hosts that are interconnected by an IPv4 infrastructure can tunnel IPv6 packets between themselves. In this case, the tunnel spans the entire end-to-end path that the packet takes.
- Router-to-Host — IPv6/IPv4 routers can tunnel IPv6 packets to their final destination IPv6 or IPv4 host. This tunnel spans only the last segment of the end-to-end path.
Tunneling techniques are usually classified according to the mechanism by which the encapsulating node determines the address of the node at the end of the tunnel. In router-to-router or host-to-router methods, the IPv6 packet is being tunneled to a router. In host-to-host or router-to-host methods, the IPv6 packet is tunneled all the way to its final destination.
The entry node of the tunnel (the encapsulating node) creates an encapsulating IPv4 header and transmits the encapsulated packet. The exit node of the tunnel (the decapsulating node) receives the encapsulated packet, removes the IPv4 header, updates the IPv6 header, and processes the received IPv6 packet. However, the encapsulating node needs to maintain soft state information for each tunnel, such as the maximum transmission unit (MTU) of the tunnel, to process IPv6 packets forwarded into the tunnel.
There are two types of tunnels in IPv6:
automatic tunnels
Automatic tunnels are configured by using IPv4 address information embedded in an IPv6 address – the IPv6 address of the destination host includes information about which IPv4 address the packet should be tunneled to.
configured tunnels
Configured tunnels must be configured manually. These tunnels are used when using IPv6 addresses that do not have any embedded IPv4 information. The IPv6 and IPv4 addresses of the endpoints of the tunnel must be specified.
For information on configuring automatic and configured tunnels, see Setting up tunneling in IPv6.
IPv6 multihomed link-local and site-local support
A host can have more than one interface defined. A host with two or more active interfaces is called multihomed. Each interface has a link-local address associated with it.
Link-local addresses are sufficient for allowing communication among nodes attached to the same link.
A multihomed host has two or more associated link-local addresses. The AIX IPv6 implementation has 4 options to handle how link-layer address resolution is resolved on multihomed hosts. Option 1 is the default.
- Option 0 — No multihomed actions are taken. Transmissions will go out on the first link-local interface. When the Neighbor Discovery Protocol (NDP) must perform address resolution, it multicasts a Neighbor Solicitation message out on each interface with a link local address defined. NDP queues the data packet until the first Neighbor Advertisement message is received. The data packet is then sent out on this link.
- Option 1 — When the NDP must perform address resolution, that is, when sending a data packet to a destination and the link-layer information for the next hop is not in the Neighbor Cache, it multicasts a Neighbor Solicitation message out on each interface with a link-local address defined. NDP then queues the data packet until it gets the link-layer information. NDP then waits until a response is received for each interface. This guarantees that the data packets are sent on the appropriate outgoing interfaces. If NDP did not wait, but responded to the first Neighbor Advertisement received, it would be possible for a data packet to be sent out on a link not associated with the packet source address. Because NDP must wait, a delay in the first packet being sent occurs. However, the delay occurs anyway in waiting for the first response.
- Option 2 — Multihomed operation is allowed, but dispatching of a data packet is limited to the interface specified by
main_if6. When the NDP must perform address resolution, it multicasts a Neighbor Solicitation message out on each interface with a link-local address defined. It then waits for a Neighbor Advertisement message from the interface specified bymain_if6(see the no command). Upon receiving a response from this interface, the data packet is sent out on this link. - Option 3 — Multihomed operation is allowed, but dispatching of a data packet is limited to the interface specified by
main_if6and site-local addresses are only routed for the interface specified bymain_site6(see the no command). The NDP operates just as it does for Option 2. For applications that route data packets using site-local addresses on a multihomed host, only the site-local address specified bymain_site6are used.
Upgrading to IPv6 with IPv4 configured
This scenario leads you through a manual upgrade from IPv4 to IPv6.
The network used in this example consists of a router and two subnets. There are two hosts on each subnet: the router, and another host. You will upgrade each machine on this network to IPv6. By the end of the scenario, the router will advertise prefix 3ffe:0:0:aaaa::/64 on network interface en0 and prefix
3ffe:0:0:bbbb::/64 on network interface en1. You will first configure the machines to temporarily support IPv6 so that you can test them. You will then configure the machines so they will be IPv6-ready at boot time.
If you are running the AIX operating system and do not have your IPv4 settings configured, see Upgrading to IPv6 with IPv4 not configured.
Things to Consider
- The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.
Step 1: Set up the hosts for IPv6
On the hosts on both subnets, do the following: 1. Make sure IPv4 is configured by typing the following command:
netstat -ni
Your results should look similar to the following:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279393 0 2510 0 0
en0 1500 9.3.230.64 9.3.230.117 279393 0 2510 0 0
lo0 16896 link#1 913 0 919 0 0
lo0 16896 127 127.0.0.1 913 0 919 0 0
lo0 16896 ::1 913 0 919 0 0
- With root authority, configure your IPv6 settings by typing the following command:
autoconf6
- Rerun the following command:
netstat -ni
Your results should look similar to the following:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279679 0 2658 0 0
en0 1500 9.3.230.64 9.3.230.117 279679 0 2658 0 0
en0 1500 fe80::206:29ff:fe04:55ec 279679 0 2658 0 0
sit0 1480 link#3 9.3.230.117 0 0 0 0 0
sit0 1480 ::9.3.230.117 0 0 0 0 0
lo0 16896 link#1 2343 0 2350 0 0
lo0 16896 127 127.0.0.1 2343 0 2350 0 0
lo0 16896 ::1 2343 0 2350 0 0
- Start the ndpd-host daemon by typing the following command:
startsrc -s ndpd-host
Step 2: Set up the router for IPv6
- Make sure that the IPv4 settings are configured by typing the following command:
netstat -ni
- With root authority, type the following command:
autoconf6
- Manually configure global addresses on the router's interfaces belonging to each of the two subnets by typing the following commands:
# ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
# ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
You will need to do this for every subnet that your router is sending packets to.
- To activate IPv6 forwarding, type the following:
no -o ip6forwarding=1
- To start the ndpd-router daemon, type the following:
startsrc -s ndpd-router
The ndpd-router daemon will advertise prefixes corresponding to the global addresses that you configured on the router. In this case, the ndpd-router will advertise prefix 3ffe:0:0:aaaa::/64 on en0 and prefix 3ffe:0:0:bbbb::/64 on en1
Step 3. Set up IPv6 to be configured on the hosts at boot time
Your newly configured IPv6 will be deleted when you reboot the machine. To enable IPv6 host functionality every time you reboot, do the following:
Open the
/etc/rc.tcpipfile using your favorite text editor.Uncomment the following lines in that file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
# Start up ndpd-host daemon
start /usr/sbin/ndpd-host "$src_running"
- Add the
-Aflag tostart /usr/sbin/autoconf6 "":
start /usr/sbin/autoconf6 "" -A
When you reboot, your IPv6 configuration will be set. Repeat this process for each host.
Step 4: Set up IPv6 to be configured on the router at boot time
Your newly configured IPv6 will be deleted when you reboot. To enable IPv6 router functionality every time you reboot, do the following:
Open the
/etc/rc.tcpipfile in your favorite text editor.Uncomment the following line in that file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
- Add the following lines immediately after the line that you just uncommented in the previous step:
# Configure global addresses for router
ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
In this scenario, our network has only two subnets, en0 and en1. You will need to add a line to this file for every subnet that your router is sending packets to.
- Uncomment the following line in the file:
# Start up ndpd-router daemon
start /usr/sbin/ndpd- router "$src_running"
When you reboot, IPv6 will be automatically started.
Upgrading to IPv6 with IPv4 not configured
This scenario shows how to set up hosts and a router for IPv6 without IPv4 settings configured.
The network used in this example consists of a router and two subnets. There are two hosts on each subnet: the router, and another host. By the end of the scenario, the router will advertise prefix 3ffe:0:0:aaaa::/64 on network interface en0 and prefix 3ffe:0:0:bbbb::/64 on network interface en1. You will first configure the machines to temporarily support IPv6 so that you can test them. You will then configure the machines so they will be IPv6-ready at boot time.
This scenario assumes that the bos.net.tcp.client fileset is installed.
To upgrade to IPv6 with IPv4 already configured, see Upgrading to IPv6 with IPv4 configured.
Things to Consider
- The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.
Step 1: Set up the hosts for IPv6
- With root authority, type the following command on each host on the subnet:
autoconf6 -A
This will bring up all IPv6-capable interfaces on the system.
Note: To bring up a subset of interfaces, use the -i flag. For example, autoconf6 -i en0 en1 will bring up interfaces en0 and en1.
- Type the following command to view your interfaces:
netstat -ni
Your results should look similar to the following:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#3 0.4.ac.17.b4.11 7 0 17 0 0
en0 1500 fe80::204:acff:fe17:b411 7 0 17 0 0
lo0 16896 link#1 436 0 481 0 0
lo0 16896 127 127.0.0.1 436 0 481 0 0
lo0 16896 ::1 436 0 481 0 0
- Start the ndpd-host daemon by typing the following command:
startsrc -s ndpd-host
Step 2: Set up the router for IPv6
- With root authority, type the following command on the router host:
autoconf6 -A
This will bring up all IPv6-capable interfaces on the system.
Note: To bring up a subset of interfaces, use the -i flag. For example, autoconf6 -i en0 en1 will bring up interfaces en0 and en1. Your results should look similar to the following:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en1 1500 link#2 0.6.29.dc.15.45 0 0 7 0 0
en1 1500 fe80::206:29ff:fedc:1545 0 0 7 0 0
en0 1500 link#3 0.4.ac.17.b4.11 7 0 17 0 0
en0 1500 fe80::204:acff:fe17:b411 7 0 17 0 0
lo0 16896 link#1 436 0 481 0 0
lo0 16896 127 127.0.0.1 436 0 481 0 0
lo0 16896 ::1 436 0 481 0 0
- Manually configure global addresses on the router's interfaces belonging to each of the two subnets by typing the following commands:
# ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
# ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
Note: You will need to do this for every subnet that your router is sending packets to.
- To activate IPv6 forwarding, type the following:
no -o ip6forwarding=1
- To start the ndpd-router daemon, type the following:
startsrc -s ndpd-router
The ndpd-router daemon will advertise prefixes corresponding to the global addresses that you configured on the router. In this case, the ndpd-router will advertise prefix 3ffe:0:0:aaaa::/64 on en0 and prefix 3ffe:0:0:bbbb::/64 on en1.
Press Enter to continue.
Press Enter a second time to confirm your decision and begin the installation of your software bundle.
Step 3. Set up IPv6 to be configured on the hosts at boot time
After completing Step 1 for each host, IPv6 will be deleted when you reboot the machine. To enable IPv6 host functionality every time you reboot, do the following:
Open the
/etc/rc.tcpipfile using your favorite text editor.Uncomment the following lines in that file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
# Start up ndpd-host daemon
start /usr/sbin/ndpd-host "$src_running"
- Add the
-Aflag tostart /usr/sbin/autoconf6 "":
start /usr/sbin/autoconf6 "" -A
- Repeat this process for each host.
When you reboot, IPv6 will be automatically started.
Step 4: Set up IPv6 to be configured on the router at boot time
After completing Step 2 for your router, IPv6 will be deleted when you reboot. To enable IPv6 router functionality every time you reboot, do the following:
Open the
/etc/rc.tcpipfile in your favorite text editor.Uncomment the following line in that file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
- Add the
-Aflag to that line:
start /usr/sbin/autoconf6 "" -A
- Add the following lines immediately after the line that you just uncommented in the previous step:
# Configure global addresses for router
ifconfig en0 inet6 3ffe:0:0:aaaa::/64 eui64 alias
ifconfig en1 inet6 3ffe:0:0:bbbb::/64 eui64 alias
In this scenario, our network has only two subnets, en0 and en1. You will need to add a line to this file for every subnet that your router is sending packets to.
- Uncomment the following line in the file:
# Start up ndpd-router daemon
start /usr/sbin/ndpd-router "$src_running"
- Run the following command to enable IP forwarding at boot time:
no -r -o ip6forwarding=1
When you reboot, IPv6 will be automatically started.
Run-time Static Configuration
This scenario leads you through run-time configuration of a node by using static IPs and routes.
The network that is used in this example consists of a host and a router. By the end of the scenario, an IPv6 interface is set up on the host. You first configure the machines to temporarily support IPv6 so that you can test them. Then you configure the machines so that they are IPv6-ready at boot time.
Things to consider
The information in this how-to scenario was tested by using specific versions of AIX. The results that you obtain might vary significantly depending on your version and level of AIX.
The example assumes 2001:1:2::/48 is the Aggregate Global Unicast Address for the IPv6 interface assigned by the Internet Assigned Numbers Authority (IANA) to the provider. And 2001:1:2:3:4::/64 is the subnet that uses bits 49 - 64 assigned by the network administrator.
You must refer RFC 3587 to understand the IPv6 Global Unicast Address Format.
Related information
Run-Time Configuration Commands autoconf6 Command
Step 1. Setting up hosts for IPv6:
Follow this procedure for setting up hosts for IPv6.
- With root authority, configure your IPv6 settings by entering the following command:
# autoconf6
- Rerun the following command:
# netstat -ni
Your results must look similar to the following output:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.6.29.4.55.ec 279679 0 2658 0 0
en0 1500 9.3.230.64 9.3.230.117 279679 0 2658 0 0
en0 1500 fe80::206:29ff:fe04:55ec 279679 0 2658 0 0
sit0 1480 link#3 9.3.230.117 0 0 0 0 0
sit0 1480 ::9.3.230.117 0 0 0 0 0
lo0 16896 link#1 2343 0 2350 0 0
lo0 16896 127 127.0.0.1 2343 0 2350 0 0
lo0 16896 ::1 2343 0 2350 0 0
- Use the chdev command to add the IPv6 address to the host interface. For this example, the low-order 64 bits are taken from low-order 64 bits of Link-Local IP generated by autoconf6 on interface en0.
# chdev -l en0 -a netaddr6='2001:2:3:4:206:29ff:fe04:55ec' -a prefixlen=64
- Delete any existing prefix link routes for the following prefix:
# route delete -inet6 2001:2:3:4::/64
- Configure prefix static route on the host to add reachability to the router, where fe80::206:29ff:fe04:66e is the router or a gateway that has connectivity to the router.
# route add -inet6 -net 2001:2:3:4::/64 fe80::206:29ff:fe04:66e -static
Note: If a change is needed for the default route, make sure autoconf6 is run with the –R option that prevents it from adding or overwriting any default routes on the node. Then, repeat steps 3-5.
Step 2. Setting up the router for IPv6:
Follow this procedure for setting up the router for IPv6.
- Check to ensure that the IPv4 settings are configured, by entering the following command:
# netstat -ni
- With root authority, enter the following command:
# autoconf6
- To activate IPv6 forwarding, enter the following command:
# no -o ip6forwarding=1
- Configure Global IP on the router interface, by entering the following command:
# chdev -l en0 -a netaddr6='2001:4:5:6:207:30ff:fe05:66ec' -a prefixlen=64
- Manually configure routes on the router to enable accurate delivery of packets. For example, if fe80:: 3ca6:70ff:fe00:3004/64 is the gateway for prefix 2001:2:3:4::/64, add a prefix route as follows:
# route add -inet6 -net 2001:2:3:4::/64 fe80::3ca6:70ff:fe00:3004 -static
Step 3. Setting up IPv6 to be configured on hosts at every restart:
The IPv6 hosts settings configured in Step 1. Setting up hosts for IPv6 are deleted when you restart the machine. To enable IPv6 hosts functionality every time you restart the machine, follow this procedure.
Open the /etc/rc.tcpip file in a text editor.
Uncomment the following line in the /etc/rc.tcpip file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
Note: If the preceding line is not present in the /etc/rc.tcpip file, add it in the file.
- Add the
-Aflag to start /usr/sbin/autoconf6 "".
start /usr/sbin/autoconf6 "" -A
- Add the following line in the /etc/rc.tcpip file after the line you uncommented (or added):
chdev -l en0 -a netaddr6='2001:2:3:4:206:29ff:fe04:55ec' -a prefixlen=64
- Delete any previously existing prefix routes, by entering the following command:
chdev -l inet0 -a delrout6='-net, 2001:2:3:4::/64'
- Set up a route, by entering the following command:
chdev -l inet0 -a rout6='-net, 2001:2:3:4::/64 ,fe80::206:29ff:fe04:66e,-static'
When you restart the machine, your IPv6 configuration is set.
Note: You must repeat this procedure for each host.
Step 4. Setting up IPv6 to be configured on the router at every restart:
The IPv6 router settings configured in Step 2. Setting up the router for IPv6 are deleted when you restart the machine. To enable IPv6 router functionality every time you restart the machine, follow this procedure.
Open the /etc/rc.tcpip file in a text editor.
Uncomment the following line in /etc/rc.tcpip file:
# Start up autoconf6 process
start /usr/sbin/autoconf6 ""
Note: If the preceding line is not present in the /etc/rc.tcpip file, add it in the file.
- Add the
-Aflag to start /usr/sbin/autoconf6 "".
start /usr/sbin/autoconf6 "" -A
- Add the following lines after the line that you uncommented (or added) in step 2 to configure Global IP on the router and to configure the prefix route.
chdev -l en0 -a netaddr6='2001:4:5:6:207:30ff:fe05:66ec' -a prefixlen=64
chdev -l inet0 -a rout6='-net,2001:2:3:4::/64,fe80::3ca6:70ff:fe00:3004,-static'
In this scenario, the network has only one subnet, en0. You must add a line to this file for every subnet to which the router sends packets.
When you restart the machine, IPv6 is automatically started on the machine.
Note: When you use static configurations simultaneously with ndpd-host make sure various flags in ndpd-host are explored to retain static IPs and routes, if needed.
Setting up tunneling in IPv6
You can use either of two methods to set up tunneling in IPv6. The first method sets up an automatic tunnel. The second method sets up a configured tunnel.
Things to Consider
- The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.
Set up an automatic tunnel in IPv6
In this scenario, the autoconf6 command will be used to configure IPv6 and set up an automatic tunnel through the primary interface, en2. The autoconf6 command will then be used to configure a tunnel through the secondary interface, en0.
Following is the result of the netstat -ni command, which displays the current network configuration of the system:
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
- To enable IPv6 and one automatic tunnel, type the following command:
autoconf6
Running the netstat -ni command now produces the following results:
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 10.1.1.1 0 0 0 0 0
sit0 1480 ::10.1.1.1
If en2 (IP address 10.1.1.1) is the primary interface, address ::10.1.1.1 is now available for automatic tunneling over the en2 interface.
- To enable an automatic tunnel through interface
en0, type the following command:
autoconf6 -s -i en0
Running the netstat -ni command now produces the following results:
# netstat -in
en0 1500 link#2 MAC address here 0 0 33 0 0
en0 1500 1.1 1.1.1.3 0 0 33 0 0
en0 1500 fe80::204:acff:fe49:4910 0 0 33 0 0
en2 1500 link#3 MAC address here 79428 0 409 0 0
en2 1500 10.1 10.1.1.1 79428 0 409 0 0
en2 1500 fe80::220:35ff:fe12:3ae8
sit0 1480 link#7 1.1.1.3 0 0 3 0 0
sit0 1480 ::10.1.1.1 0 0 3 0 0
sit0 1480 ::1.1.1.3 0 0 3 0 0
This action causes an IPv4-compatible IPv6 address to be added to the existing SIT interface, sit0. Tunneling is now also enabled for interface en0 using address ::1.1.1.3. The same interface, sit0, will be used for both tunnels.
Note: The automatic tunnels are deleted when the system is restarted. To have the automatic tunnel present at boot time, add the required arguments to the autoconf6 command in the /etc/rc.tcpip file.
Set up configured tunnels
In this scenario, SMIT will be used to set up a configured tunnel. This tunnel will be available when the system restarts because it will be stored in the ODM. A tunnel will be configured between systems alpha and beta. The IPv4 address of alpha is 10.1.1.1, and the IPv4 address of beta is 10.1.1.2.
To set up configured tunnels, follow these steps:
- To configure a tunnel between
alphaandbeta, type the following on both systems:
smit ctinet6
- Select Add an IPV6 in IPV4 Tunnel Interface on both systems.
autoconf6
- In this scenario, we filled in the values as follows on
alpha, based on the IPv4 addresses:
* IPV4 SOURCE ADDRESS (dotted decimal) [10.1.1.1]
* IPV4 DESTINATION ADDRESS (dotted decimal) [10.1.1.2]
IPV6 SOURCE ADDRESS (colon separated) []
IPV6 DESTINATION ADDRESS (colon separated) []
On beta, the following values were entered:
* IPV4 SOURCE ADDRESS (dotted decimal) [10.1.1.2]
* IPV4 DESTINATION ADDRESS (dotted decimal) [10.1.1.1]
IPV6 SOURCE ADDRESS (colon separated) []
IPV6 DESTINATION ADDRESS (colon separated) []
- To view the configured interfaces, type the following command:
ifconfig cti X
where X is the number of the interface. In this scenario, the following results were returned. On alpha:
cti0: flags=8080051<UP,POINTOPOINT,RUNNING,MULTICAST>
inet6 fe80::a01:101/128 --> fe80::a01:102
On beta:
cti0: flags=8080051 <UP,POINTOPOINT,RUNNING,MULTICAST>
inet6 fe80::a01:102/128 --> fe80::a01:101
SMIT automatically creates IPv6 addresses for both ends of the tunnel using the following method:
The lower 32 bits contain the IPv4 address
The upper 96 bits contain the prefix
fe80::/96
You can fill in specific IPv6 addresses if desired.