HP-UX HB v13.00 Ch-09 - Networking Basics
HP-UX Handbook – Rev 13.00 Page 17 (of 27)
Chapter 09 Network Basics
October 29, 2013
# ifconfig lan1
lan1: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 10.10.10.111 netmask ffffff00 broadcast 10.10.10.255
# netstat -in |grep lan1
lan1 1500 10.10.10.0 10.10.10.111 0 0 0 0 0
# netstat -rnv |grep lan1
10.10.10.111/255.255.255.255 10.10.10.111 UH 0 lan1 4136
10.10.10.0/255.255.255.0 10.10.10.111 U 2 lan1 1500
The kernel defines two routes for each physical and virtual interface automatically; one to
organize communication with the IP address locally and another to define the way to local
subnets.
If we need more than one IP address on this physical interface, we can simply add it with the
ifconfig command:
# ifconfig lan1:1 10.10.10.111 netmask 255.255.255.0 up
We have to check, if anything is reachable within out new network. We send packages to the
broadcast address of this network:
# ping 10.10.10.255
PING 10.226.91.255: 64 byte packets
64 bytes from 10.10.10.30: icmp_seq=0. time=0. ms
64 bytes from 10.10.10.14: icmp_seq=0. time=0. ms
64 bytes from 10.10.10.38: icmp_seq=0. time=0. ms
At least our own system has to answer. If you get lots of answers, then the network is up and
running. The above simple test requires no additional duplex settings, but for data transfer it is
important.
Check the speed/duplex/Autonegotiation settings with:
# lanadmin –x 1
Speed = 1000 Full-Duplex.
Autonegotiation = On.
Use the card instance number from the lanscan output to address the appropriate interface. The
same command used with option “-x” allows us to make changes. Some older drivers do not
recognize the “-x” option, instead use “-s”/”-S” for those interfaces.
To transmit data outside of your local subnet you should be able to ping the gateway:
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
10.10.10.30 10.10.10.30 UH 0 lan0 32808
10.10.10.0 10.10.10.30 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808