1.79k likes | 3.61k Views
Network Configuration. Unit objectives Understand networks, the TCP/IP protocol, classes, and subnets, and configure an interface Use PPP to send TCP/IP over modem, ISDN, and DSL interfaces Understand name resolution and DNS
E N D
Network Configuration Unit objectives • Understand networks, the TCP/IP protocol, classes, and subnets, and configure an interface • Use PPP to send TCP/IP over modem, ISDN, and DSL interfaces • Understand name resolution and DNS • Use network services to share files, use applications, and read e-mail • Configure network services and provide routing and firewall services
Networks and Protocols • Wired media • Wireless media • LANS • WANS • VPNS • ISP
The TCP/IP protocol • Internet Protocol (IP) address • Four 8-bit numbers (octets) • Identifies a computer on the network • Two parts: network and host • Subnet mask • Determines the network and host portions of an IP address
Default gateway • Address of the router that sends packets to other networks
TCP/IP classes • Class A • 1st octet: 1 – 127 • Subnet mask: 255.0.0.0 • 127 networks, 16,777,214 hosts • Class B • 1st octet: 128 – 191 • Subnet mask: 255.255.0.0 • 16,284 networks, 65,534 hosts • Class C • 1st octet: 192 – 223 • Subnet mask: 255.255.255.0 • 2,097,152 networks, 254 hosts continued
TCP/IP classes, continued • Class D • 1st octet: 224 – 239 • Used for multicasting • Can’t be assigned to interfaces as IP addresses • Class E • 1st octet: 240 – 254 • Experimental • Not typically assigned to a computers
Subnets • Subdivide networks into smaller sections • Control traffic flow • Improve manageability • Applied to class A, B, and C networks
Configuring a NIC interface • ifconfig command • Assigns TCP/IP configuration to a NIC • Eth0 IP netmask subnet broadcast address • Displays configuration of all network interfaces • ifup and ifdown
Dynamic Host Configuration Protocol (DHCP) • Provides TCP/IP configuration values to hosts • dhclient command • Requests information from DHCP server
packet internet groper (ping) • Checks connectivity to other computers • Checks interfaces for proper configuration
Point to Point Protocol (PPP) • Runs TCP/IP over serial lines • Used by three common technologies • Modems • /dev/modem points to /dev/ttyS0 • ISDN • kudzu • DSL • Through NIC
Name resolution • Host name • Name assigned to a computer • Uses plain language • Fully Qualified Domain Name (FQDN) • Host name that follows DNS convention • Domain Name Space (DNS) server • Resolves FQDNs to IP address
Host Names • host name command • Set a hostname for a session • /etc/hosts file • Keeps a static list of names to IPs
Using DNS • Centralized naming list or a company • DNS Servers • List FQDNs of host on their networks • Refers requests to other DNS servers • /etc/resolve.conf • Use nslookup to test connection • Name Lookup order • /etc/nssswitch.conf, /etc/hosts.conf
Network File System (NFS) • Method for transferring files between UNIX and Linux systems • Not as common as FTP • To access files using NFS: • Use a remote computer that has the NFS daemons started • Mount a directory from remote machine to a local directory
Network File System (NFS) • mount –t nfs nfs.sampledomain.com:/var/mnt
Accessing windows files • mount –t smbfs //windowsxp/accoutning /mnt • smbmount command • Same as mount –t smbfs • smbclient utility • Connects to shared resources on a Windows system
Running remote applications • telnet command • Obtains a BASH shell from a remote computer
Secure access methods • Secure Shell (ssh) utility • Encrypts communication between server and host • rlogin • One of several utilities • Allows access without passwords • Uses trusted access
Transferring e-mail • Downloaded via two protocols • Post Office Protocol (POP) • Downloads the messages from the server to the computer • Interactive Mail Access Protocol (IMAP) • Stores the messages on the server and displays them across the network
Accessing e-mail • Mail User Agent (MUA) • Allows you to read, right, and send e-mail • Many different methods • Both standalone program and part of larger program
Common network services • /etc/services file • Lists ports that daemons listen on • Port • Number that identifies a network service • 65535 possible ports • Well known port • used by common networking services • 0 to 1024
Internet Super Daemon (xinetd) • Initializes and configures many network services
Xinetd • Manages connections for smaller daemons • /etc/xinetd.conf • /etc/xinted.d • Older systems use inted
Standalone daemons • Normally started at bootup • Configure themselves without assistance from the Internet Super Daemon • The ntsysv utility • Configures most standalone daemons to start in various run levels • Long config files • Log to own directory
DHCP server configuration • /etc/dhcpd.conf • Lists IP range for the network • Address lease durations • Other configuration options
Apache configuration • /var/www/html • Default document root directory • /etc/httpd/conf/httpd.conf • Contains nearly all Apache configuration options • Each line called a directive
Using Samba • Shares files with Windows computers • Need to create windows user accounts • Add samba passwords with smbpasswd –a username • Emulates the SMB protocol • Main configuration file: • /etc/samba/smb.conf
FTP services • wu-ftpd • Controlled by Internet Super Daemon • Configuration file for wu-ftpd: • /etc/xinetd.d/wu-ftpd • vsftpd • Standalone daemon • Easier to configure • Included with Fedora Core 2
Network Information Service (NIS) • Coordinates common configuration files • /etc/passwd • /etc/shadow • /etc/hosts • Configuration files: • /etc/sysconfig/network • /var/yp/Makefile • /var/yp/securenets • /etc/ypserv.conf
NIS Commands • ypcat - Prints the values in NIS map • ypmatch - Prints values for specified keys in NIS map • ypwhich - Finds out what server the current host is using • ypclnt - Programmer's suite that provides an interface to the YP subsystem • yppasswd - Changes the password for NIS domain • ypset - Makes ypbind connect to a particular server • ypmake - Builds a new hash map from those files that have changed • ypinit - Configures a host as master or slave server • yppush - Makes slave servers update their versions of map