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 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 connects 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. Linux has software bridge functionality built into kernel. In this post, I will describe how to configure […]
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, information on network interface configuration is stored in /etc/network/interfaces. If you modify /etc/network/interfaces to reconfigure any interface, you need to reload it so that the new configuration can take effect. Here is how you can reload /etc/network/interfaces. sudo service networking restart One caveat: If NetworkManager is installed and enabled on your […]
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…

 

How to assign multiple IP addresses to one network interface on CentOS

The practice of configuring multiple IP addresses on a particular network interface is called IP aliasing. IP aliasing is useful when you set up multiple sites on virtual web hosting on a single interface, or maintain multiple connections to a network each of which serves a different purpose. You can assign multiple IP addresses to […]
Continue reading…