Linux : Ip Commands


Linux : Ip Commands

ifconfig : Display Current Config for all NIC’s.

ifconfig eth0 : Display Current Config for eth0.

ifconfig eth0 192.168.1.2 : Assign IP.

ping -c 3 192.168.1.1 : Ping.

ifconfig eth0:0 192.168.1.2 : Assign multiple IP’s.

ifconfig eth0:1 192.168.1.3 : Assign second IP.

ifconfig eth0 down : Disable network card.

ifconfig eth0 up : Enable network card.

route “or” route -n : View current routing table.

arp “or” arp -n : View arp cache.

ifconfig eth0 192.168.1.2 netmask 255.255.255.0 : Assign IP/Subnet.

route add default gw 192.168.1.1 : Assign Default Gateway.

traceroute http://www.google.com : Trace Route.

tracepath http://www.google.com : Trace Path.

host http://www.google.com : DNS Test.

dig http://www.google.com : Advanced DNS Test.

Note : Some commands will need root privilege, so better to Enter as Root to perform them all.

http://linuxxcommand.blogspot.com/2013/12/linux-ip-commands.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s