Networking/Computing Tips/Tricks

Here are some great Linux command line entries you can make to examine and configure IPv6 (assuming your version of Linux ipconfgdoes so).

Let's start with some simple ones. 

To verify you have IPv6 running:

csi@csi-virtual-machine:~$ cat /proc/net/if_inet6

fe80000000000000020c29fffef704ce 02 40 20 80     eth0
00000000000000000000000000000001 01 80 10 80       lo

First, let's check the IFCONFIG -A from the Terminal Window:



You can see my machine is running "Dual Stack" since it has both IPv4 and IPv6.

The "netstat -r -6" command displays the routing table in your computer:



We can clearly see the IPv6 Routing table with the Link Local addresses and the IPv6 Multicast groups.

Let's see if there has been any general IPv6 traffic on the interfaces.  You can do this with a "netstat -ps -6" command:

csi@csi-virtual-machine:~$ netstat -ps -6


  23857 total packets received

  0 incoming packets discarded

  23857 incoming packets delivered

  0 forwarded

  5841 requests sent out

  1 dropped because of missing route

  23793 incoming multicast packets

  5780 outgoing multicast packets

  Ip6InOctets: 4025297

  Ip6OutOctets: 546152

  Ip6InMcastOctets: 4015659

  Ip6OutMcastOctets: 536762


  84 ICMP messages received

  0 input ICMP message failed.

  7 ICMP messages sent

  ICMP input histogram:

  group member responses: 84

  ICMP output histogram:

    router solicits: 3

    neighbor solicits: 1

    Icmp6OutMLDv2Reports: 3

    Icmp6InType131: 84

    Icmp6OutType133: 3

    Icmp6OutType135: 1

    Icmp6OutType143: 3


  23524 packets received

  0 packets to unknown port received.

  0 packet receive errors

  5770 packets sent



  123 active connections openings

  9380 passive connection openings

  62 failed connection attempts

  28 connection resets received

  1 connections established

  245471 segments received

  301392 segments send out

  908 segments retransmited

  0 bad segments received.

  31 resets sent



Pretty cool.

Another way to see the IPv6 Route Table is using the "route" command. The command-line Route tool enables entries in the local IPv4 and IPv6 routing tables, such routes can direct  network traffic to local, WAN and internet network map.

Here is an IPv6 route test example:



How about PING and TRACE ROUTE for IPv6?  Sure.  Here is how you Ping in IPv6:

csiipv6@csi-virtual-machine:~$ ping6 ::1

PING ::1(::1) 56 data bytes

64 bytes from ::1: icmp_seq=1 ttl=255 time=0.743 ms

64 bytes from ::1: icmp_seq=2 ttl=255 time=0.027 ms

64 bytes from ::1: icmp_seq=3 ttl=255 time=0.014 ms

64 bytes from ::1: icmp_seq=4 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=5 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=6 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=7 ttl=255 time=0.012 ms

64 bytes from ::1: icmp_seq=8 ttl=255 time=0.013 ms

64 bytes from ::1: icmp_seq=9 ttl=255 time=0.010 ms

64 bytes from ::1: icmp_seq=10 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=11 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=12 ttl=255 time=0.014 ms

64 bytes from ::1: icmp_seq=13 ttl=255 time=0.011 ms

64 bytes from ::1: icmp_seq=14 ttl=255 time=0.025 ms

64 bytes from ::1: icmp_seq=15 ttl=255 time=0.014 ms

64 bytes from ::1: icmp_seq=16 ttl=255 time=0.019 ms

64 bytes from ::1: icmp_seq=17 ttl=255 time=0.010 ms

64 bytes from ::1: icmp_seq=18 ttl=255 time=0.025 ms

64 bytes from ::1: icmp_seq=19 ttl=255 time=0.020 ms

64 bytes from ::1: icmp_seq=20 ttl=255 time=0.015 ms


--- ::1 ping statistics ---

20 packets transmitted, 20 received, 0% packet loss, time 18998ms

rtt min/avg/max/mdev = 0.010/0.051/0.743/0.158 ms


Here are the ping6 options:

csi@csi-virtual-machine:~$ ping6 -?

Usage: ping6 [-LUdfnqrvVaAD] [-c count] [-i interval] [-w deadline]

             [-p pattern] [-s packetsize] [-t ttl] [-I interface]

             [-M pmtudisc-hint] [-S sndbuf] [-F flowlabel] [-Q tclass]

             [[-N nodeinfo-option] ...]

             [hop1 ...] destination


And here is the Trace route command:

csiipv6@csi-virtual-machine:~$ tracert6 ::1

traceroute to ::1 (::1) from ::1, 30 hops max, 60 byte packets

1 csi-virtual-machine (::1) 0.006 ms 0.004 ms 0.003 ms



Here are the Tracert options:

csi@csi-virtual-machine:~$ tracert6 -h

  -A  send TCP ACK probes
  -d  enable socket debugging
  -E  set TCP Explicit Congestion Notification bits in TCP packets
  -f  specify the initial hop limit (default: 1)
  -g  insert a route segment within a “Type 0” routing header
  -h  display this help and exit
  -I  use ICMPv6 Echo Request packets as probes
  -i  force outgoing network interface
  -l  display incoming packets hop limit
  -m  set the maximum hop limit (default: 30)
  -N  perform reverse name lookups on the addresses of every hop
  -n  don’t perform reverse name lookup on addresses
  -p  override destination port
  -q  override the number of probes per hop (default: 3)
  -r  do not route packets
  -S  send TCP SYN probes
  -s  specify the source IPv6 address of probe packets
  -t  set traffic class of probe packets
  -U  send UDP probes (default)
  -V  display program version and exit
  -w  override the timeout for response in seconds (default: 5)
  -z  specify a time to wait (in ms) between each probes (default: 0)


There is something known as Path MTU or PMTU in IPv6.  You can check Path MTU by doing a Path Ping in Windows, but there is no such command in Linux.

Our other favorite that allegedly does the Path Ping equivelant is "mtr".  Here is the MTR usage:

usage: mtr [-hvrwctglspniu46] [--help] [--version] [--report]
                [--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]
                [--raw] [--split] [--no-dns] [--address interface]
                [--psize=bytes/-s bytes]
                [--report-wide|-w] [-u]
                [--interval=SECONDS] HOSTNAME [PACKETSIZE]

Here is an example output of MTR for IPv4 (you have to type Control-C to stop MTR):

My traceroute  [v0.80]
csi-virtual-machine (                          Sun Aug  7 18:11:17 2011
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1.                       0.0%    15    0.9   1.0   0.8   2.3   0.4

You can see below that it works for IPv6 as well:

My traceroute  [v0.80]
csi-virtual-machine (::)                               Sun Aug  7 18:13:49 2011
Resolver error: No error returned but no answers given. of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. ::1                               0.0%    11    0.0   0.0   0.0   0.1   0.0

We hope this helps you get started on IPv6 on your local Linux machine.

Comments powered by CComment

Find by Tag

4G Networks 5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az Addressing Analysis Ansible Architecture ARP AToM Baseline BGP Bloom's Taxonomy Broadband Cable cat CellStream Cellular Central Office Cheat Sheet Chrome Cisco Cloud CMD Coloring Rules Computer Consulting Customer Support Data Center Data Networking DHCPv6 DNS Docker Documentation Dublin-Traceroute dumpcap ECMP Ethernet Ethics Evaluation Field Operations Fragmentation G-MPLS GeoIP Git GNS3 Google GQUIC Hands-On History Home Network ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 India Interface Control Internet IoT IPsec IPv4 IPv6 IRINN IS-IS L2VPN L3VPN LDP Linux LLN LoL M-BGP MAC Macro Microsoft mininet Monitoring MPLS mtr MTU Multicast Name Resolution Netcat Netmiko NetMon netsh Networking Network Science nmap Npcap NSE Observations Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX OTT Paris-Traceroute Parrot PIM PMTU Policy POTS POTS to Pipes PPP Profile Programming Project Management PW3E Python QoS QUIC Remote Desktop Requirements Resume RIP Routing RPL RSVP Rural SDN Security Service Provider Small Business SONET Speed SS7 SSH SSL Subnetting SYSCTL T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone termshark Testing TLS Tools Traceroute Traffic Engineering Training Travel Tunnel Ubuntu Utility Video Virtualbox Virtualization VoIP VRF VXLAN Wi-Fi Wi-Fi 4 Wi-Fi 5 Wi-Fi 6 Windows Winpcap Wireless Wireless 5G Wireshark Wireshark Tip WLAN Writing Zenmap ZigBee

Twitter Feed