Introduction to Computer Networks Slides For Week 1
Dec 31, 2015
Course Goals
Understand the basic principles of computer networks
Understand the Internet and its protocols Understand the key design principles used to build
the Internet Experience building network systems Course is not about specific skills
E.g. configure a router from company X vs. learn principles of how all routers work
Success means you are confident to tackle a range of network programming, design and maintenance.
2 Introduction to Computer Networks
Why Study Networks?
Integral part of society Work, entertainment, community
Pervasive Home, car, office, school, mall …
Huge impact on people and society Person-to-person and group communication
email, blogs, chat Form and strengthen communities
chat rooms, newsgroups ... Commerce, services, entertainment, socializing
4 Introduction to Computer Networks
Concepts for this week
What is the Internet? What is a network? Core and Edge of the Internet Circuit, message and packet switching
Layering and encapsulation Network delay analysis
5 Introduction to Computer Networks
Lets start at the beginning…
7
What is a network for? To allow two or more endpoints to communicate Is Cable T.V. a network?
– yes.
What is a computer network? Nodes connected by links Nodes are computers:
Processing ability Receive and transmit information (unlike televisions).
Is this a Network?
Yes, not an interesting one..
Introduction to Computer Networks
Other Networks (network topologies)
8
Ring Star (Hub and Spoke)
Hierarchical Broadcast
Introduction to Computer Networks
Data Networks
9
Data networks are Packet Switching Networks Data is carried in packets and is switched between
routers Every packet carries its destination address and is routed
according to current network conditions. There is no fixed route between every pair of end points.
Telephone networks are Circuit Switched Networks Voice is carried over a predetermined circuit between
two phones. The route is established before any of the data is sent, and
then the data is sent (like a phone call – you first call, have a connection, and then talk).
Data is also carried (e.g., fax). But it is not a data network!
Introduction to Computer Networks
Data Types
10
Non-Isochronous Isochronous
Examples: mail, web files, P2P traffic, etc.
Examples: voice, live broadcast
Arrival rate is undetermined, bursty. Jitter (variation of delay between subsequent packets) is unknown, and not important.
Arrival rate is predetermined and jitter should be fixed. E.g., packet every 0.25 msec.
Delay is possible. For example, your email cab be delayed by a few seconds.
Delay is critical and bounded. Maximal possible delay is ~ 30-70 msecs.
Packet loss can be taken care of by the network, and missing packets can be retransmitted, so that the receiving side receives the complete data sent.
Packets lost cannot be resent due to the maximal delay limitation.
Ideal for packet switching Ideal for circuit switching
Introduction to Computer Networks
The Internet
11
Built initially for non-isochronous data Hence, a packet switching architecture.
Today we see that the world moves towards integration of networks: carry data, voice, TV over the Internet. Termed: everything over IP
(We will see later what that means)
Why not use circuit switching (telephone network)? There was a big debate, of course, but telephone
networks are less efficient for routing bursty data (Internet data).
In this course we study a packet switching network:The Internet.
Introduction to Computer Networks
What is Internet Technology? What is an internet?
Network of networks What is the Internet?
A global internet based on the IP protocol
To what does “Internet technology” refer? Architecture
Services We will learn the protocols which enable
the services, and understand the architecture it is built over.
Protocols
12 Introduction to Computer Networks
Architecture-wise
Host: Machine running user application
Media: Physical process used (copper wire, fiber optics, satellite link)
Company A
Company B
Internet Service Provider 1
ISP 2
13 Introduction to Computer Networks
14
Architecture-wise
Network : Collection of interconnected machines or interconnected LANs (subnetworks)
Router: decide where to send data next
Company A
Company B
Internet Service Provider 1 (ISP 1)
ISP 2
Introduction to Computer Networks
15
Architecture-wise
Company A
Company B
ISP 2
Core Networks (ISP tiers)•Tier 1: Biggest ISPs •Tier 2 and 3: Regional and very small.
Internet Service Provider 1 (ISP 1)
Edge Networks: Companies, organizations with a “default route” Introduction to Computer Networks
Networks Today
16
Default Route Networks: Campus, Company
Local Area Networks (LANs) for labs, or certain floors
Virtual LANs
Edge Networks:
Small Internet Service Providers
Metropolitan
Core Networks:
Wide Area Network
The Internet: Core + Edge Networks
Introduction to Computer Networks
Networks Legendary Scaling
17
Inter-processorDistance
Processors LocatedIn Same
1 m Square meter Personal Area Network
10m
100m
1km
Room
Building
Campus
Local Area Network
10 km City Metropolitan Area
Network
100 km
1000km
Country
ContinentWide Area Network
10000 km Planet The Internet
Introduction to Computer Networks
Local Area Network (LAN)
18
Limited Size Run at speeds of 10Mbs, 100 Mbs, 1Gbps, 10
Gbps Legend topology: Ethernet (broadcast) Example: PC farm with servers and printers. Today:
Switched computers and nodes.
Introduction to Computer Networks
Service-wise (applications) Electronic mail Remote terminal File transfer Newsgroups File sharing Resource distribution World Wide Web Video conferencing Games
19 Introduction to Computer Networks
Enabling A Service
20
The user, at home, is requesting page www.mta.ac.il The network (Internet) should figure:
1. Which server is www.mta.ac.il? (all computers use numbers. Most people seem to prefer names).
2. Which Route to use for user’s request?3. What format to use for sender request and receiver’s
reply? (maybe data should be encrypted) 4. What to do if the message gets corrupted along the
way?5. What to do if a routing computer fails along the way?6. Maybe the server restricts access to this page, is this
user ok?7. What if the page content was moved to another server,
or was deleted?8. What if user logged off or pressed “refresh” before
transmission was completed? ….Introduction to Computer Networks
Protocols The Internet uses the TCP/IP protocol suite
Architecture Service Rules of communication Divided to layers
…
FTP HTTP RTP TFTP
TCP UDP
IP
Ethernet 802.11 PPP
CAT-5 Single-ModeFiber
RS-232
21 Introduction to Computer Networks
Layering
22
An important and basic principle in computer networks
Divide the work hierarchically: each layer is a separate entity that maintains its part.
Application
Transport
Network
Host-to-Net *(Link layer)
Host
The application layer receives or transmits the data to/from the application
The Transport layer is responsible to packetize the data and transmit it without errors to the end host
The Network layer is responsible to choose the next hop(a neighbor network node) and route the packets to it
The Host-to-net layer is responsible to send the data over the attached physical link in its format and * host-to-net layer is also called the link layer
Introduction to Computer Networks
TCP/IP Layering Architecture
Application Protocolend-to-end communication
Transport Protocol (TCP)end-to-end communication
ApplicationLayer
TransportLayer
NetworkLayer
Link Layer
Host A Host B
ApplicationLayer
TransportLayer
NetworkLayer
Link Layer
NetworkLayer
Link Layer
NetworkLayer
Link Layer
IPIP IP
23 Introduction to Computer Networks
Layering and Encapsulation
24
Use layers to hide complexity, each layer implements a service:
Layer N uses service provided by layer N-1 layer N-1 provides a service to layer N
This is done using encapsulation: Treat the neighbouring layer’s information as a
“black box”, can’t look inside or break message Sending: add information needed by the current
layer “around” the higher layers’ data headers in front trailers in back
Receiving: Strip off headers and trailers before handing up the stack
Introduction to Computer Networks
Layering (cont.)
26
data
dataTransport layer header
Network layer headerdata
Transport layer header
Network layer headerdata
Transport layer header
Host-to-net layer header
At the sending host
A Packet
A Frame
Host sends the frame on the attached linkIntroduction to Computer Networks
Layers (cont.)
27
At the receiving host The frame arrives on the attached link
data
dataTransport layer header
Network layer headerdata
Transport layer header
Network layer headerdata
Transport layer header
Host-to-net layer header
Data is delivered to the application at the receiving hostIntroduction to Computer Networks
ISO OSI Layering Architecture –The reference model
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
Application Protocol
Transport Protocol
Presentation Protocol
Session Protocol
Host A Host BApplication
Layer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
Router Router28 Introduction to Computer Networks
ISO’s Design Principles
A layer should be created where a different level of abstraction is needed
Each layer should perform a well-defined function
The layer boundaries should be chosen to minimize information flow across the interfaces
The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity, and small enough that the architecture does not become unwieldy
29 Introduction to Computer Networks
Who is who?
30
ISO - International Organization for Standardization ISO 9000, etc.
IETF – The Internet Engineering Task Force: Near term, standardized oriented group, divided into disciplines such as: applications, routing, addressing, etc.
IRTF – The Internet Research Task Force: Pursue long term research projects
RFCs: Requests For Comment Some become official standards http://www.rfc-editor.org Look for “aviation over IP” (aka birds)…
Introduction to Computer Networks
Host-to-net Layer
31
Receives a data packet from the network layer
Creates a frame of bits Signal the start and end of a frame (usually by a
string of known bits)
Add error correcting codes to enable transmission even on noisy channels
Collision detection and retransmissions
What is the time it takes to transmit and receive a frame on a link?
Introduction to Computer Networks
Link Delay
32
Two factors
Propagation delay = Distance / Speed of light Time for bits to “move across wires”
Transmission delay = Packet size / BandwidthTime to “get bits on wires”
Introduction to Computer Networks
Transmission vs. Prop. delay
A single transmission link as a water pipe
The thicker the pipe, the more water it can carry from one end to the other in each unit time
Water is carried from one end of the pipe to the other at constant speed, no matter how thick the pipe is
Water = Data bits
Thickness of the pipe = Channel capacity (bandwidth)
Speed of water through the pipe = Propagation speed (light speed)
33 Introduction to Computer Networks
Transmission vs. Prop. Delay (cont)
pipe
1. Propagation delay is how long takes to cross the pipe, irrespective of volume
2. Transmission (bandwidth delay) is related to how much water can be pushed in through the opening per unit time
34 Introduction to Computer Networks
1500 x 8 bits
Transmission TimeHow long does it take A to transmit an entire packet on the link?
Relevant information: packet length = 1500 bytes channel capacity = 100
Mbps
Another way to ask this question:If the link can transmit 100 million bits in a second, how many seconds does it take to transmit 1500 bytes (8x1500 bits)?
100 Mbits
1 sec=
t
Solving for t… t = 0.00012 sec (or 120 sec)
35 Introduction to Computer Networks
Propagation Delay
How long does it take a single bit to travel on the link from A to B?
Relevant information: link distance = 500 m prop. delay factor = 5 sec/km
Another way to ask this question:If it takes a signal 5 sec to travel 1 kilometer, then how long does it take a signal to travel 500 meters?
5 sec
1000 m=
500 m
t Solving for t…t = 2.5 sec
36 Introduction to Computer Networks
Units Bits are the units used to describe an amount of data in a
network 1 kilobit (Kbit) ~1 x 103 bits = 1,000 bits 1 megabit (Mbit)~1 x 106 bits = 1,000,000 bits 1 gigabit (Gbit) ~1 x 109 bits = 1,000,000,000 bits
Seconds are the units used to measure time 1 millisecond (msec) = 1 x 10-3 seconds = 0.001 seconds 1 microsecond (sec) = 1 x 10-6 seconds = 0.000001 seconds 1 nanosecond (nsec) = 1 x 10-9 seconds = 0.000000001 seconds
Bits per second are the units used to measure channel capacity/bandwidth and throughput bit per second (bps) kilobits per second (Kbps) megabits per second (Mbps)
Bytes are units that describe a series of eight bits 1 Byte = 8 bits Bytes per second (Bps)
37 Introduction to Computer Networks
Processing Delay Stylized format required to send data Analogy: adding and removing envelopes to
letters How long does it take to execute all these
layers?
ApplicationLayer
TransportLayer
NetworkLayer
Host-to-Net Layer
Host
Why is this time important?
NetworkLayer
Host-to-Net Layer
Router
ApplicationLayer
TransportLayer
NetworkLayer
Host-to-Net Layer
Host
38 Introduction to Computer Networks
Example
Protocol Processing Time = 40 sec packet length = 1500 bytes
channel capacity = 100 Mbpspropagation delay factor = 5 sec/km
A B
500 m
1. How long to format the data?
2. How long does it take a single bit to travel on the link from A to B?
3. How long does it take A to transmit an entire packet onto the link?
39 Introduction to Computer Networks