ipv6

Ping Failure Without IPv6

Our user interface is communicating with another application on a different machine, often connecting using domain names. On our network, when IPv6 is installed, DNS name resolution works great, all machines can be pinged and contacted fine. When IPv6 is uninstalled, pinging the same DNS names returns an IP address on some distant sub...

Maximum length of the textual representation of an IPv6 address?

I want to store the data returned by $_SERVER["REMOTE_ADDR"] in PHP into a DB field, pretty simple task, really. The problem is that I can't find any proper information about the maximum length of the textual representation of an IPv6 address, which is what a webserver provides through $_SERVER["REMOTE_ADDR"]. I'm not interested in con...

IPv6 and ports

How do ports (or their functional equivalent) work with IPv6? Thanks! The Wikipedia article points out that the syntax of an IPv6 address includes colons and has a short form preventing fixed-length parsing, and therefore you have to delimit the address portion with []. This completely accounts for the odd parsing errors. ...

What benefits/impact will IPv6 have on application development & design?

There has been a lot of press about IPv6 and the impending switch over to IPv6 from IPv4. I have some understanding of IPv6, but I've often wondered how much impact IPv6 has on application development & design (specifically)? Are there some tangible/well known benefits IPv6 provides which we don't already have today? I know Windows Vi...

Extract ipv6 prefix in python

Given either the binary or string representation of an IPv6 address and its prefix length, what's the best way to extract the prefix in Python? Is there a library that would do this for me, or would I have to: convert the address from string to an int (inet_ntop) Mask out the prefix Convert prefix back to binary Convert binary to str...

IPv6 decoder for pcapy/impacket

I use the pcapy/impacket library to decode network packets in Python. It has an IP decoder which knows about the syntax of IPv4 packets but apparently no IPv6 decoder. Does anyone get one? In a private correspondance, the Impacket maintainers say it may be better to start with Scapy ...

Using the name resolver of resolv.h with IPv6

I write or modify programs which perform name resolution and need a good control of the process. So I do not use getaddrinfo(), I go deeper and use res_query() / res_send() / etc in resolv.h, documented in resolver(3). Although not documented, the common way to set the resolver used is to update _res.nsaddr_list. But this array, define...

Is there a way for non-root processes to bind to "privileged" ports (<1024) on Linux?

It's very annoying to have this limitation on my development box, when there won't ever be any users other than me. I'm aware of the standard workarounds, but none of them do exactly what I want: authbind (The version in Debian testing, 1.0, only supports IPv4) Using the iptables REDIRECT target to redirect a low port to a high port (...

Why does gethostbyaddr(gethostname()) return my IPv6 IP?

I'm working on making a simple server application with python, and I'm trying to get the IP to bind the listening socket to. An example I looked at uses this: HOST = gethostbyaddr(gethostname()) With a little more processing after this, it should give me just the host IP as a string. This should return the IPv4 address. But when I ru...

How to store IPv6-compatible address in a relational database

How do I do that? Right now IPv6 will not be used, but I need to design the application in such a way as to make it IPv6-ready. It is necessary to store IP addresses and CIDR blocks (also BGP NLRI, but this is another story...) in a mysql database. I've alway used an INT for IPv4 + a TINYINT for masklen, but IPv6 is 128 bit. What kind o...

Working with IPv6 Addresses in PHP

After searching around somewhat thoroughly, I noticed a slight lack of functions in PHP for handling IPv6. For my own personal satisfaction I created a few functions to help the transition. The IPv6ToLong() function is a temporary solution to that brought up here: How to store IPv6-compatible address in a relational database. It will sp...

libnet that properly calculates checksum on IPV6

I have recently started playing around with libnet and using it to generate IPV6 packets. I am very new at programming, however, I am quite happy with the library. I have one problem with it though. It seems that libnet currently does not have the ability to properly calculate checksums on IPV6 packets. Being so new to programming,...

At what point should I support IPV6 in my php scripts?

I've got quite a bit of PHP code laying around and am wondering at what point should I start upgrading the scripts to support IPV6. I know IPV6 has been on the 'list of things to do' for a long, long time but really have never seen a clear transition path on when I need to start supporting it. G-Man ...

What is the best way to implement longest-prefix matching for ipv6?

An ipv6 router stores a number of routes as the first n bits of the address. In 2000, researchers found only 14 distinct prefix lengths in 1500 ipv6 routes. Incoming packets are routed to different outgoing ports based on the longest prefix match, so if the first 8 bits of packet x match an 8 bit route but the first 48 bits of the same p...

Need IPv6 Traffic Generator.

I am looking for the tool to generator IPv6 Traffic. It should allow me to give all its header value manually by me. It would be great if source code is available. Thanks in Advance. ...

Python: Getting an IPv6 socket to receive packets destined for the Subnet-Routers Anycast address

How do you get a socket to receive packets destined for the IPv6 Subnet-Routers Anycast address? I haven't been able to find any informationn on how to do this. In a fit of desparation, I've tried using socket.setsockopt as you would to join a multicast group: # 7 is the interface number s = socket(AF_INET6, SOCK_DGRAM) packed_iface_...

Transparent Proxy for IPv6 traffic under Linux

When maintaining networks, it is often an expedient thing to do to run a transparent proxy. By transparent proxy I mean a proxy that 'hijacks' outgoing connections and runs them through a local service. Specifically I run a linux firewall with squid configured so that all tcp/ip connections fowarded on port 80 are proxied by squid. This...

How to make Teredo hosts within a subnet talk to each other

While I can successfully ping a global address from my teredo-enabled end-host, I'm unable to connect two end-host within the same ipv4 subnet. We are running windows XP. Any thoughts? ...

Formatting IPv6 as an int in C# and storing it in SQL Server

Under IPv4 I have been parsing the string representation of IP addresses to Int32's and storing them as int's in SQL Server. Now with IPv6 I'm trying to find out if there's a standard or accepted way to parse the string representation of IPv6 to two Int64's using C#? Also how are people storing those values in SQL Server? As 2 fields of...

IPv6 address ranges

Following on from this post I am interested in searching IPv6 address ranges. Under IPv4 I would be able to determine the start and end IP addresses provided by an ISP and using those integer values as range bounds quickly search a DataBase to see if any entries in the DB fell into that range. How will this be impacted by IPv6? Will IS...