How to disable Network Manager on Linux

Network Manager is a feature-rich network configuration service which is used by default in most Linux desktop environments nowadays. It provides automatic configuration of (wired/wireless) network interfaces, as well as VPN, mobile broadband and even Bluetooth connections. Network Manager is smart enough to automatically switch to the best (or the most recent) connection network, and […]
Continue reading…

 

How to switch from NetworkManager to systemd-networkd on Linux

In the world of Linux, adoption of systemd has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. Billed as a “never finished, never complete, but tracking progress of technology” by […]
Continue reading…

 

How to spoof the MAC address of a network interface on Linux

A 48-bit MAC address (e.g., 08:4f:b5:05:56:a0) is a globally unique identifier associated with a physical network interface, which is assigned by a manufacturer of the corresponding network interface card. Higher 24 bits in a MAC address (also known as OUI or “Organizationally Unique Identifier”) uniquely identify the organization which has issued the MAC address, so […]
Continue reading…

 

How to measure packets per second or throughput on high speed network interface

There are many traffic monitoring tools available on Linux, which can monitor/classify network traffic, and report real-time traffic statistics in fancy user interfaces. Most of these tools (e.g., ntopng, iftop) are powered by libpcap, which is a packet capture library used to monitor network traffic in user space. Despite their versatility, however, libpcap-based network monitoring […]
Continue reading…

 

How to find Ethernet network interface card information in Linux

Sometimes you may want to know the product name or hardware settings of the network interface cards (NICs) attached to your Linux system. For example when you check whether a particular network device driver or a kernel module is compatible with your Ethernet adapter, you need to know its hardware specification such as NIC model/vendor […]
Continue reading…

 

How to use virtual Ethernet adapters in promiscuous mode on VMware

When an Ethernet adapter is turned into promiscuous mode, all packets on the connected network are received by the interface. In Linux, you can easily enable promiscuous mode by using ifconfig command. In VMs created by VMware Workstation or Player, however, you may encounter a situation where promiscuous mode does not work on virtual Ethernet […]
Continue reading…

 

How to configure a Linux bridge interface

In computer networking, a bridge is a network device that interconnects more than one LAN segment at Layer-2. Bridges can filter traffic between different segments, thereby reducing the amount of traffic on LAN, even with many LAN segments. This bridge functionality is built into the Linux kernel, so one can set up a software bridge […]
Continue reading…

 

How to run a startup script automatically after a network interface is up on CentOS

In some cases, you may want to run a specific command or a custom script right after a given network interface (e.g., eth0) is up. For example, you want to configure interface-specific iptables rules or QoS settings. Follow this guideline to learn how to set up a startup script for a specific network interface on […]
Continue reading…

 

How to reload /etc/network/interfaces in Ubuntu or Debian

In Ubuntu or Debian desktop, Network Manager is the default network configuration tool, whereas Ubuntu server by default uses /etc/network/interfaces to configure network interfaces. Of course, even on desktop, you can disable Network Manager, and use /etc/network/interfaces instead to configure your networking. For those of you who use /etc/network/interfaces to configure network interfaces, if you […]
Continue reading…

 

How to set a default gateway on CentOS

A default gateway is a remote host or router that your Linux host forwards traffic to when the destination IP address of outgoing traffic does not match any route in your local routing table. Configuring a default gateway on CentOS is quite straightforward. If you wish to change a default gateway temporarily at run time, […]
Continue reading…