Monday, May 5, 2008

AIX network administration

 The examples here assume that the default TCP/IP con guration
( method is used. If the alternate method of using rc.bsdnet
is used then some of these examples may not apply.
Determine if rc.bsdnet is used over
lsattr -El inet0 -a bootup option
TCP/IP related daemon startup script
To view the route table
netstat -r
To view the route table from the ODM DB
lsattr -EHl inet0 -a route
Temporarily add a default route
route add default
Temporarily add an address to an interface
ifconfig en0 netmask
Temporarily add an alias to an interface
ifconfig en0 netmask alias
To permanently add an IP address to the en1 interface
chdev -l en1 -a netaddr= -a netmask=0xffffff00
Permanently add an alias to an interface
chdev -l en0 -a alias4=,
Remove a permanently added alias from an interface
chdev -l en0 -a delalias4=,
List ODM (next boot) IP con guration for interface
lsattr -El en0
Permanently set the hostname
chdev -l inet0 -a
Turn on routing by putting this in
no -o ipforwarding=1
List networking devices
lsdev -Cc tcpip
List Network Interfaces
lsdev -Cc if
List attributes of inet0
lsattr -Ehl inet0
List (physical layer) attributes of ent0
lsattr -El ent0
List (networking layer) attributes of en0
lsattr -El en0
Speed is found through the entX device
lsattr -El ent0 -a media speed
Set the ent0 link to Gig full duplex
(Auto Negotiation is another option)
chdev -l ent0 -a media speed=1000 Full Duplex -P
Turn o Interface Speci c Network Options
no -p -o use isno=0
Get (long) statistics for the ent0 device (no -d is shorter)
entstat -d ent0
List all open, and in use TCP and UDP ports
netstat -anf inet
List all LISTENing TCP ports
netstat -na grep LISTEN
Remove all TCP/IP con guration from a host
IP packets can be captured using iptrace / ipreport or tcpdump