quiz image

Linux Network Interface Naming Conventions

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
·
·
Download

Start Quiz

Study Flashcards

5 Questions

Where should the interface name be placed in relation to the word 'auto'?

On the same line

What is the purpose of the 'iface' configuration line?

To specify the address family and method for an interface

What is the purpose of the 'auto' keyword in an interface configuration file?

To bring up interfaces at boot time

What is the address family used for TCP/IP networking?

inet

What is the purpose of the 'dhcp' method in an interface configuration file?

To use the IP settings provided by the network's DHCP server

Study Notes

Interface Naming Convention

  • Linux uses a predictable naming convention for network interfaces to identify which device and port corresponds to which interface.
  • The naming convention starts with a two-character prefix indicating the interface type:
    • en: Ethernet
    • ib: InfiniBand
    • sl: Serial line IP (slip)
    • wl: Wireless local area network (WLAN)
    • ww: Wireless wide area network (WWAN)
  • The naming convention follows a priority order:
    • Naming after the BIOS or firmware index (e.g., eno1)
    • Naming after the PCI express slot index (e.g., ens1)
    • Naming after the bus address (e.g., enp3s5)
    • Naming after the MAC address (e.g., enx78e7d1ea46da)
    • Naming using the legacy convention (e.g., eth0)

Configuration Files

  • Configuration files for network interfaces are stored in /etc/systemd/network and /lib/systemd/network.
  • Files with different suffixes have different purposes:
    • .netdev: creates virtual network devices (e.g., bridge or tun devices)
    • .link: sets low-level configurations for network interfaces
    • .network: sets up network addresses and routes
  • The name of the file determines the order in which it is processed.
  • The [Match] section in the file defines the network interface to which the configuration applies.

Network Interface Configuration

  • The [Network] section in the file defines the settings for the device.
  • The interface name should follow the word auto on the same line.
  • Interfaces marked auto are brought up at boot time in the order they are listed.
  • The iface line specifies the interface name, address family, and method used to configure the interface.
  • Examples of address families and methods:
    • inet for TCP/IP networking
    • ipx for IPX networking
    • inet6 for IPv6 networking
    • loopback for loopback interfaces
    • dhcp for using IP settings from a DHCP server

Learn about the evolution of Linux network interface naming conventions, from eth0 to the current system, and how it clarifies device and port identification.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser