Creating a Virtual Network
This topic describes how to create virtual networks in Windows Contrail deployment.
- Navigate to Overlay > Virtual Networks > Create Virtual Network in Contrail Command UI and create a virtual network with IP pool.
- After the virtual network is created, run the following
command on Windows compute node to create a local Contrail network:
docker network create --ipam-driver windows --driver Contrail --opt tenant=$tenant --opt network=$network --subnet $subnet $localnetwork
where:
$tenant is the name of your tenant in Contrail,
$network is the name of your network in Contrail,
$subnet is subnet CIDR (e.g. 10.0.0.0/24). This parameter must be specified, if you Contrail network has multiple subnets defined.
$localnetwork is an arbitrary name that docker network should have on local compute node.
- Specify the parameter --ipam-driver windows to override docker's default IPAM driver with a noop driver.
docker network create --ipam-driver windows --driver Contrail --opt tenant=admin --opt network=rednetwork --subnet 10.0.0.0/24 my_local_red_net
To remove a network, use the docker network remove command. You cannot remove a network that has active endpoints.
Note This operation does not remove the virtual network in Contrail. To remove a virtual network you need to log in to Contrail Web UI.