IPv6 Address Example

What does an IPv6 address look like? Can you give an example of IPv6 address? How do I view an IPv6 address under Linux or UNIX operating systems?

Internet Protocol Version 6 (IPv6) is a version of the Internet Protocol which is designed to succeed Internet Protocol version 4 (IPv4). IPv6 addresses are 128 bits long and are written groups of four hexadecimal digits separated by colons, for example, IPv6 address for www.cyberciti.biz look like as follows:
In short IPv6 addresses are divided into two parts: a 64-bit network prefix, and a 64-bit interface identifier. Further IPv6 classified as follows:

  1. Unicast addresses – used to identify each network interface.
  2. Anycast addresses – used to identify a group of interfaces at different locations.
  3. Multicast addresses – used to deliver one packet to many interfaces.

IPv6 does not support the broadcast method. Some IPv6 addresses are used for special purposes, such as the address for loopback which look like as follows:

How Do I View LoopBack IPv6 Address under Linux?

Type the following command:
$ ifconfig lo
Sample outputs:

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:354575118 errors:0 dropped:0 overruns:0 frame:0
          TX packets:354575118 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:179276910234 (166.9 GiB)  TX bytes:179276910234 (166.9 GiB)

To see an IPv6 address assinged to Linux eth0 interface enter:
# ip -f inet6 addr show eth0
Sample outputs:

6: eth0:  mtu 9000 
    inet6 2607:f0d0:1002:51::4/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::230:48ff:fe33:bc33/64 scope link 
       valid_lft forever preferred_lft forever

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • madusanka Jun 21, 2012 @ 1:42

    thanks for posting simple ipv6 how is look like,

  • KRISHNA Jun 19, 2013 @ 21:05

    Thanks a lot for sharing such a valuable information..

  • Abenezer Tesfaye Jan 23, 2014 @ 16:24

    what’s the ipv6 address of IPCONFIG?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum