Chapter 12
TCP/IP Networking
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Objectives
Recognize, define TCP/IP protocol suite
IPv4 addressing
Use basic TCP/IP applications (kppp)
Construct TCP/IP configuration files
Integrate a Linux system into a TCP/IP
network.
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Overview of TCP/IP
TCP/IP suite grew out of a 1969 DARPA
funded project that look to develop a packet switching
network – ARPANET
1983, ARPANET divided into two networks: MILNET
and smaller ARPANET (Internet)
1990, ARPANET formally existence
TCP/IP is available to many OS : Linux, MS-DOS,
Windows, OS/2, Novell ,…
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Overview of TCP/IP
Protocols: IP (Internet Protocol), Transmission
Control Protocol (TCP), User Datagram Protocol
(UDP), Internet Control Message Protocol (ICMP), …
IP : defines the structure of packets of data that
exchanged over the network
TCP : byte stream protocol that support error
checking, flow control and is extremely reliable.
( Telnet, FTP, …)
UDP : unreliable and connectionless : do not “agree”
to data being transmitted prior to the sender beginning
transmission and no technique to verify arrived data.
(NFS, NIS, DNS, …)
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Overview of TCP/IP
ICMP : connectionless transport agent, exchanges
control information among network systems:
Checking remote hosts (ex: ping)
Detecting unreachable destinations
Network congestion
Redirect routes
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Networks
Networks are composed of hosts, routers, ..
Hosts : end-user devices : pc, printer, fax, ..
Routers : have more than one interface cards allow
to connect to number of networks the same family
protocols
Gateways : like routers but also be convert between
protocols: TCP/IP and SNA (Systems Network
Architecture)
TCP/IP runs over : Ethernet, Token Ring, Serial Line
Protocols (PPP, SLIP), FDDI
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Internet Protocol Address
A logical address IPv4 use 32-bit address with four
numbers (0-255) separated by ‘.’
IP address are assigned by a central authority
(InterNIC)
IP address mapped to hardware using ARP (IP to
MAC) & RARP(MAC to IP) protocols
Some address values reserved : 0 (not used), 10
(internal networks), 255 (broadcast), 127 ( loopback )
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
IPv4 Address Format
Every host has unique IP address
Includes Network ID and Host ID
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
IPv4 Address Format
Class A : [Link] to [Link]
Class B : [Link] to [Link]
Class C : [Link] to [Link]
Class D : [Link] to [Link]
Class E : [Link] to [Link]
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Three types of IP address
Unicast Traffic is destined for a single host
Multicast Traffic is destined for a group of hosts
requesting multicast
Broadcast Traffic is destined for all hostson a given
network
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Internal (Private) IP Address
Class A : 10.x.x.x
Address: [Link] to [Link]
Class B : 172.16.x.x to 172.31.x.x
Class C : 192.168.x.x
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Setting up Networking
Configuration files : in /etc/
hosts Contains mapping b/w IP address and name; used for
name resolution
[Link] Controls name resolution on older systems;
replaced on newer systems by [Link]
hostname Contains the logical hostname
HOSTNAME Contains the logical hostname
networks Contains mapping b/w network address and name;
often blank file
[Link] Controls the sources used by different
system library lookup function like nameresolution,
supersedes [Link]
[Link] Controls the client-side portions of DNS and is
used in name resolution
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Defining IP addresses
Defining IP addresses : in /etc/hosts
IP_address hostname aliases
Large sites use DNS
One or more host on the network maintain all IP
address
Individual hosts request addresses as needed
Addresses cached locally to optimize DNS
…
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102
Summary
Linux systems use TCP/IP for networking
Every host on the network must have an unique IP
address.
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, [Link].
P9, [Link], HCMHCM LPI 102