Exploring Network Protocols & Services: Deep Dive into HTTP, TCP, IP, & Layering, Study notes of Computer Science

An in-depth exploration of network protocols and services, focusing on http, tcp, ip, and protocol layering. Learn how applications interact with transport and internet protocols to retrieve data from web servers, the role of each layer in the network architecture, and the importance of clean interfaces in protocol design.

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-ilt
koofers-user-ilt 🇺🇸

10 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Network Architecture
CINS/F1-01
Objectives of Lecture
Show how network architecture can be
understood using a layered approach.
Introduce the OSI seven layer reference model.
Introduce the concepts of internetworking and
routing.
Understand the difference between network
protocols and services.
Contents
1.1 Extended example: how the Internet
protocols fetch a web page
1.2 The concept of protocol layering
1.3 Internetworking and routing
1.4 The OSI seven layer model
Protocols
The term protocol refe rs to a well-known set of rules
and formats to be use d in order to perform a task. For
example, a task of com municating between processes.
Parts of a protocol:
A specification of a sequence of messages th at
must be exchanged.
A specification of the format of the data in the
messages.
Existence of well-know n (standard) protocols enables
the separate compone nts of the distributed systems to
be developed independently in different languages and
on different platforms.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Exploring Network Protocols & Services: Deep Dive into HTTP, TCP, IP, & Layering and more Study notes Computer Science in PDF only on Docsity!

Network Architecture

CINS/F1-

Objectives of Lecture

  • Show how network architecture can be understood using a layered approach.
  • Introduce the OSI seven layer reference model.
  • Introduce the concepts of internetworking and routing.
  • Understand the difference between network protocols and services.

Contents

1.1 Extended example: how the Internet protocols fetch a web page 1.2 The concept of protocol layering 1.3 Internetworking and routing 1.4 The OSI seven layer model

Protocols

  • The term protocol refers to a well-known set of rules and formats to be used in order to perform a task. For example, a task of communicating between processes.
  • Parts of a protocol:
    • A specification of a sequence of messages that must be exchanged.
    • A specification of the format of the data in the messages.
  • Existence of well-known (standard) protocols enables the separate components of the distributed systems to be developed independently in different languages and on different platforms.

Four elements of a protocol:

A set of rules governing the communication between two peer entities. It must define the format and the order of messages as well as actions taken on the transmission and receipt of a message.

  • syntax: format, what is a valid message?
    • “GET /~hugue/index.html HTTP/1.1\nHOST: www.cs.umd.edu\n\n”
  • Semantics: what does it mean?
    • Get file /~hugue/index.html using the http 1.1 protocol.
  • Action:
    • read file /~hugue/index.html from the disk, send it through the socket using the http 1.1 protocol and close the socket
  • Timing: relative order of messages.
    • Reply follows the request

1.1 Internet Protocols

Network Web Browser Web Server

Four-Layer Model

Distributed data communications involves three primary components:

  • Applications
  • Computers
  • Networks Four corresponding layers
  • Application layer
  • Transport layer
  • Internet layer
  • Network Interface Basic Internet Network Architecture Application Layer Transport Layer Internet Layer Network Layer Physical Network Application Layer Transport Layer Internet Layer Network Layer HTTP Message TCP Packet Ethernet Frame Ethernet Frame IP Datagram IP Datagram Internet Layer Network Layer Physical Network Host A Host B Router

Internet Layer

  • Responsible for routing communications between one machine and another.
  • Accepts requests to send packets to destination address.
  • Internet Protocol (IP) encapsulates packets in IP datagram with IP header and uses routing algorithm to decide whether to send directly or indirectly.
  • Also handles incoming IP datagrams.
    • If addressed to local machine, remove the IP datagram header and pass up to transport layer.

Internet Layer Example

  • IP outline:
    • Time to live: 128
    • Header checksum: 0x57d
    • Source: my home pc (69.140.128.222)
    • Destination: www.cs.umd.edu (128.8.10.143) Dst: 128.8.10.143 TTL: 128^ Src: 69.140.128.222^ Src Chksum: 1081: 0xa858^ Dst: 80^ GET /~^ Host:hugue/index.html^ www.cs.umd.edu^ HTTP/1. IP datagram header TCP header HTTP Message

Network Interface Layer

  • Accepts IP datagrams and transmits over specific networks.
  • Maybe a simple device driver (e.g. an Ethernet driver) or a complex subsystem with further data link protocols. Src: 00:e0:81:10:19:fc Dst: 00:a0:cc:54:1d:4e Type: IP

Network Interface Layer Example

  • Ethernet outline:
    • Destination: 00:a0:cc:54:1d:4e
    • Source: 00:e0:81:10:19:fc
    • Type: IP Dst: 128.8.10.143 TTL: 128^ Src: 69.140.128.222^ Src^ Chksum: 1081: 0xa858^ Dst: 80^ GET /~^ Host:hugue/index.html^ www.cs.umd.edu^ HTTP/1. Ethernet Frame

Ports and Addresses

  • Ports are destination points within a host computer.
  • Processes are attached to the ports, enabling them to communicate.
  • Transport layer addresses are composed of network address of the host computer and a port number.
  • In the Internet every host is assigned a unique IP number which is used in routing.
  • In an Ethernet each host is responsible for recognizing that the messages meant for it.

1.2 Protocol Layering

Application Layer Transport Layer Internet Layer Network Interface Physical Network Application Layer Transport Layer Internet Layer Network Interface Message Packet Datagram Frame Host A Host B

Protocol Layering

Application Layer Transport Layer Internet Layer Network Layer Physical Network Application Layer Transport Layer Internet Layer Network Layer HTTP Message TCP Packet IP Datagram Ethernet Frame Web Browser Web Server

Protocol Hierarchies

  • Protocols are stacked vertically as series of ‘layers’.
  • Each layer offers services to layer above, shielding implementation details.
  • Layer n on one machine communicates with layer n on another machine (they are peer processes/entities ) using Layer n Protocol.

1.3 Internetworking and Routing

  • No single networking technology can satisfy all requirements.
  • Universal interconnection is desired.
  • Protocols allow communication between nodes without understanding underlying mechanisms.
  • Internetworking is the process by which a group of disparate, heterogeneous networks can be linked to form a single logical network.
  • The Internet is just such a collection.

Routing

Web Browser Web Server Router Network A Network B Routing is the mechanism used to transfer data between networks to reach the correct destination. Routing takes place at the IP layer: routers are not aware of transport and application layers.

Protocol Layering and Routing

Application Layer Transport Layer Internet Layer Network Layer Physical Network Application Layer Transport Layer Internet Layer Network Layer HTTP Message TCP Packet Ethernet Frame Ethernet Frame IP Datagram IP Datagram Internet Layer Network Layer Physical Network Host A Host B Router

1.4 The OSI Reference Model

  • OSI Reference Model – an internationally standardised network architecture.
  • An abstract representation of an ideal network protocol stack; not used in real networks.
  • OSI = Open Systems Interconnection.
  • Specified in ISO 7498-1.
  • Model has 7 layers.

Internet Protocols vs OSI

Application Presentation Session Transport Network Data Link Physical Application TCP IP Network Interface 1 Hardware 2 3 4 5 1 2 3 4 6 5 7

The OSI Model

Layer 7 Layer 6 Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

Lower/Upper Layers

  • Layers 1-4 often referred to as lower layers.
  • Layers 5-7 are the upper layers.
  • Lower layers relate more closely to the communications technology.
  • Layers 1 – 3 manage the communications subnet. - the entire set of communications nodes required to manage massages between a pair of machines.
  • Layers 4 – 7 are true ‘end-to-end’ protocols.
  • Upper layers relate to application.

Layer 7: Application Layer

  • Home to wide variety of protocols for specific user needs, e.g.: - virtual terminal service, - file transfer, - electronic mail, - directory services.

Layer 2: Data Link Layer

  • Provides reliable, error-free service on top of raw Layer 1 service.
  • Breaks data into frames. Requires creation of frame boundaries.
  • Frames used to manage errors via acknowledgements and selective frame retransmission.

Layer 1: Physical Layer

  • Concerned with bit transmission over physical channel.
  • Issues include:
    • definition of 0/1,
    • whether channel simplex/duplex,
    • connector design.
  • Mechanical, electrical, procedural matters.

Services in the OSI Model

  • In OSI model, each layer provide services to layer above, and ‘consumes’ services provided by layer below.
  • Active elements in a layer are called entities.
  • Entities in same layer in different machines are called peer entities.

Layering Principles

(n+1) Entity Service User (n) Entity Service Provider (n+1) Entity Service User (n) Entity Service Provider Layer n Service Access Point (SAP) Layer n protocol PDU^ n+ Layer n+1 protocol SDU PDU - Protocol Data Unit SDU - Service Data Unit PDU^ N-1^ N-1 PDU

Services and Protocols

  • Service = set of primitives provided by one layer to layer above.
  • Service defines what layer can do (but not how it does it).
  • Protocol = set of rules governing data communication between peer entities, i.e. format and meaning of frames/packets.
  • Service/protocol decoupling very important.

Connections

  • Layers can offer connection-oriented or connectionless services.
  • Connection-oriented like telephone system.
  • Connectionless like postal system.
  • Each service has an associated Quality-of- service (e.g. reliable or unreliable).

Reliability Issues

  • Reliable services never lose/corrupt data.
  • Reliable service costs more.
  • Typical application for reliable service is file transfer.
  • Typical application not needing reliable service is voice traffic.
  • Not all applications need connections. Encapsulation as it is applied in layered protocols

Sockets Programming

  • Network API
  • Socket Structures
  • Socket Functions Network Application Programming Interface (API) - The services provided by the operating system that provide the interface between application and protocol software. Application Application NetworkNetwork^ APIAPI Protocol A Protocol A Protocol BProtocol B Protocol CProtocol C

Network API

  • Generic Programming Interface.
  • Support for message oriented and connection oriented communication.
  • Uses the existing I/O services
  • Operating System independence.
  • Support multiple communication protocol suites (families): IPv4, IPv6, XNS, UNIX.
  • Provide special services for Client and Server?

TCP/IP

  • There are a variety of APIs for use with TCP/IP:
    • Sockets
    • TLI
    • Winsock
    • MacTCP

Functions needed

  • Specify local and remote communication endpoints
  • Initiate a connection
  • Wait for incoming connection
  • Send and receive data
  • Terminate a connection gracefully
  • Error handling

Berkeley Sockets

  • Generic:
    • support for multiple protocol families.
    • address representation independence
  • Uses existing I/O programming interface as much as possible

Unix Descriptor Table

DescriptorDescriptor^ TableTable Data structure for file 0Data structure for file 0 Data structure for file 1Data structure for file 1 Data structure for file 2Data structure for file 2

Socket

  • A socket is a process-level abstract representation of a communication endpoint.
  • Sockets work with Unix I/O services just like files, pipes & FIFOs.
  • Sockets (obviously) have special needs:
    • establishing a connection
    • specifying communication endpoint addresses