Linux CLI 31๐ง ip and netstat commands
a - ip command
ip command is a tool for managing network tasks
ip address โ displays detailed information about all Network interfaces.
ip link โ displays link layer information
ip link -s โ displays link layer statistics
ip neighbour โ lists devices in the same network
ip route โ displays routing table
Other objects: neighbour โ ARP or NDISC cache entry rule โ Rule in routing policy database.
tunnel โ tunnel over IP maddress โ Multicast address
b - ip command examples
ip addr add 192.168.1.2/24 dev eth0 โ sets to eth0 interface specific IP and subnet mask
ip route add default via 192.168.1.1 dev eth0 โ sets new default gateway
ip addr del 192.168.1.100/24 dev eth0 โ deletes specific IP address
sudo ip route flush โ flushes routing tables
sudo ip neighbor flush โ flushes neighbour entries
ip rule show โ show IP rules
ip rule add priority 1000 from 192.168.1.0/24 to 10.0.0.0/8 table main โ example of adding new rule
c - netstat command
netstat displays network related statistics and connections
It provides various options to filter, sort, display or modify network-related data
netstat -tulpn โ shows all listening (LISTEN) TCP connections
netstat -nr โ shows the routing table
netstat -tna | grep :25 โ checks network connections on a specific port
sudo netstat -tcp โ lists all established TCP connections
sudo netstat --statistics โ shows network statistics
netstat -au โ lists all UDP ports
netstat -l โ lists all listening ports
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!