Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How do I add an additional IPv6 address to /etc/network/interfaces?

this question How do I add an additional IP address to /etc/network/interfaces? mostly asks what i want except that i want to add more IPv6 addresses in the same interface eth0 without incrementing to eth0.1 and so on. the ifconfig command does IPv6 like ifconfig eth0 add ... so ... how can i add more IPv6 addresses to eth0 ?

Community's user avatar

  • it would be nice if there was a practical way to do a whole /64 –  Skaperen May 1, 2015 at 13:22
  • You can find some information about using a full /64 block on a single host here: serverfault.com/questions/590038/… –  kasperd May 3, 2015 at 15:04

4 Answers 4

It would appear (tested with ifupdown version 0.7.53.1) that we can add several iface eth0 inet6 stanzas to the interfaces file, which is more declarative than the accepted answer. The following code instructs the ifupdown suite to use stateless autoconfiguration and two additional static IPv6 addresses for the eth0 network interface:

Witiko's user avatar

  • 5 This is the "proper" answer - for IPv6 and IPv4! –  Michael Hampton Jul 7, 2016 at 20:50
  • in my case your answer did not work, but the approved one above did work. I am not sure why it might since it is a virtual machine (xen)? –  Sverre Feb 1, 2018 at 13:43
  • It would be useful to know what version of ifupdown you use. Can you look into the manpage of ifconfig? –  Witiko Feb 1, 2018 at 14:31
  • 1 While this works, it may not do what you want with respect to private addressing and router advertisements. See salsa.debian.org/debian/ifupdown/blob/master/inet6.defn for what actually happens. It seems like the order matters here for each of the inet6 statements. It may make sense to have a single auto declaration and then use post-up to add the addresses via ip -6 add and pre-down to remove it. –  AngerClown Jan 14, 2020 at 2:26
  • 2 Props for the dead:beef and c0de:d00d . –  Markus Zeller Aug 25, 2021 at 7:38

In the question you reference, the second answer shows the equivalent solution for IPv4. In the case of IPv6, the /etc/network/interfaces file should contain something like this:

You will need the iproute2 package installed, but you should use ip instead of ifconfig anyway.

For adding a whole /64 to an interface: There are some Q&As in serverfault.se , like " Adding a whole IPv6 /64 block to an network interface on debian " or " Can I bind a (large) block of addresses to an interface? ". Maybe they can help you.

Dubu's user avatar

  • that local block route feature works so all i need to do now is get that added so it puts it back on reboot –  Skaperen May 6, 2015 at 9:25

Here is what I did for multiple v6 addresses in interfaces file. First thing to consider is there cannot be two gateways, so you add a route below the second address.

UndyingThanos's user avatar

I was puzzled, too. But you can just give as many address lines you like. And it works.

Apply without interruption with:

You can also remove addresses this way. No need for ifdown .

You can even use IPv4 addresses to improve readability. For example on ProxMox I map the IPv6 of a VM based on the internal IPv4 of the VM, which gives addresses like:

fd01:7e57::192.168.0.1/64 provided your IPv6 prefix is /64 .

fd12:3456:789a in the example above is from the private IPv6 area fd00::/8 , which is similar to a private net on IPv4 like 10.0.0.0/8 . Replace 12:3456:789a with 40 random bits. This leaves 16 bits for subnets to form a /64 (in IPv6, networks cannot go beyond /64 , so this should always be the biggest address mask you can see on properly IPv6 enabled networks).

RIPE even writes:

Assigning prefixes longer than /56 is strongly discouraged, so your choices are: If you want a simple addressing plan use a /48 for each end-user
  • "Official" (static) allocations from your ISP should give you a /48.
  • Dynamic allocations (from the ISP to your router), usually give you a /56.
  • And internally on our network, you use a /64, so you can split up the /56 into 256 distinct networks for your own needs.

If you see a /64 on your router this does not mean, your ISP is nuts. Many routers default to /64 if not configured otherwise. Usually all ISPs allow routers to request a /56.

So on the other side (Server) you can safely assume, that all IPs which use the same prefix according to /56 come from the same network.

Tino's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking server ethernet ipv6 ..

  • The Overflow Blog
  • Tomasz Tunguz: From Java engineer to investor in eight unicorns
  • Featured on Meta
  • Update: New Colors Launched
  • Incident update and uptime reporting
  • Ubuntu 23.10 is now on-topic!
  • AI-generated content is not permitted on Ask Ubuntu

Hot Network Questions

  • How concerning is this water in my bathroom?
  • How easy would it be to distinguish between Hamas fighters and non combatants?
  • Amount of fresh rosemary
  • Tutoring Unfamiliar Material
  • Ethical question about preauthorizing hotel charges
  • Does this newly proposed French bill violate or go against the principles of international human right of free speech?
  • Paradox about white dwarfs and ionization
  • Why are mixed declarations more challenging to implement than forcing all declarations to be at the top of a scope?
  • Was Tolkien familiar with Lovecraft's work?
  • DC motor with potentiometer operation
  • What are the practical differences between Avis and Budget?
  • 1 to 10 vs 1 through 10 - How to include the end values
  • Necessity of army and navy in a space warfare setting
  • Staff text positioning
  • Is the term "Hobbit Village" ever used canonically by Tolkien?
  • aaabbabbc⠀⠀⠀⠀⠀⠀
  • Cause-effect definition of fictitious forces
  • Why do the bootprints on the moon appear bright in some photographs or film?
  • kOay kOay kOay!
  • Formatting string with QGIS Expression builder: separate groups of fours digits with hyphens
  • Why have consumer-level graphing calculators seemingly not developed in 20+ years?
  • Why does echo !() print the contents of the current directory?
  • I put a 700 x 35c inner tube in my 700 x 38c tyre. Is my tyre in risk for a flat?
  • What's the difference between "might..." and "might potentially... "?

how to add ipv6 address using ifconfig

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

Select Your Language

Infrastructure and management.

  • Red Hat Enterprise Linux
  • Red Hat Satellite
  • Red Hat Subscription Management
  • Red Hat Insights
  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift
  • Red Hat OpenStack Platform
  • Red Hat OpenShift Container Platform
  • Red Hat OpenShift Data Science
  • Red Hat OpenShift Dedicated
  • Red Hat Advanced Cluster Security for Kubernetes
  • Red Hat Advanced Cluster Management for Kubernetes
  • Red Hat Quay
  • OpenShift Dev Spaces
  • Red Hat OpenShift Service on AWS
  • Red Hat Gluster Storage
  • Red Hat Hyperconverged Infrastructure
  • Red Hat Ceph Storage
  • Red Hat OpenShift Data Foundation
  • Red Hat Runtimes
  • Red Hat JBoss Enterprise Application Platform
  • Red Hat Data Grid
  • Red Hat JBoss Web Server
  • Red Hat Single Sign On
  • Red Hat support for Spring Boot
  • Red Hat build of Node.js
  • Red Hat build of Quarkus

Integration and Automation

  • Red Hat Application Foundations
  • Red Hat Fuse
  • Red Hat AMQ
  • Red Hat 3scale API Management
  • How do I configure a network interface for IPv6?

Environment

  • Red Hat Enterprise Linux 6
  • How do I configure IPv6 IP addressing?
  • How do I do basic IPv6 setup?

You can configure an IPv6 interface with the /etc/sysconfig/network-scripts/ifcfg-* files just like IPv4 addresses.

The following parameter is needed when configuring IPv6:

You can add an IPv6 address with:

  • The prefix is optional.

You can add the IPv6 gateway with:

Or if you want to specify the gateway interfaces as well, you can add it:

You add a DNS server like normal:

Further reading

These options are described in /usr/share/doc/initscripts-*/sysconfig.txt , you can search for "IPV6" to see the relevant options.

We can not set the link local address of IPv6 manually.

Diagnostic Steps

  • Example of ipv6 working with ipv4 in Red Hat Enterprise Linux 7 with NetworkManager.
  • initscripts

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

You need at least this in ifcfg-* for ipv6 config to happen: IPV6INIT=yes

For networks which uses Router Advertisements to set the IPv6 router/gateway RHEL presents a challenge if you want to configure a static IPv6 address and not having the autoconfigured IPv6 address available.

The IPV6_AUTOCONF config variable controls whether any Router Advertisements should be received, as a side effect this also disables the autoconfigured IPv6 address as the autoconfig process is based on the advertised network prefix.

IMHO, IPV6_AUTOCONF should really control the autoconf sysctl interface attribute instead of the current accept_ra attribute, and a properly named knob should be introduced to control the accept_ra attribute.

As a workaround, we added the following script as ifup-pre-local (which is run by the ifup script) to disable the autoconf attribute when a network device is configured (script revised to cater for virtual devices like bond0 etc):

This issue seems to still crop up (CentOS 7.6). It appears the cloudinit 18.2-1 is turning off autoconf via IPV6_AUTOCONF=no in it's sysconfig settings and breaking IPv6 RA.

Whether or not this particular configuration is a bug, cloud-init is triggering it by disabling AUTOCONF. I reported it to CentOS, https://bugs.centos.org/view.php?id=15833

Looks like IPV6_DEFAULTGW does not work in CIDR notation.

There is no documented option in this above case to autoconfigure DNS.

Is the solution applicable to Red Hat Enterprise Linux 8?

Formatting Tips

Here are the common uses of Markdown.

Request Japanese Translation

Generating machine translation.

Use IPv6 addresses

About this task.

IP addresses can have either a dotted quad notation (IPv4) or IP Next Generation (IPv6) format. You can use IPv6 addresses if you define the parameter LSF_ENABLE_SUPPORT_IPV6 in lsf.conf ; you do not have to map IPv4 addresses to an IPv6 format.

For the list of platforms on which LSF supports IPv6 addresses, see the Release Notes for IBM® Spectrum LSF for this version.

Enable both IPv4 and IPv6 support

Configure hosts for ipv6.

Follow the steps in this procedure if you do not have an IPv6-enabled DNS server or an IPv6-enabled router. IPv6 is supported on some linux2.4 kernels and on all linux2.6 kernels.

  • Check that the entry /proc/net/if_inet6 exists.
  • If it does not exist, as root run: modprobe ipv6
  • To check that the module loaded correctly, execute the command lsmod | grep -w ’ipv6’
  • Add an IPv6 address to the host by executing the following command as root: /sbin/ifconfig eth0 inet6 add 3ffe:ffff:0:f101::2/64
  • Display the IPv6 address using ifconfig .
  • Repeat all steps for other hosts in the cluster.

For IPv6 networking, hosts must be on the same subnet.

  • Test IPv6 communication between hosts using the command ping6 .
  • Articles Automation Career Cloud Containers Kubernetes Linux Programming Security

Configuring an IPv6 address in Red Hat Enterprise Linux 7 and 8

%t min read | by Valentin Bajrami (Sudoer alumni)

Configuring an IPv6 Address in RHEL 7 and 8

As I mentioned in What you need to know about IPv6 , different methods exist to configure an IPv6 address on a machine. We will mainly focus on configuring an IPv6 address on a Red Hat Enterprise Linux (RHEL) 7 and 8 systems and briefly explain different assignment methods.

[Want to try out Red Hat Enterprise Linux?  Download  it now for free.]

Configuring IPv6 on RHEL 7 and 8

A Red Hat Enterprise Linux system is configured to obtain an IPv6 address automatically. These are the lines in the configuration file where the magic happens (I am adding some explanation to each line):

For more information on what those connection settings do, run:

Stateless address autoconfiguration (SLAAC)

If the IPV6_AUTOCONF variable is set to yes , then the SLAAC method is used to configure the host’s IPv6 address by using the Neighbor Discovery Protocol (NDP) . The technique applied here is the one explained in the previous article’s Multicast section, where there is an exchange of client solicitation and router advertisement ICMPv6 messages.

We use the term stateless because there is no service to keep track of what IPv6 addresses have been assigned to clients. Rather, the IPv6 address is composed with a technique called the Extended Unique Identifier (EUI-64) where 16 bits are added to the Media Access Control (MAC) address (which has 48 bits), thus creating a globally unique IPv6 address.

To use DHCPv6, the following should appear within the configuration file:

If the DHCPv6 variable is set to yes , then a client obtains an IP address from the DHCPv6 pool. The DHCPv6 service then keeps track of what IPv6 addresses are assigned to what clients. Among the IP address, other information like DNS servers, lease time, hostnames, and other attributes are pushed to the client. An administrator must configure the IPv6 address pool to be able to serve clients.

It is also possible (but not recommended) to configure an IPv6 address manually. Manual configuration requires a lot of effort, is error-prone, and it’s hard to keep track of what IPv6 addresses are assigned to what clients. On a large network, a DHCPv6 server is preferable for performing this task.

To configure IPv6 on Red Hat Enterprise Linux 7 and 8 manually, your version of the following needs to added to the configuration file:

Or, you can manually configure through NetworkManager:

Testing IPv6 connectivity

To test IPv6 connectivity, we can run a ping6 on www.redhat.com :

While the ping was running, I ran Wireshark in the background to see what’s happening under the hood. Here is the ICMPv6 request packet (sent by me) and the ICMPv6 reply packet I received back.

ICMPv6 request

Icmpv6 reply.

Note that many organizations choose to block ping requests for security reasons, so it’s generally a good idea to try pinging several sites when testing your connectivity.

Ethernet cables

Valentin Bajrami

Valentin is a system engineer with more than six years of experience in networking, storage, high-performing clusters, and automation. He is involved in different open source projects like bash, Fedora, Ceph, FreeBSD and is a member of Red Hat Accelerators. More about me

Try Red Hat Enterprise Linux

Download it at no charge from the red hat developer program., related content.

A blue cable plugged into a green Raspberry Pi

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How do I assign IPv6 addresses manually?

So I'm still rather clueless with IPv6, but I wanted to try something with my network today. Currently, I assign IPv4 LAN addresses manually, so that my router is 192.168.0.1 , then my first computer is 192.168.0.2 , and so on.

So far, I haven't been able to figure out how to do this with IPv6. Or is the process completely different that this is not how it would work?

Router is an Archer C4000, and my main system runs Ubuntu 19.04

EDIT: To clarify with how I manually set network IP addresses, my router has a page where I can set an address of my choosing to a MAC address. No configuration is done outside of the router.

hiigaran's user avatar

  • Please edit question and indicate how you assign LAN addesses manually. (On the router only? On your first computer as well?) I suspect you just set a network range on the router, and then addresses are not assigned "manually", but by DHCP from the router. On IPv6 then your router needs to advertise a subnet. On Ubuntu, you can set both IPv4 and IPv6 address manually with ip addr add ... . –  dirkt Sep 10, 2019 at 11:22
  • Edited. I'm going to guess then that it is assigned from a range, but then I limit what can be assigned based on MAC addresses. If I'm setting the IP address manually on each device, is there any further configuration that needs to be done (apart from avoiding duplicates), or will the router just accept that device A is going to use its own configured address? –  hiigaran Sep 10, 2019 at 12:00
  • If there's a page where you can assign an IPv4 address based on a MAC address, then this is for static addresses assigned via DHCP from the router. IPv6 works differently. While there is DHCPv6, the normal way is to use SLAAC , and let each computer pick an IPv6 address based on the announced subnet prefix.So this page won't help you to assign IPv6 addresses... –  dirkt Sep 10, 2019 at 12:05

2 Answers 2

To clarify with how I manually set network IP addresses, my router has a page where I can set an address of my choosing to a MAC address. No configuration is done outside of the router

This usually isn't called "manual configuration" to avoid confusion (from the LAN hosts' point of view, it is still automatic configuration). The usual terms are "static DHCP lease" or "DHCP reservation".

Overall, the process in IPv6 is usually completely different.

In IPv6 primary address auto-configuration mechanism (SLAAC) is completely stateless: the router does not issue individual addresses; it only periodically advertises the subnet address prefix and each host just combines it with its own chosen suffix. The router cannot limit hosts to just a specific sub-range; in fact the router does not receive any feedback about hosts' chosen address at all.

(Depending on each device's OS, the suffix might be a MAC address in traditional RFC4862 SLAAC; it might be a static hash value in RFC7217; it might be completely random in RFC4941 "Privacy Extensions"; and it might even be a user-provided value if the OS allows that.)

For example, the router advertises 2001:db8:123:456::/64 as the LAN address prefix; client A combines it with its own MAC address and begins using 2001:db8:123:456:6af2:68fe:ff7c:e25c .

That said, DHCP does exist in the IPv6 world and handles address leases in much the same way as IPv4 DHCP does. That means you can create DHCPv6 address pools, you can configure static address leases in DHCPv6, and so on. But not all clients support DHCPv6 at all (e.g. Android does not), so having SLAAC alongside is almost unavoidable.

So if you have a DHCPv6-capable client on a DHCPv6-capable network, chances are it'll have both a nice DHCPv6-assigned address and a longer SLAAC-autoconfigured address.

If I'm setting the IP address manually on each device, is there any further configuration that needs to be done (apart from avoiding duplicates), or will the router just accept that device A is going to use its own configured address?

As you can see above, that's how IPv6 address configuration works anyway .

u1686_grawity's user avatar

Your router's manual is found in User Guide and contains for IPv6 only an option for entering a static IPv6 address for the router itself (as received from the ISP).

The section about specifying the IP addresses that the router assigns by MAC address does not say whether they are IPv4 or IPv6, but I think it is highly unlikely that this will work for IPv6. And here is why.

IPv6 is quite unlike IPv4 in the sense that the long IPv6 address is made up of two parts. The first (the prefix) is assigned by the ISP. The second is assigned locally by the router or by each computer and is usually a random value based on the MAC address.

This means that the router does not control the IPv6 prefix which the ISP can change whenever it likes. You can force your computer to use a static IPv6 address, but only if it agrees with the ISP. You may be able to ask the ISP for a static IPv6 address, but that is a bad idea.

The reason it's a bad idea, is that all your devices are visible to the entire Internet by their IPv6 address (unless the router intervenes). Therefore having a fixed IPv6 address just makes tracking you that much easier.

If you wish, you would in Windows set a computer's static IPv6 inside Start > Network > Network and Sharing Center > Change Adapter Setting , right-click on the Ethernet connection IPv6 and choose Properties, right-click "Internet Protocol Version 6 (TCP/IPv6)" and click on Properties, the set "Use the following IPv6 address".

But the fact you can does not mean you should. The only place that static IPv6 addresses makes sense is inside a local network which is not connected to the Internet.

harrymc's user avatar

  • What about if I wanted to run a web server? I'm constantly traveling for work, and I would love to have access to one of the computers at home which runs 24/7. I'd need to set a static IPv6 for this to work, wouldn't I? –  hiigaran Sep 10, 2019 at 19:23
  • A general solution would require an IPv6 dynamic DNS provider. See for that the article dynv6.com: IPv6 dynamic DNS done right . –  harrymc Sep 10, 2019 at 19:29
  • @harrymc Help me understand your logic, why would a server in a data center have a static IP but a server at home a dynamic one? In what world does that make any sense? –  Chazy Chaz Jul 29, 2022 at 12:40
  • In a world where the ISP attributes to users dynamic IP addresses. –  harrymc Jul 29, 2022 at 12:51

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking router ipv6 ..

  • The Overflow Blog
  • Tomasz Tunguz: From Java engineer to investor in eight unicorns
  • Featured on Meta
  • Update: New Colors Launched
  • Incident update and uptime reporting

Hot Network Questions

  • Why did Linux standardise on RTS/CTS flow control for serial ports
  • Solid state drug addiction
  • Do software industry employeers care that you failed a subject or two in university?
  • Is "Aviate, Navigate, Communicate" legal in Part 121 operations?
  • How does one photograph a large painting in order to make prints?
  • kOay kOay kOay!
  • Take paired differences of pairs of rows
  • Which protocol to send the most possible data through satellite?
  • What is the origin of the default 256-color VGA palette?
  • How common is Imperfect Subjunctive in modern German?
  • How to remove a part of an ellipse?
  • Master's supervisor said he didn't post projects because he's not taking in any students but said I should apply anyway for PhD in his group?
  • Amount of fresh rosemary
  • Why is flow from a holding tank diminishing after a few seconds?
  • Tutoring Unfamiliar Material
  • How is “R v. Smith” pronounced?
  • Better solutions than joining table for Many to Many?
  • Ethical question about preauthorizing hotel charges
  • Can we partition the reciprocals of N so that each sum equals 1
  • What is the purpose of including (or excluding) the output resistor in the feedback loop of an op-amp buffer?
  • Why is 'H' the second most common byte in executables?
  • Why does echo !() print the contents of the current directory?
  • Dewpoint of water in relation to composition of atmosphere
  • Has Qatar ever been punished for supporting Hamas?

how to add ipv6 address using ifconfig

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to check IPv6 address via command line?

How do I check the IPv6 address via command line? For IPv4 I simply use:

curl ipinfo.io/ip

This doesn't work for IPv6.

  • command-line-interface

Zac67's user avatar

  • 7 Does wget -O - v6.ident.me 2>/dev/null && echo work? –  Arkadiusz Drabczyk Mar 17, 2020 at 2:59
  • 3 You do realise you don't mention an operating system in this question right? –  Chopper3 Feb 5, 2021 at 16:02
  • IPinfo.io does support IPv6, but via the v6 domain - eg. curl v6.ipinfo.ip/ip –  Ben Dowling Feb 7, 2022 at 20:53
  • In Feb 2023: Could not resolve host: v6.ipinfo.ip –  Danila Vershinin Feb 25 at 4:44
  • @DanilaVershinin: v6.ipinfo.ip has only a v6 address (necessarily) thus it will only resolve for a program that handles v6 (i.e. getaddrinfo) on a system which supports v6. What program(s) are you using, with what options, on what system(s), with what networking? –  dave_thompson_085 Mar 19 at 1:19

7 Answers 7

to show the localy listed ipv6 address one can use

This will show all locally configured ipv6 address including the link-local address. to show just global reachable addresses you can use

when you use a service like curl ipinfo.io/ip you are most often trying to work out the nat addresses you are using to reach the internet. Nat is much less common with IPv6 however there are many "whatsmyip" type service for ipv6 e.g.

with telnet

Even With ssh

I have seen this service over many other protocols as well so google and have fun ;)

balder's user avatar

Ipify has a ipv6 endpoint: curl https://api64.ipify.org

gte525u's user avatar

ipinfo.io/ip doesn't support IPv6. You may want to try:

Tomek's user avatar

  • 1 It does, but via the v6 subdomain (eg. curl v6.ipinfo.io) –  Ben Dowling Feb 7, 2022 at 20:52

The IP tools will show IPV6 addresses:

Davidw's user avatar

  • Thank, Which one to pick scope global or scope link ? –  Houman Dec 5, 2020 at 22:58
  • 2 Scope global is the rough equivalent of a public IP address in IPv4, while scope link is the rough equivalent of a private or APIPA address in IPv4. –  Davidw Dec 6, 2020 at 17:47

If you want to find the public IPv6 address you can do this with the dig command and then pipe the result into the sed command to remove the closing quotes.

Another alternative is using the curl command and pulling the IP address from a URL such as OpenDNS'.

To print only the value (the IP address) you can specify the -r parameter.

willowen100's user avatar

  • Are you sure this lookup works? –  Daniel K Feb 9, 2022 at 16:02
  • 1 @DanielK yes I've just tested it on a Fedora server. –  willowen100 Feb 10, 2022 at 19:34

ip.sb support both IPv4 and IPv6. To get IPv6 adress,use:

And, curl -4 ip.sb for IPv4 adress.

kyo's user avatar

Using curl vs ip is allowing me to check that this ip address is reachable from the web, when ip is only showing me the adress. Dig is not an available command on my machines.

user2922434's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged linux ip ipv6 command-line-interface ..

  • The Overflow Blog
  • Tomasz Tunguz: From Java engineer to investor in eight unicorns
  • Featured on Meta
  • Update: New Colors Launched
  • Incident update and uptime reporting

Hot Network Questions

  • What is the purpose of including (or excluding) the output resistor in the feedback loop of an op-amp buffer?
  • What allows Qatar to be in a uniquely favorable situation to be able to mediate negotiations between Hamas and Israel?
  • Touching Base (Checkered Fillomino)
  • What Final Fantasy summons are referenced in the Gumball episode "The Console"?
  • I put a 700 x 35c inner tube in my 700 x 38c tyre. Is my tyre in risk for a flat?
  • Statistics of lottery
  • How easy would it be to distinguish between Hamas fighters and non combatants?
  • Are there any situations in which it would make sense to return a never type?
  • Engine Anti ice usage
  • Can monsters enter the area controlled by a character who is playing dead?
  • What are the practical differences between Avis and Budget?
  • Is "Aviate, Navigate, Communicate" legal in Part 121 operations?
  • How to react to request to look more interested in meeting?
  • What's the relation between the output of a neural network and a Multinomial distribution?
  • How to download SearchDisplay results as a PDF via API4
  • How would you notate the chord G# F B E as a substitute for a G7 chord leading to C?
  • Better solutions than joining table for Many to Many?
  • How to remove a part of an ellipse?
  • Master's supervisor said he didn't post projects because he's not taking in any students but said I should apply anyway for PhD in his group?
  • How do I use StarData with HR number as input?
  • Why do the bootprints on the moon appear bright in some photographs or film?
  • Is side 0 on the top or bottom of a floppy disk?
  • MOVING PICTURES
  • Multiply an integer polynomial with another integer polynomial to get a "big" coefficient

how to add ipv6 address using ifconfig

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

  • Previous : IPv6 Network Interface Configuration File
  • Next : 6to4relay Command

IPv6 Extensions to the ifconfig Utility

The ifconfig utility now enables IPv6 interfaces and the tunneling module to be plumbed. The ifconfig(1M) utility uses an extended set of ioctls to configure both IPv4 and IPv6 network interfaces. The following table shows the set of options that are added to ifconfig . See How to Display Interface Address Assignments for a description of useful diagnostic procedures that use this utility.

Enabling IPv6 Nodes provides IPv6 configuration procedures.

Examples—New ifconfig Command Options

The following usage of the ifconfig command creates the hme0:3 logical interface to the 1234::5678/64 IPv6 address. This command enables the interface with the up option. The command also reports status. The command disables the interface. Finally, the command deletes the interface.

Example 3–1 Examples—Using addif and removeif

The following usage of the ifconfig command opens the device that is associated with the physical interface name. The command configures the streams that are needed for TCP/IP to use the device. The command reports the status of the device. The command configures the source and the destination address for the tunnel. Finally, the command reports the new status of the device after the configuration.

Example 3–2 Examples—Using tsrc , tdst , and index

Example 3–3 configuring 6to4 through ifconfig —long form.

This example of the 6to4 pseudo-interface configuration uses the subnet ID of 1 and also specifies the host ID, in hexadecimal form.

Example 3–4 Configuring 6to4 Through ifconfig —Short Form

  • © 2010, Oracle Corporation and/or its affiliates

IMAGES

  1. How to Configure IPv6 Network on CentOS/RHEL 8

    how to add ipv6 address using ifconfig

  2. Adding an IPv4 or IPv6 address in Debian 8

    how to add ipv6 address using ifconfig

  3. How To Set The Default Gateway In Linux Using The Ifconfig Command

    how to add ipv6 address using ifconfig

  4. configuration

    how to add ipv6 address using ifconfig

  5. ifconfig command

    how to add ipv6 address using ifconfig

  6. Adding an IPv4 or IPv6 address in Debian 8

    how to add ipv6 address using ifconfig

VIDEO

  1. IP Address

  2. How to Check Your IP Address in Windows Using Command Prompt (CMD)

  3. 23- IPv4 Routing

  4. How to Configure IPv6 routing using Link Local IPv6 address

  5. #trending IP ADDRESS 🔥 FULL EXPLAINED 💯 IPV4 & IPV6

  6. How to use ifconfig command?

COMMENTS

  1. 2. Add an IPv6 address

    2.1. Using "ip" Usage: # /sbin/ip -6 addr add <ipv6address>/<prefixlength> dev <interface> Example: # /sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0 2.2. Using "ifconfig" Usage: # /sbin/ifconfig <interface> inet6 add <ipv6address>/<prefixlength> Example: # /sbin/ifconfig eth0 inet6 add 2001:0db8:0:f101::1/64

  2. How do I add an additional IPv6 address to /etc/network/interfaces?

    The following code instructs the ifupdown suite to use stateless autoconfiguration and two additional static IPv6 addresses for the eth0 network interface: iface eth0 inet6 auto iface eth0 inet6 static address 3ffe:ffff::dead:beef netmask 32 iface eth0 inet6 static address 3ffe:ffff::c0de:d00d netmask 32 Share Improve this answer Follow

  3. How to add an IPv6 address?

    How to add an IPv6 address? Ask Question Asked 3 years, 6 months ago Modified 3 years, 5 months ago Viewed 2k times 0 The official Debian networking documentation tells to use: ifup 6to4 But ifup is not found (ifupdown and ifupdown2 are commands not found too, even after having been installed). Does it have something to do with prefix delegation?

  4. Configuring IPv6 addresses

    Using "ifconfig" 6.2. Add an IPv6 address 6.2.1. Using "ip" 6.2.2. Using "ifconfig" 6.3. Removing an IPv6 address 6.3.1. Using "ip" 6.3.2. Using "ifconfig" 6.4. Automatic IPv6 Address Configuration 6.5. Enable Privacy Extension 6.5.1. Enable Privacy Extension using sysctl 6.5.2. Enable Privacy Extension using NetworkManager 6.5.3.

  5. How to get the IPv6 IP address in Linux

    61 I have a Linux server and I want to find the main IPv6 address via one single command line. My command so far: $ ip addr show dev eth0 | sed -e's/^.*inet6 \ ( [^ ]*\)\/.*$/\1/;t;d' which shows: 2001:410:0:39:221:28ff:fe46:eef4 fe80::221:28ff:fe46:eef4 But I want only one occurrence, so that the output reads: 2001:410:0:39:221:28ff:fe46:eef4 ipv6

  6. Ubuntu Linux Add Static IPv6 Address Network Configuration

    Test IPv6 Configuration. To see your IPv6 address, enter: # ifconfig eth0 # ip -6 address show eth0 Display kernel IPv6 routing table: # netstat -nr -6 Ping to ipv6 enabled site such as cyberciti.biz (or ipv6.google.com): # ping6 cyberciti.biz Sample Output

  7. How do I configure a network interface for IPv6?

    The following parameter is needed when configuring IPv6: IPV6INIT=yes Address. You can add an IPv6 address with: IPV6ADDR=<IPv6 address>[/<prefix length>] For example: IPV6ADDR=fe80::2/64 The prefix is optional. Gateway. You can add the IPv6 gateway with: IPV6_DEFAULTGW=<IPv6 address[%interface]> For example: IPV6_DEFAULTGW=fe80::1/64

  8. Use IPv6 addresses

    Add an IPv6 address to the host by executing the following command as root:/sbin/ifconfig eth0 inet6 add 3ffe:ffff:0:f101::2/64; Display the IPv6 address using ifconfig. Repeat all steps for other hosts in the cluster. Add the addresses for all IPv6 hosts to /etc/hosts on each host.

  9. How to set static IPv6 IP address to embedded Linux board using

    So far we could enable IPv6 in Linux kernel and Busybox. We could test that kernel is IPv6 ready. We tried to configure a static IP using ifconfig (Busybox) as mentioned below.

  10. Configuring an IPv6 address in Red Hat Enterprise Linux 7 and 8

    To configure IPv6 on Red Hat Enterprise Linux 7 and 8 manually, your version of the following needs to added to the configuration file: [root@rhel8 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp1s0 ……… ……… IPV6ADDR=2 a01:1 b0:5389:4 ::22f 2 IPV6_DEFAULTGW=2 a01:1 b0:5389:4 ::22f 0 ……… ……… Or, you can manually configure through NetworkManager:

  11. Linux ifconfig Command

    • 4 min read ifconfig (interface configuration) is a network management tool. It is used to configure and view the status of the network interfaces in Linux operating systems. With ifconfig, you can assign IP addresses, enable or disable interfaces, manage ARP cache, routes, and more. In this article, we'll explore how to use the ifconfig command.

  12. Linux ifconfig Command Explained With 19 Practical Examples

    The ifconfig command is a part of net-tools, a legacy Linux tool for configuring a network interface. Modern distributions use the IP command, which works in a similar manner. Even though ifconfig has limited capabilities compared to IP, the command is still commonly used to configure a network interface in Linux.

  13. How do I assign IPv6 addresses manually?

    3 So I'm still rather clueless with IPv6, but I wanted to try something with my network today. Currently, I assign IPv4 LAN addresses manually, so that my router is 192.168..1, then my first computer is 192.168..2, and so on. So far, I haven't been able to figure out how to do this with IPv6.

  14. How to assign multiple IPv6 Alias addresses to one network interface

    What I actually need to do is assign full ipv6 range to the single NIC as alias ip's in one go. I can do this with below command. [root@test ~]# for ip in {4..10}; do /sbin/ifconfig eth0:1 inet6 add 2001:0df3:3c00::$ {ip}/64; done. Also after I run this command, I see my ipv6 ip's with ifconfig command as below but only the main IPv6 ping's and ...

  15. Add an IPv6 address

    6.2. Add an IPv6 address. Adding an IPv6 address is similar to the mechanism of "IP ALIAS" addresses in Linux IPv4 addressed interfaces.

  16. How to check IPv6 address via command line?

    How to check IPv6 address via command line? Ask Question Asked 3 years, 7 months ago Modified 1 month ago Viewed 62k times 24 How do I check the IPv6 address via command line? For IPv4 I simply use: curl ipinfo.io/ip This doesn't work for IPv6. linux ip ipv6 command-line-interface Share Improve this question Follow edited Feb 5, 2022 at 22:47 Zac67

  17. System Administration Guide: IP Services

    ifconfig Command Extensions for IPv6 Support. The ifconfig command enables IPv6 interfaces and the tunneling module to be plumbed.ifconfig uses an extended set of ioctls to configure both IPv4 and IPv6 network interfaces. The following describes ifconfig options that support IPv6 operations. See Monitoring the Interface Configuration With the ifconfig Command for a range of both IPv4 and IPv6 ...

  18. IPv6 Extensions to the ifconfig Utility

    The ifconfig utility now enables IPv6 interfaces and the tunneling module to be plumbed. The ifconfig (1M) utility uses an extended set of ioctls to configure both IPv4 and IPv6 network interfaces. The following table shows the set of options that are added to ifconfig.

  19. ifconfig showing ipv6 address while networksetup doesn't

    1 Answer. Your system does have an IPv6 address though it's not really usable for networking beyond the local subnet. fe80::1c00:23f2:b82e:fc8c is a fe80::/10 link-local unicast address. Link-Local addresses are designed to be used for addressing on a single link for purposes such as automatic address configuration, neighbor discovery, or when ...

  20. Configure IPv6 for an External Interface

    Adjacent to the Static IPv6 Addresses list, click Add. The Add Static IPv6 Address dialog box appears. Type the IPv6 IP address and the routing prefix length. Click OK. The IP address is added to the list; Use IPv6 Address Autoconfiguration. IPv6 address autoconfiguration enables the device to automatically assign an IPv6 link-local address to ...

  21. Configuring IPv6 Interface Addressing

    To configure an IPv6 address on a Cisco interface you'll use the ipv6 address X:X:X:X::X/<0-128> command in interface configuration mode. Note that IPv6 addressing does not use a subnet mask explicitly following the address but uses the CIDR bit notation. Examples; IPv4 address 10.55.82.23 /24, IPv6 Address: 2001:dabd:32bf::1 /64.