Persistent network interface naming
In order to make things a little easier, we have opted to hardcode the names of the network interfaces. This is achieved by adding audev ruleset for each hardware port, which have a unique MAC address. These can be identified using ip addr show. Look for the end0 (commonly port B) and enp0s1 (commonly port A) and record the MAC addresses for each. These may also be listed on the physical ports as well.
Create a new file called 70-persistent-net.rules (the name doesn’t matter, it only requires the .rules file extension) and populate it with a pair of lines (see below) for each port, replacing <MACADDR> with the hardware MAC address.
70-persistent-net.rules
/etc/udev/rules.d/:
Configuring a network port
Each network port can be defined using an interface file, which should be saved to the/etc/network/interfaces.d directory, with the filename corresponding to the network name specified in the previous section.
A network interface can either be defined as DHCP—it will be assigned an IP address by a separate, dedicated device, e.g., a router—or static—the IP address, netmask, and potentially gateway are fixed. An example interface file for each looks like:

