Download TCP/IP Basics

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Multiprotocol Label Switching wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Distributed firewall wikipedia , lookup

Network tap wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Net bias wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

I²C wikipedia , lookup

AppleTalk wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Deep packet inspection wikipedia , lookup

Computer network wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

TCP congestion control wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Transcript
TCP/IP
TCP/IP Basics
Alvin Kwan
What is TCP/IP?
TCP/IP


It is a protocol suite governing how data can
be communicated in a network environment,
both local and globally.
To remind you what a protocol is, please read
http://www.leapforum.org/published/internetw
orkMobility/split/node10.html to learn a
particular protocol known as ARQ (automatic
repeat request) protocol
OSI vs. TCP/IP
TCP/IP
History of TCP/IP (1/2)
TCP/IP





Stands for Transmission Control
Protocol/Internet Protocol (TCP/IP)
Developed by Defense Advanced Research
Projects Agency (DARPA) under the
sponsorship of U.S. Department of Defense
(DoD) in since late 1960s
1972 – Telnet
1973 – File Transfer Protocol (FTP)
1974 – Transmission Control Protocol (TCP)
History of TCP/IP (2/2)
TCP/IP





1980 – User Datagram Protocol (TCP)
1981 – Internet Protocol (TCP)
1982 – TCP/IP as a protocol suite
1984 – Domain Name System (DNS)
1991 – Transfer of funding responsibility from
DAPRA to National Science Foundation
(NSF), which started to turn the military
originated protocols into civic use, notably in
education sector
Some TCP/IP features
TCP/IP




It is an open standard, which is also adopted
by the Internet.
It offers a routable protocol such that the path
of every piece of data that moves through the
network is traceable.
It adopts a single and simple addressing
scheme which is easy to understand
IP is a connectionless protocol (with data
transferred in individual packets); whereas
TCP is connection-oriented.
Connectionless vs.
Connection-oriented Protocols (1/2)
TCP/IP

Connectionless protocols
•
•
•
•
•
•
The data communication method occurs between
hosts with no previous setup
Send data across the network to its destination without
guaranteeing receipt
Higher layers handle packet sequencing and certain
data integrity control issues
Fast; require little overhead
Most LAN protocols at the data link layer are
connectionless
Data packets in a connectionless communication are
referred to as datagrams
More to follow …
Connectionless vs.
Connection-oriented Protocols (2/2)
TCP/IP

Connection-oriented protocols
• Establish a formal connection between two
•
•
•
computers, guaranteeing the data will reach its
destination
Higher layers can rely on low layers to handle
matters of packet sequencing, data integrity, and
delivery timeouts
Slower but more reliable
ATM networks are connection oriented at the
data link layer
Network Interface Layer (1/3)
TCP/IP



Lowest layer in the TCP/IP stack
To define how a computer connects to a
network
It does not regulate the type of network that
the host is on and thus TCP/IP can be run on
an Ethernet, Token Ring or Fiber Distributed
Data Interface (FDDI) or any other network
topology
Network Interface Layer (2/3)
TCP/IP


Physical (or MAC) address, which is burnt
into every network interface card (NIC)
MAC address is usually represented in 12
hexadecimal digits (or 48 bits)
• First six hexadecimal digits uniquely represent
•
the manufacturer
Last six hexadecimal digits is a unique serial
number that the card’s manufacturer has
assigned to the NIC
Network Interface Layer (3/3)
TCP/IP


For a TCP/IP packet to be delivered, it must
contain the destination node’s MAC address so
that a host can check whether the packet is
directed to it.
A broadcast packet is designed to be attended
by all hosts and it has a target MAC address of
FFFFFFFF, i.e., all bits set.
The Internet Layer
TCP/IP

The internal layer contains protocols for
addressing and routing of packets.
•
•
•
•
•
Internet Protocol (IP)
Address Resolution Protocol (ARP)
Internet Control Message Protocol (ICMP)
Internet Group Message Protocol (IGMP)
Routing protocols (e.g., RIP)
Internet Protocol (1/2)
TCP/IP




To determine the source and destination IP
addresses of every packet
Every host on a network is assigned a unique
IP address (logical address)
IP address is divided into two parts: network
number and host address on that network
Based on the subnet mask and IP address, it
can be decided whether the target is a
“remote” host or a “local” host (and details will
be given later)
Internet Protocol (2/2)
TCP/IP


For a remote host, IP needs to send the
packet through a gateway or a router (which
is also identified by an IP address).
Connectionless and thus unreliable
transmissiion
Address Resolution Protocol
(ARP)
TCP/IP



Protocol to resolve an IP address to a physical
address.
The hardware address will be cached for a short
time.
To resolve an IP address to a physical address
• Try the ARP cache (kept in RAM)
• If not found in cache, initiate an ARP request
•
broadcast and keep the result in cache
Try the command “ARP –A” in a command
window
ARP Command
TCP/IP
Internet Control Message Protocol
(ICMP)
TCP/IP


For sending error messages, performing
diagnostics and controlling data flow
Try “ping cite.hku.hk” to test the network
connection to another host
Internet Group Message Protocol
(IGMP)
TCP/IP


IGMP enables one host to send one stream of
data to many hosts at the same time with the
use of a multicast address
Some routing protocols use IGMP to
exchange routing tables
Routing Protocols
TCP/IP

Routing Information Protocol (RIP)
• Simple IP-based routing protocol that collects
•

and exchange information about network route
and status
Only suitable for small networks
Open Shortest Path First (OSPF)
• Typically used by routers to determine the best
path through a network
Transport Layer
TCP/IP

Transmission Control Protocol (TCP)
•
•
•
•

Primary IP transport protocol
Connection-oriented and thus guarantee a more
reliable delivery
Use port numbers to identify communicating
applications
Responsible for message fragmentation and
reassembly (with the use of sequence number)
User Datagram Protocol (UDP)
•
A connectionless transport protocol which runs faster
continued
TCP/IP Applications
TCP/IP

Domain Name System (DNS)
•

File Transfer Protocol (FTP)
•

Application protocol for file transfer and directory/file
manipulation services
Telnet
•

For URL to IP-address translation
For remote terminal sign-on
Simple Mail Transport Protocol (SMTP)
•
Provide messaging services (i.e., sending e-mails)
continued
IP Addressing
TCP/IP


IP is responsible for addressing and routing in the
TCP/IP environment
IP addresses
• Logical addresses, which are 32 bits (4 bytes) long
• A decimal number from 0 to 255, separated by periods,
•
represents each byte or octet
Two sections
 One defines the network a computer is on
 One defines the host ID for a computer
•
Example: 172.24.206.18
IP Addressing
TCP/IP

Originally, three classes of IP addresses
• Class A
•
•
 Large corporations
 ID numbers between 1 and 126 (in its first octet, or 8 bits)
Class B
 Medium-sized networks
 Network IDs between 128 and 191 (in its first octet, or 8 bits)
Class C
 Small networks
 Range from 192 to 223 (in its first octet, or 8 bits)

IP address registries manage the total collection of valid
IP addresses
IP Addressing
TCP/IP



IP addresses are rapidly becoming scarce
TCP/IP’s technical governing body has
reserved a series of addresses for private
networks
IETF is working on a new implementation of
TCP/IP (IPv6) that uses addresses that are 8
bytes long but retain backward compatibility
with IPv4 4-byte addresses
Classless Inter-domain Routing
(CIDR) (1/2)
TCP/IP




A more efficient way to assign IP addresses than
using IP address “classes”
The network and host addresses boundary is not
always made on octet boundaries, but may be
made any specific number of bits from the
beginning of the address
Steal bits from the network address for use in the
host address and this is also called supernetting
A slash following IP address is used to indicate
the number of bits of the network address, e.g.,
192.203.187.32 /22
Classless Inter-domain Routing
(CIDR ) (2/2)
TCP/IP

Advantages
• Subnet ID may now be all 0’s or 1’s
• Avoid of wasting a number of IP addresses
when subnetting a Class C address

Disadvantages
• Router support is needed
• All possible bit patterns used for supernetting
a network are to be reserved to be used by
that network only
Subnet Masks
TCP/IP




The “all ones” bit pattern that masks the
network portion of an IP address
Class A address default: 255.0.0.0
Class B address default: 255.255.0.0
Class C address default: 255.255.255.0
Examples on Subnet Mask and
Supernets
TCP/IP

See pp203-205 of the recommended reading
Dynamic Host Configuration
Protocol (DHCP)
TCP/IP




A TCP/IP protocol that allows automatic IP
addresses and subnet mask assignment
Major benefit is ease with which computers
can be moved
Not suitable for systems that require a static
address, such as web servers
A dedicated host, which can be a router or a
computer, to take the role of DHCP server
Readings
TCP/IP



http://www.wown.com/j_helmig/tcpip.htm
http://www.yale.edu/pclt/COMM/TCPIP.HTM
http://www.ii.uib.no/~magnus/TCP-1.html
http://www.pcsupportadvisor.com/search/c04100.htm