User Tools

Site Tools


ipv6_opnfv_project:metadata_structure

Metadata Structure

Muliple VM Interfaces

               External Subnet(ipv6_gateway=<LLA-of-upstream-router> in the Neutron agent configuration file

Interface 3 (External Network) |


Interface 2 (Tenant Network: Net1) —————————————–(Router1)—-(subNet1)

Interface 1 (Management Network: Net0) | —————————————–(Roter0)—–(subnet0)

                                                 | |
                                                ----------
                                                | IPv6VM  |
                                                -----------

So what is the extra Data describing IPv6VM three interface VM above, we need for our ISO creation? We will need 3 Interface names, two Routers, external LLA and other attibutes.

Notes for Neutron IPv6: Following would be the list of commands to be executed in order to create three networks and boot VM instances using Nova with two virtual NICs. The idea can be extended to more NICs if required.

1. Create an external network. neutron net-create –tenant-id <tenant-id> –provider:network_type <flat/vlan> –provider:physical_network <physical-network> –provider:segmentation_id <segmentation-id-if-vlan> –router:external <external-network-name>

2. Create a tenant network. neutron net-create –tenant-id <tenant-id> –provider:network_type <tenant-network-type> –provider:physical_network <physical-network> –provider:segmentation_id <vlan-id/tunnel-id> <tenant-network-name>

3. Create an external subnet. Now that we have IPv6-Router BP support, creating an external subnet is not mandatory. We can simply define ipv6_gateway=<LLA-of-upstream-router> in the Neutron agent configuration file. Neutron L3 Agent would add a default route in the router namespace which points to ipv6_gateway.

4. Create an internal subnet. neutron subnet-create –tenant-id <tenant-id> –ip-version 6 –ipv6-ra-mode <slaac/dhcpv6-stateful,dhcpv6-stateless> –ipv6-address-mode <slaac/dhcpv6-stateful,dhcpv6-stateless> <network-name> <subnet-cidr>

5. Create a neutron router. neutron router-create –tenant-id <tenant-name> <router-name>

6. Associate the internal subnet to a neutron router. neutron router-interface-add <router-id> <internal-subnet-id>

7. If we want to create multiple subnets/networks, we can repeat the steps 2 & 4 based on the type of network.

8. Assuming that we now have two internal networks and we want to spawn a VM with two NICs, the steps would be.. nova boot –image <image-id> –flavor <flavor-id> –nic <net-id=net-uuid-for-nic1> –nic <net-id=net-uuid-for-nic2> <name-of-the-vm>

9. The VM booted in above step would have two interfaces (say eth0 and eth1) and would have IP addresses assigned from the respective subnets.

Greenfield approach with Cloudinit

#cloud-config
bootcmd:
  - /usr/sbin/ifdown eth0
  - /usr/sbin/ifup eth0
  - /usr/sbin/ifdown eth1
  - /usr/sbin/ifup eth1
  - setenforce 0
  - /sbin/sysctl -w net.ipv6.conf.all.forwarding=1
  - /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra=2
  - /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=1
  - /sbin/sysctl -w net.ipv6.conf.eth0.router_solicitations=1
packages:
  - radvd
runcmd:
  - /usr/sbin/ifdown eth1
  - /usr/sbin/ifup eth1
  - /usr/bin/systemctl disable NetworkManager
  - /usr/bin/systemctl start radvd
  - echo 'complete' >> /tmp/cloud-config.log
write_files:
 - content: |
     TYPE="Ethernet"
     BOOTPROTO="dhcp"
     DEFROUTE="yes"
     PEERDNS="yes"
     PEERROUTES="yes"
     IPV4_FAILURE_FATAL="no"
     IPV6INIT="yes"
     IPV6_AUTOCONF="yes"
     IPV6_DEFROUTE="yes"
     IPV6_PEERROUTES="yes"
     IPV6_PEERDNS="yes"
     IPV6_FAILURE_FATAL="no"
     NAME="eth0"
     DEVICE="eth0"
     ONBOOT="yes"
   path: /etc/sysconfig/network-scripts/ifcfg-eth0
   permissions: '0755'
   owner: root:root
 - content: |
     TYPE="Ethernet"
     BOOTPROTO=static
     IPV6INIT=yes
     IPV6ADDR="2001:db8:0:2::1/64"
     NAME=eth1
     DEVICE=eth1
     ONBOOT=yes
     NM_CONTROLLED=no
   path: /etc/sysconfig/network-scripts/ifcfg-eth1
   permissions: '0755'
   owner: root:root
 - content: |
     interface eth1
     {
	AdvSendAdvert on;
	MinRtrAdvInterval 3;
	MaxRtrAdvInterval 10;
	AdvHomeAgentFlag off;
	AdvManagedFlag on;
	AdvOtherConfigFlag on;
	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;
	};
     };
   path: /etc/radvd.conf
   permissions: '0644'
   owner: root:root
 - content: |
     IPV6FORWARDING=yes
   path: /etc/sysconfig/network
   permissions: '0644'
   owner: root:root

Brownfield approach with Meta Data Structure

This will be more suitable for OPNFV 6-server POD usage with Jenkins Integration. As pointed by Iben Rodriguez of Spirent, most enterprise prefer to work with existing DC resources and hence Carriers need to support Brownfield vRouter in VM within existing DC resources.

Now we have an IP6VM (meaning a VM with two IPv6 Interfaces) and we need to downlaod and install Quagga base package(with just IPv6 add-on) to invoke and use it as a VRouter, rather than the OVS based in Hypervisor for switching and forwarding as usually done in OpenStack Neutron.Functionally the VM approach may have performance issues but lets deal with that latter as this gives better isolation and modularity for scaling.

ipv6_opnfv_project/metadata_structure.txt · Last modified: 2015/09/04 08:12 by Sridhar Gaddam