How to check the current network configuration
From Wiki-UX.info
Here is a list of useful command that can be used to obtained current network configuration status.
Contents
How to found the IP address of the network card assigned to system host?
# nsquery hosts $(hostname) | grep Address Address: 16.90.48.75
How to check the available network cards?
# ioscan -fnkC lan Class I H/W Path Driver S/W State H/W Type Description ====================================================================== lan 0 0/1/2/0 iether CLAIMED INTERFACE HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core lan 1 0/1/2/1 iether CLAIMED INTERFACE HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core lan 2 0/4/1/0/6/0 igelan CLAIMED INTERFACE HP A9784-60002 PCI/PCI-X 1000Base-T FC/GigE Combo Adapter
How to display LAN device configuration and status?
# lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/1/2/0 0x00156004A2FA 0 UP lan0 snap0 1 ETHER Yes 119 0/1/2/1 0x00156004A2FB 1 UP lan1 snap1 2 ETHER Yes 119 0/4/1/0/6/0 0x0016353E5012 2 UP lan2 snap2 3 ETHER Yes 119
How to determine the current IP Addresses?
# netstat -in Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lan0 1500 16.90.48.0 16.90.48.75 61923 0 22284 0 0 lo0 32808 127.0.0.0 127.0.0.1 51973 0 51973 0 0
or
for ppa in `lanscan -p`
do
printf "%s: " lan$ppa
ifconfig lan$ppa 2> /dev/null | awk '$0 ~ /inet/ {printf "%s/%s", $2, $4}'
echo
done
Example:
lan0: 16.90.48.75/fffffc00 lan1: lan2:
How to display the current routing table?
# netstat -rn Routing tables Destination Gateway Flags Refs Interface Pmtu 127.0.0.1 127.0.0.1 UH 0 lo0 32808 16.90.48.75 16.90.48.75 UH 0 lan0 32808 16.90.48.0 16.90.48.75 U 2 lan0 1500 127.0.0.0 127.0.0.1 U 0 lo0 32808 default 16.90.48.1 UG 0 lan0 1500