Upload
gladalok
View
216
Download
0
Embed Size (px)
Citation preview
7/28/2019 02computer Network Basics
1/61
Computer NetworkBasics
An overview of computer networkingwhich introduces many key conceptsand terminology. Sets the stage forfuture topics.
7/28/2019 02computer Network Basics
2/61
Components of any Computer
Processor(active)
Computer
Control (brain)
Datapath (brawn)
Memory (passive)
(whereprograms,
data livewhenrunning)
DevicesInput
Output
Keyboard,Mouse
Display ,Printer
Disk,Network
7/28/2019 02computer Network Basics
3/61
Communication Devices
Synchronous communication uses a clocksignal separate from the data signal-communication can only happen during the
tick of the timing cycle Asynchronous communication does not usea clock signal- rather, it employs a startand stop bit to begin and end the irregulartransmission of data
7/28/2019 02computer Network Basics
4/61
Connecting to Networks (andOther I/O)
Bus - shared medium of communication that
can connect to many devicesHierarchy of Buses in a PC
7/28/2019 02computer Network Basics
5/61
Operating systems
Developer or manufacturer Operating system
Apple Computers Inc. Mac OS 8/9/X
AT&T Bell Laboratories Unix
Be Inc. beOS
Berkeley University BSD, FreeBSD
Carnegie-Mellon University Mach 3.0
Cisco Systems Inc. IOS
HP HP-UX
IBM AIX and OS/2
Linus Thorvald Linux
Microsoft Windows XP, Vista
Novell NetWareSanta Cruz Operation Inc. (SCO) SCO XENIX, SCO UNIX, SCO MPX
Siemens SINIX
Silicon Graphics IRIX
Sun Microsystems Solaris, SunOS, JavaOS
7/28/2019 02computer Network Basics
6/61
Operating Systems Developed forPortable Devices
Developer or manufacturer Operating system
Microsoft Windows CE
Microsoft Windows Mobile 6.0
Palm PalmOS
Symbian Symbian OS
RIM (Research In Motion Limited) RIM
7/28/2019 02computer Network Basics
7/61
A closer look at network structure:
network edge: applications andhosts
network core: routersnetwork of
networks
7/28/2019 02computer Network Basics
8/61
General Architecture of ComputerNetworks
Cloud
Externalnodes
Internal nodes
(or stations)
(swithing devices)
7/28/2019 02computer Network Basics
9/61
The Network Core
mesh of interconnectedroutersthe fundamentalquestion: how is datatransferred through net?
circuit switching : dedicated circuit percall: telephone netpacket-switching : data sent thru net indiscrete chunks
7/28/2019 02computer Network Basics
10/61
Connection of Networks
networks or subnetworks
router or gateway
node(host,
station)
7/28/2019 02computer Network Basics
11/61
Network Topology
a) bus, b) star, c) ring, d) tree structure
a) b) c) d)
7/28/2019 02computer Network Basics
12/61
Classification of the networks according
to the connection establishing
Line switched networkPacket switched networkRadiating/data disseminating systemsPoint-to-point connected networks
7/28/2019 02computer Network Basics
13/61
Wired media
Telephone lineThin CoaxThick CoaxUnshielded Twisted Pair (UTP)Shielded Twisted Pair (STP)Fibre
7/28/2019 02computer Network Basics
14/61
(Data) Reliability
A network service is (data) reliableif the sender application can rely onthe error-free and ordered deliveryof the data to the destinationIn the Internet the reliability canobtained mainly byacknowledgements and
retransmissionIn such a way the losses in theunderlying layers can be retrieved
7/28/2019 02computer Network Basics
15/61
Flow-control and CongestionPrevention
Flow-control : to protect thereceiver against the overload
I.e.: the sender (source) sends moredata than the receiver can processit is mainly necessary in link andtransport level
Congestion prevention : to preventthe intermediate nodes against theoverload
it is mainly necessary in network level
7/28/2019 02computer Network Basics
16/61
Overload and Congestion
Overload : Too many packets occur in asubnetwork in the same time, whichprevent each other and in such a waythe throughput decreasesCongestion : the queues in the routersare too long, the buffers are full.
As a consequence some packages aredropped if the buffers of the routers areoverloaded
In extreme case: grid-lock , lock-up
7/28/2019 02computer Network Basics
17/61
Deadlock
Deadlock : the most serious situation of thecongestion, the routers wait for each other Direct store and forward deadlock : the
buffers of two neighbouring routers arefull with the packets to be sent to theother routerIndirect store and forward deadlock : thedeadlock occurred not between twoneighbouring routers but in a subnetwork,where any of the routers has not freebuffer space for accepting packets
7/28/2019 02computer Network Basics
18/61
Network: physical connection that allows two computers tocommunicate
Packet: unit of transfer, bits carried over the networkNetwork carries packets from on CPU to anotherDestination gets interrupt when packet arrives
Protocol: agreement between two parties as to howinformation is to be transmittedBroadcast Network: Shared Communication MediumDelivery: How does a receiver know who packet is for?
Put header on front of packet: [ Destination | Packet ]Everyone gets packet, discards if not the target
Arbitration: Act of negotiating use of shared mediumPoint-to-point network: a network in which every physicalwire is connected to only two computersSwitch: a bridge that transforms a shared-bus(broadcast) configuration into a point-to-point networkRouter: a device that acts as a junction between twonetworks to transfer data packets among them
Review: Networking Definitions
7/28/2019 02computer Network Basics
19/61
The Need for a Protocol Architecture
Procedures to exchange data betweendevices can be complexHigh degree of cooperation requiredbetween communicating systems
destination addressing, pathreadiness to receivefile formats, structure of datahow commands are sent/received andacknowledgedetc.
7/28/2019 02computer Network Basics
20/61
Layered Protocol Architecture
Modules arranged in a vertical stackEach layer in stack:
Performs related functions
Relies on lower layer for more primitivefunctionsProvides services to next higher layerCommunicates with corresponding peer layer ofneighboring system using a protocol
7/28/2019 02computer Network Basics
21/61
Network LayeringLayering: building complex services from simpler ones
Each layer provides services needed by higher layers by utilizing services
provided by lower layersThe physical/link layer is pretty limitedPackets are of limited size (called the Maximum Transfer Unit or MTU:often 200-1500 bytes in size)Routing is limited to within a physical link (wire) or perhaps through aswitch
Our goal in the following is to show how to construct a secure, ordered,message service routed to anywhere:
Physical Reality: Packets Abstraction: MessagesLimited Size Arbitrary Size
Unordered (sometimes) OrderedUnreliable Reliable
Machine-to-machine Process-to-processOnly on local area net Routed anywhere
Asynchronous Synchronous
7/28/2019 02computer Network Basics
22/61
Key Features of a Protocol
Set of rules or conventions to exchangeblocks of formatted dataSyntax : data formatSemantics : control information(coordination, error handling)Timing: speed matching, sequencing
Actions: what happens when an eventoccurs
7/28/2019 02computer Network Basics
23/61
Operation of Protocols
(interlayer) protocol layerprotocol
Host Host
Physical connection
(n-1). layer protocol entity
(n-1). layer protocol entity
(n+1). layer protocol entity
n. layer protocol entity
(n+1). layer protocol entity
n. layer protocol entity
... ...
7/28/2019 02computer Network Basics
24/61
The OSI Model
Physical Layer(Data) Link Layer
Network LayerTransport LayerSession Layer
Presentation LayerApplication Layer
7/28/2019 02computer Network Basics
25/61
Physical Layer
Transmission of energy onto themedium
Collection of energy from the medium
This layer is concerned with the physicaltransmission of raw bitsThis bits are transmitted throughmechanical, electrical, and procedural
interfaces which include interface card standard modem standards certain portions of the ISDN and LAN MAN
standards
7/28/2019 02computer Network Basics
26/61
(Data) Link Layer
Transmission of frames over one link or networkOften subdivided into the MAC and LLCIt receives bits from the physical layer, converting bitsto frames
frame boundariesUsing protocols (e.g. HDLC), this layer corrects errorsthat might have occurred during transmission across a linkIn addition this layer provides an error -freetransmission channel to the next layer known as thenetwork layer: error control
ARQduplicates
Flow control
7/28/2019 02computer Network Basics
27/61
The previous two layers were concerned with getting error-free data across a link The network layer establishes connections between nodes,routes data packets through the network, and accounts for them
End-to-end transmission of packets (possibly over multiplelinks)Controls the operation of the subnetRouting
staticdynamic
Congestion controlAt this stage, there may be congestion due to many packets waiting to be routed
Some packets may be lost during congestion
Network Layer I
7/28/2019 02computer Network Basics
28/61
Network Layer IIAccounting
packetsbytesetc.
InternetworkingThis layer is also concerned with internetworking where there is talking between technologies, such as the traditional Internet connected to ATM segmentationaddressingsequencingaccounting
Broadcast subnets: thin network layer
7/28/2019 02computer Network Basics
29/61
Transport Layer I
This layer presumes the ability to pass through a network and provides additional services to end-users, such as and-to-and
packet reliability End-to-end delivery of a complete message(end-to-end communication path, usuallyreliable)Isolation from hardware Multiplexing/demultiplexingDivide message into packetsReassemble (possibly out of order packets)
into the original message of the distant end
7/28/2019 02computer Network Basics
30/61
Transport Layer II
End-to-end flow controlAcknowledgmentsTypes of service
error-free, point-to-point, in sequence,flow controlledno correctness guaranteesno sequencing
Establishing/terminating connectionsnaming/addressingintra-host addressing (process, ports)
7/28/2019 02computer Network Basics
31/61
This layer enables users to establish sessions across a network between machines In addition, it offers session management services Set up and management of end-to-end conversation
Establish and terminate sessionssuperset of connections
Assignment of logical portsDialogue controlToken management
for critical operationsSynchronization
checkpoints/restarts
Session Layer
7/28/2019 02computer Network Basics
32/61
Presentation Layer
This layer is concerned with the syntax and semantics of messages, code conversions between machines, and other data conversion services Some of these services are data compression and data encryption Interface between lower layers and applicationFormatting
Syntax & semantics of messagesData encoding (e.g.: ASCII to EBCDIC)CompressionEncryption/Decryption
Authentication
7/28/2019 02computer Network Basics
33/61
Application Layer
This layer provides support for the user's network applications Some application layer services have been standardized,e.g.:
File Transfer and Management (FTAM)Message Handling Services for electronic mail (X.400)Directory Services (X.500)Electronic Data Interchange (EDI)
Program youre running,applications file transfer, access & managemente-mailvirtual terminals
WWW
7/28/2019 02computer Network Basics
34/61
The OSI Protocol Stack
7/28/2019 02computer Network Basics
35/61
Operationof themodel
Virtualtransmission
Real datatransmission
Applicationlayer entity
Session layer entity
Transportlayer entity
Network layer entity
Datalink layer entity
Presentationlayer entity
Intermediate
Network layer entity
Datalink layer entity
Intermediate
Network layer entity
Datalink layer entity
Endsystem
Applicationlayer entity
Session layer entity
Transportlayer entity
Network layer entity
Presentationlayer entity
Datalink layer entity
Physical medium
Endsystem
Physical layer entity
Physical layer entity
Physical layer entity
Physical layer entity
7/28/2019 02computer Network Basics
36/61
Names of the Nodes, Connections andData Units
Layer name Node Connection Data unit
Application layer application network service e.g. file (ADU)
Presentation layer host session data structure (PPDU)
Session layer host transport connection message (SPDU)
Transport layer host network path message (TPDU)
Network layer host, router line (data)packet (NPDU)
(Data)link layer station (physical) channel (data)frame (LLC PDU)
Physical layer switch physical transmissionmedium
bit
7/28/2019 02computer Network Basics
37/61
Communication among the layers
Connection oriented network service(virtual circuits, eg. ATM )
Reliable transport service Unreliable transport serviceConnectionless network service(datagram service, eg. IP )
Reliable transport service (eg. TCP) Unreliable transport service (eg. UDP)
7/28/2019 02computer Network Basics
38/61
Network Tools
Repeater : connects network segmentslogically to one networkHub : multiport repeaterBridge : datalink level connection of twonetworksSwitch : multiport bridgeRouter : connects networks that arecompatible in transport level
subnetworks are connected to the interfaces ofthe repeater
Gateway (proxy server) : router betweentwo individual network. The Way Out
7/28/2019 02computer Network Basics
39/61
Physical Layer Devices
Repeater
Hubdumb level-1 hubmulti-port repeater
7/28/2019 02computer Network Basics
40/61
Data Link Layer Devices
BridgeCascaded vs. BackboneSingle
Multiple
Switch (switched hub)
7/28/2019 02computer Network Basics
41/61
Routers
Provide link between networksAccommodate network differences:
Addressing schemes
Maximum packet sizesHardware and software interfacesNetwork reliability
Congestion/Traffic Management
7/28/2019 02computer Network Basics
42/61
Devices of the Network Connection
Application layer
Presentation layer
Session layer
Transport layer
Datalink layer
Network layer
Physical layer
Gateway
or
Proxy server
Router or Gateway
Bridge or Switch
Repeater or Hub
Application layer
Presentation layer
Session layer
Transport layer
Datalink layer
Network layer
Physical layer
7/28/2019 02computer Network Basics
43/61
Architectural Implementation of theLANs
Ethernet (IEEE 802.3)FDDIGigabit EthernetToken Bus (IEEE 802.4)Token Ring (IEEE 802.5)
7/28/2019 02computer Network Basics
44/61
Characteristics of High-Speed LANs
Fast Ethernet Gigabit Ethernet Fibre Channel Wireless LAN
Data Rate 100 Mbps 1 Gbps, 10 Gbps 100 Mbps 3.2Gbps 1 Mbps 2 Gbps
Transmission Mode UTP,STP, OpticalFiberUTP, shielded
cable, optical fiberOptical fiber,
coaxial cable, STP2.4 GHz, 5 GHz
Microwave
Access Method CSMA/CD CSMA/CD Switched CSMA/CA Polling
SupportingStandard IEEE 802.3 IEEE 802.3
Fibre ChannelAssociation IEEE 802.11
7/28/2019 02computer Network Basics
45/61
Wide Area Network Connections
Solutions for connecting LANs to theInternet
Ethernet (ring or star topology) Managed Leased Line Network (MLLN)ATM (Asynchronous Transfer Mode)Switched line
ISDN line
f d d
7/28/2019 02computer Network Basics
46/61
Soft and Hard States
State: the data collection, which are necessary forkeeping the connection between two protocol entitiesHard state
If the connection is established once, it is never timed out, evenif it is not in usageTo cancel the connection one of the participants of the connectionmust explicitly close itThe history of the state is stored
Soft state To keep the connection the participants must send occasionallykeep-alive messages, since without keep-alive message the stateinformation is timed out after a certain periodThe state is called as soft since in the ordinary operation thestate can change easilyThe history of the state is not stored
7/28/2019 02computer Network Basics
47/61
Packet switching versus circuit switching
Great for bursty dataresource sharingno call setup (less start-up delay)
HoweverPackets can experience delays , so not for real -timeapplicationsexcessive congestion leads to packet delay and loss
protocols (like TCP) are needed for reliable datatransfer, and congestion control
Is packet switching best in every case?
P f C id i
7/28/2019 02computer Network Basics
48/61
Performance ConsiderationsBefore continue, need some performance metrics
Overhead: CPU time to put packet on wire
Throughput: Maximum number of bytes per second Depends on wire speed, but also limited by slowest router (routingdelay) or by congestion at routers
Latency: time until first bit of packet arrives at receiver Raw transfer time + overhead at each routing hop
Contributions to LatencyWire latency: depends on speed of light on wire
about 11.5 ns/footRouter latency: depends on internals of router
Could be < 1 ms (for a good router)
Router Router
LR1 LR2 LW1 LW2 Lw3
7/28/2019 02computer Network Basics
49/61
Delay in packet-switched networks
packets experience delayon end-to-end pathfour sources of delayat each hop
Nodal processing : check bit errorsdetermine output link
Queueing :time waiting at output
link for transmissiondepends on congestionlevel of router
A
B
propagation transmission
nodalprocessing queueing
7/28/2019 02computer Network Basics
50/61
Delay in packet-switched networks
Transmission delay : R=link bandwidth (bps)L=packet length (bits)time to send bits intolink = L/R
Propagation delay :d = length of physical links = propagation speed inmedium (~2x108 m/sec)
propagation delay = d/s
A
B
propagation transmission
nodal
processing queueing
7/28/2019 02computer Network Basics
51/61
Queueing delay (revisited)
R=link bandwidth (bps)L=packet length (bits)a=average packetarrival rate
traffic intensity = La/R
La/R ~ 0: average queueing delay smallLa/R -> 1: delays become largeLa/R > 1: more work arriving than can beserviced, average delay infinite!
I l k
7/28/2019 02computer Network Basics
52/61
Internet protocol stack
Application:supporting networkapplicationsftp, smtp, http
Transport: host-host data transfertcp, udp
Network: routing of datagrams fromsource to destinationip, routing protocols
Network access: data transfer betweenneighboring network elements
ppp, ethernetPhysical: bits on the wire
7/28/2019 02computer Network Basics
53/61
Layering: logical communication
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical application
transportnetworklink
physical
application
transportnetworklink
physical
networklinkphysical
data
data
E.g.: transport take data from appadd addressing,reliability checkinfo to formdatagram send datagram topeerwait for peer toack receiptanalogy: postoffice
data
transport
transport
ack
7/28/2019 02computer Network Basics
54/61
Layering: physical communication
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical application
transportnetworklink
physical
applicationtransportnetwork
linkphysical
networklink
physical
data
data
7/28/2019 02computer Network Basics
55/61
Protocol layering and data
Each layer takes data from aboveadds header information to create new data unitpasses new data unit to layer below
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
source destinationM M M M
Ht Ht Hn Ht Hn Hl
M M M M
Ht Ht Hn Ht Hn Hl
message segment datagram frame
7/28/2019 02computer Network Basics
56/61
IP over ATM
ATM AdaptationLayer (AAL): interface to upperlayers
end-systemsegmentation/rea
ssemblyATM Layer: cellswitchingPhysical
AAL5ATM
physical
AAL5ATM
physical
AAL5ATM
physical
AAL5ATMphysical
ATMphysical
applicationTCP/UDP
IP
applicationTCP/UDP
IP
applicationTCP/UDP
IP
applicationTCP/UDP
IP
7/28/2019 02computer Network Basics
57/61
Physical
Data Link
Network
Transport
Session
Presentation
Application
Network Access
IP
TCP UDP
Application
Sockets
The Internet Protocol Stack
N t k P t l
7/28/2019 02computer Network Basics
58/61
Network ProtocolsProtocol: Agreement between two parties as to howinformation is to be transmitted
Example: system calls are the protocol between the operatingsystem and applicationNetworking examples: many levels
Physical level: mechanical and electrical network (e.g. how are 0 and 1represented)
Link level: packet formats/error control (for instance, the CSMA/CDprotocol)
Network level: network routing, addressing Transport Level: reliable message delivery
Protocols on todays Internet:
Ethernet ATM Packet radio
IPUDP TCP
RPCNFS WWW e-mail ssh
Physical/Link
Network
Transport
B ilding a messaging ser ice
7/28/2019 02computer Network Basics
59/61
Building a messaging serviceProcess to process communication
Basic routing gets packets from machine machine
What we really want is routing from process process Example: ssh, email, ftp, web browsingSeveral IP protocols include notion of a port , which isa 16-bit identifiers used in addition to IP addresses
A communication channel (connection) defined by 5 items:[source address, source port, dest address, dest port, protocol]
UDP: The User Datagram ProtocolUDP layered on top of basic IP (IP Protocol 17)
Unreliable, unordered, user-to-user communication
UDP Data
16-bit UDP length 16-bit UDP checksum16-bit source port 16-bit destination port
IP Header(20 bytes)
B ilding mess ging ser ice (cont)
7/28/2019 02computer Network Basics
60/61
Building a messaging service (con t) UDP: The Unreliable Datagram Protocol
Datagram: an unreliable, unordered, packet sent from
source user dest user (Call it UDP/IP)Important aspect: low overhead! Often used for high-bandwidth video streams Many uses of UDP considered anti -social none of the well -
behaved aspects of (say) TCP/IP
But we need ordered messagesCreate ordered messages on top of unordered ones IP can reorder packets! P 0,P1 might arrive as P 1,P0
How to fix this? Assign sequence numbers to packets 0,1,2,3,4.. If packets arrive out of order, reorder before delivering touser application For instance, hold onto #3 until #2 arrives, etc.
Sequence numbers are specific to particular connection
TCP/IP k t Eth t f
7/28/2019 02computer Network Basics
61/61
Message
TCP/IP packet, Ethernet frameApplication sends message
TCP data
TCP Header
IP Header
IP DataEH
Ethernet Hdr
Ethernet Hdr
TCP breaks into 64KBsegments, adds 20B header
IP adds 20B header, sendsto networkIf Ethernet, broken into1500B frames with headers,trailers (24B)All Headers, trailers havelength field, destination, ...