Network personal tutorial

This tutorial for network based on my AIX, Linux, Windows experience.


Basic commands

Network troubelshotting

How to find mac-adress remotly

AIX configuring a gateway

Linux How to configure NFS


In this tutorial i simply list some commands related to the network in particulare in Unix, Linux environment (basic commands, help for troubleshooting…).

For more information about a command use « man <command> »

Top ?

Basic commands

  • ifconfig Configure, display the network interface (similar to ipconfig in windows environment)
    • An example how to set an Ip adress on a network interface, then disable and enable the network card
      • ifconfig eth0 (set the IP adress)
      • ifconfig eth0 down (disable the network card)
      • ifconfig up (enable the network card)
      • ifconfig eth0 (list the information about the network card)
  • route Route – show / manipulate the IP routing table
    • route Show information about the network route
    • route add -net netmask gw Add a host routing entry for the host
    • route del -net netmask gw Delete a route
  • arp Manipulate the ARP cache
    • arp Show the ARP informations
    • arp -s 00:02:03:F6:7C:4B temp Add a temporary entry to a host’s ARP cache
  • ftp Etablish an interactive FTP connection with host to tranfer files
    • ftp
  • dig Obtain information from DNS servers
    • dig
  • telnet Etablish an user interface to the TELNET protocol
    • telnet
  • whois Client for the whois directory service (domain name, name server…)
    • whois
  • nbtstat Network statistics
      • nbtstat client-name (To find the Mac adress from a connected client)



Network troubleshooting

  • ping The first command to try if a network problem suspected :-))
  • host DNS lookup utility
    • host -v
  • lsof List information about files opened by processes
  • netstat Print network connections, routing tables, interface statistics…
    • netstat -a List all sockets
    • netstat -p Show the PID and name of the program holding the socket
    • netstat -l Show only listening sockets
    • netstat –inet Show only IP connections
  • tcpdump Dump traffic on a network
  • traceroute Display the route to reach a destination hostname
    • traceroute

How to find mac-adress remotly

net view at a command prompt.
Find the name of the

machine you want.

nbtstat -a machinename at a command prompt.
MAC address will be at the bottom.


AIX Configuring a gateway

SMIT fast path Command file

Displaying the Routing Table

smit lsroute

netstat -rn

Adding a Static Route

smit mkroute

route add destination gateway

Removing a Static Route

smit rmroute

route delete destination gateway

Flushing the Routing Table

smit fshrttbl

route flush

How to configure NFS

A) On the server side

1) Install nfs-kernel-server (Linux suse)

sudo zypper install nfs-kerne-server

2) Edit the /etc/exports file

vi /etc/exports

/directory-to-export *(ro)

3) Restart the nfs server

/etc/init.d/nfsserver restart

B) On the client side

1) Create a sharee directory

mkdir /home/nsf_local

2) Mount the filesystem

mount nfsserver:/directory-to-export /home/nsf_local

3) Mount the filesystem at system restart

vi /etc/fstab

nfsserver:/directory-to-export /home/nfs_local/ nfs defaults 0 0