Some cool technology to share:
Ubuntu 14.04, with Netflix (using pipelight), which is using IPv6 (see terminal on the right).
Sunday, April 20, 2014
Tuesday, April 15, 2014
Hurricane Electric can handle dynamic IPv4 addresses
My ISP loves to give me a new IPv4 address each few days. Until now I used Hurricane Electric's website to update my IPv6 tunnel endpoint accordingly to get my IPv6 working again. I just discovered you can update your tunnel in another way:
curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456'
You have to run this from a machine on your LAN
I created a script like this
date >> /var/log/tunnelbroker.log
curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456' >> /var/log/tunnelbroker.log
and put it into my crontab. Problem solved!
Thanks to the Tunnelbroker FAQ:
curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456'
You have to run this from a machine on your LAN
I created a script like this
date >> /var/log/tunnelbroker.log
curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456' >> /var/log/tunnelbroker.log
and put it into my crontab. Problem solved!
Thanks to the Tunnelbroker FAQ:
My IPv4 endpoint address is dynamic. Can I still create a tunnel? If yes, what do I need to do when my IP address changes?
Yes, you can still create a tunnel even if you are using a dynamic IPv4 endpoint address. If your IPv4 endpoint address changes, you can either login to the tunnelbroker.net page and update your IPv4 endpoint address or use https://ipv4.tunnelbroker.net/nic/update which is designed to be used to update your IPv4 endpoint address.
Monday, April 14, 2014
Top 1000 .nl sites: 66 IPv6 enabled
Of the top 1000 .nl (= Netherlands) sites (based on the Alexa list) 66 are IPv6 enabled. That's 6.6%
Collecting:
alexa-aaaa$ cat top-1m.csv | grep -e "\.nl$" | head -1000 | ./has-an-aaaa-or-not.py > alexa-nl-top1000.txt
Counting:
alexa-aaaa$ cat alexa-nl-top1000.txt | awk '{ print $2 " " $3 " " $4 }' | sort | uniq -c
66 has an IPv6
934 has no IPv6
Collecting:
alexa-aaaa$ cat top-1m.csv | grep -e "\.nl$" | head -1000 | ./has-an-aaaa-or-not.py > alexa-nl-top1000.txt
Counting:
alexa-aaaa$ cat alexa-nl-top1000.txt | awk '{ print $2 " " $3 " " $4 }' | sort | uniq -c
66 has an IPv6
934 has no IPv6
The IPv6 enabled sites are (in order of Alexa relevance):
$ cat alexa-nl-top1000.txt | grep "has an"
google.nl has an IPv6 address
blogspot.nl has an IPv6 address
dumpert.nl has an IPv6 address
geenstijl.nl has an IPv6 address
mijnwoordenboek.nl has an IPv6 address
encyclo.nl has an IPv6 address
xs4all.nl has an IPv6 address
digid.nl has an IPv6 address
rijksoverheid.nl has an IPv6 address
daskapital.nl has an IPv6 address
utwente.nl has an IPv6 address
transip.nl has an IPv6 address
zoover.nl has an IPv6 address
voetbalprimeur.nl has an IPv6 address
mijndomein.nl has an IPv6 address
flabber.nl has an IPv6 address
knmi.nl has an IPv6 address
tudelft.nl has an IPv6 address
sidn.nl has an IPv6 address
froot.nl has an IPv6 address
lindanieuws.nl has an IPv6 address
partyflock.nl has an IPv6 address
npo.nl has an IPv6 address
huurwoningen.nl has an IPv6 address
nsmbl.nl has an IPv6 address
spele.nl has an IPv6 address
nuon.nl has an IPv6 address
worldstream.nl has an IPv6 address
moneybird.nl has an IPv6 address
brekend.nl has an IPv6 address
goedbegin.nl has an IPv6 address
cbs.nl has an IPv6 address
zalando-lounge.nl has an IPv6 address
uvt.nl has an IPv6 address
webhostingtalk.nl has an IPv6 address
strato.nl has an IPv6 address
corendon.nl has an IPv6 address
fonq.nl has an IPv6 address
centralpoint.nl has an IPv6 address
babybytes.nl has an IPv6 address
moneymiljonair.nl has an IPv6 address
kamers.nl has an IPv6 address
dezaak.nl has an IPv6 address
antagonist.nl has an IPv6 address
sochicken.nl has an IPv6 address
torrentproxy.nl has an IPv6 address
want.nl has an IPv6 address
dutchleader.nl has an IPv6 address
ovh.nl has an IPv6 address
kennisnet.nl has an IPv6 address
fashionunited.nl has an IPv6 address
camilleri.nl has an IPv6 address
pcextreme.nl has an IPv6 address
greenhost.nl has an IPv6 address
openoffice.nl has an IPv6 address
prankster.nl has an IPv6 address
culy.nl has an IPv6 address
appwereld.nl has an IPv6 address
sexdateszoeken.nl has an IPv6 address
terena.nl has an IPv6 address
utopiatvshow.nl has an IPv6 address
manners.nl has an IPv6 address
oudjesophetweb.nl has an IPv6 address
neemontslag.nl has an IPv6 address
dailyinspiration.nl has an IPv6 address
volrecepten.nl has an IPv6 address
Sunday, April 13, 2014
IPv4 versus IPv6 traffic on Windows
On Windows, you can see the IPv4 and Ipv6 traffic with the following commands:
netstat -ps ip
netstat -ps ipv6
Example output below (tested on a Windows 7 machine)
netstat -ps ip
netstat -ps ipv6
Example output below (tested on a Windows 7 machine)
Friday, April 11, 2014
IPv6 and IPv4 statistics without netstat
Here's a method to show IPv6 and IPv4 statistics on Linux without the netstat command. I was looking for a method "without netstat", because the very old netstat version 1.42 on Ubuntu (both 12.04 and 14.04) and Debian has a silly overflow bug:
$ netstat -s -6 | grep -i octet
Ip6InOctets: -1
Ip6OutOctets: 80610872
Ip6InMcastOctets: 172080
Ip6OutMcastOctets: 3448
So "-1" IPv6 bytes ... :-(
Here's the solution with /proc/net/snmp6 (and no netstat needed):
$ cat /proc/net/snmp6 | grep -i octet | head -2 | awk '{ print $NF }'
8325976854
80610872
To make it a bit more readable:
You can put this into a five line script:
#!/bin/sh
echo "IPv4 (down resp up):"
cat /proc/net/netstat | grep -i ipext | tail -1 | awk '{ print $8 "\n" $9 }' | awk '{ print int($NF/1048576) " MB" }'
echo "\nIPv6 (down resp up):"
cat /proc/net/snmp6 | grep -i octet | head -2 | awk '{ print int($NF/1048576) " MB" }'
$ ./ipv4-vs-ipv6.sh
IPv4 (down resp up):
3636 MB
31 MB
IPv6 (down resp up):
7971 MB
77 MB
$ netstat -s -6 | grep -i octet
Ip6InOctets: -1
Ip6OutOctets: 80610872
Ip6InMcastOctets: 172080
Ip6OutMcastOctets: 3448
So "-1" IPv6 bytes ... :-(
IPv6 statistics
Here's the solution with /proc/net/snmp6 (and no netstat needed):
$ cat /proc/net/snmp6 | grep -i octet | head -2 | awk '{ print $NF }'
8325976854
80610872
To make it a bit more readable:
$ cat /proc/net/snmp6 | grep -i octet | head -2 | awk '{ print int($NF/1048576) " MB" }'
7940 MB
76 MB
So 7940 MB downstream IPv6 traffic.
IPv4 statistics
The IPv4 statistics are in a different file called ... /proc/net/netstat:
$ cat /proc/net/netstat | grep -i ipext | tail -1 | awk '{ print $8 "\n" $9 }'
3813163404
32346989
And in MB's:
$ cat /proc/net/netstat | grep -i ipext | tail -1 | awk '{ print $8 "\n" $9 }' | awk '{ print int($NF/1048576) " MB" }'
3636 MB
30 MB
To be complete: the overflow for IPv4 traffic:
$ netstat -s | grep -i octet
InOctets: -481799528
OutOctets: 32350221
InMcastOctets: 396
So a negative number of IPv4 bytes ....
Script
You can put this into a five line script:
#!/bin/sh
echo "IPv4 (down resp up):"
cat /proc/net/netstat | grep -i ipext | tail -1 | awk '{ print $8 "\n" $9 }' | awk '{ print int($NF/1048576) " MB" }'
echo "\nIPv6 (down resp up):"
cat /proc/net/snmp6 | grep -i octet | head -2 | awk '{ print int($NF/1048576) " MB" }'
The result is something like:
$ ./ipv4-vs-ipv6.sh
IPv4 (down resp up):
3636 MB
31 MB
IPv6 (down resp up):
7971 MB
77 MB
Subscribe to:
Posts (Atom)