Networking

Restarting network services

/sbin/service network restart
Natural fits for networking
  • Store all user data and user settings centrally; if the network is down, the client computers are essentially unusable
  • Store all user data and user settings locally; store some shared data on a file server; if the network is down, the client computers are still fairly usable
Network architecture
  • Fat client
  • A regular PC that's hooked up to a network
  • Requires a good deal of local processing power and memory
  • Difficult to configure and secure the clients
  • Client-server
  • Database runs on a central server
  • Most of the programs run locally
  • Uses fat clients
  • Thin client
  • All programs and data are stored on central servers
  • Doesn't require a local hard drive or floppy drive
  • Doesn't do much processing locally
  • Easier to maintain than fat clients; more flexible than dumb terminals
  • Combines the GUI of a PC with the reliability and security of a mainframe
  • Old PCs / fat clients can easily be converted into thin clients
  • Network computer
  • Closer to PCs than to dumb terminals
  • Some can be used as dumb terminals for backwards compatibility
  • A thin client that does very little processing locally
  • X Window terminal
  • A thin client running X server
  • Doesn't require much local processing power or memory
  • The client only needs to be able to boot and manage an X display
  • The server handles user login and authentication
  • Dumb terminal
  • All programs and data are stored on a central server
  • Data and input are not processed locally
NFS (Network File System)
Summary
  • Package needed: nfs-utils
  • Create the local directories that will serve as mount points for the nfs partitions of the other computers.
  • Config files:
  • /etc/hosts
  • /etc/fstab
  • /etc/exports
  • /etc/hosts.allow
  • /etc/hosts.deny
  • Services:
  • nfs
  • portmap
  • Daemons:
  • rpc.portmap   (or portmap)
  • rpc.lockd
  • rpc.mountd
  • rpc.statd
  • rpc.rquotad
  • rpc.nfsd
Usage
  • To find out which runlevels the services are enabled in:
/sbin/chkconfig --list
  • To find out how many of the daemons are running:
/usr/sbin/rpcinfo -p

/ps -x | grep rpc

  • Mounting the nfs partitions
  • If the "noauto" option is used in fstab, the nfs partition has to be mounted manually when needed:
mount <local-mount-point>
  • The nfs partion can be manually unmounted with the following command:
umount <local-mount-point>
  • Synchronizing the computers
  • To prevent problems with access and ownership rights, /etc/passwd and /etc/group must be synchronized on all computers.
  • On all computers, the same UID and GID numbers must apply.
  • In large networks, this can be achieved through NIS or rpc.ugidd.
  • Locking problems can be avoided by using the "nolock" option in fstab.
Installation
  • Installing the nfs-utils package (if not already installed)
  • Enabling the services in the appropriate runlevels
/sbin/chkconfig --level 345 nfs     on
/sbin/chkconfig --level 345 portmap on

  • Loading the daemons (if not already loaded) (login as root)
/sbin/portmap
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/sbin/rpc.statd
/sbin/rpc.lockd
/usr/sbin/rpc.rquotad
  • Sample lines added to config files:
  • /etc/hosts
192.168.1.100    jupiter.planets.network  jupiter
192.168.1.101    saturn.planets.network    saturn
  • /etc/fstab
saturn:/mnt/saturn/public  /mnt/saturn  nfs  noauto,user,ro,hard,intr  0 0
  • /etc/exports
/mnt/jupiter/public  saturn(ro)
  • /etc/hosts.allow
portmap: saturn
lockd:   saturn
mountd:  saturn
rquotad: saturn
statd:   saturn

  • /etc/hosts.deny
portmap: ALL
lockd:   ALL
mountd:  ALL
rquotad: ALL
statd:   ALL
  • Description of the sample installation:
  • jupiter and saturn are two computers in the domain planets.network.
  • The changes shown are for jupiter.
  • jupiter will access files on saturn located at /mnt/saturn/public, using /mnt/saturn as the local mount point.
  • The directory /mnt/saturn must be created on jupiter.
  • jupiter will allow saturn access to files located at /mnt/jupiter/public.
NIS (Network Information Service)
Summary
  • NIS provides information that has to be known throughout the network, to all machines on the network.
  • If a users password entry is recorded in the NIS passwd database, they can login on all machines on the network which have the NIS client programs running.
  • Information commonly distributed by NIS
  • login names/passwords/home directories (/etc/passwd)
  • group information (/etc/group)
  • Roles for computers in the NIS domain:
  • Server (master server)
  • Slave (nonmaster server) (automatically receives updated NIS databases from the master NIS server, via the yppush program)
  • Client
Client software
  • ypbind, ypwhich, ypcat, yppoll, ypmatch
  • As soon as ypbind is running the computer is an NIS client.
Server software
  • ypserv
Misc
  • Manually set the nisdomain in /etc/sysconfig/network
NISDOMAIN=mydomain.network