Chapter 12 Study Guide

From ITCwiki

Network Configuration

'NETWORK CONFIGURATION

Networks

Be sure to have a basic understanding of local area networks and wide area networks, and their components.

IPv4

  • Consists of four octets. Each octet represents an 8-bit binary number(0-255). Ex: 192.168.1.1
  • 32 bit address(4 octets = 4 x 8 = 32)
  • Subnet mask is used to determine the host portion of the IP address.
  • Default Gateway directs traffic destined to other networks(LANs). Ex: to the internet.

IPv6

  • Uses 128 bits. Capable of supplementing 340 trillion trillion trillion IP addresses.
  • No subnetting required due to an abundance of address space.
  • First half of address represents your network. Second half uniquely identifies computers on the LAN(link local).

Configuring a Network Interface

  • NIC(Network Interface Controller) drivers are usually contained within modules that can be inserted to the Linux kernel.
  • Modules end with the .ko(kernel object) extension and are typically stored in /lib/modules directory.
  • Use insmod or modprobe commands to manually load modules into the Linux kernel.
  • Use lsmod or rmmod commands to remove a module from the Linux kernel.
  • Configure the loaded module driver for the NIC using the ifconfig(interface configuration) command.
  • dhcpclient eth0 command configures a NIC for dynamic host configuration protocol.
  • To show interface statistics use ifconfig or netstat -i.
  • The ifdown eth0 and ifup eth0 commands can be used to deactivate and active the network interface, respectively.
  • The ping command is used to test network connectivity.
  • All configuration options can also be achieved through a GUI within the Network Configuration tool.

Useful Commands

insmod
modprobe
lsmod
rmmod
ifconfig
netstat
ifdown
ifup
dhcpclient
ping

Network Services

Network services are processes that run on your computer that provide some type of valuable service for client computers on the network. Often, they are represented by a series of daemon processes that listen for certain requests on the network. Daemons use port numbers to uniquely identify each service. Ports are defined in the /etc/services file. Port numbers range in number from 0 to 65534; ports 0 - 1023 are known as well-known ports because they represent commonly used network services. A list of well-known ports can be found on page 552. Stand-alone daemons are daemons that provided network services directly. The Internet Super Daemon(xinetd) acts somewhat like a middle man and starts the appropriate daemon to provide the network service as needed.

  • Install the internet super daemon with the yum install xinetd command, and edit the /etc/xinetd.comf file to configure the daemon.
  • Large network daemons are stand-alone daemons that are started at boot time from files in the /etc/rc.d/rc*.d directories.
  • The chkconfig command or the ntsysv utility can be used to configure stand-alone daemons to start in various runlevels.

For a list of common network services refer to page 554.

Remote Administration

  • Telnet
  • Remote commands
  • Secure Shell(SSH)
  • X Windows - GUI
  • Virtual Network Computing(VNC) - GUI

Telnet

  • The telnet command is used to obtain a command-line shell on remote Linux servers across the network that run on a telnet server daemon.
  • Most operating systems support the telnet network service.
  • Managed by xinetd (internet super daemon).
  • Execute yum install telnet-server command to install the telnet server daemon.
  • Edit options in /etc/xinetd.d/telnet file to allow service.
  • Telnet uses no encryption and can therefore be an unfavorable choice for remote administration.

Remote Commands

  • Commonly called r commands.
  • Used to execute commands on remote systems, obtain remote shells, and copy files between local and remote systems.
  • Yum install rsh-server to install to a Linux system.
  • Edit /etc/xinetd.d/rlogin and /etc/xinetd.d/rsh files for configuration. Restart the xinetd daemon using the service xinetd restart command.
  • A remote user must have authorization or permission to login remotely using r commands.

Useful Commands

yum install rsh-server
service xinetd restart
rlogin
rcp
rsh

Secure Shell(SSH)

  • Designed as a secure replacement for the recently discussed commands that encrypts information that passes across the network.
  • The SSH daemon (sshd) is installed by default and is configured to start at runlevel 5.
  • Uses secure challenge-response authentication method.

Useful Commands

ssh {hostname}
ssh -l username {hostname}
ssh-keygen

Remote X Windows

  • uses telnet or secure shell to connect to remote host and allows an administrator to execute any graphical utillity within the remote shell, such as system config-network.

Virtual Network Computing(VNC)

  • Graphical option for administrating a Linux system remotely.
  • Uses a special platform-independent protocol called Remote FrameBuffer(RFB) to transfer graphics, mouse movements, and keyboard input across the network.
  • Available for most operating systems today.
  • To allow remote connections, run yum install vnc-server command.
  • Configure password for connections listed in the /etc/sysconfig/vncservers file using the vncpasswd command.
  • Password is stored in ~/.vnc/passwd.
  • Connect to the VNC server using the vncviewer command.