Jump to Navigation

172 - Useful Command for IP & Network Card

Display Current Config for all NIC's : ifconfig

Display Current Config for eth0 : ifconfig eth0

Assign IP : ifconfig eth0 192.168.1.2

Ping : ping -c 3 192.168.1.1

Assign multiple IP's : ifconfig eth0:0 192.168.1.2

Assign second IP : ifconfig eth0:1 192.168.1.3

Disable network card : ifconfig eth0 down

Enable network card : ifconfig eth0 up

View current routing table : route "or" route -n

View arp cache : arp "or" arp -n

Assign IP/Subnet : ifconfig eth0 192.168.1.2 netmask 255.255.255.0

Assign Default Gateway : route add default gw 192.168.1.1

Trace Route : traceroute www.mydomain.com

Trace Path : tracepath www.mydomain.com

DNS Test : host www.mydomain.com

Advanced DNS Test : dig www.mydomain.com

Reverse Lookup : host 168.192.17.59

Advanced Reverse Lookup : dig -x 192.168.17.59

Linux:


Main menu 2

Story | by Dr. Radut