computer systems an integrated approach to architecture and operating systems chapter 13...

101
COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008 Umakishore Ramachandran and William D. Leahy Jr.

Upload: nickolas-sidman

Post on 31-Mar-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

COMPUTER SYSTEMSAn Integrated Approach to Architecture and Operating Systems

Chapter 13Fundamentals of Networking and

Network Protocols

©Copyright 2008 Umakishore Ramachandran and William D. Leahy Jr.

Page 2: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.1 Preliminaries

• Today a general purpose computer not connected to the "net" or some net is almost unthinkable.

• Connecting to a network requires an I/O device which will use DMA

Page 3: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.2 Basic Terminologies

• Computer connected to a network is called a host• The connection is made using a device called a

Network Interface Card or NIC

• What exactly is the "network" shown in the diagram?

• As we shall see it may be one network or a composite of multiple networks

Page 4: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.2 Basic Terminologies

• What is the Internet? Consider the postal system…

Page 5: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.2 Basic Terminologies

• Now consider an email

Page 6: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.2 Basic Terminologies

• Each cloud represented computers of an Internet Service Provider (ISP)

• The ISP clouds are not directly connected• Instead they are connected by routers, which

are special purpose computer for this purpose• How do these routers know where to send

information? A universal system of addresses called Internet Protocol (or IP) Addresses is part of the answer

Page 7: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.2 Basic Terminologies

• We showed connecting using a cable or phone network. Connections may also be made through Local Area Networks (LAN's)

• Other hardware devices– hubs/repeaters– bridges– switches– routers

Page 8: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3 Networking Software

• Need to address issues such as– Arbitrary message size and physical limitations of

network packets– Out of order delivery of packets– Packet loss in the network– Bit errors in transmission

• Software is logically in a protocol stack configuration

Page 9: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3 Networking Software

• A protocol is the set of rules used to describe all of the hardware and (mostly) software operations used to send messages from Processor A to Processor B

• A protocol describes the syntax, semantics and timing of communication between two devices

• Common practice is to attach headers/trailers to the actual payload forming a packet or frame.

Page 10: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.1 Need for a LayeredProtocol Stack

• Good abstraction• Simpler to understand than OGP• Easier to design, analyze, implement and test

• Design concept is suites or families• What do we mean by layers? Or a layered

protocol? Consider the army…

Page 11: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.1 Need for a LayeredProtocol Stack

GeneralColonelCaptain

SergeantPrivate

GeneralColonelCaptain

SergeantPrivate

Page 12: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol Stack

PhysicalLink

NetworkTransport

Application

Layer 1Layer 2Layer 3Layer 4Layer 5

Page 13: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol Stack

• Application: HTTP, SMTP, FTP, etc. Shield applications using network from network details

• Transport: Breaks message into packets, handles things like out of order packets, may deal with reliability

• Network: Responsible for routing, does best effort delivery

• Link: Moves the packet using a protocol such as Ethernet, Token Ring, and ATM

• Physical: Responsible for physically (electrically, optically, etc.) moving the bits of the packet from one node to the next.

Page 14: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol Stack

• Application: HTTP, SMTP, FTP, etc. Shield applications using network from network details

• Transport: Breaks message into packets, handles things like out of order packets, may deal with reliability

• Network: Responsible for routing, does best effort delivery

• Link: Moves the packet using a protocol such as Ethernet, Token Ring, and ATM

• Physical: Responsible for physically (electrically, optically, etc.) moving the bits of the packet from one node to the next.

Page 15: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol StackManufacturers group their protocol software together into a family and give it a nice name…

• Novell Corporation• Banyan Systems• Apple Computer• Digital Equipment• IBM• “The Internet Biggie”

• Netware• VINES• AppleTalk• DECNET• SNA• TCP/IP

Page 16: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol Stack

• Layer 5: Application-Sends application specific messages

• Layer 4: Transport-Sends segments• Layer 3: Network-Sends packets• Layer 2: Datalink-Sends frames• Layer 1: Physical-Sends bits

Page 17: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.3.2 Internet Protocol Stack

Page 18: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4 Transport Layer

• Assume– send (destination-address, message)– receive (source-address, message)

• Functionality of transport layer– Support arbitrary message size at the application

level– Support in-order delivery of messages– Shield the application from loss of messages– Shield the application from bit errors in

transmission.

Page 19: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4 Transport Layer

Page 20: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.1 Stop and wait protocols

• Simple approach– Sender sends a packet and waits for a positive acknowledgement,

commonly referred to as an ACK. – As soon as packet is received, recipient generates and sends an

ACK for that packet. ACK should contain information for sender to discern unambiguously packet being acknowledged. Sequence number is unique signature of each packet. Thus, all that needs to be in ACK packet is sequence number of received packet.

– Sender waits for a period of time called timeout. If within this period, it does not hear an ACK, it re-transmits the packet. Similarly, the destination may re-transmit the ACK, if it receives the same packet again (an indication to the receiver that his ACK was lost en route)

Page 21: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.1 Stop and wait protocols

Page 22: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.1 Stop and wait protocols

Page 23: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.1 Stop and wait protocols

RTT = Round Trip Time

Page 24: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.2 Pipelined protocols

(a)

(b)

Page 25: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.3 Reliable Pipelined Protocol

Page 26: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.3 Reliable Pipelined Protocol

Increasing sequence numbers

Active window of sequence numbers

Packets sent and acknowledged Packets sent but not yet acknowledged

Packets that are in the active window that can be sent without waiting for any further ACKs

Packets that cannot yet be sent since they are outside the active window

Page 27: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.4 Dealing with transmission errors

• Methods are needing to determine if packets are being received correctly

• Examples– Checksums– Error Correcting Codes (ECC)

Page 28: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.5 Transport protocols on the Internet

Transport protocol

Features Pros Cons

TCP Connection-oriented; self-regulating; data flow as stream; supports windowing and ACKs

Reliable; messages arrive in order; well-behaved due to self-policing

Complexity in connection setup and tear-down; at a disadvantage when mixed with unregulated flows; no guarantees on delay or transmission rate

UDP Connection-less; unregulated; message as datagram; no ACKs or windowing

Simplicity; no frills; especially suited for environments with low chance of packet loss and applications tolerant to packet loss;

Unreliable; message may arrive out of order; may contribute to network congestion; no guarantees on delay or transmission rate

Page 29: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.4.5 Transport protocols on the Internet

Application Key requirement Transport protocolWeb browser Reliable messaging; in order arrival of

messagesTCP

Instant messaging Reliable messaging; in order arrival of messages

TCP

Voice over IP Low latency Usually UDPElectronic Mail Reliable messaging TCPElectronic file transfer

Reliable messaging; in order delivery TCP

Video over Internet Low latency Usually UDP; may be TCP

File download on P2P networks

Reliable messaging; in order arrival of messages

TCP

Network file service on LAN

Reliable messaging; in order arrival of messages

TCP; or reliable messaging on top of UDP

Remote terminal access

Reliable messaging; in order arrival of messages

TCP

Page 30: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5 Network Layer

• Why a separate layer?– Multiple network connections to the host– Multiple hops between source and destination– Route is not static

• Transport/network layers interface– Destination address and packet size

• Network layer functionality (host)– Routing algorithms– Provide a service model to the transport layer– Pass it up to transport if destination reached

• Network layer functionality (Routers) – Routing algorithms

Page 31: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.1 Routing Algorithms

Page 32: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.1 Routing AlgorithmsIteration Count

New node to which least-cost route known

BCost/route

CCost/route

DCost/route

ECost/route

FCost/route

Init A 2/AB 1/AC 4/AD 5/AE

1 AC 2AB 1/AC 3/ACD 4/ACE 6/ACF

2 ACB 2/AB 3/ACD 3/ABE 6/ACF

3 ACBD 3/ACD 3/ABE 5/ADF

4 ACBDE 3ABE 4/ABEF

5 ACBDEF 4/ABEF

Page 33: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.1 Routing AlgorithmsDestination A B C F

A 5(EA) 3(BA) 4(ECA) 5(EFDCA)

B 7(EAB) 1(EB) 5(ECB) 6(EFDCB

C 6(EAC) 3(EBC) 3(EC) 4(EFDC)

D 8(EACD) 4(EBEFD) 5(ECD) 2(EFD)

F 9(EABEF) 2(EBEF) 7(ECBEF) 1(EF)

DV Table for Node E

Page 34: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.1 Routing on the Internet

Details of the network layer in a gateway node

• Network of networks• Scale, dynamism• Autonomous Systems (AS)

– Allows for evolution– Gateway node for inter-AS routing

Page 35: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.1 Hierarchical Routing Algorithms

BGP Border Gateway Protocol

Gateway nodes use BGPNodes within AS use LS or DV

Page 36: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.2 Internet Addressing

IP Network Device

24 bits 8 bits

Telephone Number

Internet Protocol Address

Page 37: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.2 Internet Addressing

• Consider this 32 bit IP Address– (10000000 00111101 00010111 11011000)2

• Convert each 8-bit octet into a decimal number and separate each with a decimal– 128.61.23.216

• In this address the first 24 bits are network while the last 8 are the device– 128.61.23.216/24

Page 38: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.2 Internet Addressing

How many IP networks?

Page 39: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.2 Internet AddressingHow many IP networks?

Page 40: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.2 Internet Addressing

IP Network Device

24 bits 8 bits

IP Network

Device

16 bits 16 bits

Device

Device

8 bits 24 bits

Page 41: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.3 Network Service Model

Circuit Switching

Page 42: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.3 Network Service Model

MessageSwitching

Page 43: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.3 Network Service Model

Packet Switching

Page 44: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.4 Network Layer SummaryNetwork Terminology

Definition/Use

Circuit switching A network layer technology used in telephony. Reserves the network resources (link bandwidth in all the links from source to destination) for the duration of the call; no queuing or store-and-forward delays

TDM Time division multiplexing, a technique for supporting multiple channels on a physical link used in telephony

FDM Frequency division multiplexing, also a technique for supporting multiple channels on a physical link used in telephony

Packet switching A network layer technology used in wide area Internet. It supports best effort delivery of packets from source to destination without reserving any network resources en route.

Message switching Similar to packet switching but at the granularity of the whole message (at the transport level) instead of packets.

Switch/Router A device that supports the network layer functionality. It may simply be a computer with a number of network interfaces and adequate memory to serve as input and output buffers.

Input buffers These are buffers associated with each input link to a switch for assembling incoming packets.

Output buffers These are buffers associated with each outgoing link from a switch if in case the link is busy.

Routing table This is table that gives the next hop to be used by this switch for an incoming packet based on the destination address. The initial contents of the table as well as periodic updates are a result of routing algorithms in use by the network layer.

Page 45: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.5.4 Network Layer SummaryNetwork Terminology

Definition/Use

Delays The delays experienced by packets in a packet-switched network

Store and forward

This delay is due to the waiting time for the packet to be fully formed in the input buffer before the switch can act on it.

Queuing This delay accounts for the waiting time experienced by a packet on either the input or the output buffer before it is finally sent out on an outgoing link.

Packet loss This is due to the switch having to drop a packet due to either the input or the output buffer being full and is indicative of traffic congestion on specific routes of the network.

Service Model This is the contract between the network layer and the upper layers of the protocol stack. Both the datagram and virtual circuit models used in packet-switched networks provide best effort delivery of packets.

Virtual Circuit (VC)

This model sets up a virtual circuit between the source and destination so that individual packets may simply use this number instead of the destination address. This also helps to simplify the routing decision a switch has to make on an incoming packet.

Datagram This model does not need any call setup or tear down. Each packet is independent of the others and the switch provides a best effort service model to deliver it to the ultimate destination using information in its routing table.

Page 46: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6 Link Layer and Local Area Networks

• Innovations in the link layer in the 70's led to making the internet a household term

• Link layer is responsible for acquiring physical medium for transmission, and sending packet over the physical medium to destination host.

• Broad Classification – Random Access: Example-Ethernet– Taking Turns: Example-Token Ring

• Portion of protocol that deals with gaining access to physical medium is called the Media Access and Control (MAC) layer

Page 47: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.1 Ethernet

Listen for Carrier

TransmitMessage

AbortTransmissionNeed to

Transmit

MediumIdle

CollisionDetected

TransmissionComplete

No collision

MediumNot Idle

Page 48: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

Terminologies

• Base band signaling• Manchester encoding• CSMA/CD• CSMA/CA

– Hidden terminal problem– RTS/CTS

• xBASEy• Watch

– Triumph of the Nerds (PBS show)

Joe Cindy Bala

Page 49: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.1 Manchester Encoding

0 1 1 0 0 1 0 1 1

Page 50: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.1 Ethernet

Hidden Terminal Problem

Page 51: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.2 Token Ring

Page 52: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

ComparisonLink Layer Protocol

Features Pros Cons

Ethernet Member of random access protocol family; opportunistic broadcast using CSMA/CD; exponential backoff on collision

Simple to manage; works well in light load

Too many collisions under high load

Token ring

Member of taking turns protocol family; Token needed to transmit

Fair access to all competing stations; works well under heavy load

Unnecessary latency for token acquisition under light load

Page 53: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.3 Other link layer protocols

• FDDI: Fiber Distributed Data Interface– Fiber optics based– High bandwidth backbone used to connect LAN's

• ATM: Asynchronous Transfer Mode– Guarantees quality of service using link reservation and admission

control to avoid congestion– Connection oriented and can have transport layer implemented on

top of it– Used in MAN's and WAN's

• PPP: Point to Point– Used by dial-up connections– Widespead

Page 54: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.6.3 Other link layer protocols

• Ethernet is really not just one protocol. As obsolescence approaches a new version is introduced and typically comes out on top

• FDDI was upstaged by Gigabit Ethernet• ATM is likely to be upstaged by 10-Gigabit

Ethernet

Page 55: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.7 Relationship between the three layers

• Both TCP and IP include error checking– They don't have to be used together

• Most layers are in software but the link layer is often implemented in hardware

Page 56: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.8 Data structures for packet transmission

/* Packet Header Data Structure */struct header_t { int destination_address; /* destination address */ int source_address; /* source address */ int num_packets; /* total number of */ /* packets in message */ int sequence_number; /* sequence number of */ /* this packet */ int packet_size; /* size of data */ /* contained in the */ /* packet */ int checksum; /* for integrity check of */ /* this packet */};

Page 57: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.8 Data structures for packet transmission

/* Packet Data Structure */struct packet_t { struct header_t header; /* packet header */ char *data; /* pointer to the memory */ /* buffer containing the data */ /* of size packet_size */};

Page 58: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.9 Message transmission timeP1

Protocol

stack

Network

P2

Protocol

stackS R

Tw

msg

pkt1 pkt2 pktn…

Tf

Page 59: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.9 Message transmission timeSender

OverheadTime onthe wire

Time ofFlight

ReceiverOverhead

Page 60: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.10 Protocol Layering

• Layering is a structuring tool for combating complexity of protocol stack

• Allows partitioning total responsibility for message transmission and reception among various layers.

• Modularity allows integration of a new module at a particular layer with minimal changes to the other layers.

• It might appear that a potential downside to layering might be a performance penalty, as the message has to traverse several layers.

• Judicious definition of interfaces between layers avoids such inefficiencies.

Page 61: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.10.1 OSI Model

• Presentation layer subsumes user directed input/output functionalities that are common across different applications.

• Session layer maintains process-to-process communication details and provides a higher-level abstraction between an application and the transport layer (e.g. Unix socket).

Application Presentation

Transport

Network

Data Link

Physical

Session

7

6

5

4

3

2

1

Page 62: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.10.2 Practical issues with layering

Application Presentation

Transport

Network

Data Link

Physical

Session

7

6

5

4

3

2

1

Physical

Ethernet Card

IP

TCP

Telnet, FTP, etc.

1

2

3

4

5

Page 63: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• Hub/Repeater

Hub

Page 64: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

Hub Hub

HubHubHub

13.11 Networking Hardware

• More Hubs

Page 65: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• Bridge

HUB HUBBRIDGE

1

2

3

4

Collision domain Collision domain

Page 66: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• Switch

Page 67: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• VLAN

Switch

1

2

34

Switch

5

6

78

Page 68: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• NIC

MAC address Message

Header Payload

Page 69: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking Hardware

• Router

IP address of the destination Message MAC address of router

Payload for the router

Payload for destination node

Page 70: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking HardwareName of Component

Definition/Function

Host A computer on the network; this is interchangeably referred to as node and station in computer networking parlance

NIC Network Interface Card; interfaces a computer to the LAN; corresponds to layer 2 (data link) of the OSI model

Port End-point on a repeater/hub/switch for connecting a computer; corresponds to layer 1 (physical) of the OSI model

Collision domain

Term used to signify the set of computers that can interfere with one another destructively during message transmission

Repeater Boosts the signal strength on an incoming port and faithfully reproduces the bit stream on an outgoing port; used in LANs and WANs; corresponds to layer 1 (physical) of the OSI model

Page 71: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.11 Networking HardwareName of Component

Definition/Function

Hub Connects computers together to form a single collision domain, serving as a multi-port repeater; corresponds to layer 1 (physical) of the OSI model

Bridge Connects independent collision domains, isolating them from one another; typically 2-4 ports; uses MAC addresses to direct the message on an incoming port to an outgoing port; corresponds to layer 1 (physical) of the OSI model

Switch Similar functionality to a bridge but supports several ports (typically 4-32); provides expanded capabilities for dynamically configuring and grouping computers connected to the switch fabric into VLANs; corresponds to layer 1 (physical) of the OSI model

Router Essentially a switch but has expanded capabilities to route a message from the LAN to the Internet; corresponds to layer 3 (network) of the OSI model

VLAN Virtual LAN; capabilities in modern switches allow grouping computers that are physically distributed and connected to different switches to form a LAN; VLANs make higher level network services such as broadcast and multicast in Internet subnets feasible independent of the physical location of the computers; corresponds to layer 1 (physical) of the OSI model

Page 72: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.12 Network Programming

P1 P2

Socket

Page 73: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.12.1 Unix Sockets

• Socket: create an endpoint of communication• Bind: bind a socket to a name or an address• Listen: listen for incoming connections on the socket• Accept: accept an incoming connection request on a

socket• Connect: send a connection request to a name (or

address) associated with a remote socket• Recv: receive incoming data on a socket from a remote

peer• Send: send data to a remote peer via a socket

Page 74: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.13 Network Services and Higher Level Protocols

P1

P2 foo (args) foo (args)

return RPC

Host 1 Host 2

Page 75: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.13 Network Services and Higher Level Protocols

User

fopen

NFS client

RPC layer at client RPC layer at server

NFS server

Unix file system Unix file system

Network

Page 76: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15 Historical Perspective

• From Telephony to Computer Networking

• Evolution of the Internet• PC and the arrival of LAN• Evolution of LAN

Page 77: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.1 From Telephony to Computer Networking

• 1875 Telephone invented…analog system• 1960 Telephone infrastructure goes digital

Page 78: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.1 From Telephony to Computer Networking

• 1940's Mainframe computers developed• 1960's Transition

– Batch-oriented card-input/output– CRT I/O and timesharing

Page 79: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.1 From Telephony to Computer Networking

Digital Data

Digital Data

TelephoneInfrastructure

TelephoneInfrastructure

?Missing Link?

?Missing Link?

Analog DataAnalog Data

Page 80: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.1 From Telephony to Computer Networking

Digital Data

Digital Data

TelephoneInfrastructure

TelephoneInfrastructure

Analog DataAnalog Data

MODEM

MODEM

EXTRA!!!!!

1960 AT&T

INTRODUCES

DATAPHONE

First Commercial

Modem!

Page 81: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.1 From Telephony to Computer Networking

• 1968/9 Carterphone decision allowed devices which were beneficial and not harmful to the network to be connected to the Public Switched Telephone Network (PSTN).Paved the way for computers to communicate using the telephone switching infrastructure.

Page 82: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• 1965 DoD DARPA plans first computer network• 1969 ARPANET connects 4 computers using

packet switched network– Stanford Research Institute, UCLA, UC Santa

Barbara, and the University of Utah– Networking luminary Leonard Kleinrock, is

credited with successfully sending the first network “message” from UCLA to Stanford.

Page 83: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• “Router” in the network was called Interface Message Processor (IMP), built by a company called BBN (which stands for Bolt, Beranak, and Newman Inc.). – IMP system architecture required a careful balance of the

hardware and software that would allow it to be used as a store-and-forward packet switch among these computers.

– IMP's used modems and leased telephone lines to connect to one another.

• 1971 The ARPANET grows to 23 hosts connecting universities and government research centers around the country.

Page 84: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet1973 Robert Metcalfe and David Boggs invent the Ethernet networking system at the Xerox Palo Alto Research Center.

Page 85: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• 1973 The ARPANET goes international

Page 86: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• 1975 Internet operations transferred to the Defense Communications Agency

• 1978 Hayes Microcomputer Products releases the first mass-market modem, transmitting at 300 bps (0.3K).

• 1980 John Shoch at Xerox creates the first “worm” program, with the capacity to travel through networks.

• 1981 Ungermann-Bass ships the first commercial Ethernet network interface card.

Page 87: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• 1981 ARPANET has 213 hosts. A new host is added approximately once every 20 days.

• 1982 The term 'Internet' is used for the first time.

• 1983 TCP/IP becomes the universal language of the Internet. Developed by Vinton Cerf and Robert Kahn

• 1984 CISCO founded• Early 80's Unix and IBM OS included TCP/IP

Page 88: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.2 Evolution of the Internet

• Late 90's Internet becomes household term– Needed PC– Needed "Killer app" i.e. WWW & browsers

Page 89: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1971 Intel introduces the first microprocessor - the Intel 4004.

• 1971 The Kenbak-1, the first microcomputer, is introduced in Scientific American, selling a total of 40 units in 2 years.Used 130 IC's with a 256 byte memory and 8-bit words, processed 1000 instructions per second, and cost $750.

Page 90: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1972 Intel launches the 8-bit 8008 - the first microprocessor which could handle both upper and lowercase characters.

• 1972 Xerox develops the Xerox Alto - the first computer to use a Graphic User Interface.

The Alto consists of four major parts: the graphics display, the keyboard, the graphics mouse, and the disk storage/processor box. Each Alto is housed in a beautifully formed, textured beige metal cabinet that hints at its $32,000 price tag (1979US money). With the exception of the disk storage/processor box, everything is designed to sit on a desk or tabletop

Page 91: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1973 Robert Metcalfe and David Boggs invent the Ethernet networking system at the Xerox Palo Alto Research Center.

Page 92: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1974 Intel introduces the 8080 microprocessor– 5 times faster than the 8008. – And the heart of the future Altair 8800.

• 1975 MITS markets the Altair 8800 - the first mass-market microcomputer, launching the Personal Computer Revolution.

• 1975 Bill Gates and Paul Allen form the Microsoft company to create software for the new Altair 8800.

Page 93: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1976 Apple Computer is formed by Steve Jobs, Steve Wozniak, and Ron Wayne, and launches the Apple Computer.

• 1977 Tandy Radio Shack ships its first personal computer - the TRS-80. It sells over 10,000 units, tripling expectations.

• 1977 Apple Computer launches the Apple II, which sets new standards for sophisticated personal computer systems.

Page 94: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1978 The C programming language is completed at AT&T Bell Laboratories, offering a new level of programming.

• 1978 Apple and Tandy ship PCs with 5.25" floppy disks, replacing cassette tape as the standard storage medium for PCs.

• 1978 Hayes Microcomputer Products releases the first mass-market modem, transmitting at 300 bps (0.3K).

Page 95: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1978 Intel ships the Intel 8086 microprocessor, with 29,000 transistors, and running at 4.77 megahertz.

• 1979 Personal Software creates VisiCalc for the Apple II, the first electronic spreadsheet program, selling over 100,000 copies.

• 1979 Intel develops the 8088 microprocessor, which would later become the heart of the IBM PC.

Page 96: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1979 Motorola develops the Motorola 68000 microprocessor, offering a new level of processing power.

• 1979 Robert Metcalf founded 3COM• 1980 Seagate Technology introduces the first

microcomputer hard disk, capable of holding 5 megabytes of data.

• 1980 Philips introduces the first optical laser disk, with many times the storage capacity of floppy or hard disks.

Page 97: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1980 Xerox creates Smalltalk - the first object-oriented programming language.

• 1981 Ungermann-Bass ships the first commercial Ethernet network interface card.

• 1981 Xerox introduces the Xerox Star 8010, the first commercial Graphic User Interface computer, for $16,000-$17,000.

Page 98: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.3 PC and the arrival of LAN

• 1981 Microsoft supplies IBM with PC-DOS (which it would also sell as MS-DOS), the OS that would power the IBM PC.

• 1981 IBM brings to market the IBM PC, immediately establishing a new standard for the world of personal computers.

Page 99: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

EthernetInterface

MAU

Male "N" Connector50 ohm terminator

MAU - Medium Access UnitAUI - Attach Unit Interface

AMPThickCoaxial (Vampire) Tap

Thick Coax Segment500 Meter Maximum

15 pin AUI Connector

AUI Cable(50 meter max)

13.15.4 Evolution of LAN

• Thicknet– Coaxial cable/Vampire taps– 10base5 (10 Mbits/sec, baseband, 500 meters)– 1979-1985

Page 100: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

BNC "T"Connector

10-Base-2 Coaxial Ethernet Cable with BNC terminations

Terminator Terminator

Computer

13.15.4 Evolution of LAN

• Thinnet– Coaxial cable/BNC connectors– 10base2 (10 Mbits/sec, baseband, 200 meters)– 1985-1993

Page 101: COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 13 Fundamentals of Networking and Network Protocols ©Copyright 2008

13.15.4 Evolution of LAN

• Fast Ethernet– Move "ethernet" into the box– 100baseT (T for twisted pair)– RJ45 Connectors