network basics
DESCRIPTION
networksTRANSCRIPT
![Page 1: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/1.jpg)
1
Fundamentals of Computer Networks
Guevara Noubir
Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann
Fundamentals of Computer Networks Internetworking
![Page 2: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/2.jpg)
2
What is CS4700/CS5700 about? • Goal:
– Convey the principles and mechanisms to build a computer network that can scale:
• Grow to a global proportion • Support diverse applications
– Special attention is given to the Internet protocols and architecture
• How? a combination of – Lectures on principles/concepts, mechanisms/algorithms, performance
analysis techniques – Practical assignments to develop network protocols and applications – Conceptual assignment to understand how performance is optimized
Fundamentals of Computer Networks Internetworking
![Page 3: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/3.jpg)
3
Course Outline • Introduction to internetworking: principles, concepts,
architecture, services • Direct link networks • Routing • End to end protocols: e.g., TCP, UDP • Congestion control/congestion avoidance • Multicast and overlay routing over the internet • Wireless and mobile networks • Internet security • Applications: www, mail, content distribution networks, p2p • Queuing theory: dimensioning and performance prediction
Fundamentals of Computer Networks Internetworking
![Page 4: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/4.jpg)
4
Outline of Lecture 1
• Requirements
• Architecture
• Implementation
Read Chapter 1 of textbook Fundamentals of Computer Networks Internetworking
![Page 5: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/5.jpg)
5
Requirements
• Computer networks are different from classical networks: – General – Not optimized for a specific application
• Requirements differ according to the perspective: – Application programmer: services – Network designer: resource efficiency and fairness – Network provider: administration, manageability,
accountability, security
Fundamentals of Computer Networks Internetworking
![Page 6: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/6.jpg)
6
Requirements
• Connectivity • Cost-Effective Resource Sharing • Support for Common Services • Performance
Fundamentals of Computer Networks Internetworking
![Page 7: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/7.jpg)
7
Connectivity • Goal: allow machines to communicate
– Exceptions? • Building blocks:
– Nodes: PC, workstations, special-purpose hardware… • hosts • switches
– Links: coax cable, optical fiber, wireless… • point-to-point
• multiple access (generally limited in size)
…
Fundamentals of Computer Networks Internetworking
![Page 8: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/8.jpg)
8
Connectivity: Switched Networks
– two or more nodes connected by links, or
– two or more networks connected by two or more nodes
• A network can be defined recursively as...
Fundamentals of Computer Networks Internetworking
![Page 9: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/9.jpg)
9
Switching Strategies • Circuit switching: carry bit streams
– On session establishment a path from source to destination is selected. Resources are allocated over all the links of the path. Route does not change during session life.
– Links can be shared by different sessions through mechanisms such time-division multiplexing (TDM) or frequency-division multiplexing (FDM)
– Guarantees: rate and packets delivery in order. – Example: original telephone network
• Packet switching: store-and-forward messages – Links are shared on a “demand basis” vs. fixed allocation – Packets wait in a queue before being transmitted – E.g., Internet mainly made out of packet switching
Fundamentals of Computer Networks Internetworking
![Page 10: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/10.jpg)
10
Addressing and Routing
• Address: byte-string that identifies a node – usually unique
• Routing: process of forwarding messages to the destination node based on its address
• Types of addresses – unicast: node-specific – broadcast: all nodes on the network – multicast: some subset of nodes on the network
Fundamentals of Computer Networks Internetworking
![Page 11: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/11.jpg)
11
Cost-Effective Resource Sharing
Fundamentals of Computer Networks Internetworking
![Page 12: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/12.jpg)
12
Multiplexing
• Time-Division Multiplexing (TDM) • Frequency-Division Multiplexing (FDM)
L1
L2
L3
R1
R2
R3 Switch 1 Switch 2
Fundamentals of Computer Networks Internetworking
![Page 13: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/13.jpg)
13
Statistical Multiplexing • On-demand time-division • Schedule link on a per-packet basis • Packets from different sources interleaved on link • Buffer packets that are contending for the link • Buffer (queue) overflow is called congestion
…
Fundamentals of Computer Networks Internetworking
![Page 14: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/14.jpg)
14
Support for Common Services
• A computer network provides more than packet delivery between nodes
• We don’t want application developers to rewrite for each application higher layer networking services
• The channel is a pipe connecting two applications • How to fill the gap between the underlying network
capability and applications requirements? • Problem: identify a set of common services
– Delivery guarantees, security, delay
Fundamentals of Computer Networks Internetworking
![Page 15: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/15.jpg)
15
Communication Patterns: Types of Applications
• Interactive terminal and computer sessions: – Small packet length, small delay, high reliability
• File transfer: – High packet length, high delay, high reliability
• Voice application: – Small packet length, small delay, small reliability, high arrival rate
• Video-on-demand: – Variable/high packet length, fixed delay, small reliability
• Video-conferencing – Variable/high packet length, small delay, small reliability
Fundamentals of Computer Networks Internetworking
![Page 16: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/16.jpg)
16
Basic Channels • Request/Reply channel:
– Guarantees single copy message delivery – Can provide confidentiality and integrity – Used for file transfer and digital library applications
• Message Stream channel: – Supports one/two-way traffic, multicast – Parameterized for different delays – Does not need to guarantee message delivery – Guarantees order of delivered messages – Used for video-conferencing, video-on-demand
Fundamentals of Computer Networks Internetworking
![Page 17: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/17.jpg)
17
Reliability: What goes wrong in the network?
• Bit-level errors (electrical interference) • Packet-level errors (congestion) • Link and node failures
• Messages are delayed • Messages are deliver out-of-order
• Security: – Authentication, confidentiality, integrity, availability,
Fundamentals of Computer Networks Internetworking
![Page 18: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/18.jpg)
18
Performance Metrics • Bandwidth (throughput)
– data transmitted per time unit – link versus end-to-end – notation
• KB = 210 bytes • Mbps = 106 bits per second
• Latency (delay) – time to send message from point A to point B – one-way versus round-trip time (RTT) – components
Latency = Propagation + Transmit + Queue"Propagation = Distance / c"Transmit = Size / Bandwidth"
– Examples of RTT: LAN, Cross-country link, Satellite Fundamentals of Computer Networks Internetworking
![Page 19: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/19.jpg)
19
Bandwidth versus Latency • Relative importance (e.g., fetch application)
– 1-byte: 1ms vs 100ms (latency) dominates 1Mbps vs 100Mbps (bandwidth)
– 25MB: 1Mbps vs 100Mbps dominates 1ms vs 100ms
• Infinite bandwidth – RTT dominates
• Throughput = TransferSize / TransferTime"• TransferTime = RTT + TransferSize /Bandwidth
– 1-MB file to 1-Gbps link as 1-KB packet to 1-Mbps link (RTT=100ms)
Fundamentals of Computer Networks Internetworking
![Page 20: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/20.jpg)
20
Delay x Bandwidth Product
• Amount of data “in flight” or “in the pipe” • Example: 100ms x 45Mbps = 560KB
• Why is it important to know Delay x Bandwidth product?
Fundamentals of Computer Networks Internetworking
![Page 21: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/21.jpg)
21
Network Architecture
• Layering and Protocols
• ISO Architecture
• Internet architecture
Fundamentals of Computer Networks Internetworking
![Page 22: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/22.jpg)
22
Layering • Use abstractions to hide complexity • Abstractions naturally lead to layering • Alternative abstractions at each layer
Request/reply channel
Message stream channel
Application programs
Hardware
Host-to-host connectivity
Advantages: • Solve small problems vs. monolithic software • Modularity: easily add new services Drawback: • May hide important information
Fundamentals of Computer Networks Internetworking
![Page 23: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/23.jpg)
23
Protocols • Building blocks of a network architecture • Term “protocol” is overloaded
– specification of peer-to-peer interface (rules) – module that implements this interface
• Each protocol object has two different interfaces – service interface: operations on this protocol (SAP) – peer-to-peer interface: form/meaning of messages exchanged with peer
• Protocol stack: set of consecutive layers • Interoperability problems
Fundamentals of Computer Networks Internetworking
![Page 24: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/24.jpg)
24
Host 1
Protocol
Host 2
Protocol
High-level object
High-level object
Service interface
Peer-to-peer interface
Interfaces
Fundamentals of Computer Networks Internetworking
![Page 25: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/25.jpg)
25
Protocol Machinery • Protocol Graph
– most peer-to-peer communication is indirect – peer-to-peer is direct only at hardware level
File application Digital
library application
Video application
RRP MSP
HHP
Host 1 File
application Digital library
application Video
application
RRP MSP
HHP
Host 2
What can we say about this graph?
Fundamentals of Computer Networks Internetworking
![Page 26: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/26.jpg)
26
Machinery (cont) • Multiplexing and Demultiplexing (demux key) • Encapsulation (header/body)
RRP Data HHP
Application program Application
program Host 1 Host 2
Data RRP
RRP Data HHP
Data RRP
RRP Data HHP
Fundamentals of Computer Networks Internetworking
![Page 27: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/27.jpg)
27
Open System Interconnect (OSI) Architecture: Reference Model
Application Presentation
Session Transport
End host
One or more nodes within the network
Network
Data link Physical
Network Data link Physical
Network Data link Physical
Application Presentation
Session Transport
End host
Network
Data link Physical
Fundamentals of Computer Networks Internetworking
![Page 28: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/28.jpg)
28
Physical Layer
• Function: provides a “virtual bit pipe” • How: maps bits into electrical/electromagnetic signals
appropriate for the channel • The physical layer module is called a modem
(modulator/demodulator) • Important issues:
– Timing: synchronous, intermittent synchronous, asynchronous (characters)
– Interfacing the physical layer and DLC (e.g., RS-232, Ethernet, IEEE802.x)
Fundamentals of Computer Networks Internetworking
![Page 29: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/29.jpg)
29
Data Link Control Layer (DLC)
• Receives packets from the network layer and transforms them into bits transmitted by the physical layer. Generally guarantees order and correctness.
• Mechanisms of the DLC: – Framing: header, trailer to separate packets, detect errors… – Multiple access schemes: when the link is shared by several
nodes there is a need for addressing and controlling the access (this entity is called MAC sublayer)
– Error detection and retransmission (LLC sublayer)
Fundamentals of Computer Networks Internetworking
![Page 30: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/30.jpg)
30
Network Layer
• Provides naming/addressing, routing, flow control, and scheduling/queuing in a multi-hop network
• Makes decisions based on packet header (e.g., destination address) and module stored information (e.g., routing tables)
• General comment: each layer looks only at its corresponding header (here packet header)
• Routing is different on virtual circuit networks than on datagram networks
Fundamentals of Computer Networks Internetworking
![Page 31: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/31.jpg)
31
Transport Layer
• Provides a reliable mean to transmit messages between two end-nodes through: – Messages fragmentation into packets – Packets reassembly in original order – Sessions multiplexing and splitting – Retransmission of lost packets – End-to-end flow control – Congestion control
Fundamentals of Computer Networks Internetworking
![Page 32: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/32.jpg)
32
Session Layer
• Was intended to handle the interaction between two end points in setting up a session: – multiple connections – Service location (e.g., would achieve load sharing) – Checkpointing – Control of access rights
• In many networks these functionalities are inexistent or spread over other layers
Fundamentals of Computer Networks Internetworking
![Page 33: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/33.jpg)
33
Presentation Layer
• Provides data encryption, data compression, and code conversion.
Fundamentals of Computer Networks Internetworking
![Page 34: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/34.jpg)
34
Application Layer
• What’s left … • Examples
– http (web), smtp (mail), telnet, rtp (voip) …
Fundamentals of Computer Networks Internetworking
![Page 35: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/35.jpg)
35
Internet Architecture • Defined by Internet Engineering Task Force (IETF) • IETF requires working implementations for standard
adoption • Application vs. Application Protocol (SSH, HTTP)
…
SSH HTTP DHCP DNS
TCP UDP
IP
NET 1 NET 2 NET n Fundamentals of Computer Networks Internetworking
![Page 36: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/36.jpg)
36
Implementing Network Software
• Success of the internet is partially due to: – Minimal functionality within the network – Most of the functionality running as software over general-
purpose computers
• Simple Application Programming Interface • Efficient Protocol implementation
• Today, clean-slate initiatives e.g., GENI
Fundamentals of Computer Networks Internetworking
![Page 37: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/37.jpg)
37
Application Programming Interface
• Each OS can have a special interface exported by the network to the applications developer
• Most widely used network API is: socket interface – Initially developed by the Berkeley Distribution of Unix and
today ported to almost all OS – int socket( int domain, /* PF_INET, PF_UNIX */
int type, /* SOCK_STREAM, SOCK_DGRAM */ int protocol)
Fundamentals of Computer Networks Internetworking
![Page 38: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/38.jpg)
38
Client/Server Sockets (TCP)
• Client: – socket, connect, (send, recv)*, close
• Server: – socket, bind, listen, (accept, (recv, send)*, close)*
• int connect (int socket, struct sockaddr *address, int addr_len) • int send (int socket, char *message, int msg_len, int flags) • int recv (int socket, char *buffer, int buf_len, int flags)
• int bind (int socket, struct sockaddr *address, int addr_len) • int listen (int socket, int backlog) • int accept (int socket, struct sockaddr *address, int *addr_len)
Fundamentals of Computer Networks Internetworking
![Page 39: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/39.jpg)
39
Protocol Implementation Issues
• Process model: – Process-per-protocol vs. process-per-message
• Efficient message buffers management – Avoid copying – Encapsulation operations without copying: msgAddHdr,
msgStripHdr • Efficient events management:
– Scheduling and cancellation
Fundamentals of Computer Networks Internetworking
![Page 40: network basics](https://reader033.vdocuments.us/reader033/viewer/2022052906/558e26f71a28ab741f8b475b/html5/thumbnails/40.jpg)
40
Summary • The explosive growth of the internet (and computer networks)
is mainly due to the easy way of adding new functionalities by running software on affordable general purpose computers
• Internet is a living systems – dominance of email, web, P2P, streaming
• Goal of the course is to: – understand the principles for designing and optimizing, networks
mechanisms, and protocols – learn to develop networked applications
• Requirements, Architecture, Implementation Fundamentals of Computer Networks Internetworking