Linux IP Essentials

Network

Linux IP Essentials

ip has replaced ifconfig
iw has replaced iwconfig

Add-IP

Add IP

sudo ip addr add 10.10.10.10/24 broadcast 10.10.10.255 dev eth0
sudo ip link set eth0 up
sudo ip neigh add 10.10.10.10 lladdr ff:ff:ff:00:00:00 dev eth0
ip addr show dev eth0
sudo ifconfig eth0 10.10.10.10 netmask 255.255.255.0 broadcast 10.10.10.255
sudo ifconfig eth0 up
sudo arp -s 10.10.10.10 -i eth0 ff:ff:ff:00:00:00
sudo arp -n

Remove IP

sudo ip addr del 10.10.10.10/24 dev eth0
ip addr show dev eth0
sudo ifconfig eth0 0.0.0.0 
ifconfig eth0

Down Interface

ip link set eth0 down
ip link set wlan0 down

Up Interface

ip link set eth0 up
ip link set wlan0 up

Enable Promiscious Mode

ip link set eth0 promisc on
ip -a addr