PDA

View Full Version : [Solved] ipv4 / ipv6 on the same interface


clinty
August 2nd, 2009, 10:01
Hello.

My datacenter gave me IPv6 address. So, I configured IPv6 on my machine. It's working fine.

vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet6 fe80::217:31ff:fe77:****%vr0 prefixlen 64 scopeid 0x1
inet 87.98.***.*** netmask 0xffffff00 broadcast 87.98.***:***
inet6 2001:41d0:1:****::1 prefixlen 56
ether 00:17:31:77:**:**
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active


However, I do not understand few things...
When I go to www.ipv6.org, the message is "You are using IPv6 from 2001:41d0:1:****::1". Ok, it's work.
On the other hand, when I go to showip.net, the message is "what is my ip address 87.98.***.***".

Why in some cases, the IPv4 address is printed, and in other cases, the IPv6 address is printed?

When I do "telnet freebsd.org 80", I have:
Trying 2001:4f8:fff6::28...
Connected to freebsd.org.
Escape character is '^]'.

And "telnet ovh.net 80" gives:
Trying 213.186.33.33...
Connected to ovh.fr.
Escape character is '^]'.




How it's working with the two adresses on the same interface (vr0)?

Just another question. When I do "w3m 2001:200:0:8002:203:47ff:fea5:3085", I have "Unknown URI: 2001:200:0:8002:203:47ff:fea5:3085". But "telnet 2001:200:0:8002:203:47ff:fea5:3085 80" is working.

Thanks a lot for your advices.

SirDice
August 2nd, 2009, 10:07
Not all sites support ipv6. Looks like showip.net only supports ipv4.

Same goes for applications, not all of them support ipv6.

clinty
August 2nd, 2009, 10:11
How a site says "hello, I support IPv6"? I think a "host www.domain.tld" is executed, and if a IPv6 record is found, IPv6 is supported.

But, how FreeBSD chose to use IPv4 or IPv6 for a connection?

SirDice
August 2nd, 2009, 10:14
It depends on the application. If an application only supports ipv4 it will only use A records.

Firefox supports ipv4 and ipv6, if a hostname resolves both AAAA and A records, FF will use ipv6. There's a neat little extension for firefox called ShowIP, it will show you the ipv6 or ipv4 address you're connected to.

clinty
August 2nd, 2009, 10:46
Yes, I understand that. More precisely, now, I'm interesting about the "IP chose".

I have IPv4 and IPv6 on my interface. How the chose works? Example. I'm connecting to www.ipv6.org. The domain as a AAAA record. So, the site is supporting IPv6. After, that's Firefox which decide what IP of the interface it will use? Or FreeBSD kernel which decide to use the IPv6 address of the interface (if the site supports IPv6)?

The fact is I have two address on my interface. I want to understand how the network is working with these two addresses.

SirDice
August 3rd, 2009, 07:52
I'm connecting to www.ipv6.org. The domain as a AAAA record. So, the site is supporting IPv6. After, that's Firefox which decide what IP of the interface it will use?
Yes.

Or FreeBSD kernel which decide to use the IPv6 address of the interface (if the site supports IPv6)?
No.