csci411 introduction to computer networking ©2011, ma doman 1

56
CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Upload: marylou-owen

Post on 13-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

CSCI411 Introduction to Computer Networking

©2011, MA Doman 1

Page 2: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Today – General Overview

Introduce basic concepts and vocabulary

Networking overview Internet: What is the internet

Architecture Layers

©2011 MA Doman 2

Page 3: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

What is a Network? Basically, the collection of elements

needed to enable information exchange between people, systems, or people and systems Hardware

• End points, routers, switches.. Software

• Protocols, end applications .. Transmission media

• Wires, air … Services

• Reliability• Completeness of messages

©2011 MA Doman 3

Page 4: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Bus Network Token Ring Star

Wired Network Topologies

Page 5: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Bus Network Token Ring Star

Wired Network Topologies

Page 6: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Bus Network Token Ring Star

Advantage:•Fault Tolerant

Disadvantage:•lots of wires

Wired Network Topologies

Page 7: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Mobility in a wireless network

network infrastructure

wireless hosts laptop, PDA, IP phone

Access point typically connected to

a wired network

Page 8: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Mobility in a wireless network

Ad hoc mode no base stations nodes can only transmit

to other nodes within link coverage

nodes organize themselves into a network: route among themselves

Page 9: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Structure

Local-Area Network (LAN) – designed to cover small geographical area.

Wide-Area Network (WAN) – links geographically separated sites

Page 10: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Introduction 1-11

Internet: “network of networks” Interconnected ISPs

protocols control sending, receiving of msgs e.g., TCP, IP, HTTP, Skype,

802.11 Internet standards

RFC: Request for comments IETF: Internet Engineering

Task Force

What’s the Internet ?

mobile network

global ISP

regional ISP

home network

institutional network

Page 11: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Introduction

A closer look at network structure:

network edge: hosts: clients and servers servers often in data centers

access networks, physical media: wired, wireless communication links

network core: interconnected routers network of networks

mobile network

global ISP

regional ISP

home network

institutional network

1-12

Page 12: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Conversations

13

Requester

Replier

End-to-end communicationNetwork path

Physical link path

Page 13: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Introduction 1-14

What’s a protocol?

human protocols: “what’s the time?” “I have a question” introductions

… specific msgs sent… specific actions

taken when msgs received, or other events

network protocols: machines rather

than humans all communication

activity in Internet governed by protocols

protocols define format, order of msgs sent and

received among network entities, and actions taken on msg transmission, receipt

Page 14: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

A Layered Architecture… also known as a Stack of Protocols

LAYERS: Each system is viewed logically as composed of an ordered set of subsystems.

INTERFACE: Adjacent subsystems in the vertical hierarchy (the layers) communicate through a common boundary.

ENTITIES: Functional module of each layer. Entities in the same layer but installed on different systems are called “peer” entities.

PROTOCOLS: Peer entities communicate through peer “protocols” at the appropriate (containing) layer.

16

Page 15: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

The OSI Reference Model Open Systems Interconnection, OSI Adopted as an international standard in 1983

identifies functions and services that are fundamental to providing reliable, cost-effective, secure, and transparent communications

defines the concept of layered architecture in terms of functions, services, and protocols

became a framework for defining standards for linking heterogeneous computers… NO precise definition of how the functions would be accomplished

is the basis for connecting “open” systems for distributed application processing by creating and implementing a protocol stack

©2005, L.A. DeNoia 17

Page 16: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

OSI Layers

OSI ReferenceApplication FTAM, X.400, etc.

Presentation ISO 8823

Session ISO 8327

Transport ISO 8073

Network ISO 8473

Data Link ISO 8802.x LLC/MAC

Physical physical

©2005, L.A. DeNoia 18

Page 17: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Introduction 1-19

Internet protocol stack application: supporting

network applications FTP, SMTP, HTTP

transport: process-process data transfer TCP, UDP

network: routing of datagrams from source to destination IP, routing protocols

link: data transfer between neighboring network elements Ethernet, 802.111 (WiFi), PPP

physical: bits “on the wire”

Application

Transport

Network

Link

Physical

Page 18: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Internet (TCP/IP) and OSI Layers

Internet Suite OSI Reference

Telnet, FTP, SMTP, HTTP, etc.

Application

Application FTAM, X.400, etc.

Presentation ISO 8823

Session ISO 8327

TCP, UDPHost-to-host

Transport ISO 8073

NetworkIP, ICMP, etc.

Network ISO 8473

Link 802.x MAC Data LinkISO 8802.x LLC/MAC

Physical 802.x phys Physical physical©2005, L.A. DeNoia 20

Page 19: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Up and Down the Layers

©2005, L.A. DeNoia 21

Phys

Link

Network

TCP

server

Phys

Link

Network

TCP

browser

Phy

Link

Network

Phys

Link

Open System ARelay Node Open System B

HTTP msg

TCP segment

pkt

frm

bits

router

Page 20: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

View of Encapsulation

©2005, L.A. DeNoia 22

User Data

TCP segment

Network segment

Link layer segment

MAC frame

TCP hdr

IP hdr

Linkhdr

MAC trlr

MAC hdr

Page 21: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

TCP/IP Message Flow

©2005, L.A. DeNoia 23

Data Link Layer Data Link Layer

Network Layer Network Layer

Physical Layer Physical Layer

Service

Access Point

Ethernet frames

bits

Interface

Transport Layer Transport Layer

Application Layer Application Layer

IP packets

TCP segments

HTTP messages

Page 22: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

©2010, M.A.Doman 24

Application Layer

Payload

Payload

Payload

Payload

MAC frame

Transport layer hdr

Network layer hdr

Link Layer hdr

MAC trlr

MAC hdr

User MessageApplication hdr

Page 23: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-25

Creating a network appwrite programs that: run on (different) end

systems communicate over

network e.g., web server software

communicates with browser software

no need to write software for network-core devices

network-core devices do not run user applications

applications on end systems allows for rapid app development, propagation

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

Page 24: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-26

Client-server architecture

server: always-on host permanent IP address data centers for scaling

clients: communicate with server may be intermittently

connected may have dynamic IP

addresses do not communicate

directly with each other

client/server

Page 25: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-27

P2P architecture no always-on server arbitrary end systems

directly communicate peers request service

from other peers, provide service in return to other peers self scalability – new

peers bring new service capacity, as well as new service demands

peers are intermittently connected and change IP addresses complex

management

peer-peer

Page 26: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-28

What transport service does an app need?data integrity some apps (e.g., file

transfer, web transactions) require 100% reliable data transfer

other apps (e.g., audio) can tolerate some losstiming

some apps (e.g., Internet telephony, interactive games) require low delay to be “effective”

throughput some apps (e.g.,

multimedia) require minimum amount of throughput to be “effective”

other apps (“elastic apps”) make use of whatever throughput they get

security encryption, data

integrity, …

Page 27: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-29

DNS: domain name systemDNS services hostname to IP

address translation host aliasing

canonical, alias names

mail server aliasing load distribution

replicated Web servers: many IP addresses correspond to one name

Domain Name System:

distributed database implemented in hierarchy of many name serversapplication-layer protocol: hosts, name servers communicate to resolve names (address/name translation)

note: core Internet function, implemented as application-layer protocolcomplexity at network’s “edge”

Page 28: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-30

Root DNS Servers

com DNS servers org DNS servers edu DNS servers

poly.eduDNS servers

umass.eduDNS servers

yahoo.comDNS servers

amazon.comDNS servers

pbs.orgDNS servers

DNS: a distributed, hierarchical database

client wants IP for www.amazon.com; 1st approx: client queries root server to find com DNS server client queries .com DNS server to get amazon.com

DNS server client queries amazon.com DNS server to get IP

address for www.amazon.com

… …

Page 29: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-31

Processes communicating

process: program running within a host

within same host, two processes communicate using inter-process communication (defined by OS)

processes in different hosts communicate by exchanging messages

client process: process that initiates communication

server process: process that waits to be contacted

aside: applications with P2P architectures have client processes & server processes

clients, servers

Page 30: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-32

Sockets process sends/receives messages to/from its socket socket analogous to door

sending process shoves message out door sending process relies on transport infrastructure

on other side of door to deliver message to socket at receiving process

Internet

controlledby OS

controlled byapp developer

transport

application

physical

link

network

process

transport

application

physical

link

network

processsocket

Page 31: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-33

Addressing processes

to receive messages, process must have identifier

host device has unique 32-bit IP address

Q: does IP address of host on which process runs suffice for identifying the process?

identifier includes both IP address and port numbers associated with process on host.

example port numbers: HTTP server: 80 mail server: 25

to send HTTP message to gaia.cs.umass.edu web server: IP address:

128.119.245.12 port number: 80

A: no, many processes can be running on same host

Page 32: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

©2010, M.A.Doman 34

Transport layer

Payload

Payload

Payload

Payload

MAC frame

Transport layer hdr

Network layer hdr

Link Layer hdr

MAC trlr

MAC hdr

User MessageApplication hdr

Page 33: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Transport Layer 3-35

Transport services and protocols

provide logical communication between app processes running on different hosts

transport protocols run in end systems send side: breaks app

messages into segments, passes to network layer

rcv side: reassembles segments into messages, passes to app layer

more than one transport protocol available to apps Internet: TCP and UDP

application

transportnetworkdata linkphysical

logical end-end transport

application

transportnetworkdata linkphysical

Page 34: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Transport Layer 3-36

Internet transport-layer protocols

reliable, in-order delivery (TCP) congestion control flow control connection setup

unreliable, unordered delivery: UDP no-frills extension of

“best-effort” IP services not

available: delay guarantees bandwidth

guarantees

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

logical end-end transport

Page 35: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Application Layer 2-37

Internet transport protocols servicesTCP service: reliable transport

between sending and receiving process

flow control: sender won’t overwhelm receiver

congestion control: throttle sender when network overloaded

does not provide: timing, minimum throughput guarantee, security

connection-oriented: setup required between client and server processes

UDP service: unreliable data

transfer between sending and receiving process

does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, orconnection setup,

Q: why bother? Why is there a UDP?

Page 36: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

©2010, M.A.Doman 38

Network layer

Payload

Payload

Payload

Payload

MAC frame

Transport layer hdr

Network layer hdr

Link Layer hdr

MAC trlr

MAC hdr

User MessageApplication hdr

Page 37: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Layer 4-39

Network layer transport segment from

sending to receiving host

on sending side encapsulates segments into datagrams

on receiving side, delivers segments to transport layer

network layer protocols in every host, router

router examines header fields in all IP datagrams passing through it

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

networkdata linkphysical network

data linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysicalnetwork

data linkphysical

Page 38: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Routing Strategies

Fixed routing - A path from A to B is specified in advance; path changes only if a hardware failure disables it Since the shortest path is usually chosen,

communication costs are minimized Virtual circuit - A path from A to B is

fixed for the duration of one session. Different sessions involving messages from A to B may have different paths Partial remedy to adapting to load changes Ensures that messages will be delivered in

the order in which they were sent

Page 39: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Layer 4-41

Router architecture overviewtwo key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link

high-seed switching

fabric

routing processor

router input ports router output ports

forwarding data plane (hardware)

routing, managementcontrol plane (software)

forwarding tables computed,pushed to input ports

Page 40: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Layer 4-42

IP addressing: introduction

Q: how are interfaces actually connected?A: Happens in the linklayer

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

A: wired Ethernet interfaces connected by Ethernet switches

A: wireless WiFi interfaces connected by WiFi base station

For now: don’t need to worry about how one interface is connected to another (with no intervening router)

Page 41: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Network Layer 4-43

NAT: network address translation

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

138.76.29.7

local network(e.g., home network)

10.0.0/24

rest ofInternet

datagrams with source or destination in this networkhave 10.0.0/24 address for source, destination (as usual)

all datagrams leaving local

network have same single source NAT IP

address: 138.76.29.7,different source port numbers

Page 42: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Routing Strategies (Cont.)

Dynamic routing - The path used to send a message form site A to site B is chosen only when a message is sent Usually a site sends a message to another

site on the link least used at that particular time

Adapts to load changes by avoiding routing messages on heavily used path

Messages may arrive out of order• This problem can be remedied by appending a

sequence number to each message

Page 43: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Connection Strategies Circuit switching - A permanent physical link is

established for the duration of the communication (i.e., telephone system)

Message switching - A temporary link is established for the duration of one message transfer (i.e., post-office mailing system)

Packet switching - Messages of variable length are divided into fixed-length packets which are sent to the destination Each packet may take a different path through the network The packets must be reassembled into messages as they

arrive Circuit switching requires setup time, but incurs less

overhead for shipping each message, and may waste network bandwidth Message and packet switching require less setup time, but

incur more overhead per message

Page 44: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Contention

CSMA/CD - Carrier sense with multiple access (CSMA); collision detection (CD) A site determines whether another message

is currently being transmitted over that link. If two or more sites begin transmitting at exactly the same time, then they will register a CD and will stop transmitting

When the system is very busy, many collisions may occur, and thus performance may be degraded

CSMA/CD is used successfully in the Ethernet system, the most common network system

Several sites may want to transmit information over a link simultaneously. Techniques to avoid repeated collisions include:

Page 45: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Contention (Cont.) Token passing - A unique message type, known as a

token, continuously circulates in the system (usually a ring structure) A site that wants to transmit information must wait until the

token arrives When the site completes its round of message passing, it

retransmits the token A token-passing scheme is used by some IBM and HP/Apollo

systems Message slots - A number of fixed-length message

slots continuously circulate in the system (usually a ring structure) Since a slot can contain only fixed-sized messages, a single

logical message may have to be broken down into a number of smaller packets, each of which is sent in a separate slot

This scheme has been adopted in the experimental Cambridge Digital Communication Ring

Page 46: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

©2010, M.A.Doman 48

Link Layer of Encapsulation

Payload

Payload

Payload

Payload

MAC frame

Transport layer hdr

Network layer hdr

Link Layer hdr

MAC trlr

MAC hdr

User MessageApplication hdr

Page 47: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-49

Link layer: introductionterminology: hosts and routers: nodes communication channels

that connect adjacent nodes along communication path: links wired links wireless links LANs

layer-2 packet: frame, encapsulates datagram

data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

global ISP

Page 48: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-50

Link layer services framing, link access:

encapsulate datagram into frame, adding header, trailer

channel access if shared medium “MAC” addresses used in frame headers to

identify source, dest • different from IP address!

reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit-error link (fiber, some

twisted pair) wireless links: high error rates

• Q: why both link-level and end-end reliability?

Page 49: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-51

flow control: pacing between adjacent sending and receiving

nodes error detection:

errors caused by signal attenuation, noise. receiver detects presence of errors:

• signals sender for retransmission or drops frame error correction:

receiver identifies and corrects bit error(s) without resorting to retransmission

half-duplex and full-duplex with half duplex, nodes at both ends of link can

transmit, but not at same time

Link layer services (more)

Page 50: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-52

Where is the link layer implemented? in each and every host link layer implemented

in “adaptor” (aka network interface card NIC) or on a chip Ethernet card, 802.11

card; Ethernet chipset implements link,

physical layer attaches into host’s

system buses combination of

hardware, software, firmware

controller

physicaltransmission

cpu memory

host bus (e.g., PCI)

network adaptercard

applicationtransportnetwork

link

linkphysical

Page 51: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-53

Channel partitioning MAC protocols: TDMA

TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot

(length = pkt trans time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have pkt,

slots 2,5,6 idle

1 3 4 1 3 4

6-slotframe

6-slotframe

Page 52: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-54

FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go

idle example: 6-station LAN, 1,3,4 have pkt,

frequency bands 2,5,6 idle

freq

uenc

y ba

nds

time

FDM cable

Channel partitioning MAC protocols: FDMA

Page 53: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

5-55

Check for collision Transmit only if the line is free

Random Access

Page 54: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-56

MAC addresses and ARP

32-bit IP address: network-layer address for interface used for layer 3 (network layer) forwarding

MAC (or LAN or physical or Ethernet) address: function: used ‘locally” to get frame from one

interface to another physically-connected interface (same network, in IP-addressing sense)

48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable

e.g.: 1A-2F-BB-76-09-ADhexadecimal (base 16) notation(each “number” represents 4 bits)

Page 55: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Link Layer 5-57

LAN addresses and ARPeach adapter on LAN has unique LAN address

adapter

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN(wired orwireless)

Page 56: CSCI411 Introduction to Computer Networking ©2011, MA Doman 1

Thank You!

58

Be sure to start the first lab: Introduction to the OpNet Simulator