AIX Network commands

root's picture

Resolves ip to host name (from /etc/hosts file):

#host 192.168.100.9

Resolve gz to ip address (from /etc/hosts file):

#host gz

To change the host name to gz:

#hostname gz

To the status of ethernet device en0:

#entstat en0

To list the detailed status of device en0:

#entstat -d en0

To list all net configurable attributes and their values:

#no -a

To change gzwall parameter to its default value:

#no -d gzwall

To make the machine as router in tcpip networks:

#no -o ipforwarding=1

To trace the route to gz:

#traceroute gz

To tcp ping to the machine gz:

#ping gz

To show the status of all network interfaces:

#ifconfig -a

To show the status of en0:

#ifconfig en0

Turns on network card en0:

#ifconfig en0 up

Turns off network card en0:

#ifconfig en0 down

Removes en0 card from the network interface list:

#ifconfig en0 detach

Configure en0 starts immediately:

Temporarily:# ifconfig en0 inet 192.168.100.9 netmask 255.255.255.0 up
Permanently:# chdev -l en0 -a netaddr=192.168.100.10 -a netmask=0xffffff00

Create alias ip address for en0:

Temporarily:# ifconfig en0 alias 192.168.100.10 netmask 255.255.255.0
Permanently:# chdev -l en0 -a alias4=192.168.100.10,255.255.255.0

Remove a permanently added alias:

# chdev -l en0 -a delalias4=192.168.100.10,255.255.255.0
Via SMIT: # smitty tcpip -> further Configuration -> Network Interfaces -> Network Interface Selection -> Configure Aliases

To make 192.168.100.1 as default gateway for entire network:

Temporarily:#route add 0 192.168.100.1
Permanently:#chdev -l inet0 -a route=0,192.168.100.1

To remove a route:

Temporarily:#route del 0 192.168.100.1
Permanently:#chdev -l inet0 -a delroute=0,192.168.100.1

To make 200.7 as gateway for 300.0 network:

#route add 192.100.300.0 192.100.200.7

To clear the gateway table:

#route -f

To change the host name to gz permanently:

#chdev -l inet0 -a hostname=gz

To set the MTU to 1500 on en69:

#chdev -l en69 -a mtu=1500

To show the state of all sockets:

#netstat -a

To show the network buffers cache:

#netstat -c

To show the net drops of packets:

#netstat -D

To display interface statistics:

#netstat -i

To show the routing table:

#netstat -r

To show routing table (ip will be given instead of host names)

#netstat -rn

To show the statistics of the protocols

#netstat -s

To show the statistics of respective protocols

#netstat -s -p < tcp/udp/ipv6>

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root