Skip to content


Lekcja 3: Łączenie maszyny z Siecią

TCP/IP addressing schema is based on four groups of up to three digits each split into five classes named A, B, C, D and E. The first three classes are used in the ‘real world’.

Class

IP address

Network ID

Host ID

Valid Ranges

A

w.x.y.z

w.

x.y.z

001 – 127

B

w.x.y.z

w.x.

y.z

128 – 191

C

w.x.y.z

w.x.y.

z

192 – 223

IP address must not include leading zeros. For example, this is an invalid TCP/IP number 159.012.22.167. To be valid, it has to look like this – 159.12.22.167.

Running out of the available network and host addresses resulted with introduction of a netmask. Netmask allow for more hosts and networks for each network class.

To attach AIX machine to a network one needs to know what parameters are set on a switch port to which the host will be attached (speed, Duplex/Simplex) to configure AIX host’s network adapter. System administrator must also obtain IP address / hostname / router address / DNS server address / DNS Domain Name. It may seem confusing but there is no relation between a host name and its IP address. Entries in the /etc/hosts set are used to associate an IP address assigned to a specific network interface with an easy to remember phrase (name). Usage of names instead of numerical addresses recommended since any change in an IP address is transparent to users/applications in such case.

Attaching your host to network

After the host name is set (smitty hostname or uname -S host_name, or hostname -s host_name). Execute ‘smitty chgenet’ to set NIC attributes to the setting of the switch port your host is attached to.

Next, if your machine is not a node in a future HACMP cluster, execute the ‘smitty tcpip’ to set the network interface address and so forth.


If the NAMESERVER information is entered, then these two files are populated with the information defining the host name resolution order: /etc/netsvc.conf and /etc/resolv.conf

If this host will become a node in HACM cluster, avoid any undesirable changes to /etc/hosts using smitty chinet.


Setting TCP/IP values with smitty tcpip creates false idea relating a host name with an IP address of one of host network interfaces. It is probably OK to use it just once for the initial setup of the host or if the host is not part of a cluster. Executing smitty chinet generates screens without presence of a Hostname entry. Did you notice it?

Network Interface Cheat Sheet:

To list all network adapters (configured and not): lsdev -Cc if (or) lsdev -Cc adapter

To list only configured network interfaces: ifconfig -l

To check network speed adapter is communicating with: entstat -d entX

To check routing info: netstat -rn

To check network adapter MAC address: entstat -d entX (or) netstat -in

To check IP addres/netmask/state of all configured network interfaces: ifconfig -a

To check network connectivity: ping host_name

To check hostname resolution: host host_name (or) host ip_address (or) nslookup host_name (or) nslookup ip_address.

NFS

Network File System is based on the Client / Server architecture where Server can also be a Client.

The whole idea of NFS is for the Server to provide file systems that Clients will mount and for all practical purposes the Clients will treat these file systems as “local” ones.

The last file system is NFS file system. On the local host it is mounted on directory /cardio2/documents. The  NFS server name is cardioims-tst2 (which is actually a WINDOWS machine). On this NFS server the exported file system name is /E/DOCUMENTS. For a unix host to be NFS server it must run “nfsd” daemons. Client must run ‘biod’ daemons. They all communicate using remote procedure calls (rpc). If a host performs both roles, nfsd and biod must be present. A busy NFS server needs more nfsd daemons; busy clients need more biod daemons. NFS information is stored in /etc/rmtab and /etc/xtab

NFS Cheet Sheet

To stop/start NFS:  startsrc -g nfs / stopsrc -g nfs

To change number of nfsd daemons:

stopsrc -g nfs; chssys -s nfsd -a 6; startsrc -g nfs

To see what file systems are exported by a server execute the ‘showmount command:

To to NFS mount: nfsServerName:/path/filesystem /path/localMountPoint


example: mount cardioims-tst2:/E/DOCUMENTS /cardio2/documents

NFS file systems can be exported (allowed to mount by clients) giving clients full root privileges or not. NFS file systems should never be mounted in the foreground, instead they should always be mounted in background otherwise if the NFS server goes down it will take down the client as well.


To repair NFS:
stopsrc -g nfs; stopsrc -s portmap
cd /etc rm -fr state sm sm.bak rmtab xtab
startsrc -s portmap;startsrc -g nfs


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.