Docsity

Understanding IP and TCP: Protocols in E-Commerce and Internet Architecture, Slides of Fundamentals of E-Commerce

Partial preview of the text

Download Understanding IP and TCP: Protocols in E-Commerce and Internet Architecture and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

E-Commerce

How Does the Internet Work? (continued)

and Lessons Learned From Netscape

Layering in the IP Protocols

Internet Protocol

Transmission Control

Protocol

User Datagram

Protocol

Telnet

HTTP

(Web)

SONET

ATM

Ethernet

Real-Time

Protocol

Domain Name

Service

IP Connectionless Paradigm

• No error detection or correction for packet data

– Higher-level protocol can provide error checking

• Successive packets may not follow the same path

– Not a problem as long as packets reach the destination

• Packets can be delivered out-of-order

– Receiver can put packets back in order (if necessary)

• Packets may be lost or arbitrarily delayed

– Sender can send the packets again (if desired)

• No network congestion control (beyond “drop”)

– Send can slow down in response to loss or delay

IP Packet Structure

4-bit

Version

4-bit

Header

Length

8-bit

Type of Service

(TOS)

16-bit Total Length (Bytes)

16-bit Identification

3-bit

Flags

13-bit Fragment Offset

8-bit Time to

Live (TTL)

8-bit Protocol

16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

20-byteHeader

Time-to-Live Field

• Potential robustness problem

– What happens if a packet gets stuck in a routing loop?– What happens if the packet arrives

much

later?

• Time-to-live field in packet header

– TTL field decremented by each router on the path– Packet is discarded when TTL field reaches 0– Discard generates “timer expired” message to source

• Expiry message exploited in

traceroute

tool

– Generate packets with TTL of i=1, 2, 3, 4, …– Extract router id from the “timer expired” message– Provides a way to gauge the path to destination

Type-of-Service Bits

• Initially, envisioned for type-of-service routing

– Low-delay, high-throughput, high-reliability, etc.– However, current IP routing protocols are static– And, most routers have first-in-first-out queuing– So, the ToS bits are ignored in most routers today

• Now, heated debate for differentiated services

– ToS bits used to define a small number of classes– Affect router packet scheduling and buffering polices– Arguments about consistent meaning across networks

TCP Header

16-bit destination port number

32-bit sequence number

32-bit acknowledgement number

16-bit TCP checksum

Options (if any)

Payload

20-byteHeader

16-bit source port number

16-bit window size

4-bit

header

length

F

I

N

S Y

N

R S

T

P S H

ACK

UR

G

16-bit urgent pointer

Establishing a TCP Connection

• Three-way handshake to establish connection

– Host A sends a SYN (open) to the host B– Host B returns a SYN acknowledgement (ACK)– Host A sends an ACK to acknowledge the SYN ACK

• Closing the connection

– Finish (FIN) to close and receive remaining bytes (and other

host sends a FIN ACK to acknowledge)

– Reset (RST) to close and not receive remaining bytes

time

A

B