If you’re like me you found the introduction of Netplan to Ubuntu a fresh of breath air. YAML is ubiquitous these days and is very convenient wherever manual modification is expected/required. Why EVE-NG decides to stick with legacy configuration 7 years after the introduction is hence beyond me.
NOTE: You will likely not get the same level of support from EVE-NG (if any) by converting to Netplan configuration
Netplan essentials
Linux networking is regular networking, all of the familiar concepts apply. You have routed & switched interfaces, SVIs, bridges, vlans and much more. For your EVE-NG networking configuration you will (likely) be using many of these.
Canonical describes netplan better than I am able to. You can find the following on the frontpage of Netplans website:
Netplan is a utility for easily configuring networking on a linux system. You simply create a YAML description of the required network interfaces and what each should be configured to do. From this description Netplan will generate all the necessary configuration for your chosen renderer tool.
Netplan configuration files are placed in /etc/netplan/
and must be named *.yaml
. You can split your configuration into multiple files and all configurations in the config directory will be applied.
The most minimal netplan configuration looks like the example below.
network:
version: 2
renderer: NetworkManager
You apply configuration with netplan apply
or netplan try
. When experimenting it is a good idea to use netplan try
as this will roll back to previous configuration automatically if you don’t confirm the change(alternatively you will learn to use this the hard way).
Basic EVE-NG networking
EVE-NG requries that you configure a pnet0 bridge/SVI interface. Pnet0 will be used for the management interface and be the NAT outside interface for the NAT network type in EVE. You will also typically also use this interface for general host networking purposes.
Your pnet0 interface can be attached directly to your physical servicer interface.
A complete configuration would look like this:
network:
version: 2
ethernets:
eno4:
dhcp4: no
bridges:
pnet0:
interfaces:
- eno4
dhcp4: no
addresses:
- 10.0.0.10/24
routes:
- to: 0.0.0.0/0
via: 10.0.0.1
nameservers:
addresses: [1.1.1.1]
The “networks” in EVE-NG are in reality connections to other linux bridges, named pnet1-pnet9. These allow you to connect your EVE-NG nodes to external networks. You will hence likely want to configure your host interface as a trunk, and connect your pnet0 interface to VLAN 1 of the trunk. This way will be able to connect your other pnet interfaces to other VLANs on the same interface.
--- snip ---
ethernets:
eno4:
dhcp4: no
vlans:
eno4.1:
id: 1
link: eno4
bridges:
pnet0:
interfaces:
- eno4.1
--- snip ---
If you wish to connect your EVE nodes directly to a trunk towards an external network device you can attach it directly to a host interface like in our first example:
--- snip ---
ethernets:
eno3:
dhcp4: no
bridges:
pnet1:
interfaces:
- eno3
--- snip ---
If you wish to read more about EVE-ng networking you can check out the EVE Clouds and Networks section of the cookbook. The Netplan documentation is great and can be found here.
Summary
One of the nice things with Linux and EVE-NG is that it will allow you to do just about anything you want networking-wise. EVEs external networks are just regular Linux bridges that follow regular networking rules. One idea I have been playing around with but never gotten around to is to implement Daniel Dib inspired WAN impairment using host local networking for more advanced WAN simulation.
Full configuration example
network:
version: 2
renderer: NetworkManager
ethernets:
eno4:
dhcp4: no
bonds:
bond0:
interfaces:
- eno4
vlans:
bond0.123:
id: 123
link: bond0
bridges:
pnet0:
interfaces:
- bond0.123
dhcp4: no
addresses:
- 10.0.0.10/24
routes:
- to: 0.0.0.0/0
via: 10.0.0.1
nameservers:
addresses:
- 1.1.1.1
- 1.0.0.1
See Also
- Ubuntu, SecureCRT & Telnet links 🐧🔗
- Catlyst 8000v cEdge support in EVE-ng 🧭🥼
- EEM in Catalyst Center templates 📅👨💼
- PNP Licence level change 🔀🪪
- Hello world! 👋
Got feedback or a question?
Feel free to contact me at hello@torbjorn.dev