Working with Logical Networks
This documentation is for SmartDataCenter 6 and does not apply to SmartDataCenter 7 or Triton.
For current documentation, please see docs.joyent.com/private-cloud.
<table class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><tbody><tr>
SmartDataCenter uses logical networks to group a wide array of network information such as network segment, physical network adapters, IP subnets, and VLAN ids. Logical networks are used both on head nodes and compute nodes. Logical networks are associated with physical interfaces by using a system called NIC Tags. Physical interfaces can be tagged with one or more words, and these words are associated with logical networks. This allows an operator to control the flow of logical network data over physical links.
By default, a tag and logical network are created for two logical networks: "Admin", and "External". The admin network is used as the management and communication network between the head node and compute nodes. External is created at install time, but not assigned to compute nodes. It's purpose is to allow instances to connect to some outside network like the Internet.
In this page:
A logical network describes a network segment. It includes
- The subnet in CIDR format
- The VLAN tag if any (zero if no VLAN)
- The default gateway for the network
- The range of addresses available for provisioned zones
- A nic_tag.
The nic_tag provides a way of associating the logical network with a physical NIC port on a head node or a compute node. A logical network may be associated with only one nic_tag, but several logical networks may use the same nic_tag. A physical NIC can have more than one nic_tag associated with it.
This example shows a compute node with two physical NICs
The NIC on the right is tagged external.
The NIC on the left has two tags, private and internal
There are N logical networks:
- Private-1 associated with the nic_tag private
- Private-2 associated with the nic_tag private
- Internal-2 associates with the nic_tag internal
- External associated with the nic_tag external
- External-2 associated with the nic_tag external
- DMZ-1 associated with the nic_tag external
When a new compute node appears on the admin network, the head node tags the physical NIC that was used to netboot the compute node with the admin tag. Any other physical NICs on the compute node remain untagged.
When you assign a nic_tag to a physical NIC on a compute node, you're saying that any of the logical networks with that nic_tag can be used to route traffic to SmartMachines on that compute node.
When you provision a new SmartMachine, you select a package that describes the memory, disk space, swap space, and CPU limits of the the SmartMachine. The package also includes the default logical networks for the package. You can override the defaults and choose any of the available networks.
When the SmartMachine is provisioned, the head node creates a VNIC for each of the logical networks associated with the SmartMachine. Each VNIC is assigned the next available IP address for each logical network. The VNICs are named net0, net1, and so on.
For example, this is the network configuration of a SmartMachine that was provisioned with three logical networks:
The initial configuration consists of two default networks:
|Admin||This network is used to communicate between the head node and the compute nodes. It is associated with physical NICs tagged admin.|
|External||This network allows the head node and the compute nodes to communicate with the external network, usually the Internet. It is associated with physical NICs tagged external.|
The Admin and External logical networks are created when you set up a new compute node. Once the compute node is set up, use the Operations Portal to create logical networks and to assign logical networks to packages.
|At this time, you have to create nic_tags using MAPI.|
If you are using the standard installation procedure for SmartDataCenter, you can skip this section.
If you're interested in non-interactive, automatic deployments of SDC head nodes, this section is relevant to you.
The config file on the root of the USB key provides the configuration of the two default logical networks and nic_tags of these logical networks on the head node only For example, a typical config might contain the following lines:
This configuration indicates that the head node NIC with the MAC address 00:50:56:34:60:4c is tagged admin, and the Headnode NIC with the MAC address 00:50:56:3d:a7:95 is tagged external
Additionally, the configuration indicates that the admin nic_tag is associated with the logical network named admin: 10.99.99.0/24. The external nic_tag is associated with the logical network named external 10.88.88.0/24.
|You cannot define additional NIC tags or logical networks in the config file. Only the default Admin and External logical networks are defined there.|
To create a new nic_tag via the API use the following sdc-mapi command:
You can use the Operations Portal to create logical networks. You can also use sdc-mapi to use the API to create a logical network: