- Network Identifier - The identifier to be used when communicating over the network.
- Network Name - The name of the network.
When communicating with containers in the same environment, they can access each other by hostname. If the hostname for the container you were trying to reach was
db you could run
ping db and it would resolve. Communicating over a network is different.
Cycle creates a new network interface completely separate of the other networks available to your container. Communicating between containers on the network is fully isolated from both the environment and public networks. That means if you want to communicate with other containers over the network you'll have to add additional network information to the hostname of the container your trying to reach. This way Cycle knows you want to use the network when looking for the container hostname.
If the network identifier is "bar" an the container hostname is "foo", the container foo can be accessed over the network bar by pinging
To create a network:
- Select to the Networks tab from the left side navigation and click Create Network.
- Fill in a name and select which cluster you would like to make this network available on.
- Start adding environments you would like to apply this network to.
You can select as many or as few environments to apply the network to as you wish (minimum 2). Don't worry if you decided you want to add or remove an environment you can change that by updating your network.
After network creation the network identifier can no longer be changed.
After creating a Cycle network, you'll need to take a few additional steps to make sure your containers can communicate on it.
- Add the environments you wish to connect to the network and click Update Network.
- Restart each of the included environments from the environment dashboard.
These two steps allow for the containers to install the new virtual ethernet interface necessary to use the SDN. Make sure to restart the environments associated with your networks if you ever update the network identifier as well.
- Add or remove an environment from your Network.
- Change the name of your network
Navigate to the network dashboard by clicking Networks on the left side menu. Then click on the network you wish to update. From here you can change the name field by changing the name field. Add or remove (or both) networks by selecting new networks from the menu or clicking the x.
Once you have made your changes, click Update Network.
Once you delete a network it cannot be reversed so be sure you wish to do this before moving forward.
- Navigate to the network dashboard.
- Click the network you wish to delete.
- Enter the name of the network in the delete network form.
- Hold down the Delete Network button.
If you think there may be a problem with your Cycle network, here are a few ways to get more information about whats going on.
Use the two-way console to SSH into an instance on the network and try to
ping an instance in a different environment using
ping hostname.networkidentifier. If you're able to ping the other instances over the network, it's likely that what your experiencing is not being caused by the Cycle network. Check that your container is listening on IPv6 (see below for more info).
If you cannot ping the other instances, run
ip a and check to see if the virtual network interface has been installed. When you run the command you should see a the following value
networkidentifier is the identifier you set for your network and the
macvlanID is an ID set by Cycle (you have no control over macvlan). If you do not see this network interface available on the instance, restart the environment from the environment dashboard and check again.
One thing to consider when troubleshooting your networks is what version of the IP protocol your telling Cycle you'd like to use. It's mandatory that connected environments are all set to use IPv6 (default networking on Cycle). This is important because if you have legacy networking enabled on any of your connected environments the discovery service in that environment will return strictly IPv4. This also means that your containers need to be listening on IPv6 in order to receive communications.
If you have verified that the virtual network interface is installed but you still cannot get your containers to communicate verify that your instance is listening on IPv6 by logging in through the two-way console and running the command
If the output from this command shows
:::port your instance is listening on both IPv4 and IPv6. If it shows
0.0.0.0:port, it is only listening on IPv4. If nothing is showing, your container is not listening for traffic at all. Another way to show that your instance is using IPv6 would be using cURL on the Cycle generated domain like so:
curl -6 cycle.generated.domain.
If you've got questions about the platform or need some help getting started, our team is more than happy to assist. Whether you're new to containers or just new to Cycle, reach out to us via livechat by clicking the blue circle in the bottom right corner. Join our Slack channel, and get help from the dev team or other members of the community, and check out our Roadmap to see what's planned for the future!