Click here to close now.

Welcome!

Linux Authors: Elizabeth White, Esmeralda Swartz, Carmen Gonzalez, Jason Bloomberg, Lori MacVittie

Related Topics: Linux

Linux: Article

Stateless Network Auto Configuration With IPv6

A plug-and-play network connection

IPv6 can be used to automatically connect a host to a network using stateless auto-configuration, doing away with the need for any IP addressing support like a DHCP server.

In an IPv6 network, the IPv6 protocol includes information that can directly configure a host. With IPv4 you either have to manually configure each host or rely on a DHCP server to provide configuration information. With IPv6, configuration information is integrated into the Internet protocol directly. IPv6 autoconfiguration capabilities are known as stateless, meaning that it can directly configure a host without the recourse to an external server. Alternatively, DHCP is stateful, where the host relies on an external DHCP server to provide configuration information. Stateless autoconfiguration has the advantage of hosts not having to rely on a DHCP server to maintain connections to a network. Networks could even become mobile, hooking into one subnet or another, automatically generating addresses as needed. Hosts are no longer tied to a particular DHCP server. Many ISPs still use the IPv4 protocol and to use IPv6 with these networks requires special services such as 4to6. This is beyond the scope of this article.

IPv6 Addressing
IPv6 introduces major changes into the format and method of addressing systems under the Internet Protocol. There are several different kinds of addressing with different fields for the network segment. The host segment has been expanded to a 64-bit address, allowing direct addressing for a far larger number of systems. Each address begins with a type field specifying the kind of address, which will then determine how its network segment is organized. These changes are designed not only to expand the address space but to also provide greater control over transmissions at the address level.

An IPv6 address consists of 128 bits, up from the 32 bits used in IPv4 addresses. The first 64 bits are used for network addressing, of which the first few bits are reserved for indicating the address type. The last 64 bits are used for the interface address, known as the interface identifier field. An IPv6 address is written as eight segments representing 16 bits each (128 bits total). To more easily represent 16-bit binary numbers, hexadecimal numbers are used.

In IPv6, addressing is controlled by the format prefix in the network part of the address that operates as a kind of address type. The format prefix is the first field of the IP address. The three kinds of single destination network addresses are global, link-local, and site-local. Global addresses can be sent across the Internet and have a format prefix that begins with 3. Link-local addresses are used for physically connected systems on a local network and use the format prefix FE80. Site-local can be used for any hosts on a private network and use the format prefix FEC0. Site-local addresses operate similar to IPv4 private addresses.

In the following example the first four segments represent the network part of the IPv6 site-local address, and the following four segments represent the interface (host) address:

FEC0:0000:0000:0000:0008:0800:200C:417A

Segments with all zeros can be reduced to a single zero.

FEC0:0:0:0:8:800:200C:417A

Sequences of zeros can use a shorthand symbol consisting of a double colon (::).

FEC0::8:800:200C:417A

The identifier part of the IPv6 address takes up the second 64 bits, consisting of four segments containing four hexadecimal numbers. This is the address used to identify the host. The interface ID is a 64-bit (four-segment) Extended Unique Identifier (EUI-64) generated from a network device's Media Access Control (MAC) address. There are security concerns that the identifier based directly on a constant MAC address could be used to track a host. As an alternative, a method of generating randomized and temporary identifiers has been proposed.

Generating the Link-Local Address for Local Networks
To auto-configure hosts on a local network, IPv6 makes use of each network device's hardware MAC address. This address is used to generate a temporary address with which the host can be queried and configured. Be sure that IPv6 addressing is first enabled on your host's network device. This is an option in the device's General panel in the system-config-network on Fedora Core 4.

The MAC address is used to create a link-local address, one with a link-local prefix, FE80::0, followed by an interface identifier. The link-local prefix is used for physically connected hosts such as those on a small local network.

A uniqueness test is then performed on the generated address. Using the Neighbor Discovery Protocol (NDP), other hosts on the network are checked to see if another host is already using the generated link-local address. If no other host is using the address, the address is assigned for that local network. At this point the host has only a local address that's valid within the local physical network. Link-local addresses cannot be routed to a larger network.

Generating the Full Address: Router Advertisements
Once the link-local address has been determined, the router for the network is then queried for additional configuration information. In the case of stateless addresses, the router provides the network address, such as the network's Internet address. This address is then added to the local address, replacing the original link-local prefix, giving either a complete global Internet address or, in the case of private networks, site-local addresses. Routers will routinely advertise this address information, though it can also be specifically requested. The NDP protocol is used to query and send the information using ICMPv6 packets. Before the address is officially assigned, a duplicate address detection procedure checks to see if the address is already in use. The process depends on the router's providing the appropriate addressing information in the form of router advertisements.

Figure 1 shows a network that is configured with stateless address autoconfiguration. First, each host determines its interface identifier using its own MAC hardware address. This is used to create a temporary link-local address for each host using the FE08::0 prefix. This allows initial communication with the network's router. The router then uses its network prefix to create full Internet addresses, replacing the link-local prefix.

Addressing for Private Networks
In a private network, your router would use a site-local address for the network prefix, such as FEC0::0. This network prefix would then be combined with the host's identifier to generate a full IPv6 private address (see Figure 2). In a private network, the address of the first host as shown in Figure 2 is:

FEC0:0:0:0:FEDC:BA98:7654:3210

Router Renumbering
With IPv6, routers have the ability to renumber the addresses on their networks by changing the network prefix. Renumbering is carried out through the Router Renumbering Protocol, RR. Renumbering is often used when a network changes ISP providers, requiring that the network address for all hosts be changed (see Figure 3). It can also be used for mobile networks where a network can be plugged into different larger networks, renumbering each time.

With renumbering, routers place a time limit on addresses, similar to the lease time in DHCP, by specifying an expiration limit for the network prefix when the address is generated. To ease transition, interfaces still keep their old addresses as deprecated addresses, while the new ones are first being used. The new ones will be the preferred addresses used for any new connections while deprecated ones are used for older connections. In effect a host could have two addresses, one deprecated and one preferred. This regeneration of addresses effectively renumbers the hosts.

Linux As a IPv6 router: radvd
A Linux system that operates as a router uses the radvd Router Advertisement Daemon to advertise addresses, specifying a network prefix in the /etc/radvd.conf file. The radvd daemon will detect router network address requests from hosts, known as router solicitations, and provide them with a network address using a router advertisement. These router advertisements will also be broadcast to provide the network address to those hosts that do not send in requests. For radvd to work you will have to turn on IPv6 forwarding. Use sysctl and set net.ipv6.conf.all.forwarding to 1. To start up the radvd daemon, use the radvd start-up script. To check the router addresses radvd is sending, you can use radvdump.

You will have to configure the radvd daemon yourself, specifying the network address to broadcast. Configuration though is very simple as the full address will be automatically generated using the host's hardware address. A configuration consists of interface entries that in turn list interface options, prefix definitions and options, along with router definitions if needed. The configuration is placed in the /etc/radvd.conf file, which would look something like this:


interface eth0 {
AdvSendAdvert on;
prefix fec0:0:0:0::/64
{
AdvOnLink on;
AdvAutonomous on;
};
};
This assumes one interface is used for the local network, eth0. This interface configuration lists an interface option (AdvSendAdvert) and a prefix definition along with two prefix options (AdvOnLink and AdvAutonomous). To specify prefix options for a specific prefix, add them within parentheses following the prefix definition. The prefix definition specifies your IPv6 network address. If a local area network has its own network address, you will need to provide its IPv6 network prefix address. For a private network, like a home network, you can use the silte-local IPv6 prefix that operates like the IPv4 private network addresses, 192.168.0. The above example uses a site-local address that is used for private IPv6 networks, fec0:0:0:0::, which has a length of 64 bits.

The AdvSendAdvert interface option turns on network address advertising to the hosts. The AdvAutonomous network prefix option provides automatic address configuration, and AdvOnLink simply means that host requests can be received on the specified network interface.

A second network interface is then used to connect the Linux system to an ISP or larger network. If the ISP supports IPv6, this is simply a matter of sending a router solicitation to the ISP router. This would automatically generate your Internet address using the hardware address of the network interface used to connect to the Internet and the ISP router's advertised network address. In Figure 2, a local network, eth0 network interface, connects to the local network, whereas eth1 connects to the Internet.

Conclusion
Stateless IPv6 autoconfiguration requires no independent server or source to connect to a network. It is a direct plug-and-play operation, where the hardware network interfaces and routers can directly determine the correct addresses. DCHP, currently in wide use, is an older method that requires a separate server to manage and assign all addresses. Should the DHCP server ever fail, hosts could not connect. With the IPv6 protocol in place, your address is automatically generated using your network hardware MAC interface and the ISP router's network address. Home networks can use the same structure to automatically connect any network device to your router. No local DHCP server has to be maintained. To use a Linux system as an IPv6 router, you configure and run the radvd daemon. This daemon uses a very simple configuration to automatically configure the IPv6 network addresses for your local hosts.

References

More Stories By Richard Petersen

Richard Petersen holds a M.L.I.S. in Library and Information Studies. He
currently teaches Unix and C/C++ courses at the University of California, Berkeley.

Comments (3) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Ned 09/06/07 12:08:53 PM EDT

Your stupid popup ads render your site worthless; I will not come back.

news desk 12/27/05 11:11:19 PM EST

IPv6 can be used to automatically connect a host to a network using stateless auto-configuration, doing away with the need for any IP addressing support like a DHCP server. In an IPv6 network, the IPv6 protocol includes information that can directly configure a host.

news desk 12/27/05 10:58:59 PM EST

IPv6 can be used to automatically connect a host to a network using stateless auto-configuration, doing away with the need for any IP addressing support like a DHCP server. In an IPv6 network, the IPv6 protocol includes information that can directly configure a host.

@ThingsExpo Stories
The WebRTC Summit 2015 New York, to be held June 9-11, 2015, at the Javits Center in New York, NY, announces that its Call for Papers is open. Topics include all aspects of improving IT delivery by eliminating waste through automated business models leveraging cloud technologies. WebRTC Summit is co-located with 16th International Cloud Expo, @ThingsExpo, Big Data Expo, and DevOps Summit.
SYS-CON Events announced today that Litmus Automation will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Litmus Automation’s vision is to provide a solution for companies that are in a rush to embrace the disruptive Internet of Things technology and leverage it for real business challenges. Litmus Automation simplifies the complexity of connected devices applications with Loop, a secure and scalable cloud platform.
SOA Software has changed its name to Akana. With roots in Web Services and SOA Governance, Akana has established itself as a leader in API Management and is expanding into cloud integration as an alternative to the traditional heavyweight enterprise service bus (ESB). The company recently announced that it achieved more than 90% year-over-year growth. As Akana, the company now addresses the evolution and diversification of SOA, unifying security, management, and DevOps across SOA, APIs, microservices, and more.
Wearable technology was dominant at this year’s International Consumer Electronics Show (CES) , and MWC was no exception to this trend. New versions of favorites, such as the Samsung Gear (three new products were released: the Gear 2, the Gear 2 Neo and the Gear Fit), shared the limelight with new wearables like Pebble Time Steel (the new premium version of the company’s previously released smartwatch) and the LG Watch Urbane. The most dramatic difference at MWC was an emphasis on presenting wearables as fashion accessories and moving away from the original clunky technology associated with t...
SYS-CON Events announced today that robomq.io will exhibit at SYS-CON's @ThingsExpo, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. robomq.io is an interoperable and composable platform that connects any device to any application. It helps systems integrators and the solution providers build new and innovative products and service for industries requiring monitoring or intelligence from devices and sensors.
Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, will discuss how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at the same time reduce Time to Market (TTM) by using plug and play capabilities offered by a robust I...
After making a doctor’s appointment via your mobile device, you receive a calendar invite. The day of your appointment, you get a reminder with the doctor’s location and contact information. As you enter the doctor’s exam room, the medical team is equipped with the latest tablet containing your medical history – he or she makes real time updates to your medical file. At the end of your visit, you receive an electronic prescription to your preferred pharmacy and can schedule your next appointment.
SYS-CON Events announced today that Solgenia will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY, and the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Solgenia is the global market leader in Cloud Collaboration and Cloud Infrastructure software solutions. Designed to “Bridge the Gap” between Personal and Professional Social, Mobile and Cloud user experiences, our solutions help large and medium-sized organizations dr...
While not quite mainstream yet, WebRTC is starting to gain ground with Carriers, Enterprises and Independent Software Vendors (ISV’s) alike. WebRTC makes it easy for developers to add audio and video communications into their applications by using Web browsers as their platform. But like any market, every customer engagement has unique requirements, as well as constraints. And of course, one size does not fit all. In her session at WebRTC Summit, Dr. Natasha Tamaskar, Vice President, Head of Cloud and Mobile Strategy at GENBAND, will explore what is needed to take a real time communications ...
The world's leading Cloud event, Cloud Expo has launched Microservices Journal on the SYS-CON.com portal, featuring over 19,000 original articles, news stories, features, and blog entries. DevOps Journal is focused on this critical enterprise IT topic in the world of cloud computing. Microservices Journal offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. Follow new article posts on Twitter at @MicroservicesE
SYS-CON Events announced today the IoT Bootcamp – Jumpstart Your IoT Strategy, being held June 9–10, 2015, in conjunction with 16th Cloud Expo and Internet of @ThingsExpo at the Javits Center in New York City. This is your chance to jumpstart your IoT strategy. Combined with real-world scenarios and use cases, the IoT Bootcamp is not just based on presentations but includes hands-on demos and walkthroughs. We will introduce you to a variety of Do-It-Yourself IoT platforms including Arduino, Raspberry Pi, BeagleBone, Spark and Intel Edison. You will also get an overview of cloud technologies s...
Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities. Accordingly, attendees at the upcoming 16th Cloud Expo at the Javits Center in New York June 9-11 will find fresh new content in a new track called PaaS | Containers & Microservices Containers are not being considered for the first time by the cloud community, but a current era of re-consideration has pushed them to the top of the cloud agenda. With the launch of Docker's initial release in March of 2013, interest was revved up several notches. Then late last...
The list of ‘new paradigm’ technologies that now surrounds us appears to be at an all time high. From cloud computing and Big Data analytics to Bring Your Own Device (BYOD) and the Internet of Things (IoT), today we have to deal with what the industry likes to call ‘paradigm shifts’ at every level of IT. This is disruption; of course, we understand that – change is almost always disruptive.
SYS-CON Events announced today that SafeLogic has been named “Bag Sponsor” of SYS-CON's 16th International Cloud Expo® New York, which will take place June 9-11, 2015, at the Javits Center in New York City, NY. SafeLogic provides security products for applications in mobile and server/appliance environments. SafeLogic’s flagship product CryptoComply is a FIPS 140-2 validated cryptographic engine designed to secure data on servers, workstations, appliances, mobile devices, and in the Cloud.
GENBAND has announced that SageNet is leveraging the Nuvia platform to deliver Unified Communications as a Service (UCaaS) to its large base of retail and enterprise customers. Nuvia’s cloud-based solution provides SageNet’s customers with a full suite of business communications and collaboration tools. Two large national SageNet retail customers have recently signed up to deploy the Nuvia platform and the company will continue to sell the service to new and existing customers. Nuvia’s capabilities include HD voice, video, multimedia messaging, mobility, conferencing, Web collaboration, deskt...
SYS-CON Media announced today that @WebRTCSummit Blog, the largest WebRTC resource in the world, has been launched. @WebRTCSummit Blog offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. @WebRTCSummit Blog can be bookmarked ▸ Here @WebRTCSummit conference site can be bookmarked ▸ Here
SYS-CON Events announced today that Cisco, the worldwide leader in IT that transforms how people connect, communicate and collaborate, has been named “Gold Sponsor” of SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Cisco makes amazing things happen by connecting the unconnected. Cisco has shaped the future of the Internet by becoming the worldwide leader in transforming how people connect, communicate and collaborate. Cisco and our partners are building the platform for the Internet of Everything by connecting the...
Temasys has announced senior management additions to its team. Joining are David Holloway as Vice President of Commercial and Nadine Yap as Vice President of Product. Over the past 12 months Temasys has doubled in size as it adds new customers and expands the development of its Skylink platform. Skylink leads the charge to move WebRTC, traditionally seen as a desktop, browser based technology, to become a ubiquitous web communications technology on web and mobile, as well as Internet of Things compatible devices.
Docker is an excellent platform for organizations interested in running microservices. It offers portability and consistency between development and production environments, quick provisioning times, and a simple way to isolate services. In his session at DevOps Summit at 16th Cloud Expo, Shannon Williams, co-founder of Rancher Labs, will walk through these and other benefits of using Docker to run microservices, and provide an overview of RancherOS, a minimalist distribution of Linux designed expressly to run Docker. He will also discuss Rancher, an orchestration and service discovery platf...
SYS-CON Events announced today that Vitria Technology, Inc. will exhibit at SYS-CON’s @ThingsExpo, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Vitria will showcase the company’s new IoT Analytics Platform through live demonstrations at booth #330. Vitria’s IoT Analytics Platform, fully integrated and powered by an operational intelligence engine, enables customers to rapidly build and operationalize advanced analytics to deliver timely business outcomes for use cases across the industrial, enterprise, and consumer segments.