Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The concept of 6to4 tunneling is to do encapsulate and descapsulate an ipv6 packet through ipv4 network. The encapsulation process is:

[IPv6 header][Transport Header][Application Protocol data]

=> encapsulation:

[Ip4 Header][IPv6 header][Transport Header][Application Protocol data]

I am talking from this infrastructure:

Host A (IPv6) -> Router R1 (dual stack) -> Ipv4 net work -> Router R2 (dual stack) -> Host B (Ipv6) packet.

The Ipv4 header in the encapsulation, which Ipv4 header is this among: Host A, Router R1, Router R2 and Host B?

Thanks in advance.

share|improve this question
    
Is there a question here? –  mfarver Mar 6 '11 at 1:00
    
In your encapsulation "diagram", Host B is not ipv6 enabled? –  jliendo Mar 6 '11 at 1:06
    
yes, I edited the question... host B should be ipv6! Thanks! –  JoesyXHN Mar 6 '11 at 9:22
add comment

2 Answers

6to4 is ordinary IP over IP tunnelling. Whoever does the tunneling originates the packets. Since your Host A does not have IPv4 connectivity, it cannot act as tunnel endpoint.

As an example, I have a router (R1) Linux box with a 6to4 route that looks thus:

2000::/3 via ::192.88.99.1 dev sit0 metric 1024 mtu 1480 advmss 1420 hoplimit 0

and a IPv4 route thus:

default via XXX.YYY.210.1 dev br0

Internet IPv6 traffic coming in from LAN (e.g. from Host A) routes to sit0. The boxen on the LAN believes that they are directly connected to IPv6 internet. Traffic from sit0 is wrapped in IPv4 packets with R1 as source address and injected into br0 which connects to IPv4 internet.

share|improve this answer
    
I made a mistake in forming the question. Could you please give me a new answer? thanks in advance! –  JoesyXHN Mar 6 '11 at 9:23
add comment

The two routers R1 and R2 will do the tunneling. Packets originating from R1 will have an IPv4 header with R1's IPv4 address as the source and R2's IPv4 address as the destination (R1 sends to R2). Return IPv4 packets will have the source and destination addresses reversed (R2 sends to R1). The IPv6 addresses of the hosts A and B will pass untranslated in the header of the encapsulated packet. Normally a minimal 20 byte IP4v header is used, so the IPv6 MTU (Maximum Transmission Unit) on the tunnel will be at most 1480 bytes.

Encapsulation just consists of adding an IPv4 header to the IPv6 packet and routing it using normal IPv6 routing. The un-encapsulation just removes the IPv4 header, and routes the remaining IPv6 packet normally. It is possible for an IPv6 packet to be passed through more than one tunnel between the two hosts. The IPv4 addresses in the IPv4 will always be the address of the tunneling router (source) and the address of the tunnel end-point router (destination).

EDIT: The following was written to describe the case of described in the following paragraph. The other paragraphs supply additional background.

HostA (IPv6) and HostB (IPv4) will be unable to communicate as they don't have compatible stacks. If HostB was had an IPv6 stack they could communicate.

A dual stack host could do its own tunneling, in which case its IPv4 address would be used as its IPv4 end-point address. If NAT is being used then the address of its router would be the IPv4 end-point address while the packet was on the IPv4 network between the routers.

IPv6 does not have NAT so the IPv6 addresses will never be translated.

For an IPv6 only host to communicate with an IPv4 host, protocol translation is required. Host A could address Host B using one of the IPv6 schemes for encoding IPv4 addresses in IPv6. Router R1 would need to perform the protocol translation. (Although I don't believe there are any such routers on the market.) Again, the IPv4 end-point address on the IPv4 network would R1's IPv4 address. Some network options may not get translated during protocol translation.

share|improve this answer
    
I made a mistake in forming the question. Could you please give me a new answer? thanks in advance! –  JoesyXHN Mar 6 '11 at 9:23
    
@JoesyXHN: Revised the first paragraph to answer your question. Left the rest of the answer as most of it is background. It may be of interest to people who are trying to mix stacks. –  BillThor Mar 6 '11 at 16:37
    
Hi BillTHor, I am very appreciated about your answer. However, I am still not clear that in encapsulation in Router R1, which Ipv4 header will be added in the encapsulated packet? is it of Ipv4 of Router 2? Thanks in advance. –  JoesyXHN Mar 6 '11 at 18:31
    
@JoesyXHN: IPv4 header will be from R1 to R2 (source and destination) both addresses appear in the header. I have updated my response accordingly. –  BillThor Mar 6 '11 at 23:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.