User Tools

Site Tools


ipv6_opnfv_project:vm_as_router

This is an old revision of the document!


Get a Service VM Running as a vRouter

# Current network setup for IPv6 router VM on local virtualbox setup
# /etc/sysconfig/network-scripts/ifcfg-enp0s3
# Network interface enp0s3 is IPv4 for public internet access
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="32bad876-680a-4f78-a364-726eae21bfcf"
DEVICE="enp0s3"
ONBOOT="yes"

# /etc/sysconfig/network-scripts/ifcfg-enp0s8
# Network interface enp0s8 is IPv6 internal interface to provide IPv6 to internal hosts
BOOTPROTO=static
IPV6INIT=yes
IPV6ADDR="2001:db8:0:2::1/64"
NAME=enp0s8
UUID=e931a806-2f76-425d-b035-d37813b81df5
DEVICE=enp0s8
ONBOOT=yes
NM_CONTROLLED=no

# Disable NetworkManager
systemctl disable NetworkManager

# Install dhcp.x86_64, dhcp-common.x86_64, radvd.x86_64 if not already installed
yum install dhcp-common
yum install dhcp
yum install radvd

# /etc/sysctl.conf Set sysctl to enable IPv6 forwarding
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.enp0s3.accept_ra=2
net.ipv6.conf.enp0s3.accept_ra_defrtr=1
net.ipv6.conf.enp0s3.router_solicitations=1

# /etc/radvd.conf
interface enp0s8
{
# This is the primary "on switch" for RADVD

  AdvSendAdvert on;     

#
# These settings determine how often advertisements will be sent every X-Y.
# X and Y are in seconds. With these settings you will be sending a advert every 60 seconds
#

  MinRtrAdvInterval 60;
  MaxRtrAdvInterval 180;

#
# Disable Mobile IPv6 support
#

  AdvHomeAgentFlag off;

# Here we set our managed flags

  AdvManagedFlag on;
  AdvOtherConfigFlag on;

#
# Enter our IPv6 prefix and CIDR
#

  prefix 2001:db8:0:2::/64
  {
      AdvOnLink on;
      ### On link tells the host that the default router is on the same "link" as it is
      AdvAutonomous on;
      AdvRouterAddr off;
  };

};

# Enable radvd service
systemctl enable radvd

# In /etc/sysconfig/network add
IPV6FORWARDING=yes

For reference "How to set up RADVd DHCPv6 and DNS on CentOS 6" refer http://www.percula.info/archives/196

ipv6_opnfv_project/vm_as_router.1437029352.txt.gz · Last modified: 2015/07/16 06:49 by Sridhar Gaddam