Inspect bridge config in /etc/network
In this step, you will explore where network interface configurations, including bridge configurations, are often stored on Debian-based systems like Ubuntu. These configurations define how network interfaces are set up when the system starts.
Network interface configurations are typically located in the /etc/network/interfaces
file and potentially in files within the /etc/network/interfaces.d/
directory.
Let's view the content of the main network interfaces file using the cat
command. cat
is used to display the content of files.
cat /etc/network/interfaces
You might see content similar to this:
## interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
This file defines the lo
(loopback) interface and the eth0
interface, configured to use DHCP.
Now, let's check the contents of the /etc/network/interfaces.d/
directory. This directory is often used to store separate configuration files for individual interfaces or bridges, keeping the main interfaces
file cleaner.
Use the ls
command to list the files in this directory:
ls /etc/network/interfaces.d/
You might see files related to bridge configurations here, especially if bridges were configured manually or by other software. For example, you might see a file named 50-cloud-init.cfg
or similar, which could contain bridge definitions.
If there are files in this directory, you can view their content using cat
. For example, if you see a file named my-bridge.cfg
, you would use:
cat /etc/network/interfaces.d/my-bridge.cfg
Examining these configuration files helps you understand how the network bridges are defined and configured persistently on the system. Keep in mind that network configuration methods can vary between Linux distributions and versions (e.g., using Netplan in newer Ubuntu versions), but /etc/network/interfaces
and /etc/network/interfaces.d/
are common locations on many systems.