2009/06/27

IPv6 address assigned to 6to4 tunnel interface

I have used PPPoE to obtain a public IP address 218.103.230.241 (da67:e6f1). Upon activating the 6to4 tunnel interface on XP, the following IPv6 addresses are assigned :

IP address: 2002:da67:e6f1::da67:e6f1

Default Gateway: 2002:c058:6301::c058::6301

The IP address of the interface can be understand easily which append 218.103.230.241 in hex format after prefix 2002. As for the GW, c058:6301 translate to 192.88.99.1 which is an anycast address for 6to4 relay router. On tracert, it goes to the node of Hurricane Electric established in HK:

Tracing route to 192.88.99.1 over a maximum of 30 hops

1 1 ms 1 ms 1 ms 192.168.73.1

2 207 ms 228 ms 114 ms pcd-hhm23-2-rx.netvigator.com [203.218.199.254]

3 226 ms 208 ms 111 ms n219076123050.netvigator.com [219.76.123.50]

4 18 ms 17 ms 56 ms 218.102.21.66

5 67 ms 78 ms 100 ms hurricaneelectric-RGE.hkix.net [202.40.161.158]

6 26 ms 20 ms 62 ms 192.88.99.1



Trace complete.

2009/06/21

Teredo IPv6 address

I got the following IPv6 address from Teredo on Windows XP:

2001:0:cf2e:3096:0:78f8:24b0:fed5

The command to activate teredo interface is "netsh interface ipv6 set teredo client teredo.ipv6.microsoft.com".

On analysis, 2001:0::/32 is the prefix. Teredo server is provided by Mircrosoft at 207.46.48.150 (cf2e:3096) and the client gateway of NAT is 219.79.1.42 (24b0:fed5). The flag contents are 0 and the port number of the client port is 34567. All these can be found out by ipv6calc -i -q 2001:0:cf2e:3096:0:78f8:24b0:fed5.

One question I have in mind is how can the router serving the public teredo server announce routing prefix properly given that differnet IPv4 addresses can request the services. It is not difficult at all since client addresses are in the least signicant part. Just announce 2001:0:cf2e:3096::/64 will be satisfactory.

2009/06/20

Virtual web hosting with IPv6 address

The following is the directive of virtual web hosting in Apache running on an IPv6 address:

NameVirtualHost [2406:a000::6:218]:80

< VirtualHost [2406:a000::6:218]:80>
ServerName ipv6.warrenkwok.com
DocumentRoot /var/www/html/ipv6-warrenkwok
< /VirtualHost>

Again, the extra space after < should be removed.

2009/06/18

Displaying visitor's IP address

This is a single line script to display the visiting IP address to a web site:
< ?php
echo $_SERVER['REMOTE_ADDR'];
?>

It works for both IPv4 and IPv6 addresses.

[Note: the extra space been left arrow and ? should be removed. I purposely made a space for deceiving html.]

2009/06/16

ff02::1 and ff02::2

On a Linux machine, I tried "ping6 ff02::1%2" and a large number of IP addresses responded to it. This is the neighbour discovery packet so all nodes with IPv6 enabled will answer.

Secondly, I tried "ping6 ff02::2%2" and only one single IP address responded to it which was the default router in the network. In fact, ff02::2 is the router discovery packet.

Those who are new to IPv6 will find them lot of funs.

2009/06/15

Random identifier in Vista

Unlike XP which uses EUI-64 format for idenitifier in IPv6 assignment of link-local address, Vista by default randomizes the last 64 bits for privacy protection. It can be disabled by the following command:

c:\netsh interface ipv6 set global randomizeidentifiers=disabled

To turn it on again, the command is to change from disabled to enabled.

c:\netsh interface ipv6 set global randomizeidentifiers=enabled

2009/06/11

迪士尼樂園可恥

當政府宣布小學及幼稚園停課,並呼籲市民不要去人多聚集的地方時,迪士尼樂園竟推出本地小學及幼稚園學生優惠,以250元購買本月通行門票。迪士尼樂園此舉只顧贏利,妄顧公眾安全,實屬可恥。

2009/06/03

Viewing files on tape archive

I wanted to check the list of files of a SCSI 800GB tape archive. The command I issued was "tar -t /dev/st0". Nothing was returned. Another command "tar --list /dev/st0" was made but gave the same result.

The problem is that for tar command, the parameter "-f" is extremely important. I should use "tar -tvf /dev/st0".

2009/06/02

ipv6calc

ipv6calc gives me an easy way to convert 48-bit MAC address to 64-bit EUI used as interface identifier in IPv6 address:

[root@localhost ~]# ipv6calc --action geneui64 --in mac --out eui64 00:15:F2:BC:03:8C
215:f2ff:febc:38c

Another application is to query the type of an IPv6 address:

[root@localhost~]# ipv6calc -q -i 2001:200:0:8002:203:47ff:fea5:3085
Address type: unicast, global-unicast, productive
Address type has SLA: 8002
Registry for address: APNIC
Interface identifier: 0203:47ff:fea5:3085
EUI-48/MAC address: 00:03:47:a5:30:85
MAC is a global unique one
MAC is an unicast one
OUI is: Intel Corporation

Great, it is found that the IPv6 address 2001:200:0:8002:203:47ff:fea5:3085 is assigned by auto-configuration.

2009/06/01

problems of internal IP + NAT in mobile devices

Some mobile operators are assigning 10.X.Y.Z IP addresses to mobile devices and use NAT to connect to the Internet. There are at least 3 problems caused by this approach:

1. No end-to-end connectivity is guaranteed. Some VPN services might fail.
2. NAT increases the battery drain due to some packets utilized to check the status of devices.
3. NAT can offer less than 65535 ports in use. If a mobile device is running P2P applications with about 100 ports open, then the total number of device that can be supported is 650 on a network segment.

IPv6 could solve all these problems. All mobile operators should assign IPv6 addresses to their customers.