Chapter 09 Network Basics HP-UX Handbook Revision 13.
Chapter 09 Network Basics October 29, 2013 TERMS OF USE AND LEGAL RESTRICTIONS FOR THE HP-UX RECOVERY HANDBOOK ATTENTION: PLEASE READ THESE TERMS CAREFULLY BEFORE USING THE HP-UX HANDBOOK. USING THESE MATERIALS INDICATES THAT YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THE HP-UX HANDBOOK. THE HP-UX HANDBOOK HAS BEEN COMPILED FROM THE NOTES OF HP ENGINEERS AND CONTAINS HP CONFIDENTIAL INFORMATION.
Chapter 09 Network Basics October 29, 2013 TABLE OF CONTENTS Introduction ______________________________________________________________________ 4 A little bit of Theory ________________________________________________________________ 4 Protocols and Models _____________________________________________________________________4 IP Addresses and Netmasks ________________________________________________________________ 7 Private IP Addresses __________________________________________________________________
Chapter 09 Network Basics October 29, 2013 Introduction This document is a short introduction to network configuration and administration on HP-UX systems. It discusses the most common networking tasks, that you might encounter during your daily work but will not cover every task in detail. For additional information please refer to www.hp.com/go/hpux-networking-docs Or http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c02492449/c02492449.
Chapter 09 Network Basics October 29, 2013 The OSI Reference Model illustrates the access of applications to the network. This implementation is independent (from operating systems and hardware) and helps a lot in heterogeneous networks. Table 1 shows the standardized terminology; the right column offers some examples for the respective layer. 7 APPLICATION LAYER (i.e…telnet, ftp, DNS, etc) consist of application programs that use the network 6 PRESENTATION LAYER (i.
Chapter 09 Network Basics October 29, 2013 UDP stands for User Datagram Protocol: The User Datagram Protocol gives application programs direct access to a datagram delivery service, e.g. the delivery service that IP provides. This allows applications to exchange messages over the network with a minimum of protocol overhead. UDP is an unreliable, connectionless datagram protocol.
Chapter 09 Network Basics October 29, 2013 IP Addresses and Netmasks An IP address specifies the network the system resides in and the “number” of the host within this network. The IP address consists of a network part and a host part. The network part is important for routing, to find a way through the network(s) to the target. The host part identifies a specific host within its own network. The netmask defines how many bits of the 4-byte IP address are used for the network part.
Chapter 09 in decimal: Network Basics October 29, 2013 15.140.15.255 IPv6 IPv6 is the next generation network-layer protocol designed to be the successor to the current Internet Protocol version 4 (IPv4). It provides the packet delivery service for TCP, UDP and ICMPv6. IPv6 has significant advantages over IPv4 in terms of increased address space, simplified header format, integrated QoS support and mandatory security.
Chapter 09 Network Basics October 29, 2013 or network. The systems store the corresponding information within the routing table and we can have a look at this information with the netstat command: # netstat –rn The kernel will refer to this list, when deciding which interface to use to send out a network package. To interpret the output you should consult the man page: # man routing The route command is used to (re-)configure the routing table on a running system.
Chapter 09 Network Basics October 29, 2013 Display a HW scan of all network interfaces: # ioscan -funC lan Display hardware state, paths and names (how the system has recognized the NICs): # lanscan Configure and display software state, IP and network parameters of a NIC: # ifconfig Display and customize driver settings of interfaces (speed, duplex modi, pmtu): # lanadmin Display lots of statistics and status information: # netstat -[ainrv] Add and delete entries from the routing table i
Chapter 09 Network Basics October 29, 2013 # ping [-o] Test network connectivity and display route to target: # traceroute To specify a network interface to obtain the source IPv4 or IPv6 address for outgoing probe packets. This is normally only useful on a multi-homed host. (See the -s flag for another way to do this.): # traceroute –i This utility is very useful to check connectivity in Serviceguard environments. Download it from, http://teams3.sharepoint.hp.
Chapter 09 Network Basics October 29, 2013 nameserver, domainname. The initial configuration of the system should be done using the script; # /sbin/set_parms ( man set_parms).
Chapter 09 Network Basics October 29, 2013 1000Base-T Dual-port Adapter To configure the network on your system you should also check/edit the file /etc/hosts. It should contain at least the line “127.0.0.1 localhost loopback” and one additional line for each local IP address.
Chapter 09 Network Basics October 29, 2013 ============== ========= ============== ======== ============== lan0 UP 0x00306EF30764 igelan 1000Base-T lan1 UP 0x001A4B066052 iether 1000Base-T lan2 UP 0x001A4B066053 iether 1000Base-T lan900 DOWN 0x000000000000 hp_apa hp_apa These commands can also be used to change the network settings on a running system. But please keep in mind that some programs/applications may have problems changing the network environment during runtime.
Chapter 09 Network Basics October 29, 2013 (10HD/100HD/100FD/1000FD/100000FD…). If you use 100BaseT interfaces, the whole environment works more stable if you avoid the value AUTO If you use Gigabit interfaces, it is strongly suggested to use the value AUTO only. duplex communication system is a system composed of two connected parties or devices that can communicate with one another in both directions. Ref: http://en.wikipedia.
Chapter 09 Network Basics October 29, 2013 communication within the same logical subnet, you should use “HP AUTO-PORT Aggregation” software (aka APA) as a supported solution. Additionally, APA can provide load balancing and high availability. Dead Gateway Detection Starting with HP-UX 11.00, systems use the so-called Dead Gateway Detection mechanism, i.e. the active gateways in the routing table are pinged regularly to see if they are still active.
Chapter 09 Network Basics October 29, 2013 # ifconfig lan1 lan1: flags=1843 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.
Chapter 09 default Network Basics 10.10.10.254 UG 0 lan0 October 29, 2013 1500 # ping 10.10.10.254 Checking network connectivity After installation or whenever somebody suspects a network problem, we have to check whether the network is up and running. The following table lists some examples on how to gather the needed information. (There might be other ways to collect the same data.
Chapter 09 Network Basics lanadmin –g “Crd In#” Look for speed settings and statistics nettl –status Size >0 and location of nettllogfiles ll /var/adm/nettl.LOG00* No current change at this files Dmesg Last entry of dmesg should be memory information Check if IPFilter is installed and if we have to discuss limitations by rules ; “ipfstat: not found.
Chapter 09 Network Basics October 29, 2013 Discussing some known problems Problem: After a reboot the network and the network interfaces are not configured Before you start “the big troubleshooting procedure”, check /etc/rc.log first for any relevant information AND check and ensure that the file systems /tmp and /are not full (message: file system full). Our system requires some space for temporary files in /tmp to initialize the network stack.
Chapter 09 Network Basics October 29, 2013 Kernel configuration with ndd HP-UX gives us lots of opportunities to tune the network stack for performance improvement and adaptation to different environments. The behavior of the kernel can be changed with the ndd command. # ndd –h This will show you the available kernel parameters. You will get additional information for each parameter, if you run the command with the option “-h” and the specific parameter, e.g.
Chapter 09 Network Basics October 29, 2013 NDD_NAME[0]= NDD_VALUE[0]= Set a unique ordinal (sequential number) in brackets. Starting with “0”, you have to increase this number by one, for each new entry. If you run: # ndd –c the ndd program will re-read the configuration file and activate the changes within the running kernel. During startup, the system runs this script in /sbin/rc2.d/S340net (and in some other scripts).
Chapter 09 Network Basics October 29, 2013 XPORT/Pages/NDD%20parameters/nddparams.aspx, (HP-Internal). Trace tools If there are any problems or unexpected effects in the network it is often really helpful to check the network communication directly. There are some easy to use programs available for this purpose. This is a short introduction to the most common tools: nettl The nettl command is a tool to monitor problems within the network and to trace the complete network communication.
Chapter 09 Network Basics October 29, 2013 to the value of the “–tm” option. You can use the –n option to specify the number of output files. The default is 2. # nettl –tn pduin pduout –e ns_ls_ip –n 8 –tm 99999 –f /tmp/my-trc We have to format it to get a readable trace output or to view the binary output with some viewer tools like ethereal (see below). We can format the binary output files from nettl (both – trace and log files) with the netfmt command.
Chapter 09 Network Basics October 29, 2013 appropriate information. Additional hints: To get a first impression of what is going on within the network, we can combine nettl and netfmt, even though UNIX pipes are to slow to trace a really busy network. # /usr/sbin/nettl -tn pduin pduout -e ns_ls_ip | netfmt -F1TN | tee file This shows you what happened on the network and writes it to file.
Chapter 09 Network Basics October 29, 2013 Show the DNS traffic ( port 53 ) running via lan1 to the name server with IP address 15.137.16.1 # tcpdump –p –n –i lan1 host 15.137.16.1 and port 53 These commands write (-w option) only one line of information per network package. Often those one-liners do not contain enough information. Therefore we better write a raw trace to disk (using the “-s” option to specify how much data should be stored – “0” means all).
Chapter 09 Network Basics October 29, 2013 ethereal and wireshark Another very usefully tool from the open-source community is the program ethereal/wireshark. Please don’t be confused about those two names. It is really the same software, only in different versions. Formerly, the program was called “ethereal”, but due to some legal restrictions it now uses the name “wireshark”. Full documentation, the latest version and more is available at http://www.wireshark.org.