Questions tagged [ipv6]

The Internet Protocol is one of the fundamental protocols used for the Internet. IPv6 is the next generation Internet Protocol, as opposed to the currently common Internet Protocol known as IPv4.

Primarily IPv6 increases the number of available addresses to allow continued expansion of the Internet once all of the addresses are allocated. There are a number of other noticeable changes over , which are based on the lessons learned from the evolution of .

Useful resources:

2550 questions
12
votes
2 answers

ipv6 ping connect: invalid argument on android

Why ping6 doesn't work on my Android dev? ping6 on the Android dev. bullhead:/ # ping6 fe80::405a:e0a5:e054:cbde connect: Invalid argument 2|bullhead:/ # ping6 -I wlan0 fe80::405a:e0a5:e054:cbde …
Andrey Egorov
  • 391
  • 1
  • 4
  • 15
12
votes
2 answers

Splitting an IPv6 cidr into /64 blocks, in php

I'm looking to create a script that will take an ipv6 range or cidr as input, and spit out a list of /64 blocks (or the first IP in each /64 block). I have a function that does something similar for IPv4 IPs, but I lack the understanding to…
Moist_Gerbil
  • 195
  • 7
12
votes
2 answers

How to store both IPv4 or IPv6 in single column in SQL Server?

Should I use binary(16) or varbinary(16)? I know I can use getAddress() in java.net.InetAddress (Java) or System.Net.IPAddress (C#) to get a byte[] representation of both IPv4 and IPv6, but if I need to insert IPv4 i.e. binary(4) into a binary(16)…
Henry
  • 32,689
  • 19
  • 120
  • 221
12
votes
1 answer

API for configuring static IP addresses in an Android application

Is it possible to set the IP address of an interface in Android within an application? I can query the available interfaces and their current addresses using java.net.NetworkInterface, but this doesn't provide a facility to change these. Did I just…
Flexo
  • 87,323
  • 22
  • 191
  • 272
12
votes
3 answers

how to bind a link local address to an ipv6 socket

This question can be treated as a sister question of previous one posted by myself. It is very tedious that when you want to bind a link local address to an IPv6 socket, you need to set the sin6_scope_id field of the sockaddr_in6 struct. I'm…
Haiyuan Zhang
  • 40,802
  • 41
  • 107
  • 134
12
votes
2 answers

Get IPv6 addresses in linux using ioctl

I trying to get IPv6 addresses in my linux OS like following: sd = Socket_m(AF_INET6_m, SOCK_DGRAM_m, 0); ifc.ifc_buf = buffer_p; ifc.ifc_len = buffSize; Ioctl_m(sd, SIOCGIFCONF, &ifc); It works succesfully if any IPv4 address are configured for…
Yury Bushev
  • 642
  • 9
  • 25
12
votes
2 answers

Rails IPv6 server

I'm using a development server which I currently only have IPv6 connectivity to, and I'm working on a rails application. I tried to use bundle exec rails s -e development -p 3003 -d to start a server, but it seems it only binds to IPv4: tcp 0…
Per Johansson
  • 6,697
  • 27
  • 34
11
votes
3 answers

Different browsers, different IPs?

I'm saving the user's IP addresses by saving the value of $_SERVER['REMOTE_ADDR'] in a MySQL database. Problem is that for both Firefox and Chrome $_SERVER['REMOTE_ADDR'] is ::1 (that means localhost in IPv6) and for IE and Opera is 127.0.0.1…
federico-t
  • 12,014
  • 19
  • 67
  • 111
11
votes
7 answers

Matching IPv6 address to a CIDR subnet

Is there a good way to match an IPv6 address to an IPv6 subnet using CIDR notation? What I am looking for is the IPv6 equivalent to this: Matching an IP to a CIDR mask in PHP 5? The example given above can't be used since an IPv6 address is 128 bits…
MW.
  • 12,550
  • 9
  • 36
  • 65
11
votes
2 answers

Anonymizing IPv6 addresses

As required by law in several countries we anonymize IP-addresses of our users in our log files. Using IPv4 we regularly just anonymize the two last bytes, eg. instead of 255.255.255.255 we log 255.255.\*.\* What algorithm would you recommend to…
tec
  • 505
  • 3
  • 13
11
votes
2 answers

Where did IPv5 go?

Since we are all moving towards IPv6 whether we want it or not, I ask this: what happened to IPv5? Was it not cool enough for it's older brother, or did something else happen to that specification?
3cho
  • 547
  • 1
  • 6
  • 12
11
votes
1 answer

does the user login restriction based on IP address support ipv6 for web application?

Does any one know how to restrict the user to login based on an IPV6 address for a web application in c# dot net? I have already done the functionality using IPV4 and it's working fine, but I wanted to restrict the user based on their IPV6 for the…
user3497034
11
votes
1 answer

why can't i bind ipv6 socket to a linklocal address

#include #include #include #include #include void error(char *msg) { perror(msg); exit(0); } int main(int argc, char *argv[]) { int sock, length, fromlen, n; struct…
Haiyuan Zhang
  • 40,802
  • 41
  • 107
  • 134
11
votes
4 answers

Force python mechanize/urllib2 to only use A requests?

Here is a related question but I could not figure out how to apply the answer to mechanize/urllib2: how to force python httplib library to use only A requests Basically, given this simple code: #!/usr/bin/python import urllib2 print…
Evan Teran
  • 87,561
  • 32
  • 179
  • 238
11
votes
1 answer

PHP $_SERVER['REMOTE_ADDR'] shows IPv6

I am facing an issue with $_SERVER['REMOTE_ADDR'] in PHP It is giving a IPv6 like value even though the server is using IPv4. Can anyone help me to resolve this issue.
Brijesh
  • 133
  • 1
  • 1
  • 5