Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Chapter 4: server services Objectives • Configure network interfaces using commandline and graphical utilities • Set up a simple DHCP server • Manage networked printing services The Complete Guide to Linux System Administration 2 Configuring Linux Networking • Learn more about – Networking protocols – Network configuration The Complete Guide to Linux System Administration 3 Understanding Network Devices in Linux • Linux networking devices – Not shown in /dev directory – Do not “exist” on system until appropriate device driver installed in kernel • Networking device – Named channel over which network traffic can pass • Device drivers for networking are kernel modules The Complete Guide to Linux System Administration 4 Understanding Network Devices in Linux (continued) • Kernel modules can be loaded or unloaded while Linux is running • /dev/eth0 – First Ethernet card installed on system • Media Access Control (MAC) address – Unique address assigned by Ethernet card manufacturer The Complete Guide to Linux System Administration 5 Understanding Network Devices in Linux (continued) • To obtain MAC address – Host broadcasts message to entire network segment using Address Resolution Protocol (ARP) – Host with IP address responds directly to computer that sent ARP request with MAC address – Source host stores MAC address and IP address The Complete Guide to Linux System Administration 6 Understanding Network Devices in Linux (continued) • arp command – Display ARP cache • Mapping of IP addresses to hardware addresses – Used mainly for troubleshooting network connectivity – Refreshed frequently The Complete Guide to Linux System Administration 7 Configuring Networking with Command-line Utilities (continued) • • • • View status of interface: ifconfig eth0 Stop Ethernet interface: ifconfig eth0 down Start Ethernet interface: ifconfig eth0 up Routing table tells networking software where to send packets that are not part of local network The Complete Guide to Linux System Administration 8 Configuring the DNS Resolver • DNS – Used to convert host and domain names into IP addresses – Implemented by server that supports DNS • Reverse DNS converts IP address to domain name • Resolving – Process of converting domain name to IP address or vice versa The Complete Guide to Linux System Administration 9 Configuring the DNS Resolver (continued) • Resolver – Client part of DNS – Makes requests to DNS server – Test by pinging another system using host name instead of IP address – Configured by file /etc/resolv.conf – Contains IP address of one or more DNS servers preceded by keyword nameserver – Can include up to three DNS servers The Complete Guide to Linux System Administration 10 Configuring the DNS Resolver (continued) • Keyword – Word to which program reading configuration file attaches special meaning • Utilities for researching DNS problems: – dnsquery – nslookup – dig – whois – host • /etc/hosts file stores IP addresses and corresponding domain names in text file on host The Complete Guide to Linux System Administration 11 Dynamic Routing with Routing Protocols • Static routing – Uses preconfigured routing table – Not good choice for: • Larger networks • Unreliable connections • Dynamic routing uses specialized routing protocol to build and modify routing tables automatically The Complete Guide to Linux System Administration 12 Dynamic Routing with Routing Protocols (continued) The Complete Guide to Linux System Administration 13 Configuring a DHCP Server • DHCP server installed by default on many Linux systems • /etc/dhcpd.conf file – Configuration for DHCP – Instructs DHCP server which IP address ranges are available for DHCP clients The Complete Guide to Linux System Administration 14 Configuring a DHCP Server (continued) • When client requests IP address : – DHCP server leases address to client for specified time – At end of lease client must request new IP address – Whole arrangement transparent to user on client host • DHCP client can run on any operating system The Complete Guide to Linux System Administration 15 Networked Printing Services • Linux includes network printing capabilities The Complete Guide to Linux System Administration 16 Using Traditional Linux Printing: LPRng • Traditional Linux printing system • Based on version of UNIX • Allows multiple users to print files at same time to: – Local printer – Networked printers • Print queues – System administrator must define printers – Printer definitions describe type of printer and features to be used The Complete Guide to Linux System Administration 17 Using Traditional Linux Printing: LPRng (continued) • Printing file in LPRng system – Application submits file to be printed (print job) – Print job processed by print filter converts information from Linux application into formatting codes to produce desired output – Printing utility stores print job in print spool directory • Default directory /var/spool/lpd – Lpd print server program keeps track of all print jobs in all print queues on system The Complete Guide to Linux System Administration 18 Using Traditional Linux Printing: LPRng (continued) • Correlation between print queue and physical printer not always one to one • Linux print filter – Same as printer driver in other operating systems – Converts documents or images into format that printer can use The Complete Guide to Linux System Administration 19 Using Traditional Linux Printing: LPRng (continued) The Complete Guide to Linux System Administration 20 Using Traditional Linux Printing: LPRng (continued) • Configuring local printer definitions – Each LPRng printer definition created as print queue entry in /etc/printcap configuration file • Uses complex format – Must provide appropriate Linux device name • Parallel ports use device name lp followed by device number • Serial ports use name ttyS followed by device number The Complete Guide to Linux System Administration 21 Printing Remotely Using LPRng • Define printer on system that refers to remote computer and print queue on remote system – Key options in configuration file • rm remote system specified • rp remote print queue specified • Once print job has been sent to remote system using lpd, user has no direct control over it The Complete Guide to Linux System Administration 22 Managing Printing (continued) • Alternatives command • lpr command and lpc command • Using lpc – Prevent new print jobs from being accepted by print queue – Prevent print jobs from being sent to printer – Cancel print job currently being printed – See status of any printer The Complete Guide to Linux System Administration 23 Managing Printing (continued) • lpq utility lists each print job in print queue with status information • lprm command deletes print job from queue • Graphical print management utilities – Print Manager The Complete Guide to Linux System Administration 24