Review Fundamental Concepts of Networking. (Read chapter 1 and chapter 7, Tanenbaum)

Preview:

Citation preview

ReviewReview

Fundamental Concepts of Networking.

(Read chapter 1 and chapter 7, Tanenbaum)

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 2

IntroductionIntroduction

A network is a set of independent devices which can communicate.

Implications– Vendor independent– Hardware independent– OS independent– …..

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 3

Principle!Principle!

To communicate, we must use– Common language– Common set of rules

Different levels of communications

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 4

A NetworkA Network

Rou.

telnet photon….

R

R

R

DNS Server Rou.

R photon…

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 5

Two Types of Communication EntitiesTwo Types of Communication Entities End-to-end:

– Used only at the end points of communication sessions Point to point:

– Used on every relaying device

Server

RoutersClient

E2E

E2EPt2Pt

Pt2Pt

Pt2PtPt2Pt

Pt2Pt

Pt2Pt Pt2Pt

Pt2PtPt2PtPt2Pt

Switch/Bridge

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 6

End-to-End Protocols End-to-End Protocols (Examples)(Examples)

Applications: HTTP, FTP, Telnet, DNS

Communication tools: TCP, UDP..

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 7

Point to PointPoint to Point

Protocols: IEEE 802.x., HDLC, Bluetooth, SLIP, PPP

Devices: Ethernet NIC (IEEE 802.3),

wireless card (IEEE 802.11), DSL, modem, ATM switch

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 8

Some RemarksSome Remarks

The transmission of one packet involves– Many different agents– At many different levels

Agents on the same host may request services from agents immediately close to them

Agents on different machines communicate ONLY PEER TO PEER

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 9

A Logical View

Rou.

R

DNS Server Rou.

R photon…

DNS

DNS

UDP

UDP

Network Int. Card

NIC1 NIC2

R R

IP

IP

IP

IPNetwork Int. Card NIC1 NIC2

telnet

telnet

TCP

TCP UDP

ARP IP

Network Int. Card

ARP

ARP

ARP ARP

E2E

E2E

E2E

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 10

Review OutlineReview Outline

End-to-End:– General principles and techniques– Focus on Internet– Upper level lower level

Point to point– General principles– Focus on Internet– Lower level – upper level

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 11

ConclusionConclusion

Communications and Networking are complex

To solve the problem and design good solutions, the problem must broken in different levels.

The difficulty is : What are the different levels? What are the functions of different levels?

The OSI Reference ModelThe OSI Reference Model((Open Systems InterconnectionOpen Systems Interconnection))

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 13

Communications: Communications: A Complex Problem?A Complex Problem?Divide and Conquer..Divide and Conquer..

Communication should be broken in layers such that:– Each layer has a well defined function– Adjacent layers have neat interfaces– Adjacent layers exchange minimal information– Each layer hides details from upper layers– A layer contains similar functions

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 14

Decomposing Communication Decomposing Communication in Layersin Layers

International effort led by ISO (International Standards Organization)

Economical conflicting interests Result: no viable stack implementation, but a nice

formal model good for education and networking experts communication

Neat definition of:– Functions at each layer– Interfaces between adjacent layers

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 15

OSI Reference ModelOSI Reference ModelApplication Application

Presentation Presentation

Interface Interface

Session Session

Interface Interface

Transport Transport

Interface Interface

Protocol

Protocol

Protocol

Protocol

Interface Interface

Interface Interface

Network Network

Link Link

Interface Interface

Phys. Phys

InterfaceInterfaceLink Link

InterfaceInterface

Phys. Phys

NetworkNetwork

User/Client User/Server

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 16

RemarksRemarks

End-to-end layers (protocols):– Application– Presentation– Session– Transport

Point-to-point layers (protocols):– Network– Link– Physical

Application

Presentation

Session

Transport

Network

Link

Physical

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 17

ImplicationsImplications

End-to-end layers: implemented (active) only on the end points.

Point-to-point: implemented throughout ALL the path, on endpoint nodes and intermediary nodes

Application

Presentation

Session

Transport

Network

Link

Physical

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 18

Application LayerApplication Layer

End to endCommunication services provided directly

to the user (or by server):– File transfer– Email– http– X400….

Application

Presentation

Session

Transport

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 19

Presentation LayerPresentation LayerEnd to endThe two communicating entities may be

different (different vendors, different OS, different CPUs)

Application

System M1

Application

System M2

Presentation

Communication System

PresentationM1 Representation M2 Representation

COMMON Representation COMMON Representation

Translation Translation

Application

Presentation

Session

Transport

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 20

Presentation Layer (Cont’d):Presentation Layer (Cont’d):Examples of Common Rep’sExamples of Common Rep’s

Network byte order: (on then wire order)– Little endian– Big endian

Floating point numbers: IEEE 754

Application

Presentation

Session

Transport

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 21

Session LayerSession Layer

End to endAllows establishing communication

sessions:– File transfers under bad network conditions.– Optimize the use of a system

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 22

Transport LayerTransport Layer End to end Hides/adapts defects and limitations of the network sys.

Upper Layers

1

2

3

4

5

Transport Layer

Network System(may loose, duplicate, reorder)

Upper Layers

1

5

3

Transport Layer

4

3

Too big message

Application

Presentation

Session

Transport

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 23

Network LayerNetwork Layer

Point to point

– Addressing

– Routing

– Congestion control

– Administration

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 24

Link LayerLink Layer

Point to point, has two fundamental functions:– Data Link Layer

Framing Error control Flow control

– Medium Access Control Layer

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 25

Physical LayerPhysical Layer

Transmission of raw bitsDeal with:

– Electrical specs– Mechanical specs

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 26

ConclusionConclusion

The OSI reference model is a nice conceptual model

There is no large scale implementation of an OSI protocol stack

The OSI model is largely used by networking people (conceptually)

A Network Protocol StackA Network Protocol Stack(Example)(Example)

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 28

GeneralitiesGeneralities

Most existing protocol stacks have only 5 layers (set before OSI model):– TCP/IP– Novell

SNA (IBM proprietary architecture) has 7 layers

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 29

TCP/IP: “Running code and some consensus”

Physical Layer Ethernet Token Ring 802.11

Link Layer Ethernet Token Ring 802.11

Network Layer IP (and some “helpers”)

Transport Layer TCP UDP

Application Layer SMTP FTP HTTP DNS Telnet ..

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 30

TCP/IP StackTCP/IP StackApplication layer:

– SMTP: Simple Mail Transfer Protocol (Port 25)– FTP : File Transfer Protocol (Port 21)– Telnet : Terminal… (Port 23)– HTTP: HyperText Transfer Protocol (Port 80)– DNS : Domain Name System (port 53)

Transport layer:– UDP: User Datagram Protocol (Protocol # 17)– TCP: Transmission Control P. (Protocol # 6)

Network layer:– IP : Internet Protocol

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 31

ConclusionConclusion

You must understand:– Layering, its purpose, its use in networking– At least role and “position” of each layer in the

stack – Peer to peer communication– Layer- to immediate layer communication– Distinction between end-to-end and point-point

Application LayerApplication Layer

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 33

Where in the OSI Reference Where in the OSI Reference Model?Model?

Application Application

Presentation Presentation

Interface Interface

Session Session

Interface Interface

Transport Transport

Interface Interface

Protocol

Protocol

Protocol

Protocol

Interface Interface

Interface Interface

Network Network

Link Link

Interface Interface

Phys. Phys

InterfaceInterfaceLink Link

InterfaceInterface

Phys. Phys

NetworkNetwork

User/Client User/Server

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 34

How Do Lower Layers Appear to How Do Lower Layers Appear to the Application Layer?the Application Layer?

Application Application

Interface Interface

ProtocolUser/Client User/Server

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 35

Functions of the Application Functions of the Application LayerLayer

Specialized service to the userSet services not offered by lower layers Set services offered by lower layers but not

reliable or not trustedImprove services offered by lower layers

but incomplete

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 36

Specialized Service To the Specialized Service To the UserUser

Virtual chat roomWeb browserFile transferEmailRemote terminalMapping host names to IP addresses…………

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 37

Set Services Not Offered by Lower Set Services Not Offered by Lower LayersLayers

Want to set a reliable connectionless service over the internet that corrects only errors “recoverable” in less than 20ms:– Use TCP? Bad idea because of handshake, congestion

control, of own retransmissions that cannot be controlled, coarse timer…

Enforce secrecy (do not want nosy people to see my messages)

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 38

Set Services Offered by Lower Set Services Offered by Lower Layers but Not Reliable or not Layers but Not Reliable or not

TrustedTrustedBill Gates offers the DoJ:A FREE special version to XP to guarantee

the secrecy of proceedings relative to the Antitrust with encryption at TCP level.

ANDFree Internet access through MSNAND an innocent smile

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 39

Improve Services Offered by Improve Services Offered by Lower Layers but IncompleteLower Layers but Incomplete

Suppose that we notice that an audio or video stream sent over UDP suffers batches of corrupted bytes up to 5 contiguous bytes every 100 bytes…..

Internet Applications Internet Applications Protocols:Protocols:

DNS, Telnet, SMTP, HTTPDNS, Telnet, SMTP, HTTP

Domain Name System (DNS)Domain Name System (DNS)RFC 1034 and RFC 1035RFC 1034 and RFC 1035

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 42

DNS: What ?

• It is a service used to map host names into IP addresses for:– Web URLs– Email addresses

– Based on a Client-Server architecture– Each machine connected to the net must know the

IP address of its DNS server.

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 43

DNS: Why ?DNS: Why ?

Human do not like to use IP addresses (as numbers)

Human want prefer to designate machines with names

Interconnecting devices on the net use IP addresses (as numbers)

Huge number of hosts on the Internet

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 44

DNS: How ?DNS: How ?

Use a file with all machine names and mapping?

Use a local server that contains the database related to all hosts on the Internet?

Use a distributed database system

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 45

DNS: A Hierarchical Distributed DNS: A Hierarchical Distributed DatabaseDatabase

Root server administered by the Internet Corporation for Assigned Names and Numbers (ICANN)

Who administers the rest?

int com edu org gov mil net us fr jp ……….

tamu auburn

cs eng

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 46

DNS Servers DNS Servers (Port 53)(Port 53)

One DNS server per zoneA DNS server is organized as:

– A primary server (with a database) – One to many secondary servers (reliability and

distribution of load)May be delegated or not: a CS department

may want to maintain its own DNS. General network administrator does not want!!!!

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 47

What Does the DNS Client Do?What Does the DNS Client Do?

It prepares a name resolution request based on the DNS protocol– What is the IP address of “photon.cs.tamu.edu”?

It specifies :– The port number of the DNS server (53 well-known)

– The IP address of the DNS server (configuration)

DNS Request

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 48

What Does the UDP Transport Agent What Does the UDP Transport Agent Do?Do?

It encapsulates the DNS request with:– The DNS client port number (source)– The DNS server port number (53 destination)– Some extra information used by UDP

DNS RequestUDP Header

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 49

What Does the IP Network Agent Do?What Does the IP Network Agent Do?

IP encapsulates the UDP datagram with:– The DNS client IP address (configuration)– The DNS server IP address (configuration)– UDP stamp (The payload of the IP packet is a UDP

datagram)– Some extra information used by IP

It finds the next host to which to send the packet

DNS RequestUDP HeaderIP Header

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 50

What Does the IP Network Agent Do? What Does the IP Network Agent Do? (2)(2)

To find the next host:– It checks if the final destination IPD is local (attached to

local segment)– If the final destination is not local:

Then IP looks into a routing table to find the IP address of next hop

Else… IP must find the local host that has IP address IPD

DNS RequestUDP HeaderIP Header

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 51

strangelove.eng.auburn.edu host

Telnet software (Client)

Address Resolver

DNS software (Client)

Forms a DNS Request

UDP transport agent

Encapsulates DNS Request

IP Network agent

Finds next host

How to Resolve IP Address Local Address?

ARPIP add.

Local add.

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 52

Name Resolution (Name Name Resolution (Name IP IP address)address)

Telnet software (Client)

Address Resolver

strangelove.eng.auburn.edu host

DNS software (Client)

Forms a DNS Request

UDP transport agent

Encapsulates DNS Request

IP Network agent

Finds next host

DNS Request

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 53

strangelove.eng.auburn.edu host

Telnet software (Client)

Address Resolver

DNS software (Client)

Forms a DNS Request

UDP transport agent

Encapsulates DNS Request

IP Network agent

Finds next host

How to Resolve IP Address Local Address?

ARPIP add.

Local add.

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 54

DNS software (Server)

Process DNS Request

UDP transport agent

Decapsulates DNS Request

Port?

IP Network agent

Is it for me?What stamp? UDP?

Query gets to the DNS Server

DNS RequestUDP HdrIP Header

DNS RequestUDP Hdr

DNS Request

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 55

DNS Server Responds

DNS software (Server)

Forms DNS Response DNS Response

UDP Hdr

UDP transport agent

Encapsulates DNS Request

DNS Response

IP Header

IP Network agent

Is it for me?What stamp? UDP?

UDP HdrDNS Response

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 56

UDP transport agent

Decapsulates DNS Request

Port?

IP Network agent

Is it for me?What stamp? UDP?

On Host strangelove.eng.auburn.edu

DNS ResponseUDP HdrIP Header

DNS ResponseUDP Hdr

DNS Response

Telnet software (Client)

Address Resolver

DNS software (Client)

Process DNS Response

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 57

Requesting the IP of Requesting the IP of bach.cs.tamu.edu from bach.cs.tamu.edu from mallard.eng.auburn.edumallard.eng.auburn.edu

mallard dns.duc.auburn.edu dns.auburn.edu

Server for .edu Domaindns.tamu.edudns for cs.tamu.edu

Request

Response

TelnetTelnetRFC 854RFC 854

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 59

Telnet: the Big PictureTelnet: the Big Picture(Port 23)(Port 23)

TelnetClient

Terminal Driver

TCP/IP

User at terminal

TelnetServer

Pseudo-Terminal Driver

TCP/IP

One TCP connection

Login Shell

Kernel Kernel

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 60

Telnet to a Port other than 23Telnet to a Port other than 23

TelnetClient

Terminal Driver

TCP/IP

User at terminal

Any stream server

TCP/IP

One TCP connection

Kernel Kernel

SMTPSMTPRFC 822RFC 822

Read 7.2

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 62

Electronic MailElectronic MailUser

User AgentQueue of mail

to be sent

Local Mail Transfer Agent

RelayMTA

Sending Host

RelayMTA

Local Mail Transfer Agent

Queue of mail to be sent

User Agent

UserReceiving Host

Organization 1

Organization 2

Internet

04/18/23

COMP 6320 Basics of Computer Networks Saad Biaz 63

ConclusionConclusion

You must know– The key Internet application protocols– Their functions– Port number binding– Role in the networking stack

Recommended