Network Interface
A network interface is the point of interconnection between a computer and a private or public network.
Common Network Interfaces:
- Ethernet Interface
- Wi-Fi Interface
- Virtual Network Interface
- Loopback Interface
- VPN Interface
- Bluetooth Interface
- USB-to-Ethernet Adapter
- Cellular Modem Interface
- InfiniBand Interface
- FireWire Interface
Is Ethernet a network interface?
No, Ethernet is a protocol. It is a technology for network communication, not a network interface by itself. A Network Interface is a point of interconnection between a computer and a network.
You can have a A virtual network interface (VNI) !
Virtual Network Interface (VNI)
VNI is an abstract virtualized representation of a computer network interface that may or may not correspond directly to a network interface controller.
when you enter a URL, how does the browser know which interface to use? ethernet or wifi or etc.?
This is FUNDAMENTAL.
When you enter a URL into your web browser, the underlying OS’s networking stack determines which network interface to use for the outgoing connection based on the Routing Table.
Dynamic Network Switching (failover)
Some operating systems and network managers can also switch between interfaces dynamically, based on link quality, availability, or other factors. This is known as failover.
Ex if you’re initially connected via Wi-Fi and then plug in an Ethernet cable, the operating system might switch to the Ethernet interface for new connections due to its lower metric or higher link speed.
Special Cases:
- VPN: All traffic is routed through the VPN’s virtual interface, regardless of whether you’re connected via Wi-Fi or Ethernet.
- Manual Configuration: Advanced users can manually set routes or even bind specific applications to use specific interfaces, although this is less common for general use.
ifconfig
Omg I am finally spending time to understand the ifconfig command.
In the output of ifconfig
, you’ll often see different types of network interfaces, each with a specific purpose:
- eth0, eth1, …: Ethernet interfaces for wired connections.
- wlan0, wlan1, …: Wireless interfaces for Wi-Fi connections.
- lo: Loopback Interface for local-only communication.
- tun0, tun1, …: Virtual interfaces usually for VPNs.
- vmnet0, vmnet1, …: Virtual interfaces for virtual machine networking.
- br0, br1, …: Bridge interfaces, used for connecting two networks together as if they were a single network.
- ppp0, ppp1, …: Point-to-Point Protocol interfaces, often used for dial-up connections.
- docker0, docker1, …: These are usually virtual interfaces created by Docker for container networking.
https://phoenixnap.com/kb/linux-ifconfig
You can reassign ips https://www.computerhope.com/unix/uifconfi.htm
This actually explains:
mtu is the maximal transmission unit