You are on page 1of 11

CS6111 – Computer

Networks
Basic Network based Unix Commands
ifconfig
This command is used to initialize the various kernel-level network interfaces during boot. It is then used for debugging those
interfaces.

Syntax : ifconfig [...OPTIONS] [INTERFACE]

• ifconfig -a
• Displays all the interfaces even those that are down.

• ifconfig -s
• Displays a short list of interfaces without various details.

• ifconfig -v
• Displays a list of interfaces with various details (verbose mode)
nslookup
This command is used for getting information about DNS(Domain Name Server). It is used for
obtaining IP address or DNS of a server.

Syntax : nslookup [...OPTIONS]

• nslookup [Domain name]


This displays the “A RECORD” (IP address) of the specified Domain
Name.

• nslookup [IP Address]


This displays the DNS of the specified IP Address.
• nslookup -type=soa [Domain Name]
This displays the “SOA record” (start of authority) fetched from DNS server
about the specified Domain Name.

• nslookup -type=ns [Domain Name]


This displays the list of “DNS Servers” mapped for the specified Domain name.
traceroute
This command is used for getting information about the route that packet takes before reaching the destination host.

Syntax : traceroute [options] host_Address [pathlength]

• traceroute -4 [Domain Name]


This command is used for displaying route using IPV4 protocol

• traceroute -6 [Domain Name]


This command is used for displaying route using IPV6 protocol
• traceroute -m [hops] [Domain Name]
This command is used for setting the Maximum hops for sending
the packets to the specified Domain Name.

• traceroute -w [time in ms] [Domain Name]


This command is used for setting the Timeout in ms for sending the
packets to the specified Domain Name.
ping
This command is used for sending and receiving dummy packets to the host inorder for checking its availability.

Syntax : ping [Domain Name]

• ping -c [#requests] [Domain Name]


This command pings the Server with the Domain Name specified number of times.

• ping -s [size] [Domain Name]


This command pings the Server with the Domain Name with the specified size of
packets.

• ping -i [wait Time] [Domain Name]


This command pings the Server with the Domain Name in specified time intervals.
host
This command is used for DNS Lookup of the specified host.

Syntax: host [options] hostname [server]

• host [Domain Name]


This command returns a list of IP addresses associated with the Domain Name.

• host [IP Address]


This command returns a list of Domain Names associated with the IP
address.
• host -a [Domain Name]
This command returns a list of Domain Names associated with the IP address in
verbose mode.

• host -t [types] [Domain Name]


This command returns a list of Domain Names associated with the IP address
from the specified TYPE RECORD.
route
This command is used displaying and manipulating the kernel
Routing table.
Syntax : route [options]
• route
This command returns the Routing table values.
• route -n
This command returns the Routing table values in numeric form.
dig
This command is for gathering information about the Domain Name. DIG [DOMAIN
INFO GROPER] .

• dig [Domain Name]


This command is used to grab the A Record information about the
specified Domain Name.

• dig [Domain Name] +short


This command is used to grab the A Record in short format info
about the specified Domain Name.

You might also like