Resolves ip to host name (from /etc/hosts file):
#host 192.168.100.9Resolve gz to ip address (from /etc/hosts file):
#host gzTo change the host name to gz:
#hostname gzTo the status of ethernet device en0:
#entstat en0To list the detailed status of device en0:
#entstat -d en0To list all net configurable attributes and their values:
#no -aTo change gzwall parameter to its default value:
#no -d gzwallTo make the machine as router in tcpip networks:
#no -o ipforwarding=1To trace the route to gz:
#traceroute gzTo tcp ping to the machine gz:
#ping gzTo show the status of all network interfaces:
#ifconfig -aTo show the status of en0:
#ifconfig en0Turns on network card en0:
#ifconfig en0 upTurns off network card en0:
#ifconfig en0 downRemoves en0 card from the network interface list:
#ifconfig en0 detachConfigure en0 starts immediately:
Temporarily:
# ifconfig en0 inet 192.168.100.9 netmask 255.255.255.0 upPermanently:
# chdev -l en0 -a netaddr=192.168.100.10 -a netmask=0xffffff00Create alias ip address for en0:
Temporarily:
# ifconfig en0 alias 192.168.100.10 netmask 255.255.255.0Permanently:
# chdev -l en0 -a alias4=192.168.100.10,255.255.255.0Remove a permanently added alias:
# chdev -l en0 -a delalias4=192.168.100.10,255.255.255.0Via SMIT:
# smitty tcpip -> further Configuration -> Network Interfaces -> Network Interface Selection -> Configure AliasesTo make 192.168.100.1 as default gateway for entire network:
Temporarily:
#route add 0 192.168.100.1Permanently:
#chdev -l inet0 -a route=0,192.168.100.1To remove a route:
Temporarily:
#route del 0 192.168.100.1Permanently:
#chdev -l inet0 -a delroute=0,192.168.100.1To make 200.7 as gateway for 300.0 network:
#route add 192.100.300.0 192.100.200.7To clear the gateway table:
#route -fTo change the host name to gz permanently:
#chdev -l inet0 -a hostname=gzTo set the MTU to 1500 on en69:
#chdev -l en69 -a mtu=1500To show the state of all sockets:
#netstat -aTo show the network buffers cache:
#netstat -cTo show the net drops of packets:
#netstat -DTo display interface statistics:
#netstat -iTo show the routing table:
#netstat -rTo show routing table (ip will be given instead of host names)
#netstat -rnTo show the statistics of the protocols
#netstat -sTo show the statistics of respective protocols
#netstat -s -p < tcp/udp/ipv6>- Log in to post comments
- 23315 views