Quantcast
Viewing latest article 4
Browse Latest Browse All 24

Configuring IPv6 on Linux CentOS

Configuring IPv6 is this easy if your ISP is IPv6-ready on CentOS 5 and 7:

  1. /etc/sysconfig/network-scripts/ifcfg-my_interface file, note the settings that start with “IPV6”
  2. DNS2=2001:4860:4860::8888 – Google Public IPv6 nameserver
  3. IPV6INIT=yes – This is needed when configuring IPv6 on the interface
  4. IPV6ADDR=my_ipv6-address – Specifies a primary static IPv6 address
  5. IPV6_DEFAULTGW=my_ipv6-address – Adds a default route through the interface specified

You don’t need new IPv6 switches, since switching is done at Layer 2. I’m using the old bargain web-managed HP Procurve J9028A. Image may be NSFW.
Clik here to view.
:)

(When people say IPv6-capable, that means the management features can be assigned IPv6 addresses, or that it can do Layer 3 routing functions with IPv6 addresses.)

To test:

  1. ping6 ipv6.google.com
    # ping6 ipv6.google.com
    PING ipv6.google.com(sfo07s17-in-x0e.1e100.net (2607:f8b0:4005:80a::200e)) 56 data bytes
    64 bytes from sfo07s17-in-x0e.1e100.net (2607:f8b0:4005:80a::200e): icmp_seq=1 ttl=56 time=1.39 ms
    
  2. traceroute -6 ipv6.google.com
    # traceroute -6 ipv6.google.com 
    traceroute to ipv6.google.com (2607:f8b0:4005:80a::200e), 30 hops max, 80 byte packets
     1  gateway (xxx:xx:x:xxx::1)  3.959 ms  3.978 ms  4.005 ms
     2  10ge7-3.core3.fmt2.he.net (2001:470:0:274::1)  7.859 ms  7.933 ms  11.998 ms
     3  10ge10-5.core1.pao1.he.net (2001:470:0:263::2)  11.296 ms  0.785 ms  11.311 ms
     4  google-as15169.10gigabitethernet8-2.core1.pao1.he.net (2001:470:0:244::2)  0.944 ms  0.946 ms  0.980 ms
     5  2001:4860:0:1004::1 (2001:4860:0:1004::1)  1.471 ms 2001:4860:0:1006::1 (2001:4860:0:1006::1)  1.478 ms 2001:4860:0:1004::1 (2001:4860:0:1004::1)  1.577 ms
     6  2001:4860:0:1::1f71 (2001:4860:0:1::1f71)  1.328 ms  1.266 ms  1.221 ms
     7  sfo07s17-in-x0e.1e100.net (2607:f8b0:4005:80a::200e)  1.150 ms  1.197 ms  1.210 ms
    

Tips:

  1. on CentOS 7, leaving network manager enabled was more successful than attempting to disable it
  2. the files are in network-scripts/ are space-sensitive, so don’t use spaces
  3. if you’re a Perl programmer, for best results use perl 5.14 or newer and IO::Socket::IP instead of IO::Socket::INET.

rootusers.com: Configure IPv6 Addresses And Basic Troubleshooting In Linux
google.com: Google Public DNS IP addresses
centos.org: Are you using Network-Manager in no-GUI CentOS 7 Server?


Viewing latest article 4
Browse Latest Browse All 24

Trending Articles