Sie sind auf Seite 1von 270

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Network architectures and protocols


Basics, for beginners
Last edited: Jan 16, 2012

Jnos Vgh(Janos.Vegh@unideb.hu)

Printed: February 21, 2012

Jnos Vgh | Network architectures and protocols

1/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

References and useful links I


Network architectures and protocols

[1] James F. Kurose, Keith W. Ross: Computer Networking: A Top-Down Approach., 4. edition, Pearson Education, ISBN : [2] William Stallings: Data and Computer Communications, 7. edition, Prentice Hall, ISBN : 0-13-183311-1 [3] P. Ciccarelli, et al: Networking basics. Wiley 2008, ISBN: 978-0-470-11129-1 [4] Larry L. Peterson and Bruce S. Davie: Computer Networks, 3. edition, Elsevier, ISBN : 1-55860-833-8 [5] T. Lammle, A. Barkl: CCDA-Cisco Certied Design Associate, Second Edition, 2003 SYBEX, ISBN: 0-7821-4200-1 [6] Joe Casad: Sams Teach Yourself TCP/IP in 24 Hours, Third Edition Sams Publishing, 2003. ISBN : 0-672-32565-9

Jnos Vgh | Network architectures and protocols

2/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

References and useful links II


Network architectures and protocols

[7] Matthew J. Castelli: LAN Switching rst-step, Cisco Press, 2004. ISBN : 1-58720-100-3 [8] W. Richard Stevens: TCP/IP Illustrated, Volume 1: The Protocols. Addison Wesley, 1999. (14th print) ISBN: 0201633469 [9] http://www.securitydocs.com/ [10] http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf [11] http://www.tcpipguide.com/free 4 [12] http://www.rfc-editor.org [13] http://www.globalknowledge.com [14] http://www.garykessler.net/library/tcpip.html

Jnos Vgh | Network architectures and protocols

3/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

References and useful links III


Network architectures and protocols

[15] http://www.elon.edu/predictions 3

Jnos Vgh | Network architectures and protocols

4/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Copyright notice
Network architectures and protocols

Copyright c 2008-2011 Jnos Vgh <Janos.Vegh@unideb.hu> Permission is granted to present, copy, distribute and/or modify this document (course lecture) under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Jnos Vgh | Network architectures and protocols

5/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

What is Internet, really?


The Internet, a birds view

The todays Internet is too big and complex to be represented in a somewhat realistic way. For most of its users, Internet means some loosely dened thing.
c www.cs.princeton.edu/bwk/cloud.jpg

Jnos Vgh | Network architectures and protocols

6/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

What is Internet, really?


The Internet, a birds view

The todays Internet is too big and complex to be represented in a somewhat realistic way. For most of its users, Internet means some loosely dened thing.
c www.cs.princeton.edu/bwk/cloud.jpg

Jnos Vgh | Network architectures and protocols

6/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The growing Internet


The Internet, a birds view

c http://www.isc.org

Jnos Vgh | Network architectures and protocols

7/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Tendencies of the Internet usage


The Internet, a birds view

The site [15] presents a good summary on the history and forecasts of the Internet. It is worth to realize the changing tendencies in the Internet usage on the dierent continents.

c http://www.isc.org

Jnos Vgh | Network architectures and protocols

8/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Mi is az az Internet?
The Internet, a birds view
Main components of the Internet Millions of computer(like device)s Communication lines Packet switches (routers) Communication using computer networks is a complex, but simple to carry out process performed between computer applications a multi-component process, requires a complex infrastructure a dynamic process, independent from the used technologies (hardware and software providers)
9/228

c Pearson 2008, Kurose

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Mi is az az Internet?
The Internet, a birds view
Main components of the Internet Millions of computer(like device)s Communication lines Packet switches (routers) Communication using computer networks is a complex, but simple to carry out process performed between computer applications a multi-component process, requires a complex infrastructure a dynamic process, independent from the used technologies (hardware and software providers)
9/228

c Pearson 2008, Kurose

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Internet: is a network of networks


The Internet, a birds view

Internet connects very dierent, more or less closed networks, in a rather complex way. It uses dierent techniques, speeds, connection methods, protocols.

c http://docwiki.cisco.com

Jnos Vgh | Network architectures and protocols

10/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Developing Internet
The Internet, a birds view

The Internet is developed with full speed even today: new services, operating modes, devices, protocols appear. The key point to the world-wide applicability is the internet standards, developed by the Internet Engineering Task Force. The development process has a very special developer model: the developers proposal is published at RFC editor. This will be the description, which can be recalled in case of doubt. Its cleared up version, enriched with explanations and examples, shall be studied from textbooks.

Jnos Vgh | Network architectures and protocols

11/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Typical uses of Internet


The Internet, a birds view

Actually, Internet is an extreme large computer network, that can be used for anything. Typical uses of Internet: World Wide Web Email FTP Newsgroups Chat and instant messaging Remote access

Jnos Vgh | Network architectures and protocols

12/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using Internet
The Internet, a birds view
One of the main tasks of networks is to allow sharing data and resources for the users and applications.

c http://www.networkworld.com/subnets/cisco

Jnos Vgh | Network architectures and protocols

13/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using e-mail
The Internet, a birds view
One of the most frequently used services on the computer networks Its structure is similar to the one of the conventional mail Delivers simple text Data of other type (sound, picture, movie) can be attached

c A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

14/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operation of the e-mail


The Internet, a birds view

c W. Stallings: Data and Computer Communications

Jnos Vgh | Network architectures and protocols

15/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The computers communicating through the Internet exchange messages in a way similar to the protocol of the human communication. The right side of the gure shows the exchange of messages occurring between the WEB server and our computer running a browser, when asking for the content of a web page.

Jnos Vgh | Network architectures and protocols

15/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Some basic terms of data communication


Basics of data communication networks

Data source Provides the data to transmit Sender (transmitter) Converts data to signals for transmission Data transmission system Transmits the data Receiver Converts received signals to data Destination computer Receives and uses incoming data

Jnos Vgh | Network architectures and protocols

16/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Some basic tasks of data communication


Basics of data communication networks

Some basic tasks of data communication using data transmission system interfacing systems together generating signals sychronization managing data exchange error detection and correction dataow control addressing routing restarting message formatting security tasks managing network

Jnos Vgh | Network architectures and protocols

17/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Relations of sending and receiving


Basics of data communication networks

c 2004 Cisco Press/M. J. Castelli

In a communication a node can work as sender (source) and receiver (destination), or both.
Jnos Vgh | Network architectures and protocols 18/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Logical and physical path


Basics of data communication networks

c 2004 Cisco Press/M. J. Castelli

It is worth to distinguish logical and physical path : the intermediate node is just a "transit station", in the logical path it can be replaced and even omitted.
Jnos Vgh | Network architectures and protocols 19/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Transfer modes
Basics of data communication networks

Symplex data transfer only in one direction (radio broadcasting). Half-duplex data transfer in both directions, but not simultaneously (CB radio). Duplex data transfer in both directions, simultaneously (telephon).

c 2004 Cisco Press/M. J. Castelli

c 2004 Cisco Press/M. J. Castelli

c 2004 Cisco Press/M. J. Castelli

Jnos Vgh | Network architectures and protocols

20/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A simple network
Basics of data communication networks

The computers involved in the networks are called nodes or hosts. In a network, the messages (requests and the corresponding nodes) sent from one node to another are transferred through the transfer medium (that can be network or telephone cable, radio or satellite connection) to the other computer. The sending computer must be able to send the message or request, as well as the receiving computer must be able to understand and reply it. For these actions, it is necessary to physically detect (hardware devices) and properly interpret (protocols) the signals.
Jnos Vgh | Network architectures and protocols

c 2004 by Sams Publishing/J. Casad

21/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Goals of networking I
Basics of data communication networks

Computer network

a collection of computers (or more and more, computer-like devices), that are able to communicate with each other through some medium, using hardware and software soutions.

Node

A device with independent communication ability, and unique network address.

Jnos Vgh | Network architectures and protocols

22/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Goals of networking II
Basics of data communication networks

Protocol

A formal description, comprising rules and conventions. Denes the method of communication between networking devices.

Jnos Vgh | Network architectures and protocols

23/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Structural models
Basics of data communication networks

The devices might play dierent roles in the networks. Depending on its role, a node might have dierent access to devices in other nodes.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

24/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Client-Server Networking
Basics of data communication networks

c 2004 by Sams Publishing/J. Casad

The success of this mode of operation is based on the fact, that the partners exactly know, what can they expect from each other (this is the responsibility of the protocol): the servers are listening and upon request sending data.
Jnos Vgh | Network architectures and protocols

c 2004 by Wiley Publishing:N. Matthew, R. Stones

25/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Methods of addressing and forwarding


Basics of data communication networks

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Unicast one device sends message to the other, to its address. Broadcast one device sends message to all other devices on the network. The message (in general) is sent to an address, reserved for this goal. Multicast one device sends message to a certain group of devices on the network.
26/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Connection-free and connection-based protocol


Basics of data communication networks

c 2004 by Sams Publishing/J. Casad

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

27/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Connection-free and connection-based protocol


Basics of data communication networks

c 2004 by Sams Publishing/J. Casad

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

27/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Network hardware
Basics of data communication networks

Subdividing networks: By function


broadcasting networks peer-to-peer networks

By distance of processors 1 m Personal 100 m Local 10 km Metropolitan 100 km Wide 10.000 km Internet for reducing the complexity of networking, layers (levels) are created.

Jnos Vgh | Network architectures and protocols

28/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

What can see the user from the operation of the network?
Basics of data communication networks
To build out a connection, proper hardware (network interface) and software (protocol suit provided by the operating system) conditions required.

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

29/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The network form the point of view of the operating system


Basics of data communication networks
The *nix operating systems handle everything as FILE; network is no exception. Data are handled (sent and received) by sockets dedicated for this goal. Finally, it is also FILE, and immediately pipe.

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

30/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Connecting to the Internet


Basics of data communication networks

the top level connection possibility is the (Network Access Point, NAP). The providers (Internet Service Provider, ISP) rent a network access point (Point of Presence, POP) for accessing the network, and use their own server for routing. some rules are commonly accepted there are international organizations for operating and handling the networks everybody speaks the same language
Jnos Vgh | Network architectures and protocols

c 2004 by Sams Publishing/J. Casad

31/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP addresses
Basics of data communication networks

In computer networks the individual nodes are identied by unique 32-bit numbers (later we shall call them IP-numbers). The IP based networks are using a hardware-independent, hierarchic addressing scheme. Every node has its unique address. This "calling number" has similarity to the phone numbers, because it can be divided into area code (network ID) and local number (host ID).

c 2004 by Sams Publishing/J. Casad

c 2008 by http://wiki.hill.com

On the networks the data are forwarded according to the addresses of the hosts. The address of a host allows us to conclude its geographical location, it is a kind of ZIP code.

Jnos Vgh | Network architectures and protocols

32/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Ports and sockets


Basics of data communication networks
In the TCP/IP system (see next section) there exists a mechanism, allowing to address certain networking applications, using either TCP or UDP protocol, through some ports. IP address and port together constitute the socket.
c 2004 by Sams Publishing/J. Casad

Port

A well dened internal address, that provides a datapath inside the transport layer for the application.

Socket

A socket is an ID, fully describing the networking application, and comprises IP address and port number.

Jnos Vgh | Network architectures and protocols

33/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Services and ports


Basics of data communication networks

In addition to the IP address and port number, even the transport protocol must also be named, to uniquely describe a service. Name echo echo ftp-data ftp-data ftp telnet telnet smtp smtp http http Port/protocol 7/tcp 7/udp 20/tcp 20/udp 21/tcp 23/tcp 23/udp 25/tcp 25/udp 80/tcp 80/udp Remark echo echo #File Transfer (default) #File Transfer (default) #File Transfer (control) telnet telnet mail # Simple Mail mail # Simple Mail # WWW http # WWW http

Jnos Vgh | Network architectures and protocols

34/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operation of the inetd server


Basics of data communication networks

c 2004 http://www.fmc-modeling.org

Jnos Vgh | Network architectures and protocols

35/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Exchange of socket addresses


Basics of data communication networks

c 2004 by Sams Publishing/J. Casad

The next example shows how an application on the destination computer can be reached from the sending computer through a socket:
1

Computer A initiates a connection to computer B on a well-known port address. A eld in the sent message contains the information, which port number should use computer B when sending information back to computer A. In messages, sent by the application running on computer B, to the application running on computer A, this socket address will be the destination address.
36/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using e-mails
Basics of data communication networks
One of the most frequently used services on computer networks Its structure is similar to the conventional mail It delivers simple texts Data of other types are delivered as attachment (sound, picture, movie)

c A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

37/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operation of e-mails
Basics of data communication networks

c W. Stallings: Data and Computer Communications

Jnos Vgh | Network architectures and protocols

38/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layered architectures in general


The layer models for networking

It is worth to break the process of communication into layers, because describing protocols is hard and complex task a hierarchical protocol system is easier to overview only the interface shall be dened, rather than the operation details the individual layers can be implemented by dierent manufacturers easier to implement easier to change easier to nd errors easier to replace easier to study
39/228

c 2004 http://www.globalknowledge.com

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Introducing the 7-layer model


The layer models for networking

The Open Systems Interconnection (OSI) model is a reference tool for understanding data communications between any two networked systems. It divides the communications processes into seven layers. Each layer both performs specic functions to support the layers above it and oers services to the layers below it. The three lowest layers focus on passing trac through the network to an end system. The top four layers come into play in the end system to complete the process. Understanding of each of the seven layers, including their functions and their relationships to each other, will provide you with an overview of the network process, which can then act as a framework for understanding the details of computer networking.

Jnos Vgh | Network architectures and protocols

40/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layers of the network communication


The layer models for networking
Tasks for the individual layers: Application (7) provides services for operating the applications (for example, taking into account naming conventions for le transfer) Presentation (6) resolving interpretation problems Session (5) handling dialogs between aplications Transport (4) assures connection between nodes, controls data ow Network (3) provides network trac (connecting, addressing and routing) Data link (2) provides reliable data transfer (physical addressing, network topology, media access, physical transfer) Physical (1) forwarding signals, established electrical, optical and mechanical specications
41/228

c 2004 The Computer Language Co Inc

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layers of the network communication


The layer models for networking
Tasks for the individual layers: Application (7) provides services for operating the applications (for example, taking into account naming conventions for le transfer) Presentation (6) resolving interpretation problems Session (5) handling dialogs between aplications Transport (4) assures connection between nodes, controls data ow Network (3) provides network trac (connecting, addressing and routing) Data link (2) provides reliable data transfer (physical addressing, network topology, media access, physical transfer) Physical (1) forwarding signals, established electrical, optical and mechanical specications
41/228

c 2004 The Computer Language Co Inc

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

An Overview of the OSI Model


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Jnos Vgh | Network architectures and protocols

42/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

An Overview of the OSI Model


The layer models for networking

The main benets of the OSI model include the following: Helps users understand the big picture of networking Helps users understand how hardware and software elements function together Makes troubleshooting easier by separating networks into manageable pieces Denes terms that networking professionals can use to compare basic functional relationships on dierent networks Helps users understand new technologies as they are developed Aids in interpreting vendor explanations of product functionality

Jnos Vgh | Network architectures and protocols

43/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 1 - The Physical Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Jnos Vgh | Network architectures and protocols

44/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Components of the physical layer


The layer models for networking

The physical layer of the OSI model denes connector and interface specications, as well as the medium (cable) requirements. Electrical, mechanical, functional, and procedural specications are provided for sending a bit stream on a computer network. Components of the physical layer include: Cabling system components Adapters that connect media to physical interfaces Connector design and pin assignments Connector design and pin assignments Hub, repeater, and patch panel specications Wireless system components Parallel SCSI (Small Computer System Interface) Network Interface Card (NIC)

Jnos Vgh | Network architectures and protocols

45/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 2 - The Data Link Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Jnos Vgh | Network architectures and protocols

46/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Components and functions of the datalink layer


The layer models for networking

NICs have a layer 2 or MAC address. A switch uses this address to lter and forward trac, helping relieve congestion and collisions on a network segment. Bridges and switches function in a similar fashion. Layer 2 of the OSI model provides the following functions: Allows a device to access the network to send and receive messages Oers a physical address so a devices data can be sent on the network Works with a devices networking software when sending and receiving messages Provides error-detection capability Common networking components that function at layer 2 include: Network interface cards Ethernet and Token Ring switches Bridges
Jnos Vgh | Network architectures and protocols 47/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 3 - The Network Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Jnos Vgh | Network architectures and protocols

48/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main functions of the network layer


The layer models for networking

Layer 3, the network layer of the OSI model, provides an end-to-end logical addressing system so that a packet of data can be routed across several layer 2 networks (Ethernet, Token Ring, Frame Relay, etc.). Some basic security functionality can also be set up by ltering trac using layer 3 addressing on routers or other similar devices. Layer 3 of the OSI model provides the following functions: Logical addressing Subnetting and routing Fragmenting messages Diagnosing and reporting variations Some basic security and ltering

Jnos Vgh | Network architectures and protocols

49/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 4 - The Transport Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Layer 4, the transport layer of the OSI model, oers end-to-end communication between end devices through a network. Depending on the application, the transport layer either oers reliable, connection-oriented or connectionless, best-eort communications.

Jnos Vgh | Network architectures and protocols

50/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functions oered by the transport layer


The layer models for networking

Some of the functions of the transport layer: Application identication Client-side entity identication Conrmation that the entire message arrived intact Segmentation of data for network transport Control of data ow to prevent memory overruns Establishment and maintenance of both ends of virtual circuits Transmission-error detection Realignment of segmented data in the correct order on the receiving side Multiplexing or sharing of multiple sessions over a single physical link The most common transport layer protocols are the connection-oriented TCP Transmission Control Protocol (TCP) and the connectionless UDP User Datagram Protocol (UDP).

Jnos Vgh | Network architectures and protocols

51/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 5 - The Session Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Layer 5, the session layer, provides various services, including tracking the number of bytes that each end of the session has acknowledged receiving from the other end of the session. This session layer allows applications functioning on devices to establish, manage, and terminate a dialog through a network.
Jnos Vgh | Network architectures and protocols 52/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functions oered by the session layer


The layer models for networking

Some of the functions of the session layer: Virtual connection between application entities Synchronization of data ow Creation of dialog units Connection parameter negotiations Partitioning of services into functional groups Acknowledgements of data received during a session Retransmission of data if it is not received by a device Application identication

Jnos Vgh | Network architectures and protocols

53/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 6 - The Presentation Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Layer 6, the presentation layer, is responsible for how an application formats the data to be sent out onto the network. The presentation layer basically allows an application to read (or understand) the message.
Jnos Vgh | Network architectures and protocols 54/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functions oered by the presentation layer


The layer models for networking

Some of the functions of the presentation layer: Encryption and decryption of a message for security Compression and expansion of a message so that it travels eciently Character code translation Graphics formatting Content translation System-specic translation

Jnos Vgh | Network architectures and protocols

55/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Layer 7 - The Application Layer


The layer models for networking

c 2006 Global Knowledge Training LLC, Paul Simoneau

Layer 7, the application layer, provides an interface for the end user operating a device connected to a network. This application layer is the data the user views while using these applications.
Jnos Vgh | Network architectures and protocols 56/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functionality of the application layer


The layer models for networking

Application layer functionality include: Support for le transfers Ability to print on a network Electronic mail Electronic messaging Browsing the World Wide Web Encryption and decryption of a message for security

Jnos Vgh | Network architectures and protocols

57/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The OSI messaging model


The layer models for networking

c 2004 by Cisco Press/M. J. Castelli

Jnos Vgh | Network architectures and protocols

58/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Protocol hierarchies
The layer models for networking

The layers provide services for other layers above them, and use services of layers below them. The same layers of the communicating partners can make connection with each other, using the layers between them.
c A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

59/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Service and protocol


The layer models for networking

c 2004 by Cisco Press/M. J. Castelli

In general, layer k provides service for layer k + 1 and uses services of layer k 1. Since (virtually) the two layers k are connected, it is enough to restrict discussing communication (protocol) to this level.

Jnos Vgh | Network architectures and protocols

60/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Data packing
The layer models for networking

c 2004 Cisco Press/M. J. Castelli

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

61/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Data packing
The layer models for networking

c 2004 Cisco Press/M. J. Castelli

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

61/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Data format of network messages


The layer models for networking

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

The data are transmitted through the network in form of messages. The messages typically consist of three parts: Header control information on interpreting the data Data/payload the valuable data; often itself being packed for forwarding Footer/trailer similar to the header, in most cases not used

Jnos Vgh | Network architectures and protocols

62/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Network operation in nutshell


The layer models for networking

c 2009 http://SmartDraw.com

Jnos Vgh | Network architectures and protocols

63/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP/IP Model Layers


The layer models for networking

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

the TCP/IP application layer corresponds to the application, presentation and session layers of OSI. The TCP/IP application layer conceptually blurs the top three OSI layers. A similar fusion takes place of the physical network fuctionality in the lower two layers. The functionaly of the other layers roughly corresponds to each other.
Jnos Vgh | Network architectures and protocols 64/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A TCP/IP protocol suite


The layer models for networking

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

65/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Place and function of the application layer in TCP/IP


Application layer
Layer 7, the application layer, provides an interface for the end user operating a device connected to a network. Support for le transfers Ability to print on a network Electronic mail Electronic messaging Browsing the World Wide Web Encryption and decryption of a message for security Layer 6, the presentation layer, is responsible for how an application formats the data to be sent out into the network. Encryption and decryption of a message for security Compression and expansion of a message so that it travels eciently Character code translation Graphics formatting Content translation System-specic translation Layer 5, the session layer, provides various services, including tracking the number of bytes that each end of the session has acknowledged receiving from the other end of the session. Virtual connection between application entities Synchronization of data ow Creation of dialog units Connection parameter negotiations Partitioning of services into functional groups Acknowledgements of data received during a session Retransmission of data if it is not received by a device Application identication

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

Jnos Vgh | Network architectures and protocols

66/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Place and function of the application layer in TCP/IP


Application layer
Layer 7, the application layer, provides an interface for the end user operating a device connected to a network. Support for le transfers Ability to print on a network Electronic mail Electronic messaging Browsing the World Wide Web Encryption and decryption of a message for security Layer 6, the presentation layer, is responsible for how an application formats the data to be sent out into the network. Encryption and decryption of a message for security Compression and expansion of a message so that it travels eciently Character code translation Graphics formatting Content translation System-specic translation Layer 5, the session layer, provides various services, including tracking the number of bytes that each end of the session has acknowledged receiving from the other end of the session. Virtual connection between application entities Synchronization of data ow Creation of dialog units Connection parameter negotiations Partitioning of services into functional groups Acknowledgements of data received during a session Retransmission of data if it is not received by a device Application identication

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

Jnos Vgh | Network architectures and protocols

66/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Place and function of the application layer in TCP/IP


Application layer
Layer 7, the application layer, provides an interface for the end user operating a device connected to a network. Support for le transfers Ability to print on a network Electronic mail Electronic messaging Browsing the World Wide Web Encryption and decryption of a message for security Layer 6, the presentation layer, is responsible for how an application formats the data to be sent out into the network. Encryption and decryption of a message for security Compression and expansion of a message so that it travels eciently Character code translation Graphics formatting Content translation System-specic translation Layer 5, the session layer, provides various services, including tracking the number of bytes that each end of the session has acknowledged receiving from the other end of the session. Virtual connection between application entities Synchronization of data ow Creation of dialog units Connection parameter negotiations Partitioning of services into functional groups Acknowledgements of data received during a session Retransmission of data if it is not received by a device Application identication

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

c 2004 http://www.globalknowledge.com

Jnos Vgh | Network architectures and protocols

66/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Protocols of the TCP/IP application layer


Application layer

c 2008 www.softpanorama.org

Jnos Vgh | Network architectures and protocols

67/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using the application layer


Application layer

The networking API allows a networking application to communicate with the protocol stack. Most operating systems have their own layer to work above the application layer and "hide" the details of network operation before the user and the application. For Windows explorer.exe fullls this task.
c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

68/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Example: le and printer server


Application layer

A server provides services for other computers. A printer server handles a printer and serves printing requests. A le server fullls read and write requests on that device.

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

69/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Name resolution
Application layer

At the beginning a name (hostname) was given to the computers, and those names, together with the addresses attached to them, have been stored in le hosts, downloadable from a central place (NIC). When the operating system faces a computer name, it can be translated to address using the hosts le, . In more complex networks an eective, hierarchic name system is required, which
c 2004 by Sams Publishing/J. Casad

shares the responsibility of name resolution between special name servers. makes resolving the local names to be the right (and duty) of the local administrator.
70/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Name resolution
Application layer

At the beginning a name (hostname) was given to the computers, and those names, together with the addresses attached to them, have been stored in le hosts, downloadable from a central place (NIC). When the operating system faces a computer name, it can be translated to address using the hosts le, . In more complex networks an eective, hierarchic name system is required, which
c 2004 by Sams Publishing/J. Casad

shares the responsibility of name resolution between special name servers. makes resolving the local names to be the right (and duty) of the local administrator.
70/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

domain name system, DNS I


Application layer

The present day solution is contained in RFC 1034, RFC 1035 Its main points: hierarchical, domain-based naming convention distributed database The system comprises three main components: domain names and resource records name servers address resolution programs

Jnos Vgh | Network architectures and protocols

71/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

domain name system, DNS II


Application layer

Domain name space

It is a treee-type graph, in which all nodes represent resources. The nodes have labels attached. Label with zero length can only be attached to the root. The labels of sister nodes of the same lavel must be dierent.

These requirements concluded in developing the domain name system, DNS. The DNS name space is a multi-level domain system. It its design it was a planned feature, which servers shall be inquired to get the requested address. The name of the host and its domain name together dene the fully qualied domain name, FQDN.

Jnos Vgh | Network architectures and protocols

72/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

domain name system, DNS III


Application layer

Address resolution program

It is the interface making connection between the name servers and user applications. In addition to its general inquiry functions, it shall nd address to node name, or the reverse way, node name to address.

Jnos Vgh | Network architectures and protocols

73/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

domain name system, DNS IV


Application layer

Name server

It is such a node, that stores graph of domain names stores in the records of the domain names
the authentic resource record of the zone address of servers of the child zones temporarily also records of other zones

answers requests for name resolution


recoursively iteratively

Jnos Vgh | Network architectures and protocols

74/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Structure of the domain name space


Application layer
. .

mil

com

net

edu

org

hu

de

microsoft

IBM

mit

bme

unideb

www

dev

support

neptun

inf

www

irh

www

Jnos Vgh | Network architectures and protocols

75/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Structure of the domain name space


Application layer
root level . .

rst level

mil

com

net

edu

org

hu

de

second level

microsoft

IBM

mit

bme

unideb

www

dev

support

third level

neptun

inf

www

fourth level

irh

www

At the top of the hierarchy the root is located. The nodes, derived from the same node, (the so called sister nodes) comprise a level. The (sister) nodes at the same level must be dierent.
Jnos Vgh | Network architectures and protocols 75/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Structure of the domain name space


Application layer
. .

mil

com

net

edu

org

hu

de

Microsoft microsoft IBM mit bme unideb

Debrecen

www

dev

support

neptun

inf

www

IK www

irh

Jnos Vgh | Network architectures and protocols

75/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

DNS base terms I


Application layer

DNS zone

When cutting through the edges of the graph, part-graphs can be derived. Nodes in such a part-graph comprise a zone.

Absolute domain name

Any node in the space of the domain names can uniquely described by the order-keeping series of labels from the leaf to the root.

Jnos Vgh | Network architectures and protocols

76/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

DNS base terms II


Application layer

The absolute domain names always include the root node, and because of this, always end with character ..

Jnos Vgh | Network architectures and protocols

77/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Coding DNS names


Application layer

When coding the DNS names, the chained labels are prepended with the number of characters in the label. The string comprising the labels are terminated with a 0 byte. For example, coding of www.xyzindustries.com is [3] w w w [13] x y z i n d u s t r i e s [3] c o m [0] .

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

78/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root

hu

com

unideb

www

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root

hu

com

unideb

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root

hu own DNS 1 unideb

com

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu own DNS 1 unideb com

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu com

own DNS 1 unideb

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu 4 com

own DNS 1 hu DNS unideb

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu com

own DNS 1

hu DNS

unideb

www DNS client

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu com

own DNS 1

hu DNS

unideb

www DNS client unideb.hu DNS

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu com

own DNS 7 1

hu DNS

unideb

www DNS client unideb.hu DNS

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

root DNS hu com

own DNS 7 1 8

hu DNS

unideb

www DNS client unideb.hu DNS

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Flow of the DNS name resolution


Application layer

root 2

3 recoursive enquiry

root DNS hu com

own DNS 7 1 8

hu DNS

unideb

www DNS client iterative enquiry unideb.hu DNS

Jnos Vgh | Network architectures and protocols

79/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Reverse DNS search


Application layer
To make the reverse search quicker, a special edge of the graph in the name space is reserved for this goal. In such a case the system is looking for a number as described previously: the number is searched in the top level domain arpa, in its bme subdomain in addr , then the dotted decimal form of the given adress is used, the labels comprising the rst, second, third and fourth group of digits are used as address. When looking for the name corresponding to the IP address 193.6.128.25, the eective domain address searched is 25.128.6.193.in-addr.arpa. and the result of the search is the domain name www.unideb.hu.
80/228

reversed

normal . .

arpa

net

edu

hu

in addr

mit

unideb

157

193

inf

www

www

128

25

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The DNS resource records


Application layer

In the DNS system a data needed for name resolution are located on one or more servers. The information needed for name rsolution are stored in form of resource record, RR) in the database. For eciency, in reality they are stored in binary form, but they are represented here for simplicity as ASCII source. Type Meaning Value SOA Beginning of list Parameters belonging to this zone A IP address of a host 32-bit integer MX Mail exchange The domain that receives mail NS Name server Name of the server belonging to a domain CNAME Canonic name Domain name PTR Pointer Alias for an IP address HINFO Host description Description of CPU and operating system TXT text Arbitrary ASCII text
Jnos Vgh | Network architectures and protocols 81/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A sample DNS database


Application layer

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

82/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

DNS request/reply formats


Application layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

DNS request/reply formats: Header


A bit combination to separate dierent requests (standard query, status query, etc).

Request
The name in question and other parameters.

Reply
Direct reply to the question.

Autenticity
Records describing data from authentic servers.

Further data
Other information relevant to the question (RR).

Jnos Vgh | Network architectures and protocols

83/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

File Transfer Protocol (FTP)


Application layer

c 2008 by http://en.kioskea.net

DTP The process responsible for creating a connection and handling data channel. PI Responsible for interpreting commands received through the control channel (Protocol Interpreter). SERVER-PI watches commands sent by USER-PI through the control channel, creates data channel, receives and replies commands sent by USER-PI runs SERVER-DTP. USER-PI responsible for establishing a connection with a server, receives and sends commands, optionally controls USER-DTP

Jnos Vgh | Network architectures and protocols

84/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Downloading a le with FTP


Application layer
User command ftp -d pcguide.com ixl FTP protocol commands/FTP server reply Connected to pcguide.com. 220 ftp199.pair.com NcFTPd Server (licensed copy) ready. Name (pcguide.com:ixl): USER ixl 331 User ixl okay, need password. PASS XXXX 230-You are user #1 of 300 simultaneous users allowed. 230-Welcome to (<system name>) 230 Logged in. SYST 215 UNIX Type: L8 Remote system type is UNIX. Using binary mode to transfer les. PASV 227 Entering Passive Mode (ip1,ip2,ip3,ip4,193,224) LIST 150 Data connection accepted from ip5.ip6.ip7.ip8:4279; transfer starting. -rw-r-r- 1 ixl users 16 May 22 17:47 testle.txt 226 Listing completed. TYPE A 200 Type okay. PASV 227 Entering Passive Mode (ip1,ip2,ip3,ip4,193,226) RETR testle.txt 150 Data connection accepted from ip5.ip6.ip7.ip8:4283; transfer starting for testle.txt (16 bytes). 226 Transfer completed. 17 bytes received in 0.10 seconds (0.17 KB/s) QUIT 221 Goodbye.

****

dir

asc

get testle.txt

quit

Jnos Vgh | Network architectures and protocols

85/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Overview of the FTP protocol


Application layer

The FTP commands can basically be divided into three groups: Access control commands Data transfer commends Service commands The replies to the questions contain a number and text; the user interface evaluates the replies based on the number, and the user understands them based on the text. The user interface is in connection with a program, that is user friendly can be customized can be simplyied and abstracted

Jnos Vgh | Network architectures and protocols

86/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Trivial File Transfer Protocol (TFTP)


Application layer

FTP can carry out a lot of functionality, but on certain (for example, embedded) computers it is hard to implement, and in addition, most of its functionality is not really required. When small footprint and simple implementability is more important, than it is sucient to implement Trivial File Transfer Protocol (TFTP), that is essentially a simplied File Transfer Protocol (FTP). For more details see [11].

Jnos Vgh | Network architectures and protocols

87/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using remote computers directly


Application layer

Telnet protocol allows to work with a remote computer as if the user were connected directly to that. Main features of Telnet built on client/server model creates permanent connection for the session uses the well-known port 23/TCP sends a single data stream the server can have connection with multiple clients (using dierent IP/port addresses) simple communication protocol but: Network Virtual Terminal (NVT) hides details of operation Example of its usage: $ telnet www.someserversomewhere.org

Jnos Vgh | Network architectures and protocols

88/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Electronic mail
Application layer

c 2007 by Wikipedia

Jnos Vgh | Network architectures and protocols

89/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Actors of the mailing game


Application layer

c 2005 by http://www.mcmcse.com

As Fig shows, in addition to the already discussed DNS protocol, two more protocols play important role in electronic mailing. Protocol SMTP is mainly used in data transfer between mail servers, but this is also used in transferring mail from clients to server.

Jnos Vgh | Network architectures and protocols

90/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Sending and reading e-mails


Application layer

c 2004 A. S. Tanenbaum: Computer Networks

In the simplest case the mailing client of the user is located on the same computer as the mail server itself (i.e. the client is automatically permanently "on-line"). If the client connects only ocassionally to the Internet, it needs to download the mails of the user from the server. For downloading mails from the server to the client either the POP3 or IMAP protocols are used.
Jnos Vgh | Network architectures and protocols 91/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Comparing protocols POP3 and IMAP


Application layer

Property Denition Used port/protocol E-mail storing Place of E-mail reading Connection time Server resources required More mailboxes E-mails saved by For mobile access? Download control possibility? Partial download? Storage quota problems? Simple to implement? Widely supported?
Jnos Vgh | Network architectures and protocols

POP3 RFC 1939 110/TCP User PC O-line Little Little No User No Small Yes None Yes Yes

IMAP RFC 2060 143/TCP Server On-line Much Much Possible ISP Yes Big No Maybe No Increasing
92/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Protocol SMTP
Application layer
The Simple Mail Transfer Protocol (SMTP) (RFC 821, RFC 2821) is responsible for delivering mails.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

one can connect directly to an SMTP server: $ telnet www.someserversomewhere.org 25


Jnos Vgh | Network architectures and protocols 93/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Protocol POP3
Application layer

Electronic mails are written and read with clients (Outlook, Eudora, ...) installed on PC, using protocol POP3 (RFC 1939). POP3 allows for transfer in one direction only, from the mail server to the mailing client. Its operation can be observed with command : $ telnet mail.isp.com 110

c 2003 by http://www.sahughes.net

Jnos Vgh | Network architectures and protocols

94/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Downloading three messages using POP3


Application layer

The user actually downloads his/her emails to the client computer and deletes them from the server. For the time of downloading a TCP connection is built out.

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

95/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Protocol IMAP
Application layer

In contrast with the protocol POP, protocol IMAP (RFC 2060) not only delivers mails to the client software, but also allows to order them into directories on the server. Using webmail is a dierent mechanism, where one can read and write mails using a web browser.

c 2003 by http://www.sahughes.net

Jnos Vgh | Network architectures and protocols

96/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Extension MIME
Application layer

A MIME (Multipurpose Internet Mail Extensions, RFC 2045-RFC 2049) allows for attaching to our emails not only English text, but even picture or sound messages. The sending software codes the messages into texts, and the receiver decodes them. allows for using "user-dened" elds, and this facility is handled appropriately by the e-mail forwarding protocols.

c 2008 by http://www.learnthenet.com

Jnos Vgh | Network architectures and protocols

97/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The MIME method of operation


Application layer

The receiver software needs to know, how to convert back the received text. To help this process, the sender tells the data type
<type>/<subtype>

of the attachment in a line of form


Content-Type: <type>/<subtype> [; parameter1 ; . ; parameterN ]

The parameters allow for pinpointing the interpretation.

Jnos Vgh | Network architectures and protocols

98/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

MIME data transfer example


Application layer

c 2004 A. S. Tanenbaum: Computer Networks

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

99/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The World Wide Web (WWW)


Application layer

The WWW essentially only extends services we learned in connection with e-mailing and sending les. It is, however, much more, thanks to its ability to link dierent documents ("hypertext") and its protocol, being able to handle multi-media les eectively.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

100/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Model of World Wide Web


Application layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

101/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The Hypertext Markup Language (HTML)


Application layer

A markup language, in which one can describe with commands , how to present some content Its anchestor: ISO standard 8879:1986: Standard Generalized Markup Language (SGML) It has textual commands for all aspects, according to which one can display documents

c 2004 A. S. Tanenbaum: Computer Networks

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

102/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The Hypertext Markup Language (HTML)


Application layer

A markup language, in which one can describe with commands , how to present some content Its anchestor: ISO standard 8879:1986: Standard Generalized Markup Language (SGML) It has textual commands for all aspects, according to which one can display documents

c 2004 A. S. Tanenbaum: Computer Networks

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

102/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The Hypertext Markup Language (HTML)


Application layer

A markup language, in which one can describe with commands , how to present some content Its anchestor: ISO standard 8879:1986: Standard Generalized Markup Language (SGML) It has textual commands for all aspects, according to which one can display documents

c 2004 A. S. Tanenbaum: Computer Networks

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

102/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Some HTML commands


Application layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

103/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A Hypertext Transfer Protocol (HTTP)


Application layer

Presently we use its version Hypertext Transfer Protocol - HTTP/1.1 (RFC 2616). HTTP also uses method of NVT. For example, using command $ telnet www.someserversomewhere.org 80 one can directly connect to a HTTP server, that after logging in as shown above, expects HTTP requests. The protocol can handle dierent media, using many elements of the MIME concept of electronic mail. Its generic message format: <start-line>\<message-headers>\<empty-line> [<message-body>] [<message-trailers>]

Jnos Vgh | Network architectures and protocols

104/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Message format of HTTP Request


Application layer
<request-line> <general-headers> <request-headers> <entity-headers> <empty-line> [<message-body>] [<message-trailers>]

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

105/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Message format of HTTP Response


Application layer
<status-line> <general-headers> <response-headers> <entity-headers> <empty-line> [<message-body>] [<message-trailers>]

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

In reply to a HTTP request, at least a HTTP reply is received. The reply comprises a state code, and in most cases the requested resource.

Jnos Vgh | Network architectures and protocols

106/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Addressing scheme of WWW (URIs)


Application layer

URI (Uniform Resource Identier)

Describes a network resource in a concise and unique way, a kind of "address in the application layer". It is a compact, textual expression, containing all important information needed to reach a resource. Unavoidable for implementing hyperreferences.

The URI has grown out for using the network (WWW), for today it has been generalized and it is universally used in connection with TCP/IP protocols.

Jnos Vgh | Network architectures and protocols

107/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Addressing scheme of WWW (URIs)


Application layer

URI is a common name for two main classes: Uniform Resource Locator (URL) and Uniform Resource Name (URN). The generic structure of the widely used URL: <scheme>:<scheme-specific-part> which has a generally used form <scheme>://<user>:<password>@<host>:<port>/<url-path>; <params>?<query>#<fragment> The syntax belonging to the individual access modes (schemes) are dierent.

Jnos Vgh | Network architectures and protocols

108/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Uniform Resource Name (URN)


Application layer

Dierent copies of a network resource receive dierent names, although they are otherwise identical. They might have a uniformized name with using Uniform Resource Name (URN), see RFC 1737, RFC 2141. The individual resources are described by a namespace. The general syntax of URN is URN: <namespace-ID>:<resource-identifier> For example, a book can be described as URN:isbn:0-679-73669-7 Although URN uniquely identies a resource, it cannot tell how to access it. For that goal a resolution mechanism, similar to DNS, is necessary, see RFC 2483 (URI Resolution Services Necessary for URN Resolution)

Jnos Vgh | Network architectures and protocols

109/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Webmail
Application layer

c 2003 by http://www.sahughes.net

Webmail uses protocol IMAP4. The real IMAP4 mailing client is provided by the webmail server. Its operation:
1

2 3

4 5

It builds out a connection to the users PC, using the HTML protocol. Upon logging in, identies the user with user name and password. It reads the e-mails from the mailbox owned by the user and on the web-screen displays the list of received letters. When selecting a mail from the list, it displays the message. One can write a new mail in the browser, send it with HTTP protocol to the server, and the server forwards it using SMTP protocol.
110/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functions of the OSI transport layer


The transport layer

Layer 4 (transport) provides endpoint to endpoint connection through the network. application identication, client-side entity identication conrmation that the entire message arrived intact segmentation of data for network transport control of data ow to prevent memory overruns
c 2004 http://www.globalknowledge.com

establishment and maintenance of both ends of virtual circuits transmission-error detection realignment of segmented data in the correct order on the receiving side multiplexing or sharing of multiple sessions over a single physical link

Jnos Vgh | Network architectures and protocols

111/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Services provided for the upper layers


The transport layer
The functional item (transport entity) actually providing service is handled as an abstract term in this section.

c 2004 A. S. Tanenbaum: Computer Networks

In abstract terms, the data unit of the transport protocol is TPDU (Transfer Protocol Data Unit), corresponding physically to (possibly encapsulated into each other) data packets. Similarly, the name of the service access point is TSAP (Transport Service Access Point).
Jnos Vgh | Network architectures and protocols 112/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Transport primitives
The transport layer

Transport layer must provide a transport service interface for the application processes. Primitive SOCKET BIND LISTEN ACCEPT CONNECT SEND RECEIVE CLOSE Meaning Creating new communication endpoint (socket) Assigning a local address to the socket Declaring intention to accept connections Blocking the caller until connection attempt Attempting a connection Sending data through the connection Receiving data through the connection Disconnecting

Jnos Vgh | Network architectures and protocols

113/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP/IP protocol suite: transport layer


The transport layer
The transport layer forwards the data from the applications towards the lower layers. In that layer error checking, dataow control, network transfer control can be carried out.

c 2008 www.softpanorama.org

Jnos Vgh | Network architectures and protocols

114/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The UDP header


The transport layer

The UDP (User Datagram Protocol, RFC 768) can send through the network without building up a connection packages (segments) consisting only of an only 8 byte header and the user data. Although the UDP is in general characterized as not having error checking, some (rather limited) error checking is made. UDP does not assure c 2005 by http://www.tcpipguide.com/C. M. Kozierok rearranging the messages. Since the the UDP heading does contain neither the address of the sender, nor that of the receiver, mis-delivering may also happen.

Jnos Vgh | Network architectures and protocols

115/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP header
The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

116/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main task of TCP


The transport layer

The activity of TCP focusses on the following main tasks: Addressing/multiplexing Connection handling (creating, maintaining and terminating) Data handling and packing Data transfer Reliability and quality assurance Data ow dontrol And, what is not its task: Pre-determined communication Providing security Keeping message boundaries Guaranteed communication

Jnos Vgh | Network architectures and protocols

117/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main task of TCP


The transport layer

The activity of TCP focusses on the following main tasks: Addressing/multiplexing Connection handling (creating, maintaining and terminating) Data handling and packing Data transfer Reliability and quality assurance Data ow dontrol And, what is not its task: Pre-determined communication Providing security Keeping message boundaries Guaranteed communication

Jnos Vgh | Network architectures and protocols

117/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main characteristics of the TCP


The transport layer

Connection-oriented TCP requires, that before sending data, the devices build out connection with each other. Two-way Both devices are able both to send and receive data Multi-endpoint The devices can open multiple connections, either with the same or dierent device, and these connections can be handled independently, without collision. Reliable TCP takes care of both data sending and receiving. Acknowledged TCP acknowledges all messages. Stream-oriented TCP allows for sending continuous data ow. Structure-less In the TCP dataow received from the application there are no native dividing points. Dataow controlled TCP not only packs data and forwards them as quickly as possible.

Jnos Vgh | Network architectures and protocols

118/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

(De)multiplexing TCP/IP packets


The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

119/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Creating TCP connection


The transport layer

c 2008 http://www.itwizard.info

the computers need initially to synchronize their operation. This synchronization happens in the frame of the so called three-way handshaking.
Jnos Vgh | Network architectures and protocols 120/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Terminating TCP connection


The transport layer

c 2008 http://www.itwizard.info

Jnos Vgh | Network architectures and protocols

121/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Handling TCP connection


The transport layer

TCP (based on dierent parameters) fragments the byte stream into segments. The segments are passed to the next (network) layer, which forwards them (as IP datagram). In the receiving device the process follows a reverse path.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

122/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Positive acknowledge with resending


The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

In the simplest case the receiving host sends an acknowledge to the sender. The sender arms a timer; if no reply arrives within the pre-determined time, it re-sends the message.

Jnos Vgh | Network architectures and protocols

123/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Enhanced positive acknowledge with re-sending


The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

This enhanced method provides a reliable, ecient, data-ow controlling connection.


Jnos Vgh | Network architectures and protocols 124/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The sliding window method of TCP


The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

The bytes of the transferred TCP stream can be divided into four categories:
1 2 3 4

Sent and acknowledged bytes Sent but not (yet) acknowledged bytes Bytes to be sent, which the receiver is able to receive Bytes to be sent, which the receiver is not (yet) able to receive

The key to the process is the sending window, i.e. the amount of bytes, the receiver allows to be sent by the sender without acknowledge.
Jnos Vgh | Network architectures and protocols 125/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP transaction with resending


The transport layer

TCP sends the individual segments in such a way, that places them in a retransmittance que, and starts a transmit timer upon starting transmitting. During transmitting, all segments are place in this que. The que is ordered according to the remaining value of the retransmit timer. If the acknowledge arrives before the timer expires, TCP removes the segment from the que, otherwise resends it. If the acknowledgement number is greater or equal to the number of the sequence number of the last byte of the segment, the segment arrived in good condition.
The cumulative acknowledgment system of TCP

TCP uses a cumulative acknowledgment system, that is an acknowledgment number means, that all bytes with smaller sequence number arrived.

Jnos Vgh | Network architectures and protocols

126/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP transaction with resending


The transport layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

The server quickly sends three segments, starting a transmit timer for each. The third segment is lost. When the fourth segment aarives, the client puts the date to their place, but it cannot send the acknowledgement, because doing so would acknowledge that the third one also arrived. When the timer of the third segment arrives, the server resends the segment, and when it arrives, it acknowledges both the third and fourth segment, usually in only one acknowledge.
127/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

TCP transaction with selective resending


The transport layer

If both partners are able to do so, and they discuss this previously, the missing packet is selected by the sender, based on the selective acknowledgement send by the receiver. The receiver TCP can signal that the fourth segment has been received, and from this the sender can conclude that the third one shall be resent.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

128/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Overview of the network (internet) layer


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

This layer denes the cooperation of networks (internetworking).


Jnos Vgh | Network architectures and protocols 129/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Basic tasks of the network layer


Network layer
Basic tasks: Logical addressing The devices communicating through the network, have their own logic address Routing The data transmission through linked networks is a dominant function of the networking layer. Datagram packing Like also in the other layers, but a bit dierently Fragmenting and reassembling The technologies used in the network layer limit the length of the messages. Error handling Additional protocols are used .

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

130/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A simplied communication model-diagram


Network layer

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

131/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A simple switched network


Network layer

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

132/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Circuit switched networks


Network layer

c 2004 by Prentice Hall/W. Stallings

Its main characteristics: dedicated communication path between the stations phases: build up - transmit - remove it should be intelligent to design the path the unused capacity is lost
Jnos Vgh | Network architectures and protocols 133/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Packet switched networks


Network layer

c 2004 by Prentice Hall/W. Stallings

Its main characterictics: the data are transmitted in small packets the data are fragmented, and equipped with control information the received packet is (temporarily) stored and the re-transmitted the individual connection path pieces can be multiply used queing takes place
Jnos Vgh | Network architectures and protocols 134/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Transmitting data with packet switching


Network layer

In the case of packet swithed networks, the messages are fragmented into packets and the packets are sent one by one. The comparison of these two transmitting method: Datagram method Virtual circuit method the packets are handled independently they can take any path they can arrive in dierent order and even thay can be lost re-transmittance and resetting depend on the receiver the path is contructed before sending the packets handshake-based connection creation the virtual circuit rather than the reciever is identied by the packet no need to decide about the path of the individual packets no dedicated path exists
Jnos Vgh | Network architectures and protocols 135/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Virtual circuits vs datagrams


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

136/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Virtual circuits vs datagrams


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

136/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Virtual circuits vs datagrams


Network layer

The data packets may take dierent paths when using these dierent connection technologies

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

137/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Virtual circuits vs datagrams


Network layer

The data packets may take dierent paths when using these dierent connection technologies

c 2004 by Prentice Hall/W. Stallings

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

137/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Comparing features of virtual circuit and datagram method


Network layer

Task Building connection Addressing Status information Routing Eect of an error Quality of service Congestion

Datagram No need Complete source and destionation address n.a. Independent packets Some lost packages Complicated Complicated

Virtual circuit Needed Virtual circuit ID Store virtual circuits All packets on the same path All circuits through the node destroyed Depends of the reserved resources Depends of the reserved resources
138/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Eect of packet size on transmission time


Network layer

c 2004 by Prentice Hall/W. Stallings

The packet size has its eect on the transmission time. The packet to be sent comprises 40 bytes and a 3-bytes header is attached to the packet. In general, the total transmission time reduces with overlapped transmission. However, using more and smaller packets may result in increased, rather than decreased delay (the processing and queuing delays gain this tendency).
139/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Event timings for circuit and packet switching


Network layer

c 2004 by Prentice Hall/W. Stallings

Main contribution to the total delay: Propagation delay Transmission time Node delay
Jnos Vgh | Network architectures and protocols 140/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main function of the IP address


Network layer
Based on the IP address, one has to identify the addressee and to nd out what path leads to it

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

141/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP addresses and interfaces


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

142/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Structure and representation of the IP address


Network layer

The IP addresses used for addressing network devices are essentially 32-bit binary numbers, for convenience of the human users, represented as 4 decimal numbers separated by decimal points. The individual decimal numbers correspond to the individual bytes; because of this, their value lies in the range 0-255. The 32-bit address is divided into 4 bytes, usually represented in decimal form, separated by decimal points.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2008 by http://http://technet.microsoft.com

Jnos Vgh | Network architectures and protocols

143/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP address and subnetwork


Network layer

IP addressing

IP-addressing logical ID of the node, a 32-bit value Dotted decimal the usual representation (decimal value per byte) Address ranges InterNIC provides institutions with address ranges

Although one could organize subnetworks based on the ID of the hosts, it would be complicated and even unusable in the case of several millions of hosts. It would be more practical to divide the network based on netwok identiers, so taht the nodes and routers could select the destination segment. The intensive use of the IP addresses resulted in rather complicated dividing rules. The routers are able to deliver the datagrams to the address of a subnetwork (usually corresponding to a network segment) within the network.
Jnos Vgh | Network architectures and protocols 144/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP address and subnetwork


Network layer

IP addressing

IP-addressing logical ID of the node, a 32-bit value Dotted decimal the usual representation (decimal value per byte) Address ranges InterNIC provides institutions with address ranges

Although one could organize subnetworks based on the ID of the hosts, it would be complicated and even unusable in the case of several millions of hosts. It would be more practical to divide the network based on netwok identiers, so taht the nodes and routers could select the destination segment. The intensive use of the IP addresses resulted in rather complicated dividing rules. The routers are able to deliver the datagrams to the address of a subnetwork (usually corresponding to a network segment) within the network.
Jnos Vgh | Network architectures and protocols 144/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP address classes
Network layer

When Internet started to grow, the rst idea was to create address classes. The addresses have ben grouped into classes, and separated to network/host addresses. In the case of class A the network address is of 8 bits, the hosts of 24 bits, in the case of B class 16+16, while for C class 24+8.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

c 2008 by http://wiki.hill.com

Jnos Vgh | Network architectures and protocols

145/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP address classes
Network layer

When Internet started to grow, the rst idea was to create address classes. The addresses have ben grouped into classes, and separated to network/host addresses. In the case of class A the network address is of 8 bits, the hosts of 24 bits, in the case of B class 16+16, while for C class 24+8.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

c 2008 by http://wiki.hill.com

Jnos Vgh | Network architectures and protocols

145/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Evaluating the IP address classes method


Network layer

This method introduces a two-level hierarchy in the address space: it is divided to networks and hosts within those networks. Although today (after the Internet has grown several orders of magnitude) the disadvantages of the address classes are emphasized, it also has had severe advantages: Simple and clear Suciently exible Simple routing Reserved addresses available Main disadvantages, however: Lack of internal exibility The address space not eciently used The routing tables increase signicantly

Jnos Vgh | Network architectures and protocols

146/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Evaluating the IP address classes method


Network layer

This method introduces a two-level hierarchy in the address space: it is divided to networks and hosts within those networks. Although today (after the Internet has grown several orders of magnitude) the disadvantages of the address classes are emphasized, it also has had severe advantages: Simple and clear Suciently exible Simple routing Reserved addresses available Main disadvantages, however: Lack of internal exibility The address space not eciently used The routing tables increase signicantly

Jnos Vgh | Network architectures and protocols

146/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Separating an IP address within a byte


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

147/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP subnetworks
Network layer

A possible solution for dividing the IP address space with better eecticity is decribed by RFC 950. Pros: Reects the network structure Flexibility Invisible for Internet No need for new IP addresses for development Does not increases routing tables
Subnetwork mask

The subnetwork mask is a 32-bit number belonging to the IP address, whose bits are of value 1 if denoting network or subnetwork address, and of value 0 if address of host.

Jnos Vgh | Network architectures and protocols

148/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP subnetworks
Network layer

A possible solution for dividing the IP address space with better eecticity is decribed by RFC 950. Pros: Reects the network structure Flexibility Invisible for Internet No need for new IP addresses for development Does not increases routing tables
Subnetwork mask

The subnetwork mask is a 32-bit number belonging to the IP address, whose bits are of value 1 if denoting network or subnetwork address, and of value 0 if address of host.

Jnos Vgh | Network architectures and protocols

148/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Dividing a B class into subnetworks


Network layer

The bits describing the subnetwork, are borrowed from those originally intended to address hosts in the class-based description.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

The subnet mask bits with value 1 denote those bits of the IP address that are part of the network ID or subnet ID. The bits of value 0 denote bits that in the IP address contain the address of the host.

Jnos Vgh | Network architectures and protocols

149/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Dividing a B class into subnetworks


Network layer

The bits describing the subnetwork, are borrowed from those originally intended to address hosts in the class-based description.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

The subnet mask bits with value 1 denote those bits of the IP address that are part of the network ID or subnet ID. The bits of value 0 denote bits that in the IP address contain the address of the host.

Jnos Vgh | Network architectures and protocols

149/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Generating subnetwork ID
Network layer

The subnet mask is a kind of legend to interpreting the IP address. Except when having special goal, the subnet begins with consecutive 1s on the side of the higher positional value side, and nishes with consecutive 0s on the lower c 2005 by http://www.tcpipguide.com/C. M. Kozierok positional value side. Although the original RFC 950 does not contain this requirement, it is worth to place those masking bits in a consecutive way, according to Fig . After doing so, the co called CIDR notation (see later) can be used, which gives the number of the consecutive 1s (network + subnetwork address bits). In case of Fig this would be /21.

Jnos Vgh | Network architectures and protocols

150/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Default subnet mask


Network layer

After introducing the subnetting extension, it had to be introduced also in the systems, not really using it. Because of this, a so called default subnet mask had to be introduced, that provides the solution to the problem. The subnet mask can be interpreted simply for the base address classes, too: the length of the network bits is given, the length of the subnetwork bits is 0. The default subnet mask of the individual address is shown in Fig .

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

151/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Addressing/routing for subnetworks


Network layer

c 2004 by Sams Publishing/J. Casad

Directing the datagrams to networks happens based on network identifying bits of the IP address, which bits are dened by its address class. When a datagram has already reached the network, it is directed to the right subnetwork based on the bits identifying the subnetwork. After reaching the network segment, the host ID bits are used to direct the datatgram to the right host.

Jnos Vgh | Network architectures and protocols

152/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Example: designing class C subnetworks


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

When designing subnetworks, one needs to design rst, how many bits to steal for the subnetwork address from the bits originally intended to address hosts.
c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

153/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Example: designing class C subnetworks


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

When designing subnetworks, one needs to design rst, how many bits to steal for the subnetwork address from the bits originally intended to address hosts.
c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

153/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Unique and non-unique decisions.


Network layer

In the class C network shown in Fig 7 subnetworks should be created in such a way that all subnetworks contain at least 25 hosts.

In the case of class B network shown in Fig at least 15 subnetworks, each of which containing at least 450 hosts, should be created.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

154/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Unique and non-unique decisions.


Network layer

In the class C network shown in Fig 7 subnetworks should be created in such a way that all subnetworks contain at least 25 hosts.

In the case of class B network shown in Fig at least 15 subnetworks, each of which containing at least 450 hosts, should be created.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

154/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Determining address in a class C network.


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

155/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Determining address in a class C network.


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

155/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

CIDR - Classless Internet Domain Routing


Network layer

The CIDR (Classless Internet Domain Routing, see RFC 1517 - RFC 1520) uses a so called supernet mask to reach a group of network ID ranges as a single address. This techology is essentially the opposite of the technology used when constructing subnetworks: rather than adding more bits to the network address part, bits are removed from it. (In other words: subnetworking is applied not to a certain class, but to the address space itself) The address block is given with its smallest address, and the address if followed (after a slash, /) by the number of the bits with value 1 in the subnetwork mask, for example 204.21.128.0/17.

Jnos Vgh | Network architectures and protocols

156/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Advantages of CIDR
Network layer

Pros: Eective usage of address space Balanced address space usage Eective routing No separate subnetworking concept is needed Cons: Complexity
c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

157/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Advantages of CIDR
Network layer

Pros: Eective usage of address space Balanced address space usage Eective routing No separate subnetworking concept is needed Cons: Complexity
c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

157/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The IP heading
Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

158/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP datagram embedding
Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

159/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP Maximum Transmission Unit (MTU) and fragmentation


Network layer

The transmitter node calculates the maximum transmittable package size (taking into account the size of the IP header, having the size at least 20 bytes). However, this size might change during the transmission from one node to another.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Maximum Transmission Unit (MTU)

The size of the largest IP datagram, which can be forwarded on a physical network. It is dened by the applied technology and is characteristic to the given network.

Jnos Vgh | Network architectures and protocols

160/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP Maximum Transmission Unit (MTU) and fragmentation


Network layer

The transmitter node calculates the maximum transmittable package size (taking into account the size of the IP header, having the size at least 20 bytes). However, this size might change during the transmission from one node to another.

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Maximum Transmission Unit (MTU)

The size of the largest IP datagram, which can be forwarded on a physical network. It is dened by the applied technology and is characteristic to the given network.

Jnos Vgh | Network architectures and protocols

160/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The 2-step fragmentation of IP datagrams


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Jnos Vgh | Network architectures and protocols

161/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Routers
Network layer

The router in its simplest form is is a computer with two network interfaces.

c 2004 by Sams Publishing/J. Casad

The routers make possible to construct a unied Internet from the separated subnetworks, so the routers are very important networking devices.
Jnos Vgh | Network architectures and protocols 162/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Routers in networks
Network layer

In a real network: A router can connect to more than two networks a router can see also addresses, not directly connected to its network More data paths can be considered
c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

163/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP routing and routing tables


Network layer

c 2004 by Sams Publishing/J. Casad

The routing table essentially maps the ID of the destination networks to the next node that is being the next station of the datagram towards the destination network.
Jnos Vgh | Network architectures and protocols 164/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The routing process


Network layer
Task of the router: Receives data from any of the connected networks The data are forwarded through the protocol stack to the Internet layer The router examizes the destination address of the IP header If the data was intended to another network, the router examines its own routing tables, to nd out how to forward the data. When the router determined, through which adapter to forward the data, it forwards the data using the corresponding software of the network access layer to the adapter.
165/228

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Routing a message
Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

On this intermediate device the message raises up to the networking layer, then (re-packed) ows down in direction of another network connector.
Jnos Vgh | Network architectures and protocols 166/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

IP forwarding
Network layer

c 2004 by Sams Publishing/J. Casad

1 2

3 4 5

The host checks its own routing tables. the host looks for the IP address of the router corresponding to the destination. The datagram will be transported to the network access layer The network adapter of the router receives the frame. The router unpacks the frame and passes the datagram to the Internet layer. The router attempts to forward the datagram towards its destination according to its own routing table. the router forwards the datagram to another router, and the process repeats itself (goto step 1).
167/228

Jnos Vgh | Network architectures and protocols

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Direct and indirect forwarding


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

Fig shows three dierent forwardings.


Jnos Vgh | Network architectures and protocols 168/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Direct forwarding
Network layer

c 2004 by Sams Publishing/J. Casad

If the router connects only two segments, the routing table is very simple. The router in Fig never meets IP address not belonging to one of its own ports, and the router connects directly to both subnetworks. I.e., the router can directly forward all datagrams.

Jnos Vgh | Network architectures and protocols

169/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Indirect forwarding
Network layer

c 2004 by Sams Publishing/J. Casad

If router A is not connected to segment 3, it cannot get information on segment 3 without external help. In networks of big organizations one can nd dozens of routers, of which only one or two is connected directly to some segment. The information relating indirect addressing can be acquired from the system administrator (static) from other routers (dynamic)

Jnos Vgh | Network architectures and protocols

170/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Routing in datagram subnetworks


Network layer

c A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

171/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Routing in circuit switched subnetworks


Network layer

c A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

172/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Why address resolution is necessary


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

At each step the decision where to forward the data is made based on a logical (layer three) address, but the actual transmission must be performed using the physical (layer two) address of the next intended recipient in the route.
Jnos Vgh | Network architectures and protocols 173/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Dynamic address resolution


Network layer

c 2005 by http://www.tcpipguide.com/C. M. Kozierok

A broadcasts a request asking to be sent the hardware address of the device using the IP address IPB. B responds back to A directly with the hardware address.
Jnos Vgh | Network architectures and protocols 174/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Reverse ARP and boot PROM


Network layer

RARP RARP is the reverse operation of. Protocol ARP is used when the IP address is known but the not the physical address. Protocol RARP is used when the physical address is know, but the IP address not. Protocol RARP is frequently used together with protocol BOOTP, when booting diskless workstations. BOOTP Many network interfaces contain an empty socket, in which a boot PROM integrated circout can be inserted. The rmware of the circuit starts immediately, and it loads an operating system in the memory of the computer, from a network server, rather than from a magnetic disk. The operating system downloaded to a BOOTP device is congured to a predened IP address.

Jnos Vgh | Network architectures and protocols

175/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

ARP tables and caches


Network layer
In the memory of every host in the network segment, there exists an ARP table or ARP cache.

c 2004 by Sams Publishing/J. Casad

It is worth to review the process of the complete ARP process.


Jnos Vgh | Network architectures and protocols 176/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

ARP tables and caches


Network layer
In the memory of every host in the network segment, there exists an ARP table or ARP cache.

c 2004 by Sams Publishing/J. Casad

It is worth to review the process of the complete ARP process.


Jnos Vgh | Network architectures and protocols 176/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Features of the data link layer


The data link layer

Layer 2 of the OSI model normally includes the device driver in the operating system and the corresponding network interface card in the computer. It provides the following functions: Allows a device to access the network to send and receive messages Oers a physical (MAC) address Works with a devices networking software when sending and receiving messages Provides error-detection capability Typical devices of the datalink layer: network interface card (NIC) switch (Ethernet and Token ring) bridge
Jnos Vgh | Network architectures and protocols 177/228

c 2004 http://www.globalknowledge.com

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Main tasks of the data link layer


The data link layer

Main tasks of the data link layer: Logical Link Control (LLC) providing and controlling link between the local networking devives. Media Access Control (MAC) Controling the access to the networking medium. Data framing The packets received from the network layer are put into frames

c 2003 by Prentice Hall/A. S. Tanenbaum

Addressing all devices on the network have unique ID (called hardware ID or MAC ID) Error detection and handling Handles errors occurring on the lower levels of the protocol stack
Jnos Vgh | Network architectures and protocols 178/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Services oered for the network layer


The data link layer

connection-less, without acknowledgements connection-less, with acknowledgements connection based, with acknowledgements

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

179/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Physical address
The data link layer

c 2004 by Cisco Press/M. J. Castelli

The network interface card (NIC), connecting the nodes to the network, has a unique IDreceived during the manufacturing process. Actually, the data frames transmitted in the local network, contain the 48-bit physical address of the sending and receiving interface cards. However, their use is even less user-friendly, than that of the IP numbers.

Jnos Vgh | Network architectures and protocols

180/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The network interface cards


The data link layer

In this layer typically hardware devices are presented. Their development took place in a way, dierent from the other layers, so even its language diers from the former ones. Functionality of the datalink layer is in general implemented in the so called network interface cards. The NIC can access all, physically reachable packets, but (by default) reads and forwards to the next layers only packets arrived to its physical address.

Jnos Vgh | Network architectures and protocols

181/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A csatornakioszts problmja
The data link layer

If the length of the frames if determined by the exponential distribution with expected value 1/ [bits/frame], in case of static channel alocation the time spent in the system is T = 1/(C ) (the intensity of arrival is frames/s, service intensity is C FRAMES/s) where C T the the the the capacity of the channel, [b/s] intensity of data arrival [keret/s] parameters of distribution of the frame lengths time spent by the demand in the system [s]

i.e. the system is less eective. If the system is cut into N subchannels, all of them having capacity C/N [b/s], and the arrival intensity on the subchannels is /N, than TFDM = N 1 = = NT (C /N) (/N C

is the capacity of the line.


Jnos Vgh | Network architectures and protocols 182/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A csatornakioszts problmja
The data link layer

If the length of the frames if determined by the exponential distribution with expected value 1/ [bits/frame], in case of static channel alocation the time spent in the system is T = 1/(C ) (the intensity of arrival is frames/s, service intensity is C FRAMES/s) where C T the the the the capacity of the channel, [b/s] intensity of data arrival [keret/s] parameters of distribution of the frame lengths time spent by the demand in the system [s]

i.e. the system is less eective. If the system is cut into N subchannels, all of them having capacity C/N [b/s], and the arrival intensity on the subchannels is /N, than TFDM = N 1 = = NT (C /N) (/N C

is the capacity of the line.


Jnos Vgh | Network architectures and protocols 182/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Terms for the dynamic channel allocation


The data link layer

station Generates frames to be forwarded, independently. Channel One single channel is used for data exchange Collision Forwarding at least two frames simultaneously Time Carrier sense Continous Discrete The time is divided into time slots. yes - no attempt to transmit no - start transmission

Jnos Vgh | Network architectures and protocols

183/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The ALOHA protocol


The data link layer

In the ALOHA system the user is transmitting when it wants (and can). Feedback, evaluating success of transmission is required.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

184/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Multiple access protocols


The data link layer

A frame will not suer collision, if during its transmission (from the very rst to the very last moment) no other station is transmitting

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

185/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Slotted ALOHA protocol


The data link layer

During a given time slot Pr [k] = G k e G k!

is the probability that k new frames arrive.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

186/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Channel watching protocol


The data link layer

Another possible principle, that the sender listens to the channel for a moment, and if it nds it empy, starts to transmit with some probability, maybe after some delay. Interesting to note, that the less persistent method is more successful.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

187/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Collision sensing protocol


The data link layer

Again another principle, that the sender continously listens to the trac on the channel, and if it diers from its own transmission, it stops to transmit. Then, it waits for some random time, then attempts to receive the right for transmitting.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

188/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Collision-free protocols
The data link layer

In these protocols the stations are not independent; it is prescribed, which of them can transmit.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

189/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Collision-avoiding protocols
The data link layer

These protocols are based on the cooperation of the stations. The stations signalize for each other, which operation they are preparing for. During the operation the neighbours remain quiet.

c 2003 by Prentice Hall/A. S. Tanenbaum

Jnos Vgh | Network architectures and protocols

190/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

The simplied owchart of CSMA/CD


The data link layer

c 2008 by http://www.Wikipedia.org

Jnos Vgh | Network architectures and protocols

191/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Functions of the physical layer in the OSI model


The physical layer

Layer 1 (physical) contains connector and interface specications; furthermore functional and methodical requirements. Components of the layer cabling between the components of the system adapters connecting the media to physical interfaces
c 2004 http://www.globalknowledge.com

designing connectors and numbering of the pins specications of hub, repeater and patch panel network interface (NIC)

Jnos Vgh | Network architectures and protocols

192/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Analog and digital transmission


The physical layer

Analog signal Smoothly (without breaks) changes in time Digital signal Constant for a time, then changes to another constant value

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

193/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Analog transfer
The physical layer
the content is unimportant analog as well as digital signals can be transmitted the signal is attennuated with the distance, it shall be amplied noise is amplied as well

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

194/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Digital transfer
The physical layer

the content is important repeaters shall be used no attennuation, noise is not amplied

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

195/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Periodic and aperiodic signals


The physical layer

c 2004 by Prentice Hall/W. Stallings

Periodic signal the signal shape repeats itself after some well-dene time. It can be interpreted for both analog and digital signals. Its features: amplitude frequency (wavelength) phase Aperiodic signal signal has no such typical repetition time

Jnos Vgh | Network architectures and protocols

196/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Periodic and aperiodic signals


The physical layer

c 2004 by Prentice Hall/W. Stallings

Periodic signal the signal shape repeats itself after some well-dene time. It can be interpreted for both analog and digital signals. Its features: amplitude frequency (wavelength) phase Aperiodic signal signal has no such typical repetition time

Jnos Vgh | Network architectures and protocols

196/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A simplied communication model


The physical layer

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

197/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Modulation possibilities
The physical layer

c 2004 by Prentice Hall/W. Stallings

Jnos Vgh | Network architectures and protocols

198/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Fourier-analysis
The physical layer

Any function g (t) having period T can be produced as an (innite) sum of sine and cosine terms: g (t) = 1 c+ an sin (2nft) + bn cos (2nft) 2 n=1 n=1

c 2004 A. S. Tanenbaum: Computer Networks c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

199/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Transmission attennuation
The physical layer

c 2004 by Prentice Hall/W. Stallings

During transmission the signals are attennuated, and their shape changes as well. In other words, the dierent harmonics are attennuated dierently during transmission.

Jnos Vgh | Network architectures and protocols

200/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Transfer speed and medium


The physical layer

An ideal transfer channel has a nite transmit capacity as well: Max. data speed = 2H log2 (V ) [b/s] where H is the bandwidth of the channel, and V is the number of the discrete levels of the transmitted signal. In case of noisy channel (where the noisiness is characterized with the ratio of the power of the useful signal and the noise) Max. data speed = H log2 (1 + S/N) [b/s] This is an upper limit that cannot be reached in practical cases. For guided tranmission, two techniques are used in the practice: using galvanic (metal) and optical wires; that transmit the data using electrons and photons, respectively. In case of wireless transmission, some kind of radio waves is used.

Jnos Vgh | Network architectures and protocols

201/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Bandwidth
The physical layer

Bandwidth

It is the frequency range, where the attennuation is not too big (in general, the power of the signal does not drop under the half of its original power

Jnos Vgh | Network architectures and protocols

202/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Frequency division muliplexing


The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

203/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Wavelength-division muliplexing
The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

204/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Time-division multiplexing
The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

205/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Twisted pair cables


The physical layer

c 2003 The Computer Language Co

c 2006 by CISCO

The twisted pair cable comprises two isolated copper wires, twisted in a well-dened way, in order to reduce the antenne-eect.
c 2006 by CISCO

Jnos Vgh | Network architectures and protocols

206/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Typical usage of twisted pair cables


The physical layer

c 2006 by CISCO

UTP is the most widely used cable, for example for cabling inside building.
Jnos Vgh | Network architectures and protocols 207/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Coaxial cable
The physical layer

c 2006 by CISCO

c 2006 by CISCO c 2006 by CISCO

The coaxial cable is a metallic wire, sorrounded by isolation and shielding.


Jnos Vgh | Network architectures and protocols 208/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Specication of network cables


The physical layer

The cable labeling shows their main characteristics: the working speed, wave band and maximum transmit distance:
c 2006 by CISCO

Jnos Vgh | Network architectures and protocols

209/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Termination of network cables


The physical layer

c 2006 by CISCO

On the network cables waves are propagating, that can be reected at the end of the cable. The reected wave can interfere with the propagating wave, so the end of the cables should be earminated with a proper resistor.
Jnos Vgh | Network architectures and protocols 210/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

10BASE5 cables and connectors


The physical layer

c 2006 by CISCO

c 2006 by CISCO

Initially, a relatively thick cable was used, the individual nodes were chained with so called vampire connectors.

Jnos Vgh | Network architectures and protocols

211/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

10BASE2 cables and connectors


The physical layer

The coaxial cables are connected to the computers through T-shaped BNC type connectors .

c 2006 by CISCO c 2006 by CISCO

c 2006 by CISCO c 2006 by CISCO

c 2006 by CISCO

Jnos Vgh | Network architectures and protocols

212/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Cable connectors
The physical layer

c 2004 Cisco Press/M. J. Castelli

Both metallic and optic cable need to be linked to the devices and to each other. The most widely used connector type is (registered jack), the individual types are identied by a number. The most extensively used RJ-45 comprises maximum 8 wires.
c 2008 by http://www.americantechsupply.com

Jnos Vgh | Network architectures and protocols

213/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Cable connectors
The physical layer

c 2004 Cisco Press/M. J. Castelli

Both metallic and optic cable need to be linked to the devices and to each other. The most widely used connector type is (registered jack), the individual types are identied by a number. The most extensively used RJ-45 comprises maximum 8 wires.
c 2008 by http://www.americantechsupply.com

Jnos Vgh | Network architectures and protocols

213/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operating principle of the optical cable


The physical layer

In a thin glass layer the light can propagate without signicant loss of intensity, with a series of total reexions . In the special geometry of the optical bre the light remains inside the inner wire, through total reexion.

c 2006 by CISCO c 2006 by CISCO

Jnos Vgh | Network architectures and protocols

214/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operating principle of the optical cable


The physical layer

In a thin glass layer the light can propagate without signicant loss of intensity, with a series of total reexions . In the special geometry of the optical bre the light remains inside the inner wire, through total reexion.

c 2006 by CISCO c 2006 by CISCO

Jnos Vgh | Network architectures and protocols

214/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operating principle of the optical cable


The physical layer

c 2006 by CISCO

c 2006 by CISCO

In an optical bre with sucient width, all light beams impinging with angle above the critical angle, can propagate. In this case the cable is multi-mode. If the bre thickness is only a few times more than the wavelength of the light, the bre behaves as a wave propagator, and the light propagates along the axis of the bre. In such a case the bre is unimodal bre. .
Jnos Vgh | Network architectures and protocols 215/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Operating principle of the optical cable


The physical layer

c 2006 by CISCO

c 2006 by CISCO

In an optical bre with sucient width, all light beams impinging with angle above the critical angle, can propagate. In this case the cable is multi-mode. If the bre thickness is only a few times more than the wavelength of the light, the bre behaves as a wave propagator, and the light propagates along the axis of the bre. In such a case the bre is unimodal bre. .
Jnos Vgh | Network architectures and protocols 215/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Comparing metallical and optical cables


The physical layer

Advantages of optical transfer against copper wire transfer much larger bandwidth much less expensive and heavy insensitive to disturbances can also be used in dangerous environment
c 2008 by http://www.informationeconomy.sa.gov.au

no need to change it with the technological development

Jnos Vgh | Network architectures and protocols

216/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Using the electromagnetic spectrum in telecommunication


The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

Jnos Vgh | Network architectures and protocols

217/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Radio frequency transmission


The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

In bands VF, LF, and MF the radio waves are propagating to large distances, they follow the curvature of the Earth, in bands HF and VHF they follow a straight path, but they are reexted from the so called ionosphere.

Jnos Vgh | Network architectures and protocols

218/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Communication satellites
The physical layer

c 2004 A. S. Tanenbaum: Computer Networks

The height of the satellites denes their features, as orbital time, delay because of the distance and the number of satellites to cover the surface of the Earth fully.
Jnos Vgh | Network architectures and protocols 219/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Networking devices
Network building and devices

the routing of the network trac and the data ltering is also necessary. Tasks for the connecting devices: Routing Linking (physically dierent devices or diering protocols) Implementing hierarchical addressing Regenerating signals(lower level)

c 2004 by Sams Publishing/J. Casad

Jnos Vgh | Network architectures and protocols

220/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Local-Area Networking
Network building and devices

Local networks (Local-Area Network, LAN) are used for connecting personal computers, workstations, routers and other devices. Their main characteristics: topology - the geometrical arrangement of the computers protocols - how they communicate medium - through which medium

c 2004 Cisco Press/M. J. Castelli

Jnos Vgh | Network architectures and protocols

221/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

LAN Topologies
Network building and devices

c 2004 Cisco

c 2004 Cisco

The dening aspect of the star is that all network devices are connected to a central point. The central point of a star topology plays the role of trac cop in that it directs trac to its intended destination. In a physical ring topology, all devices are connected to one another in a closed loop. Ring topologies are used in Token Ring and Fiber Distributed Data Interface (FDDI) LANs because of the inherent redundancy in a ring network. The tree topology is a multitiered hierarchical star topology, in which the endpoint of one spoke in a star is the hub of another. This physical topology is made possible with multiple switches and might be used in an oce building where each oor has its own switch.

c 2004 Cisco Press/M. J. Castelli

Jnos Vgh | Network architectures and protocols

222/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Technologies
Network building and devices

Token Ring Token Ring uses a special frame, called a token, to designate the authoritative speaker for that LAN segment. This technology can connect up to 255 nodes in a physical star or ring connection that can sustain 4 or 16 Mbps. FDDI FDDI is a token-passing network, similar to Token Ring, and uses optical ber cabling to transmit at 100 Mbps up to 10 kilometers. Ethernet Ethernet uses carrier sense multiple access collision detect (CSMA/CD) technology, broadcasting each frame onto the physical medium (wire, ber, and so on). All stations attached to the Ethernet listen to the line for trac, and the station with the matching destination MAC address accepts the frame.

Jnos Vgh | Network architectures and protocols

223/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Repeater
Network building and devices
signal transmission is always attached with energy loss, so a periodic refreshing of the signals is required. Repeaters regenerate and propagate signals from one network segment to another.

c 2003 SYBEX/CISCO, Lammle & Barkl

Jnos Vgh | Network architectures and protocols

224/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Multiport repeater (hub)


Network building and devices

The hub is a multiport repeater, that allows to access the signal arrived on one of its input on all of its output. This allows sharing Ethernet resources and extending network segments ti large geographical distances.
c 2004 Cisco Press/M. J. Castelli

Jnos Vgh | Network architectures and protocols

225/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A bridge in a LAN
Network building and devices
The bridge transports only messages to the external world, but not the internal trac, and in this way not only connects, but also separates segments.

c 2003 SYBEX/CISCO, Lammle & Barkl

Jnos Vgh | Network architectures and protocols

226/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

A router in a LAN
Network building and devices
A router is a network device, that forwards packets from one LAN (or WAN) network to another. It operates in the third layer, and forwards packets based on networks addresses using routing tables and protocols. It is also used at the edges of the network, to connect to the Internet.

c 2003 SYBEX/CISCO, Lammle & Barkl

Jnos Vgh | Network architectures and protocols

227/228

Introduction Basics Layers Application Transport Network Datalink Physical Instrumental

Networking devices
Network building and devices

Figure shows an internet consisting of two networks: an Ethernet and a token ring, connected with a router.

c 1999 by Addison Wesley/W. R. Stevens

Jnos Vgh | Network architectures and protocols

228/228

Das könnte Ihnen auch gefallen