communicating over the network - prince sultan universityinfo.psu.edu.sa/cs/menezi/files/chapter...

58
Communicating over the Network Network Fundamentals Network Fundamentals Chapter 2

Upload: ngodan

Post on 07-May-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating over

the Network

Network FundamentalsNetwork Fundamentals

Chapter 2

Page 2: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Objectives

� Describe the structure of a network, including the devices and media that are necessary for successful communications.

� Explain the function of protocols in network communications.

� Explain the advantages of using a layered model to describe network functionality.

� Describe the role of each layer in two recognized network models: The TCP/IP model and the OSI model.

� Describe the importance of addressing and naming schemes in network communications.

Page 3: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Outline

� The platform for communications� The elements of communication

� Communicating the messages

� Component of the network

� End devices and their role on the network

� Intermediary devices and their role on the network

� Network media

� LANs, WANs and internetworks� Local are networks

� Wide area networks

� The Internet: a network of networks

� Network representation

Page 4: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Outline

� Protocols

� Rules that govern communication

� Network protocols

� Protocol suite and industry standards

� Interaction of protocols

� Technology-independent protocols

� Using layered models

� The benefits of layered model

� Protocol and reference models

� TCP/IP model

Page 5: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Outline

� Communicating process

� Protocol data units and encapsulation

� Sending and receiving process

� OSI model

Comparing OSI model to the TCP/IP model� Comparing OSI model to the TCP/IP model

� Network addressing

� Addressing in the network

� Getting data to the end device

� Getting data through the internetwork

� Getting data to the right application

Page 6: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

The Elements of Communication

� Three elements of communication:

� Message source / sender

� Destination / receiver

� A channel� A channel

Page 7: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating the Messages

� Data is divided into smaller pieces during transmission.� The process of dividing data into smaller pieces is called

segmentation.

� Benefits of segmentation:� Benefits of segmentation:� Multiplexing

� Enable transmission medium to be shared.

� Reliability

� Different packets can use different paths. If path fails or congested, alternate paths can be used.

� If part of the message fails to make it to destination, only the missing parts need to be retransmitted.

Page 8: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating the Messages

Page 9: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating the Messages

Page 10: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating the Messages

� Disadvantages of segmentation: added level of complexity.

� Must ensure each segment can:

� Get to the correct destination.Get to the correct destination.

� Be reassembled back into the content of the original

message.

� Example: similar like sending a 100-page letter one page at a time.

� Each letter needs separate envelop

� Need to label the envelopes with a sequence number

Page 11: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communicating the Messages

Page 12: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Components of the Network

� Devices (hardware)

� End devices: PCs, printers, PDAs, mobile phones

� Intermediary devices: router, switch, hub, firewall

� MediaMedia

� Can be wired or wireless

� Service (software)

� Network applications

� Routing protocols

� Processes

� Algorithms

Page 13: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

End Devices and Their Roles

Page 14: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

End Devices and Their Roles

� End devices are also referred to as hosts.

� A host device is either the source or destination of a message.

� Examples:Computers (workstations, laptops, file servers, Web � Computers (workstations, laptops, file servers, Web servers)

� Network printers

� VoIP phones

� Cameras on a network

� Mobile handheld devices (PDAs, wireless barcode scanners)

Page 15: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

End Devices and Their Roles

� End device forms an interface between human and communication network.

� People access the network through an end device.

� Each host on a network is identified by an address.Each host on a network is identified by an address.

� In the Internet, this address is called an IP address.

� A host can act as a client, server or both.

� Client: request and display information obtained from

server.

� Server: provide information and services.

� Role is determined based on software installed on the host.

Page 16: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Intermediary Devices and Their Roles

switch

or hub

switch

or hub

routers

or hub or hub

Page 17: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Intermediary Devices and Their Roles

� Provide connectivity to the network.

� Connect individual network.

� Connect segments (links) within the same network.

� Examples:� Examples:

� Network access devices: hubs, switches, wireless access

points.

� Interconnecting devices: routers.

� Communication servers and modems.

� Security devices: firewalls

Page 18: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Intermediary Devices and Their Roles

� Processes running on intermediary devices perform the following functions:

� Regenerate and retransmit data signals

� Maintain information about what pathways exist through

the network and internetworkthe network and internetwork

� Notify other devices of errors and communication failures

� Direct data along alternate pathways when there is a link

failure

� Classify and direct messages according to QoS priorities

� Permit or deny the flow of data, based on security settings

Page 19: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Media

� Network media provides the channel over which message travels from source to destination.

� There are three types of network media:� Metallic wires

� Fiber optics� Fiber optics

� Wireless

� Each media has different physical properties and uses different methods to encode message.� Encoding refers to the way data is converted to patterns of

electrical, light or electromagnetic energy and carried on the medium.

Page 20: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Media

Media Example Encoding

Copper Twisted-pair Electrical pulsesCopper Twisted-pair cable

Electrical pulses

Fiber-optic Glass or plastic fibers

Light pulses

Wireless Connect local user through air

Electromagnetic waves

Page 21: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Media

Page 22: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Media

� Criteria of choosing a network media:

� The distance the media can carry the signal

� The environment in which the media works

� The bandwidth� The bandwidth

� The cost of medium and installation

� The cost of connector and compatible equipment

Page 23: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

LANs, WANs and Internetwork

� Networks come in many sizes and serve a wide variety of functions.

� Three basic differences:� The size of the area covered

� The number of users connected� The number of users connected

� The number and types of services available

� Based on these differences, networks can be divided into three types:� Local area network (LAN)

� Wide area network (WAN)

� Internetwork

Page 24: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Local Area Network (LAN)

� A network serving a home, building or campus.

� A more formal definition:

� An individual network that usually spans a single

geographical area, providing services and applications to

people within a common organizational structure such as a people within a common organizational structure such as a

single business, campus or region.

� LAN devices:

� Switches / hubs

� Routers

� Multilayer switches

Page 25: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Wide Area Network (WAN)

� LANs separated by geographic distance are connected by a network known as the wide area network (WAN).

� A WAN is owned by a telecommunication service provider (TSP).provider (TSP).

Page 26: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Internetworks

� An internetwork is a global mesh of interconnected networks for communication.

� Example: The Internet.

� The Internet is created by the interconnection of � The Internet is created by the interconnection of networks belonging to Internet Service Providers (ISPs).

� ISPs connect customers to the Internet.

� ISPs cooperate with other ISPs and TSPs to make sure their customers have access to all Internet networks.

Page 27: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Internetworks

Page 28: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Representations

Page 29: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Representations

� Network Interface Card (NIC) – Provides the physical connection to the network at the PC or other host device.

� Physical Port – A connector or an outlet on a networking device where the media is connected to a host or other networking device.

� Interface – Specialized ports on an internetworking device that connect to individual networks.

� Because routers are used to interconnect networks, the

ports on a router are referred to as network interfaces.

Page 30: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Network Representations

Page 31: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Protocols: Rules that Govern Communication

� Communication in networks is governed by

pre-defined rules called protocol.

� A protocol suite is a group of inter-related

protocols that are necessary to perform protocols that are necessary to perform

communication.

� Protocols are implemented in software or

hardware that is loaded on each host and

network device.

Page 32: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Protocols: Rules that Govern Communication

� Network protocol suites describe processes such as:

� The format or structure of the message.

� The process by which networking devices share

information about pathways to other networks.

How and when error or system messages are passed � How and when error or system messages are passed

between devices.

� The setting up and termination of data transfer sessions.

� A protocol can either be open standard or proprietary (vendor-specific).

Page 33: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Protocol Suite and Industry Standard

� Many of the protocols in a protocol suite are actually widely utilized protocols or industry standards.

� Networking protocols are standardized by organizations such as:

� Institute of Electrical and Electronics Engineers (IEEE)

� Internet Engineering Task Force (IETF)

� The use of standard protocols ensures that networking devices from different manufacturers can work together.

Page 34: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

� A successful communication can only be achieved with the use of a number of protocols in a protocol suite.

� The different protocols work together to � The different protocols work together to ensure that the message are received and understood by both parties.� Different protocols take care of different

communication tasks.

� Example: Interaction between a Web server and Web browser.

Page 35: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

Page 36: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

� Application protocol – HTTP� Governs communication between a Web server

and Web client.

� Defines the content and format of the request and response messages between client and server.response messages between client and server.

� Implemented in the Web server and Web client application.

� Need to rely on other protocols for other communication tasks: transport data to the correct receiver, taking care of errors and losses, etc.

Page 37: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

� Transport protocol – TCP

� Manages the individual conversation betweens servers and

clients (not just between Web servers and Web clients).

� Divide HTTP message (or any application message) into

smaller messages called segments.smaller messages called segments.

� Responsible for controlling the information exchanged

between the server and the client.

� Size of data in a segment

� Flow control – how much data can be sent and received

� Reliability – what to do when packet is lost / missing

Page 38: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

� Internet protocol – IP� Responsible for making sure data can travel the

network to the correct receiver.

� Takes TCP segments and encapsulate them into a packet. a packet. � The packet header will contain information to carry the

packet to the receiver over the network.

� This information includes the source and destination addresses.

� The destination address will be used by the routers to find the best path to the receiver.

Page 39: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Interaction of Protocols

� Network access protocol (e.g. Ethernet)

� Controls physical transmission of data on the media.

� Takes packet from IP and format them to be transmitted

over the media.

Responsible for data transmission between two devices on � Responsible for data transmission between two devices on

the same network.

� Host to router

� Router to router

� Router to host

� Also responsible for converting the data (bits) into signals

used by the media.

Page 40: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Technology-independent Protocol

� Protocols are not dependent on any specific technology.

� Protocols specifies the tasks that need to be done to perform communication, not how the tasks are implemented.

� It is up to the programmer / device manufacturer to decide

on the best way to implement the protocol.

� As long as the same protocol is followed, network software / hardware developed by different parties should be able to work with each other.

Page 41: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Using Layered Model

� A layered model is used to visualize the interaction between various protocols.

� Benefits of using layered model:� Break network communication into smaller, more

manageable parts.

Provide a common language to describe networking � Provide a common language to describe networking functions and capabilities.

� Assist in protocol design because the functions of the protocol at a specific layer is clearly specified.

� Prevent changes in one layer from affecting the other layers.

� Allow products from different vendors that adhere to the specified protocol to work with each other.

Page 42: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

TCP/IP Model

� The protocol model used in the Internet.� A protocol model is a model that closely matches the

structure of a particular protocol suite.

� Protocols in the TCP/IP model are cooperatively developed by researchers and members of the developed by researchers and members of the industry.� The documents describing the protocols are called RFCs

(Request for Comments).

� Protocols described in RFCs are open standards.

� RFC documents are publicly available.

� The RFC documents are maintained by IETF.

Page 43: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

TCP/IP Model

Page 44: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communication Process – On Sending Side

� Data originates from application layer of the source host.

� Segmentation and encapsulation is performed as it is passed down the protocol stack.

� Encapsulation: process of adding control information to the

data.

� At the network access layer, data is converted to signals to be transmitted by the transmission media.

� Data is transmitted through the internetwork, which consists of media and any intermediary device.

Page 45: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communication Process – On Sending Side

Page 46: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communication Process – On Receiving Side

� Data is received at the network access layer of the destination host.

� Decapsulation and reassembly is performed as it is passed up the protocol stack.as it is passed up the protocol stack.� Decapsulation: process of removing control

information of the data.

� Reassembly: process of combining the received data to produce the original data.

� Data is passed to the receiving application at the application layer of the destination host.

Page 47: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Communication Process – On Receiving Side

Page 48: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Protocol Data Units and Data Encapsulation

� As data is passed down the protocol stack, various control information is added.� This process is referred to as encapsulation.

� This happens at every layer of the protocol stack.

� The combination of data and control information is � The combination of data and control information is referred to as protocol data unit (PDU).

� At each layer, PDU received from upper layer is encapsulated with control information of that layer to form a new PDU.

� To distinguish between PDUs of different layers, they are given different names.

Page 49: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Protocol Data Units and Data Encapsulation

Page 50: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

OSI Model

� OSI is a reference model.� A reference model

provides a common reference for maintaining reference for maintaining consistency within all types of network protocols and services.

� It divides network communication into smaller parts to make it easier to understand.

Page 51: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

OSI Model

Page 52: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

OSI Model vs. TCP/IP Model

Page 53: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Addressing in the Network

� To ensure successful data delivery, various types of addresses are used when sending data.

� Address to identify physical device / network interface

� Address to identify host

� Address to identify application

Page 54: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Getting Data to the End Device

� The host physical address is contained in Layer 2 PDU.

� Layer 2 is concerned with the delivery of messages on a single local network.

� Layer 2 address is unique on the local network and represents the address of the end device on the physical media.

� In a LAN using Ethernet, this address is called the Media Access Control (MAC) address.

Page 55: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Getting Data through the Internetwork

� Layer 3 protocols are primarily designed to move data from one LAN to another LAN through an internetwork.

� Intermediary network devices (routers) use Layer 3 address to locate hosts on different networks.

� Routers read the Layer 3 header of the packet and determine to which outgoing link the packet should be forwarded to.

� In the Internet, the Layer 3 address is called the IP address.

Page 56: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Getting Data through the Internetwork

Page 57: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Getting Data to the Right Application

� At the receiving end device, the data must be

sent to the correct network application.

� The end device may be running multiple network applications.applications.

� Information regarding the receiving

application is contained in Layer 4 PDU.

� In the Internet, the network applications are

identified using port numbers.

Page 58: Communicating over the Network - Prince Sultan Universityinfo.psu.edu.sa/cs/menezi/files/Chapter 2.pdf · Describe the importance of addressing and naming schemes in network communications

Getting Data to the Right Application