CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application...

55
CPEG514 Advanced Computer Networks Atef Abu Salim University of Nizwa Spring 2013/2014

Transcript of CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application...

Page 1: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

CPEG514

Advanced Computer

Networks

Atef Abu Salim

University of Nizwa

Spring 2013/2014

Page 2: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Today’s Class Topics

Course Syllabus

Computer Networks

LANs and WANs

The Internet

Protocols, Layers and Interfaces

Reference Models

Addressing

Page 3: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Course Overview

See Syllabus

Course Notes (PowerPoint):

Course notes available on edwwave.

It is your responsibility to download and print a copy of the slides before coming to class.

Page 4: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Course Goals, Cont.

What do you want to get out of this course?

E-mail: [email protected]

Page 5: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

The Client-Server Model

Reply

Request

Client Machine Server Machine

Network

Client

Process Server

Process

Page 6: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Networks

Communication between semi-autonomous computers

Attached to host system by an adapter

Page 7: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

LANs and WANs

Local Area Networks

High Data Access Rate (100 Mbps – 10 Gbps)

Limited Geographic Boundaries

Data delivery via broadcast (traditional) or switching (modern switched LANs)

Wide Area Networks

Lower Data Access Rate (56 Kbps – 155 Mbps)

No Geographic Limits

Data delivery via routing

Page 8: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

LAN Example

Page 9: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

WAN Example

Page 10: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

What is the Internet?

… a collection of networks (Autonomous

Systems) using the Internet Protocol (IP).

Each Autonomous System (AS), typically

owned by an Internet Service Provider (ISP),

consists of a collection of IP routers that may

be regional, national or international in scope.

Page 11: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Internet today Figure 1.1

Page 12: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

ISP Interconnection

ISPs can interconnect their networks via:

Public Peering Points called Network Access Points (NAPs) or Metropolitan Area Exchanges (MAEs)

Private Peering arrangements (direct communications circuits between ISP networks).

Page 13: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Who Makes Money?

End Users and Businesses pay ISPs to provide IP routing services.

Regional ISPs pay National ISPs to get inter-ISP routing (peering) at NAPs

ISPs pay telecommunications carriers for leased data circuits to interconnect their IP routers

Page 14: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Who runs the Internet?

Decentralized, distributed, chaotic growth Standards: International Standards Organization

(ISO), Internet Engineering Task Force (IETF), W3C, etc.

Names, Numbers: Internet Corporation for Assigned Names and Numbers (ICANN)

Operational coordination: IEPG (Internet Engineering Planning Group)

Network: ISPs (Internet Service Providers), NAPs, MAEs

Cabling: Telephone companies Content: millions of companies, universities &

individuals

Page 15: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Protocols Protocols: a set of rules governing

the format (syntax), meaning

(semantics) and timing of the

information that are exchanged

among peer entities within a layer.

Header Data

Protocol Data Unit (PDU):

Page 16: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Protocol Architectures

Application Protocol

Transport Protocol

Network Access Protocol

Layered Architecture: - Decomposes complicated processes in simpler functions

- Creates discrete modules which are almost independent except for

the interfaces between them

Protocol architecture: The structure of components, their interfaces,

and the principles and guidelines governing their design and evolution.

Application

Transport

Network Access

Application

Transport

Network Access

Communication Network

Page 17: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Protocol Layering

Layered Models standardize

Functions performed by each layer

The protocol (headers, procedures, timing) followed by peer layers on different hosts

The interfaces between adjacent layers on the same host (standard function calls to request services up or down the stack).

Protocols do not standardize implementation (O.S., hardware/software platform, etc.)

Page 18: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Protocol Layering

Page 19: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

ISO OSI Model

(ISO = International Standard Organization, OSI = Open Systems Interconnection)

Bits

Frames

Packets

Error and Flow Control

over a single link

End-to-end Error and

Flow Control

Also data compression

and encryption

• Synchronization –

mechanism for inserting

check points

• Dialog control – half-

duplex or full-duplex

Page 20: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-2 OSI Layers

Page 21: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

The OSI Model .

Layer

7 Application

6 Presentation

5 Session

4 Transport

3 Network

2 DL1

1 PH1

Application

Session

Transport

Network

DL3

PH3

Presentation

Network Network

DL2 | DL3 DL1 | DL2

PH2 | PH3 PH1 | PH2

Application Protocol

Presentation Protocol

Session Protocol

Transport Protocol

Communications Subnet Boundary

Host A Host B

APDU

Unit Exchanged

PPDU

SPDU

TPDU

Packet

Frame

Bit

Host 1 Host 2 Net1 Net3 Net2 Router Router

Page 22: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Protocol Headers

Each sending protocol layer entity (software or hardware) may add a protocol header to the data message as it passes down the stack. (Layer 2 – also adds trailer)

This header encapsulates the control information needed by the protocol peer entity that removes and acts upon the header information at the receiving end.

Page 23: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-3

Page 24: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

TCP/IP Model

Page 25: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

TCP/IP Model vs. OSI Model

Network

Access

Page 26: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Web Browsing Stack

My computer is running the following protocols:

- Application Layer = HTTP (Netscape)

- Transport Layer = TCP

- Network Layer = IP

- Data Link Layer = Ethernet

- Physical Layer = Ethernet

Page 27: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

A Layering Example WinNT PC running Netscape

User clicks “http://www.depaul.edu”

Create GET Request

in HTTP format

Add TCP Header

Add IP Header

Add Ethernet Header & Trailer

Netscape Software

(Application Layer)

TCP Software

(Transport Layer)

IP Software

(Network Layer)

Ethernet Driver (DL)

Ethernet Card (PHYS)

Win

NT

OS

Apache Software

(Application Layer)

TCP Software

(Transport Layer)

IP Software

(Network Layer)

Ethernet Driver (DL)

Ethernet Card (PHYS)

Ethernet Header

IP

Header

TCP

Header

HTTP Request

Ethernet

Trailer

Remove Ethernet

Header & Trailer

Remove IP Header

Remove TCP Header

Receive and Process

GET Request

LIN

UX

OS

Linux Server running Apache

Page 28: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Application Layer Protocol: HTTP

HTTP implemented in browser software

HTTP Protocol Example:

Client: File Request

Client sends request message in format: GET <file name>

Server: Response to GET request

Server message format: HTTP/1.0 200

MIME-Version: 1.0

Server: CERN/3.0

Content-Type: text/html

Content-Length: 8247

<file contents>

Page 29: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Application Layer Interfaces: HTTP

Interfaces:

Interface to user is keyboard or mouse clicks.

Interface to Transport Layer (TCP) interface is

WINSOCK function calls which are read, write

functions to pass data from and to the TCP software.

Page 30: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Transport Layer Protocol: TCP

-TCP software is implemented by Operating System

(i.e.,Windows 2000/XP, Linux, UNIX)

Data from Application Layer: assembled into segments

Adds TCP header (seq#, ACK bits, etc)

Starts timer

Calls IP_SEND primitive data to IP layer

Wait for TCP ACK or timeout

Data from IP Layer:

Check data for errors

Create TCP ACK message

Pass received data up to Application Layer

Page 31: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Network Layer Protocol: IP

- IP software is implemented by Operating System

(i.e.,Windows 2000/XP, Linux, UNIX)

Data from Transport Layer:

Adds IP header (source IP address, dest IP address, etc.)

Pass data to Ethernet driver software (Data Link Layer)

Data from Data Link Layer:

Check IP header to verify that destination address is correct

Remove IP header

Pass data up to TCP software

Page 32: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Data Link Protocol: Ethernet

-Ethernet Medium Access Control (MAC) protocol is implemented

by the Ethernet Network Card (NIC) and driver software

Data from IP Layer:

Adds Ethernet header (source MAC addr, dest MAC addr, etc.)

Wait until network is quiet (CSMA)

Pass data to Ethernet PHY hardware for transmission

If PHY indicates COLLISION, back-off and try again later.

Data from Ethernet PHY hardware:

Check Ethernet header to verify that destination address

matches this network card hardware

Remove Ethernet header

Pass data up to IP software

Page 33: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Physical Layer Protocol: Ethernet

-Ethernet Physical (PHY) protocol is implemented by the

Ethernet Network Card (NIC) hardware;

Data from Ethernet MAC Layer:

For each bit, generate appropriate voltages on network cable

using Manchester coding standard

If COLLISION detected, notify MAC layer

Arriving data signals on Ethernet wire :

Decode each received signal as “0” or “1”

Store each bit into a buffer

When network is quiet, pass the received data up to

the Ethernet MAC Layer

Page 34: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Client Send

1. User types "http://www.unizwa.edu.om/test.html“.

2. IE/Netscape (L5) determines IP address for

"www.unizwa.edu.om/test.html" and requests TCP

connection to server.

3. IE/Netscape (L5) passes "GET test.html HTTP/1.0" to

TCP (L4).

4. TCP (L4) adds TCP header and passes to IP (L3).

5. IP (L3) adds IP header and passes to Ethernet driver.

6. Ethernet driver adds Ethernet header and trailer and

passes data onto physical Ethernet card for transmission.

7. Ethernet card transmits data frame.

Page 35: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Server Receive

1. Server Ethernet card (L1) picks up data frame, passes to

Ethernet driver.

2. Ethernet driver (L2) removes Ethernet header, passes to

IP software.

3. IP software (L3) verifies IP destination address, removes

IP header, passes to TCP software.

4. TCP (L4) checks for errors, sends a TCP ACK back to

client, passes data up to Apache server (L5).

5. Apache server examines GET request, reads file off disk,

generates response message.

Page 36: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-15

SCTP

Page 37: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Addressing

Physical/MAC Address- unique address of NIC. support for multicast and broadcast physical addresses. a 48-bit address.

Internet Address- IP number of computer. Physical addresses cannot be tracked by all routers, so networks

are hierarchically organized by IP address. The IP address “resolves” into a physical address. It is 32 bits. No two computers can have the same IP address.

Port Address- Identifies the process on the host computer. Since most computers run several applications at a time (email,

web, etc), getting the data to the computer is not enough. The data has to get to the correct process (software) on the computer.

Other address: domain name (maps to IP address).

Page 38: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-17 Relationship of layers and addresses in TCP/IP

Example: web browser

implementing HTTP

Implemented in TCP,

UDP and SCTP software.

HTTP uses TCP.

Interface. Eg. WINSOCK on PCs

Implemented in IP

software

Eg. Ethernet Medium

Access Control (MAC)

implemented in NIC card

(Network Interface Card)

and driver software

Eg. Ethernet PHY layer.

Implemented in NIC card

Eg. TCP port 80 for

web server

Eg. 140.192.33.37 (32- bit)

Eg. Ethernet address (48-bit)

TCP UDP SCTP

Page 39: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Layer 2 MAC Addresses

Carried in Layer 2 header (Ethernet, etc.)

Associated with LAN card hardware -- burned into LAN card during manufacturing

Determines which card on same LAN will copy (receive) the broadcast data frame.

6 bytes 2-bit control field

22-bit manufacturer ID

24-bit serial number

Identifies some destination device on the same subnet (i.e. same LAN). Cannot identify destination device across any router. It is a local address.

Page 40: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-18 Physical Addresses

Page 41: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Layer 3 IP Addresses

Carried in Internet Protocol header

Identifies a particular host (computer), which may be on any subnet or network. It is a global address.

4 bytes split into IP Network

IP Host

Stored by operating system. Assigned by: ICANN/IANA or ISP (Network part)

Local network manager (Host part)

Page 42: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-19 IP Addresses

Note: We commonly uses

names such as

www.cs.depaul.edu (called

Domain Names). To

translate from names to IP

addresses, needs to use

DNS (Domain Name

Service) implemented at

the Application level.

Page 43: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Layer 4 TCP Ports

Carried in TCP header

Identifies a particular user/server process

2 byte port codes

Well-Known Port Numbers assigned by ICANN / IANA and stored in “services” file

Examples:

HTTP = port 80

File Transfer (FTP) = port 21

E-mail (SMTP) = port 25

Remote login (Telnet) = port 23

Page 44: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 2-20 Port addresses

P

Page 45: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Addressing Example

Web Server Browser

GETDEFAULT.HTM

HTTP/1.0

Ethernet

Trailer

Ethernet

HeaderIP

Header HeaderTCP

Dest. Port = 80

Dest. IP Addr = 140.192.81.6

Dest. Eth Addr =

3b:ac:55:6d:e1:25

Page 46: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.1 Dotted Decimal Notation

Figure 4.6 Classful IP Addresses

Class A: Large networks

Class B: Medium networks

Class C: Small networks

Hostid with all 0’s or all 1’s are special.

Page 47: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.5 00000000 0 ……0 01111111 1 ……1

10000000 0 ……0 10111111 1 ……1

11000000 0 ……0 11011111 1 ……1

Page 48: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.12 Multihomed devices

Page 49: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.13 Network addresses: Network ID + All 0’s hostid is commonly referred to as

a network address

Page 50: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.14 Direct broadcast address

Page 51: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.15 limited broadcast address

Page 52: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.16 “this”

host on “this” network

address

Provide

initial

configuration

information

Page 53: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.17 Specific host on this network

Page 54: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Figure 4.18 Loopback address

Page 55: CPEG514 Advanced Computer Networks€¦ · provide IP routing services. ... 1 PH1 Application Session Transport Network DL3 PH3 Presentation PPDU Network ... (i.e.,Windows 2000/XP,

Private Networks

10.0.0.0 - 10.255.255.255

172.16.0.0 - 172.31.255.255

192.168.0.0 - 192.168.255.255

Note: the above addresses should not be used on the Internet.

Private addresses

Network

Address

Translation

(NAT)

Global IP addresses