ece 4110 – internetwork programming tcp/ip protocol

23
ECE 4110 – Internetwork Programming TCP/IP Protocol

Upload: jessie-stafford

Post on 18-Jan-2016

231 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ECE 4110 – Internetwork Programming TCP/IP Protocol

ECE 4110 – Internetwork Programming

TCP/IP Protocol

Page 2: ECE 4110 – Internetwork Programming TCP/IP Protocol

2* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

OSI Model (revisited)

Page 3: ECE 4110 – Internetwork Programming TCP/IP Protocol

3* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Summary of OSI Layers

Page 4: ECE 4110 – Internetwork Programming TCP/IP Protocol

4

Sample Network Algorithm

Listen to wire

Detect a preamble?

Read destination address

Is it broadcastaddress?

Is it my address?

Read dataframe contents

Frame passeddata integrity

check?

Deliver data to designated process

Ignoretransmission

Discarddata

Yes

No

Are signals detecteddata carrying or noise?

Is the listening computerthe intended party oris it for someone else?

Did the computer get a good message or is it corrupted?

No

Yes

Yes

No

No

Yes

Page 5: ECE 4110 – Internetwork Programming TCP/IP Protocol

5* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Adding and Stripping Headers/Trailers

Page 6: ECE 4110 – Internetwork Programming TCP/IP Protocol

6* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

TCP/IP Protocol Suite

Page 7: ECE 4110 – Internetwork Programming TCP/IP Protocol

Spring 2003Tuna Tugcu ECE 4110 – Internetwork Programming 7

Terminology TCP: Transmission Control Protocol UDP: User Datagram Protocol IP: Internetworking Protocol ARP: Address Resolution Protocol RARP: Reverse ARP ICMP: Internet Control Message Protocol IGMP: Internet Group Management Protocol SMTP: Simple Mail Transfer Protocol FTP: File Transfer Protocol DNS: Domain Name System (Service) SNMP: Simple Network Management Protocol NFS: Network File System RPC: Remote Procedure Call TFTP: Trivial FTP

Page 8: ECE 4110 – Internetwork Programming TCP/IP Protocol

Spring 2003Tuna Tugcu ECE 4110 – Internetwork Programming 8

IP Protocol Connectionless. IP packets are called datagrams. Best-effort: IP does its best to get the

packet to the destination. No error checking or tracking lost datagrams.

Each datagram is transmitted separately. This causes: Out of sequence datagrams Duplicate datagrams

Page 9: ECE 4110 – Internetwork Programming TCP/IP Protocol

9* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Addresses in TCP/IP

Page 10: ECE 4110 – Internetwork Programming TCP/IP Protocol

10* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Layer-Address Relationship in TCP/IP

Page 11: ECE 4110 – Internetwork Programming TCP/IP Protocol

11* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Physical Addressing

Page 12: ECE 4110 – Internetwork Programming TCP/IP Protocol

12* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

IP Addressing

• Physical addresses are 48 bits.

• IPv4 addresses are 32 bits.

• Port addresses are 16 bits.

Page 13: ECE 4110 – Internetwork Programming TCP/IP Protocol

13* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Classful Addressing

Page 14: ECE 4110 – Internetwork Programming TCP/IP Protocol

Spring 2003Tuna Tugcu ECE 4110 – Internetwork Programming 14

Classful Addressing (cont’d)

A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.

The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself).

In classful addressing, the network address is the one that is assigned to the organization.

Page 15: ECE 4110 – Internetwork Programming TCP/IP Protocol

15* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Example: Class C Network

Page 16: ECE 4110 – Internetwork Programming TCP/IP Protocol

16* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Multihomed Hosts

Page 17: ECE 4110 – Internetwork Programming TCP/IP Protocol

17* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Direct Broadcast Address

Page 18: ECE 4110 – Internetwork Programming TCP/IP Protocol

18* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Limited Broadcast Address

Page 19: ECE 4110 – Internetwork Programming TCP/IP Protocol

19* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

This Host on This Address (Bootstrapping)

Page 20: ECE 4110 – Internetwork Programming TCP/IP Protocol

20* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Specific Host on This Network

Page 21: ECE 4110 – Internetwork Programming TCP/IP Protocol

21* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Loopback Address

Page 22: ECE 4110 – Internetwork Programming TCP/IP Protocol

Spring 2003Tuna Tugcu ECE 4110 – Internetwork Programming 22

Unicast, Multicast, and Broadcast Addresses

Unicast communication is one-to-one.

Multicast communication is one-to-many.

Broadcast communication is one-to-all.

Page 23: ECE 4110 – Internetwork Programming TCP/IP Protocol

23* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

Sample internet