linux+ guide to linux certification chapter fifteen linux networking

52
Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Upload: maud-welch

Post on 31-Dec-2015

340 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Linux+ Guide to Linux Certification

Chapter Fifteen

Linux Networking

Page 2: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

ObjectivesObjectives

• Describe the purpose and types of networks, protocols, and media access methods

• Understand basic configuration of TCP/IP protocol• Configure a NIC interface to use TCP/IP protocol• Configure a modem, ISDN, and DSL interface to use the PPP

and TCP/IP protocols• Understand the purpose of hostnames and how they are

resolved to IP addresses• Use common network utilities to interact with network

services• Identify and configure common network services

Page 3: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Networks and TCP/IPNetworks and TCP/IP

• Two or more computers connected with media that can exchange information are called a network

• Networks that connect computers within close proximity are called Local Area Networks (LANs)

• Networks that connect computers separated by large distances are Wide Area Networks (WANs)

• Special computers called routers transfer information from one network to another

Page 4: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Networks and TCP/IPNetworks and TCP/IP

• Protocols– Set of rules of communication used between

computers on a network

• Packets– Packages of data formatted by a network protocol

• Media access method– A system that defines how computers on a

network share access to the physical medium

Page 5: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Networks and TCP/IPNetworks and TCP/IP

• LAN protocols you may configure in Linux include:– TCP/IP (Transfer Control Protocol/Internet Protocol)

– UDP/IP (User Datagram Protocol/Internet Protocol)

– IPX/SPX (Internetwork Packet Exchange/Sequence Packet Exchange)

– Appletalk

– DLC (Data Link Control)

– DECnet (Digital Equipment Corporation network)

Page 6: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Networks and TCP/IPNetworks and TCP/IP

• Ethernet– The most common media access method used in

networks today

• Token Ring– Popular media access method

• The media access method is usually contained within the hardware on the NIC or modem

Page 7: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

The TCP/IP ProtocolThe TCP/IP Protocol

• Internet Protocol (IP) address– Series of four 8-bit numbers that represent a computer on

a network– Used by a computer on the network to identify itself to

other computers

• Subnet mask– Series of four 8-bit numbers that determine the network

and host portions of an IP address

• Default gateway– IP address on router that sends packets to remote

networks

Page 8: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

The TCP/IP ProtocolThe TCP/IP Protocol

Figure 15-1: A sample IP address and subnet mask

Page 9: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

• ifconfig command– Can be used to assign a TCP/IP configuration to a

NIC as well as view the configuration of all network interfaces in the computer

• packet internet groper (ping) command– Used to check the connectivity on a network

Page 10: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-2: Configuring network hardware

Page 11: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-3: Configuring a network device

Page 12: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-4: Network device properties

Page 13: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-5: Configuring a network protocol

Page 14: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-6: Network protocol properties

Page 15: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

• Linuxconf– Common graphical configuration program that

can configure network interfaces

• netconfig– Graphical utility used to configure the network

card settings of a computer

Page 16: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-7: The Linuxconf utility

Page 17: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a NIC InterfaceConfiguring a NIC Interface

Figure 15-8: The netconfig utility

Page 18: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

• There are three common technologies that use Point-to-Point Protocol (PPP) today to connect computers to a network such as the Internet:– Modems– ISDN– DSL

Page 19: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-9: Configuring a new PPP device

Page 20: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-10: Configuring a modem device

Page 21: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-11: Configuring user account information

Page 22: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-12: Configuring ISDN hardware

Page 23: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-13: Configuring user account information

Page 24: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-14: Configuring a DSL connection

Page 25: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-15: Activating a PPP connection

Page 26: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Configuring a PPP InterfaceConfiguring a PPP Interface

Figure 15-16: The kppp utility

Page 27: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Name ResolutionName Resolution

• Hostnames– User-friendly name assigned to a computer

• Fully Qualified Domain Name (FQDN)– Hostname that follows DNS convention

• Domain Name Space (DNS)– Network device used t resolve FQDNs to the

appropriate IP address

Page 28: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Name ResolutionName Resolution

Figure 15-17: The Domain Name Space

Page 29: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Downloading Files Using FTPDownloading Files Using FTP

Figure 15-18: Using a Web browser FTP client

Page 30: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Downloading Files Using FTPDownloading Files Using FTP

Table 15-1: Common FTP commands

Page 31: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Downloading Files Using FTPDownloading Files Using FTP

Table 15-1 (continued): Common FTP commands

Page 32: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing Files with NFSAccessing Files with NFS

• Network File System (NFS) is another common method for transferring files amongst UNIX and Linux computers– Not as common as FTP– To access files using NFS, you simply mount a

directory from a remote computer on the network that has the NFS daemons started to a local directory

Page 33: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing Windows FilesAccessing Windows Files

• smbmount command– Used to mount directories from Windows

computers to mount points from the Internet Super Daemon

• smbclient utility– Used to connect to shared resources on a

Windows system

Page 34: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Running Remote ApplicationsRunning Remote Applications

• On large Linux systems, users typically gain access to a BASH shell by using the utility that connects to the server across the network– The most common utility used to obtain a BASH

shell from a remote Linux utility computer on the network is telnet

• Trusted access– Configuration where computers are allowed to access

a given computer without having to provide a password first

Page 35: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-19: Configuring a new e-mail account

Page 36: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-20: Specifying user information

Page 37: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-21: Configuring a POP, IMAP, and SMTP server

Page 38: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-22: Specifying a user name

Page 39: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-23: Specifying an account name

Page 40: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Accessing E-mailAccessing E-mail

Figure 15-24: The Mozilla e-mail client

Page 41: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

• Port– Number that uniquely identifies a network service

• Well-known port– Of the 65535 possible ports, the ones from 0 to

1024 used by common networking services

• Internet Super Daemon (xinetd)– Responsible for initializing and configuring many

networking services on a Linux computer

Page 42: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

Figure 15-25: Interacting with network services

Page 43: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

• Standalone daemons– Daemons normally started at boot-up that

configure themselves without assistance from the Internet Super Daemon

– The ntsysv utility can be used to configure most standalone daemons to start in various runlevel

Page 44: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

Table 15-2: Common network services

Page 45: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

Table 15-2 (continued): Common network services

Page 46: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

Table 15-2 (continued): Common network services

Page 47: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

• Another example of a network service that is provided directly by the Linux kernel is routing

• Route table– Table of information used to indicate which

networks are connected to network interfaces

Page 48: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

• Multihomed hosts– Computer that has more than one network

interface

• IP forwarding– Act of forwarding TCP/IP packets from one

network to another

• Routing– Act of forwarding data packets from one network

to another

Page 49: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Common Network ServicesCommon Network Services

• traceroute command– Common utility used to troubleshoot routing– Displays all routers between the current computer

and a remote computer

• Some network services involve a large number of daemons and require a great deal of configuration

Page 50: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Chapter SummaryChapter Summary

• A network is a collection of computers that are connected together and share information

• Protocols define the format of information that is transmitted across a network

• Each computer on a TCP/IP network must have a valid IP address and subnet mask

• The /etc/sysconfig/network-scripts directory contains the configuration for NIC and PPP interfaces

Page 51: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Chapter SummaryChapter Summary

• The TCP/IP configuration of a network interface may be specified manually, or obtained automatically from a DHCP or BOOTP server

• Hostnames are used to identify computers on a network easily

• Hostnames must be resolved to an IP address before network communication can take place

• Files, applications, and e-mail may be accessed across the network with the appropriate network utility

Page 52: Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking

Chapter SummaryChapter Summary

• Network services are typically provided by daemons that listen to network ports

• Some network services, such as firewall and routing services, are provided by the Linux kernel

• NIS can be used to share key configuration files across Linux computers that participate in an NIS domain