Вы находитесь на странице: 1из 50

Linux networking

Unit objectives
 Understand the basic configuration of the
Course ILT

TCP/IP protocol, and configure a NIC


interface
 Configure a modem, ISDN, and DSL
interface to use the PPP and TCP/IP
protocols, and understand hostnames
 Use network utilities, and identify and
configure common network services
 Work with the mii-tool, change Ethernet
interface parameters, and create IP aliases
Topic A
 Topic A: TCP/IP
 Topic B: Configuring a PPP interface
Course ILT

 Topic C: Connecting to network


resources
 Topic D: Ethernet interfaces
The TCP/IP protocol
 Internet Protocol (IP) address
– Four 8-bit numbers
Course ILT

– Identifies a computer on the network


 Subnet mask
– Four 8-bit numbers
– Determine the network and host portions
of an IP address
 Default gateway
– Router that sends packets to remote
networks
Course ILT TCP/IP addresses
Course ILT Activity A-1

Discussing the TCP/IP protocol


Configuring a NIC interface
 ifconfig command
– Assigns TCP/IP configuration to a NIC
Course ILT

– Displays configuration of all network


interfaces
 packet internet groper (ping)
command
– Checks connectivity to other computers
Course ILT Configuring network hardware
Course ILT Configuring a network device
Course ILT Network device properties
Network configuration tools
 netconfig
– Graphical utility that configures network
Course ILT

card settings
Course ILT The netconfig utility
Course ILT Activity A-2

Configuring TCP/IP
Topic B
 Topic A: TCP/IP
 Topic B: Configuring a PPP interface
Course ILT

 Topic C: Connecting to network


resources
 Topic D: Ethernet interfaces
Point to Point Protocol (PPP)
 Runs TCP/IP over serial lines
 Used by three common technologies
Course ILT

– Modems
– ISDN
– DSL
Course ILT Configuring a new PPP device
Course ILT Configuring a modem device
Configuring user account information for a modem
Course ILT
Course ILT Configuring ISDN hardware
Configuring user account information for ISDN
Course ILT
Course ILT Configuring a DSL connection
Course ILT The kppp utility
Course ILT Exercise B-1

Discussing the PPP interface


Name resolution
 Hostnames
– Name assigned to a computer
Course ILT

– Uses plain language


 Fully Qualified Domain Name (FQDN)
– Hostname that follows DNS convention
 Domain Name Space (DNS) server
– Resolves FQDNs to IP address
Course ILT The Domain Name Space
Course ILT Activity B-2

Resolving hostnames by using the


/etc/hosts file
Topic C
 Topic A: Networks and TCP/IP
 Topic B: Configuring a PPP interface
Course ILT

 Topic C: Connecting to network


resources
 Topic D: Ethernet interfaces
Course ILT Downloading files by using FTP
Course ILT Common FTP commands
Course ILT Activity C-1

Using the FTP daemon


Network File System (NFS)
 Method for transferring files between
UNIX and Linux systems
Course ILT

– Not as common as FTP


 To access files using NFS
– Use a remote computer that has the NFS
daemons started
– Mount a directory from the remote
machine to a local directory
Accessing Windows files
 smbclient utility
– Connects to shared resources on a
Course ILT

Windows system
Course ILT Activity C-2

Exporting a directory by using


NFS
Running remote applications
 telnet command
– Used to obtain a BASH shell from a
Course ILT

remote computer
 rlogin command
– Uses trusted access
Course ILT Activity C-3

Enabling the telnet daemon and


using a telnet utility
Course ILT Activity C-4

Using trusted access


Course ILT Activity C-5

Viewing Sendmail’s configuration


and using SMTP
Common network services
 Port
– Number that identifies a network service
Course ILT

– 65,535 possible ports


 Well-known port
– used by common networking services
– 0 to 1,024
Internet Super Daemon (xinetd)
 Initializes and configures many
network services
Course ILT
Standalone daemons
 Normally started at boot-up
 Configure themselves without
Course ILT

assistance from the Internet Super


Daemon
 The ntsysv utility
– Configures most standalone daemons to
start in various runlevels
Routing
 Forwards data packets from one
network to another
Course ILT

 Network service provided directly by


the kernel
 Route table
– Indicates which networks are connected
to network interfaces
Multihomed hosts and IP forwarding

 Multihomed hosts
– Computer that has more than one
Course ILT

network interface
 IP forwarding
– Act of forwarding TCP/IP packets from
one network to another
traceroute command
 Used to troubleshoot routing
 Displays all routers between the
Course ILT

current computer and a remote


computer
Course ILT Activity C-6

Setting up an NIS server


Topic D
 Topic A: Networks and TCP/IP
 Topic B: Configuring a PPP interface
Course ILT

 Topic C: Connecting to network


resources
 Topic D: Ethernet interfaces
The mii-tool
 An easy way to determine which
speed is used by an Ethernet card
Course ILT

 The Ethernet card needs to have


Media Independent Interface circuitry
Course ILT Activity D-1

Using the mii-tool


Course ILT Activity D-2

Changing Ethernet interface


parameters
IP aliases
 To assign more than one IP address
to a single physical interface
Course ILT

 Up to 256 IP aliases for each interface


 Useful for hosting multiple Web sites
Course ILT Activity D-3

Creating IP aliases
Unit summary
 Learned basic TCP/IP configuration
and configured a NIC interface
Course ILT

 Configured modem, ISDN, and DSL


interfaces to use PPP and TCP/IP,
and learned about hostnames
 Used network utilities, and identified
and configured network services
 Worked with the mii-tool, changed
Ethernet interface parameters, and
created IP aliases