17
1 6.1 Source: Foundations of Computer Science Cengage Learning Chapter 6 Computer Networks and Internet 6.2 Describe local and wide area networks (LANs and WANs). Distinguish an Internet from the Internet. Describe the TCP/IP protocol suite as the network model in the Internet. Define the layers in the TCP/IP protocol suite and their relationship. Describe the applications in the Internet. Describe the different transmission media used in computer networking. Objectives After studying this chapter, students should be able to: 6.3 6-1 OVERVIEW The Internet is a system that connects billions of computer in the word. We think of the Internet not as a single network, but as an Internetwork, a combination of networks. Therefore, we start our journey by first defining a network and then show how we can connect networks to create small Internetworks. Finally, we show the structure of the Internet and open the gate to study the Internet in the rest of this chapter. 6.4 A network is defined as the interconnection of a set of devices capable of communication. A device can be a host (or an end system) such as a large computer, desktop, laptop, workstation, cellular phone, or security system . A device cab be also be a connecting device such as a router which connects the network to other networks, a switch which connects devices together, a modem that changes the form of data, and so on . These devices in a network are connected using wired or wireless transmission media such as cable or air. Networks

Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

1

6.1 Source: Foundations of Computer Science Cengage Learning

Chapter 6

Computer

Networks and

Internet 6.2

Describe local and wide area networks (LANs and WANs).

Distinguish an Internet from the Internet.

Describe the TCP/IP protocol suite as the network model in

the Internet.

Define the layers in the TCP/IP protocol suite and their

relationship.

Describe the applications in the Internet.

Describe the different transmission media used in computer

networking.

Objectives

After studying this chapter, students should be able to:

6.3

6-1 OVERVIEW

The Internet is a system that connects billions of

computer in the word. We think of the Internet not as a

single network, but as an Internetwork, a combination

of networks.

Therefore, we start our journey by first defining a

network and then show how we can connect networks to

create small Internetworks. Finally, we show the

structure of the Internet and open the gate to study the

Internet in the rest of this chapter.

6.4

A network is defined as the interconnection of a set

of devices capable of communication. A device can be

a host (or an end system) such as a large computer,

desktop, laptop, workstation, cellular phone, or security

system. A device cab be also be a connecting device

such as a router which connects the network to other

networks, a switch which connects devices together, a

modem that changes the form of data, and so on. These

devices in a network are connected using wired or

wireless transmission media such as cable or air.

Networks

Page 2: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

2

6.5

Local Area Network (LAN)

A LAN is usually privately owned and connects some

hosts in a single office, building, or campus. A LAN can

be as simple as two PCs and a printer in someone’s home

office, or it can extend throughout a company and include

audio and video devices. Each host in a LAN has an

identifier, an address, that uniquely defines the host in the

LAN. A packet sent by a host to another host carries both

the source host’s and the destination host’s addresses.

6.6

Wide Area Network (WAN)

A WAN is also an interconnection of devices capable of

communication.

A WAN has a wider geographical span, spanning a town, a

state, a country, or even the world, however, a LAN is

normally limited in size, spanning an office, a building, or a

campus.

A WAN interconnects connecting devices such as switches,

routers, or modems, however, a LAN interconnects hosts.

A WAN is normally created and run by communication

companies and leased by an organization that uses it,

however, a LAN is normally privately owned by the

organization that uses it.

6.7

Example1:Point-to-Point WAN

Example2: Switched WAN

6.8

Internetwork

Today, it is very rare to see a LAN or a WAN in isolation;

they are connected to one another. When two or more

networks are connected, they make an internetwork, or

internet.

An Internetwork made of LANs and WANs

Page 3: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

3

6.9

The Internet

An Internet is two or more networks that can

communicate with each other and is composed of

thousands of interconnected networks.

The Internet is as several backbones, provider networks,

and customer networks. Backbones at top level are large

networks owned by some communication companies.

Provider networks at second level use the services of the

backbones for a fee. Customer networks are networks at the

edge of the Internet that actually use the services provided

by the Internet. They pay fees to provider networks for

receiving services.

Backbones and provider networks are also called Internet

Service Providers (ISPs). The backbones are often referred

to as international ISPs. 6.10

The Internet today

6.11

Protocol Layering

A protocol defines the rules that both the sender and

receiver and all intermediate devices need to follow to be

able to communicate effectively in Internet. we need a

protocol at each layer, or protocol layering.

The first principle: bidirectional communication, we need

to make each layer so that it is able to perform two opposite

tasks, one in each direction. For example, the third layer

task is to listen (in one direction) and talk (in the other

direction). The second layer needs to be able to encrypt and

decrypt. The first layer needs to send and receive mail.

The second principle: we need to follow in protocol

layering is that the two objects under each layer at both sites

should be identical.

6.12

A Three-Layer Protocol

Page 4: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

4

6.13

Logical Connection Between Peer Layers

layer-to-layer communication

6.14

TCP/IP Protocol Suite

The TCP/IP (Transmission Control Protocol / Internet

Protocol) is a protocol suite (a set of protocols organized in

different layers) used in the Internet today. It is a

hierarchical protocol made up of interactive modules, each

of which provides a specific functionality.

Layers in TCP/IP Protocol Suite

6.15

Communication Through an Internet

The layers in the TCP/IP protocol suite are involved in

communication between two hosts.

6.16

Addressing and Packet Names

Any communication that involves two parties needs source and

destination addresses. we normally have only four because the

physical layer (data exchange is a bit) does not need

addresses.

There is a relationship between the layer, the address used in

that layer, and the packet name at that layer. At application

layer, we use names to define the site that provides services,

such as org.com or [email protected]. At transport layer, addresses

are called port numbers, and these define the application-layer

programs at the source and destination. Port numbers are local

addresses that distinguish between several programs running at

the same time. At network-layer, the addresses are global and

uniquely define the connection of a device to the Internet. The

link-layer addresses are sometimes called MAC addresses.

Page 5: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

5

6.17

Addressing and Packets Names in TCP/IP

6.18

We are ready to give some discussion about each

layer of the TCP/IP protocol. We start from the fifth

layer and move to the first layer. The fifth layer of

the TCP/IP protocol is called the application

layer. The application layer provides services to the

user. Communication is provided using a logical

connection.

6-2 APPLICATION LAYER

6.19

Logical Connection at Application Layer

6.20

Application-Layer Paradigms

Using the Internet, we need two application programs to

interact with each other: one running on a computer and the

other running on another. Should both application programs

be able to request services and/or provide services?

Two paradigms have been developed during the lifetime of

the Internet to answer this question: the client-server

paradigm and the peer-to-peer paradigm.

Page 6: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

6

6.21

Traditional Paradigm:Client-Server

The service provider is an application program, called the server

process; it runs continuously, waiting for another application

program, called the client process, to make a connection through

the Internet and ask for service. The server process must be

running all the time; the client process is started when the client

needs to receive service.

6.22

New Paradigm: Peer-to-Peer (P2P)

There is no need for a server process to be running all the

time and waiting for the client processes to connect. The

responsibility is shared between peers. A computer connected to

the Internet can provide service at one time and receive service

at another time. A computer can even provide and receive

services at the same time. (Security is main challenge)

6.23

Example of WWW

Applications of Standard Client-Server

Several traditional services are still using this paradigm,

including the World Wide Web (WWW) and its vehicle

HyperText Transfer Protocol (HTTP), file transfer

protocol (FTP), secure shell (SSH), email, and so on.

6.24

Uniform Resource Locator (URL)

A web page, as a file, needs to have a unique identifier to

distinguish it from other web pages. To define a web page,

we need four identifiers:

Protocol: The first identifier is the abbreviation for the

client-server program in order to access the web page.

Host: The host identifier can be the IP address of the server

or the unique name given to the server.

Port: The port, a 16-bit integer, is normally predefined for

the client-server application.

Path: The path identifies the location and the name of the

file in the underlying operating system. The format of this

identifier normally depends on the operating system. protocol://host/path Used most of the time

protocol://host:port/path Used when port number is needed

Page 7: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

7

6.25

Client-Server Application2: FTP

File Transfer Protocol (FTP) is the standard protocol

provided by TCP/IP for copying a file from one host to

another.

6.26

Common Scenario

Client-Server Application2: email

Electronic mail (email) allows users to exchange

messages. email is considered a one-way transaction.

6.27

Client-Server Application3&4: Telnet & SSH

TELNET (TErminaL NETwork) is a remote logging

protocol. Although TELNET requires a logging name and

password, it is vulnerable to hacking because it sends all

data including the password in plaintext (not encrypted).

A hacker can eavesdrop and obtain the logging name and

password. Because of this security issue, the use of

TELNET has diminished in favor of another protocol,

Secure Shell (SSH).

Secure Shell (SSH) is a secure application program that

can be used today for several purposes such as remote

logging and file transfer. The current version is called

SSH-2.

6.28

TCP/IP protocols use the IP address which uniquely

identifies the connection of a host to the Internet. TCP/IP

uses a DNS (Domain Name System) client and a DNS

server to map a name to an address.

Purpose of DNS

Client-Server Application5: DNS

Page 8: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

8

6.29

1. The user passes the host name to the file transfer client.

2. The file transfer client passes the host name to the DNS

client.

3. Each computer knows the address of one DNS server.

The DNS client sends a message to a DNS server with

a query that gives the file transfer server name using

the known IP address of the DNS server.

4. The DNS server responds with the IP address of the

desired file transfer server.

5. The DNS client passes the IP address to the file

transfer server.

6. The file transfer client now uses the received IP

address to access the file transfer server.

Six Steps Map the host name to an IP address:

6.30

DNS in the Internet

Generic Domains : define registered hosts.

DNS is a protocol that can be used in different platforms.

The domain name space (tree) was originally divided into

three different sections: generic domains, country

domains, and the inverse domain. However, the inverse

domains are now deprecated.

6.31

Generic Domain Labels

6.32

Country Domains

The country domains section uses two-character

country abbreviations (e.g., us for United States).

Second labels can be organizational or they can be more

specific, national designations.

Page 9: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

9

6.33

The transport layer in the TCP/IP suite is located

between the application layer and the network

layer. It provides services to the application layer

and receives services from the network layer. The

transport layer acts as a liaison between a client

program and a server program.

6-3 TRANSPORT LAYER

6.34

Logical Connection at Transport Layer

6.35

Process-to-Process Communication

Network Layer versus Transport Layer

The Transport-layer protocol provides process-to-process

communication . A process is an application-layer entity

(running program) that uses the services of the transport

layer. The network layer is responsible for

communication at the computer level and can deliver the

message only to the destination computer. A transport-

layer protocol is responsible for delivery of the message

to the appropriate process.

6.36

Addressing:Port Numbers

For communication, we must define the local host (IP),

local process, remote host (IP), and remote process. To

define the processes, we need second identifiers called port

numbers. In the TCP/IP protocol suite, the port numbers

are integers between 0 and 65,535 (16 bits).

The client program defines itself with an ephemeral port

number that is recommended to be greater than 1023 for

some client/server programs to work properly. The server

process must also define itself with a port number.

Page 10: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

10

6.37

Translayer-Layer Protocols

The User Datagram Protocol (UDP) is a connectionless,

unreliable transport protocol. UDP is a very simple

protocol using a minimum of overhead. If a process wants

to send a small message and does not care much about

reliability, it can use UDP. Sending a small message using

UDP takes much less interaction between the sender and

receiver than using TCP.

UDP packets, called user datagrams (format as below),

have a fixed-size header of 8 byte and the total length

needs to be less 65 535 bytes.

6.38

Transmission Control Protocol (TCP) is a connection-

oriented, reliable protocol. TCP explicitly defines

connection establishment, data transfer, and connection

teardown phases to provide a connection-oriented service.

At the transport layer, TCP groups a number of bytes

together into a packet called a segment. TCP adds a header

to each segment (for control purposes) and delivers the

segment (format as below) to the network layer for

transmission. The segments are encapsulated in an IP

datagram and transmitted.

Translayer-Layer Protocols

6.39

The network layer in the TCP/IP protocol suite is

responsible for the host-to-host delivery of messages.

The network layer accepts a packet from a transport

layer, encapsulates the packet in a datagram, and delivers

the packet to the data-link layer. At the destination host ,

the datagram is de-capsulated, the packet is extracted and

delivered to the corresponding transport layer.

6-4 NETWORK LAYER

6.40

Communication at Network Layer

Page 11: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

11

6.41

Packetizing at Network Layer

Packetizing: encapsulating the payload (data received from upper

layer) in a network-layer packet at the source and decapsulating the

payload from the network-layer packet at the destination.

1. The source network-layer receives a packet from transport- layer,

adds a header that contains source and destination addresses and

some other information.

2. The network layer then logically delivers the packet to the

network-layer protocol at the destination.

3. The destination host receives the network-layer packet,

decapsulate the payload and deliver to the upper-layer protocol.

6.42

Packets Travelling Different Paths (Routing) The delivery of packets at the network layer is unreliable.

It is connectionless and no relationship between packets belonging

to the same transport-layer payload.

A transport-layer packet is divided into four network-layer packets.

They are sent in order (1, 2, 3, 4), but they have received out of

order (2, 4, 3, 1). The transport layer at the destination is

responsible to wait all packets to receive before the put them

together and deliver them to the application layer.

6.43

Network-Layer Protocols

The main protocol is called the Internet Protocol (IP) .

IPv4 and IPv6 are in use today.

There are three common notations to show an IP address:

binary notation (base 2), dotted-decimal notation (base

256), and hexadecimal notation (base 16).

6.44

Hierarchy in IPv4 Addressing

A 32-bit IPv4 address is also hierarchical, but divided only

into two parts: the prefix defines the network and the suffix

defines the node. For the following figure, the prefix

length is n bits and the suffix length is (32 − n) bits.

Page 12: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

12

6.45

IPv4 Datagram

Packets used by the IP are called datagrams. A datagram

in IPv4 is a variable-length packet consisting of two

parts: header and payload (data). The header is 20 to

60 bytes in length and contains information essential to

routing and delivery.

6.46

IPv6 Address Notations

Internet Protocol version 6 (IPv6) or IP new generation

(IPng) was a proposal to augment the address space of

IPv4 (early 1990s)

To prevent the address depletion, IPv6 uses 128 bits to

define any device connected to the Internet. Two format:

The first form is used to store an address in the computer

and the second form is used by humans.

6.47

Hierarchy in IPv6 Addressing

The address in IPv6 actually defines three levels of hierarchy:

site (organization), subnet-work, and connection to the host.

6.48

IPv6 Datagram

A datagram in the IPv6 datagram format is also a variable-

length packet consisting of two parts: header and

payload (data). The header is 40 bytes. However, some

extension headers are consider part of the payload in this

version.

Page 13: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

13

6.49

The TCP/IP suite does not define any protocol in

the data-link layer. This layer is the territories of

networks that when connected make up the

Internet. These networks, wired or wireless, receive

services and provide services to the network layer.

6-5 DATA-LINK LAYER

6.50

Communication at Data-Link Layer

6.51

Nodes and Links

Communication at the data-link layer is node-to-node .Data

unit from one point in the Internet needs to pass through

many networks (LANs and WANs) to reach another point.

Theses LANs and WANs are connected by routers. It is

customary to refer to the two end hosts and the routers

as nodes and the networks in between as links .

6.52

Wred LANs:Ethernet

Ethernet LAN was developed in 1970s by Robert Metcalfe

and David Boggs. Standard Ethernet (10 Mbps), Fast Ethernet

(100 Mbps), Gigabit Ethernet (1 Gbps), and 10 Gigabit

Ethernet (10 Gbps).

A frame carries some information such as the source address

(48 bits), the destination address (48 bits), the type of data, the

actual data, and some other control bits as a guard to help

checking the integrity of data during transition.

Ethernet LAN and the Frame Format

Page 14: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

14

6.53

Wireless Ethernet

Wireless Ethernet or WiFi is a wireless LAN. Two

kinds of services: the basic service set (BSS) and the

extended service set (ESS). The second service uses an

extra device (access point or AP) that serves as a switch

for connection to other LANs or WANs.

6.54

Bluetooth

Bluetooth is a wireless LAN technology designed to

connect devices of different functions such as telephones,

notebooks, computers (desktop and laptop), cameras,

printers, and even coffee makers when they are at a short

distance from each other.

A Bluetooth LAN is an ad hoc network, which means

that the network is formed spontaneously; the devices,

sometimes called gadgets, find each other and make a

network called a piconet. A Bluetooth LAN can even be

connected to the Internet if one of the gadgets has this

capability

6.55

Wired WANS:Dial-up Service

A dial-up service transmit data by the telephone networks.

The need to communicate digital data resulted in the

invention of the dial-up modem.

The modem refers to two functional entities that make up

the device: a signal modulator and a signal demodulator.

Dial-up Network to Provide Internet Access

6.56

ADSL Point-to-Point Network

Digital subscriber line (DSL) supports high-speed

communication over the existing telephone. ADSL. The

asymmetric DSL (ADSL) provides higher speed (bit rate)

in the downstream direction (from the Internet to the

resident) than in the upstream direction (from the resident

to the Internet).

Page 15: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

15

6.57

Cable Service

Cable networks were originally created to provide access

to TV programs. Cable TV network can also support DSL

technology that provides high-data-rate connections for

residential subscribers over the local loop.

6.58

Wireless WAN:WiMax

The worldwide Interoperability Access (WiMax) is

the wireless version of DSL or Cable connection to the

Internet. It provide two types of services (fixed WiMax)

to connect the main station to fixed station or to mobile

stations such as cellular phones.

Wireless WAN:Cellular / Satellite Networks

6.59

The role of the physical layer is to transfer the bits

received from the data-link layer and convert them

to electromagnetic signals for transmission. After

the bits are converted to signals, the signals are

delivered to the transmission media.

6-6 PHYSICAL LAYER

6.60

Communication at Physical Layer

Page 16: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

16

6.61

Data ad Signal:Analog and Digital

6.62

Digital Transmission

Digital-to-Digital Conversion

Analog-to-Digital Conversion

6.63

Analog Transmission

Digital-to-Analog Conversion

Analog-to-Analog Conversion

6.64

Electrical signals created at the physical layer need

transmission media to go from point to another.

Transmission media are actually located below the

physical layer and are directly controlled by the

physical layer. We could say that transmission

media belong to layer zero.

6-7 TRANSMISSION MEDIA

Transmission Media and Physical Layer

Page 17: Objectives Chapter 6 Describe local and wide area networks ...chun/CS-chap06-Computer Networks... · devices in a network are connected using wired or wireless transmission media

17

6.65

Guided Media

Guided media provides a conduit from one device to

another, include twisted-pair cable, coaxial cable , and

fiber-optic cable.

6.66

Unguided Media

Unguided media transport electromagnetic waves

without using a physical conductor. This type of

communication is often referred to as wireless

communication. Signals are normally broadcast through

free space and thus are available to anyone who has a

device capable of receiving them.

Electromagnetic Spectrum

6.67

Unguided Media

Radio Waves:Electromagnetic waves ranging in

frequencies between 3 kHz and 1 GHz are normally

called radio waves.

Microwaves:Electromagnetic waves having

frequencies between 1 and 300 GHz are called

microwaves. Microwaves are unidirectional.

Infrared waves: The frequencies from 300 GHz to

400 THz (wavelengths from 1 mm to 770 nm) can be

used for short-range communication.

6.68

Summary of TCP/IP Protocol Layers