Introduction to TCPIP - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Introduction to TCPIP

Description:

Receive FIN segment. Send ACK x 1. Receive ACK segment. Establishing a TCP Connection ... Send FIN seq=y, ACK x 1. 12. TCP : Data transfer. Host. Client. Send ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 17
Provided by: N228
Category:

less

Transcript and Presenter's Notes

Title: Introduction to TCPIP


1
Introduction to TCP/IP
  • Yusuke Matsuoka / Herwin Chan
  • EE201A Spring/2003
  • UCLA

2
OSI and Protocol Stack
OSI Open Systems Interconnect
Link Layer includes device driver and
network interface card Network Layer
handles the movement of packets, i.e.
Routing Transport Layer provides a reliable
flow of data between two hosts Application Layer
handles the details of the particular
application
3
Packet Encapsulation
  • The data is sent down the protocol stack
  • Each layer adds to the data by prepending headers

22Bytes
20Bytes
20Bytes
4Bytes
64 to 1500 Bytes
4
Ethernet
  • Computer lt-gt Computer communication on same
    network
  • Each device has unique MAC address (48-bit)
  • example 00-C0-4F-48-47-93

Ethernet Packet
Dest. address
Source address
Type
Data
CRC
Preamble
6bytes
6bytes
2bytes
8bytes
64 - 1500bytes
4bytes
MAC Media Access Control
5
ARP Address Resolution Protocol
  • ARP provides mapping
  • 32bit IP address lt-gt 48bit MAC address
  • 128.97.89.153 lt-gt 00-C0-4F-48-47-93
  • ARP cache
  • maintains the recent mappings from IP addresses
    to MAC addresses
  • Protocol
  • ARP request broadcast on Ethernet
  • Destination host ARP layer responds

6
IP Internet Protocol
  • Unreliable connectionless datagram delivery
    service
  • Responsible for routing of data through
    intermediate networks and computers

1111 2345
1111 6789
2222 0123
2222 4567
2233 8901
0123
4567
11 8901
IP header
1 ICMP 6 TCP 17 UDP
7
IP Routing
Source
Destination
Application
Application
Transport
Transport
Router
Network
Network
Network
Link
Link
Link
  • Routing Table
  • Destination IP address
  • IP address of a next-hop router
  • Flags
  • Network interface specification

8
ICMP Internet Control Message Protocol
  • Used to report problems with delivery of IP
    Datagrams within an IP network
  • Used by Ping, Tracerout commands
  • Types and Codes
  • Echo Request (type8, code0)
  • Echo Reply(type0, code0)
  • Destination Unreachable(type3, code0)
  • Time Exceeded(type11, code0) Time-to-Live 0

ICMP Message
4bytes
20bytes
ICMP Data
ICMP Header
IP Header
Type
Code
Checksum
1byte
1byte
2bytes
9
TCP Transmission Control Protocol
  • Connection-Oriented, Reliable, Byte Stream
    Service
  • Protocol
  • Set up connection
  • Transfer data
  • Close connection

TCP Header Format
10
TCP State Diagram
11
TCP Connection
Host
Client
Host
Client
Send SYN seqx
Send FIN seqx
Receive FIN segment Send ACK x1
Receive SYN segment Send SYN seqy, ACK x1
Receive ACK segment
Receive SYN ACK segment
Send FIN seqy, ACK x1
Receive FIN ACK segment Send ACK y1
Send ACK y1
Receive ACK segment
Receive ACK segment
Establishing a TCP Connection
Closing a TCP Connection
12
TCP Data transfer
Host
Client
Send Packet 1 Start Timer
Packet Lost
Packet should arrive ACK should be sent
Timer
ACK would normally Arrive at this time
Time Expires
Retransmit Packet1 Start Timer
Receive Packet 1 Send AXK 1
Timer
Receive ACK 1 Cancel Timer
13
HTTP Hyper Text Transfer Protocol
  • Stateless Transaction Protocol
  • Each transaction creates a new connection
  • Steps in Transaction
  • Establish connection
  • Request
  • Method ltURLgt ltCRgt
  • Response
  • Response Code ltDatagt ltCRgt
  • Close connection

14
HTTP
  • Common Request Methods
  • GET, PUT, POST
  • Response Categories
  • Informational 100
  • Successful 200
  • Redirection 300
  • Client Error 400 (eg. 404 Not found)
  • Server Error 500

15
Example Access www.ee.ucla.edu
Server
Client
Http request GET http//www.ee.ucla.edultCRgt
Appl HTTP
Appl HTTP
Http response 200 ltCRgt lthtml file in MIME
formatgt
Transp TCP
Transp TCP
Initiate connection (hdshk)
Package data (add TCP header) send http request
packet
Assemble response (break into several packets)
Send http response packets
Close connection (hdshk)
send data to next hop
Net IP
Net IP
Net IP
Relay data
ARP to provide IP/MAC translation
Link ethernet
Link ethernet
Link ethernet
Router(s)
16
References
  • TCP/IP Illustrated, Volume 1 The Protocols
  • by W. Richard Stevens (http//yenigul.net/tcpip)
  • Internet Working with TCP/IP Volume 1
  • by Douglas E. Comer
  • Sams Teach Yourself TCP/IP in 24 Hours
  • by Joe Casad. Published by Sams.
    (http//www.informit.com)
Write a Comment
User Comments (0)
About PowerShow.com