CentOS / Red Hat IPv6 Network Configuration

by Tweak on April 22, 2011
in Linux, Servers

Setting up IPv6 on CentOS, and for that matter RHEL and Fedora Linux, is quite straight forward. You need to edit just two files:

1. /etc/sysconfig/network-scripts/ifcfg-
2. /etc/sysconfig/network

  1. Configure the IP address. For example, for interface eth0, edit /etc/sysconfig/network-scripts/ifcfg-eth0 and make the necessary changes as below.DEVICE=eth0
    HWADDR=00:22:15:17:CC:C1
    BOOTPROTO=static
    IPADDR=192.168.1.2
    NETMASK=255.255.255.0
    NETWORK=192.168.1.0
    BROADCAST=192.168.1.255
    IPV6INIT=yes
    IPV6_AUTOCONF=no
    IPV6ADDR=<ipv6 address>
    ONBOOT=yes
  2. Configure the gateway (nano /etc/sysconfig/network).
    NETWORKING=yes
    HOSTNAME=yourdomain.com
    GATEWAY=192.168.1.254
    NETWORKING_IPV6=yes
    IPV6_DEFAULTGW=<ipv6 gateway>
    IPV6_DEFAULTDEV=eth0

    The ones in bold are related to IPv6 address configuration. The rest of the configuration are either specific to IPv4 address or common to both v4 and v6 address.

  3. Finally, restart your network.
    service network restart

Share and Enjoy:
  • Add to favorites
  • Twitter
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Digg
  • del.icio.us
  • MySpace
  • Live
  • Yahoo! Buzz
  • PDF
  • email

Post a Comment