Uploaded by Pronaya Bhattacharya

Chapter1

advertisement
Introduction to This Class
•
•
•
•
•
Instructor: Stephan Bohacek
bohacek@udel.edu, 302-831-4274
http://www.eecis.udel.edu/~bohacek
Textbook: Kurose and Ross: Computer Networks (6th edition)
Web page has
–
–
–
–
–
–
syllabus
class notes
videos lectures of some topics (most, but not all topics are covered)
homework assignments
project assignments
announcements
• Issues
– Programming languages: C++ or java?
– Computers:
• >=2GB ram?
• Windows or Linux?
Introduction to Data Networking
Kurose and Ross: Computer Networking: A Top Down Approach
• Chapter 1: Overview and
general principles
– Protocol stack
– Sharing
• Statistic multiplexing
• Packet switching
• Circuit switching
– Performance of packet
switching networks
• Chapter 2: Application
layer
– TCP and UDP,
multiplexing and ports
– Applications
• http, ftp, email, DNS, P2P,
DHT
• Chapter 3: Transport layer
– Tools for reliable transport
– TCP
• Chapter 4: Network layer
– IP and IPv6
– NAT
– Routing
• Intra-network routing
• Inter-network routing
• Chapter 5: Datalink and
MAC layer
–
–
–
–
–
Multiple access
ARP
Ethernet
Switches and hubs
Link layer routing
The Internet
• What is the longest time that you have gone without using “the
Internet?”
• What is the Internet?
• How do you use the Internet?
• Do you only watch TV over the Internet, or do you have cable?
• Skype?
• Facebook?
• IM?
• Twitter?
• Smart phone?
• Do you only have a data plan on your phone?
What is the Internet
Networking Basics
•
•
•
•
Core components of the Internet – the protocol stack
Multiplexing, circuit switching, and packet switching
Loss and delays
The structure of the Internet
Networking Basics
•
•
•
•
Core components of the Internet – the protocol stack
Multiplexing, circuit switching, and packet switching
Loss and delays
The structure of the Internet
The Internet
• Objective: split an application across multiple machines
– Web client and web server
• Option 1: users get a DVD of the NY Times every day
• Option 2: Split the NY Times application into 2 parts. The client part of the
application runs on the users machine and the server part runs in NY Times
headquarters. NY Times reporters can load articles on to the server and the
client can get articles from the server and read them on their machine
– Email
• Option 1: Write a letter on paper and mail it to its destination.
• Option 2: Write an email on one machine and allow this message to be sent to
the destination machine
– Buy something
• Option 1: go to the store, see item, pick up item and pay for it
• Option 2: The client machine can explore all items via a GUI. When an item is
selected for purchase, the vendor is notified, credit card is charged, and the
item is sent
• Key derived requirement: send message between machines
– These are distributed applications
• The task of sending messages between machine is very complicated
– To solve this task, we subdivide it into subtasks. Wht?
The Internet
• Objective: split an application across multiple machines
• Key derived requirement: send message between machines
– These are distributed applications
• The task of sending messages between machine is very complicated
– To solve this task, we subdivide it into subtasks. Why
– Each task is easier to solve
– If we have multiple solutions for a subtask, perhaps we can use different
solutions at different times
• E.g., a solution for wired networks and a solution for wireless. It is easier to
solved these specific tasks then a very general one (e.g., one that must for for
wired and wireless networks)
• Subtasks are called the protocol stack
–
–
–
–
–
Application layer
Transport layer
Network layer
Link layer
Physical Layer (Not covered in this course. Communication theory covers
this topic)
Application Layer – where the applications live
Protocol Stack
7. Application
4. Transport
3. Network
2. Data link
1. Physical
•
Email:
–
•
Web:
–
•
Rules/protocols for how the end-hosts gets a web page from the web servers
Question:
–
–
•
Rules/protocols for how an end-host gets mail from the mail server
How is a networking application different from a non-networking application
(e.g., MS Word). That is, why, when talking about networking application, do
we focus on protocols, but do not focus on protocols when discussing nonnetworked applications such as MS-Word?
Answer: The networking applications must communicate, and rules are required
to define the communication.
Roles that end-hosts play:
–
–
Client, server, and peer
The client asks the server for a service.
•
•
•
–
•
The protocol stack
E.g., The client asks the server to send a mail for it.
The client asks the server for a web page
The client asks the server to translate a web address to an IP address.
Peer: A host can act as both a client and a server. But usually in one transaction,
the host takes only one role
Application layer defined messages
Layers 2-4
Protocol Stack
7. Application
4. Transport
3. Network
2. Data link
1. Physical
Definition: End-host
Which are the end-host?
client
server
Routers
The protocol stack
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
Packets

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
•
•
–
–
–
–
•
Web
Email
File transfer
File sharing
Goal: move messages from between end-hosts
Approach: break the problem into little pieces.
Each piece is a layer in the “protocol stack”
TCP
UDP
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
client
server
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Packets
client
server

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
Top down approach of breaking problems into small pieces
4. Transport layer
• Reliability: The server must make sure that the client gets the data
Congestion control (or lack there of) (http://www.youtube.com/watch?v=RjrEQaG5jPM
• Congestion Control: The server should send data as fast as possible, but not too fast
• TCP provides these features (services), while UDP does not
3. Network layer (could be called the routing layer, but it isn’t)
• The packets must find their way through the network.
• Each packet has the IP address of the destination
• By examining the IP address, routers decide where to send the packet next
2. Link Layer or MAC layer (link layer and MAC layer)
• Links connect the routers/gateways and end-hosts
• This layer provides logical and control for communicating across links.
• Services that this layer might provide include
• congestion control, media access, error detection/correction
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Top down approach of breaking problems into small pieces
…..
2.
Link Layer or MAC layer (link layer and MAC layer)
•
Links connect the routers/gateways and end-hosts
•
This layer provides logical and control for communicating across links.
•
Services that this layer might provide include congestion control, media access,
error detection/correction
Packets

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
•
•
Media access. The “air” is a shared medium. If two nodes transmit at the same time,
there will be a collision. Thus, a scheme must be developed to determine which
node transmits when.
Error detection/correction. If interference does occur, then errors might occur. If an
error is detected, then
1. the error could be corrected with forward error correction, or
2. the receiving link could request a retransmission
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Packets

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
client
server
Top down approach of breaking problems into small pieces
4.
Transport layer
1.
Reliability: The server must make sure that the client gets the data
Congestion control (or lack there of)
2.
Congestion Control: The server should send data as fast as possible, but not too fast
3.
TCP provides these features (services), while UDP does not
3.
Network layer (could be called the routing layer, but it isn’t)
1.
The packets must find their way through the network.
2.
Each packet has the IP address of the destination
3.
By examining the IP address, routers decide where to send the packet next
2.
Link Layer or MAC layer
1.
Links connect the routers/gateways and end-hosts
2.
This layer provides logical and control for communicating across links.
3.
Services that this layer might provide include
1.
congestion control, media access, error detection/correction
1.
Physical layer
1.
Logical bits are encoded as physical quantities, e.g., as voltage levels, as shifts in phase, …
2.
This course does not cover the physical layer
Protocols
•
•
End-hosts
Applications
–
–
–
–
•
Packets
–
–
•
•
TCP
UDP
Routers and gateways
and groups of routers
(ISPs)
Links
–
–
–
–
•
Web
Email
File transfer
File sharing
Fiber
Coaxial
Twisted pair
Wireless
Protocols
The protocol stack
protocols define format, order of msgs sent and received
among network entities, and actions taken on msg
transmission, receipt
Hi
TCP connection
request
Hi
TCP connection
response
Got the
time?
Get http://www.awl.com/kurose-ross
2:00
<file>
time
Core components
•
•
End-hosts
Applications
–
•
Packets
–
–
•
•
TCP
UDP
Routers and gateways
and groups of routers
(ISPs)
Links
–
•
?
?
Protocols
Core components
•
•
End-hosts
Applications
–
–
–
–
•
Packets
–
–
•
•
TCP
UDP
Routers and gateways
and groups of routers
(ISPs)
Links
–
–
–
–
•
Web
Email
File transfer
File sharing
Fiber
Coaxial
Twisted pair
Wireless
Protocols
Application Layer – where the applications live
•
•
End-hosts
Applications
–
–
–
–
•
•
–
•
•
TCP
UDP
Fiber
Coaxial
Twisted pair
Wireless
Protocols
The protocol stack
Rules/protocols for how an end-host gets mail from the mail server
Web:
–
Routers and gateways
and groups of routers •
(ISPs)
Links
–
–
–
–
•
Email:
Rules/protocols for how the end-hosts gets a web page from the web servers
Question:
–
Packets
–
–
•
Web
Email
File transfer
File sharing
•
–
How is a networking application different from a non-networking application
(e.g., MS Word). That is, why, when talking about networking application, do
we focus on protocols, but do not focus on protocols when discussing nonnetworked applications such as MS-Word?
Answer: The networking applications must communicate, and rules are required
to define the communication.
Roles that end-hosts play:
–
–
Client, server, and peer
The client asks the server for a service.
•
•
•
–
E.g., The client asks the server to send a mail for it.
The client asks the server for a web page
The client asks the server to translate a web address to an IP address.
Peer: A host can act as both a client and a server. But usually in one transaction,
the host takes only one role
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•

Routers and gateways 
and groups of routers

(ISPs)

Links


Protocols
–
–
–
–
•
Web
Email
File transfer
File sharing
Packets
–
–
•
Which are the end-host?
TCP
UDP
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
client
server
Routers
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
–
–
•
Why is this a good approach?
1.Small problems are easier to
understand/solve.
2.Different solutions can be
mixed and matched
Packets
–
–
•
Web
Email
File transfer
File sharing
Goal: move messages from server to the client
Approach: break the problem into little pieces.
Each piece is a layer in the “protocol stack”
TCP
UDP
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
client
server
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Packets
client
server

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
Top down approach of breaking problems into small pieces
4. Transport layer
• Reliability: The server must make sure that the client gets the data
Congestion control (or lack there of) (http://www.youtube.com/watch?v=RjrEQaG5jPM
• Congestion Control: The server should send data as fast as possible, but not too fast
• TCP provides these features (services), while UDP does not
3. Network layer (could be called the routing layer, but it isn’t)
• The packets must find their way through the network.
• Each packet has the IP address of the destination
• By examining the IP address, routers decide where to send the packet next
2. Link Layer or MAC layer (link layer and MAC layer)
• Links connect the routers/gateways and end-hosts
• This layer provides logical and control for communicating across links.
• Services that this layer might provide include
• congestion control, media access, error detection/correction
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Top down approach of breaking problems into small pieces
…..
2.
Link Layer or MAC layer (link layer and MAC layer)
•
Links connect the routers/gateways and end-hosts
•
This layer provides logical and control for communicating across links.
•
Services that this layer might provide include congestion control, media access,
error detection/correction
Packets

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
•
•
Media access. The “air” is a shared medium. If two nodes transmit at the same time,
there will be a collision. Thus, a scheme must be developed to determine which
node transmits when.
Error detection/correction. If interference does occur, then errors might occur. If an
error is detected, then
1. the error could be corrected with forward error correction, or
2. the receiving link could request a retransmission
Layers 2-4
•
•
End-hosts
Applications
–
–
–
–
•
•
•
•
Web
Email
File transfer
File sharing
Packets

Routers and gateways
and groups of routers

(ISPs)

Links


Protocols
–
–
TCP
UDP
–
–
–
–
Fiber
Coaxial
Twisted pair
Wireless
The protocol stack
client
server
Top down approach of breaking problems into small pieces
4.
Transport layer
1.
Reliability: The server must make sure that the client gets the data
Congestion control (or lack there of)
2.
Congestion Control: The server should send data as fast as possible, but not too fast
3.
TCP provides these features (services), while UDP does not
3.
Network layer (could be called the routing layer, but it isn’t)
1.
The packets must find their way through the network.
2.
Each packet has the IP address of the destination
3.
By examining the IP address, routers decide where to send the packet next
2.
Link Layer or MAC layer
1.
Links connect the routers/gateways and end-hosts
2.
This layer provides logical and control for communicating across links.
3.
Services that this layer might provide include
1.
congestion control, media access, error detection/correction
1.
Physical layer
1.
Logical bits are encoded as physical quantities, e.g., as voltage levels, as shifts in phase, …
2.
This course does not cover the physical layer
Protocols
•
•
End-hosts
Applications
–
–
–
–
•
Packets
–
–
•
•
TCP
UDP
Routers and gateways
and groups of routers
(ISPs)
Links
–
–
–
–
•
Web
Email
File transfer
File sharing
Fiber
Coaxial
Twisted pair
Wireless
Protocols
The protocol stack
protocols define format, order of msgs sent and received
among network entities, and actions taken on msg
transmission, receipt
Hi
TCP connection
request
Hi
TCP connection
response
Got the
time?
Get http://www.awl.com/kurose-ross
2:00
<file>
time
Internet protocol stack
•
application: supporting network applications
– FTP, SMTP, HTTP
•
transport: process-process data transfer
application
– TCP, UDP
•
network: routing of datagrams from source to
destination
– IP, routing protocols
•
link: data transfer between neighboring network
elements
– PPP, Ethernet
•
physical: bits “on the wire”
transport
network
link
physical
The protocol stack
ISO/OSI reference model
•
•
•
presentation: allow applications to interpret meaning of
data, e.g., encryption, compression, machine-specific
conventions
session: synchronization, checkpointing, recovery of
data exchange
Internet stack “missing” these layers!
– these services, if needed, must be implemented in
application
– needed?
application
presentation
session
transport
network
link
physical
The protocol stack
Layers 1-5 (7)
• Why is L3 Communications called L3?
• What does the L7 filter web page discuss? Why is
it called L7
switch
router
Link
PHY
pkt
pkt
Application
Transport
Network
Link
PHY
Link
PHY
Link
PHY
It was a dark and…
pkt
pkt
pkt
pkt
pkt
Link
PHY
It was a dark and…
pkt
pkt
pkt
Link
PHY
pkt
pkt
Network
Link Link
PHY PHY
pkt
pkt
pkt
pkt
Link
PHY
Link
PHY
pkt
pkt
pkt
pkt
pkt
Link
PHY
Network
Link Link
PHY PHY
pkt
pkt
Application
Transport
Network
Link
PHY
Internet components
pkt
pkt
It was a dark and…
It was a dark and…
pkt
pkt
pkt
Today – networking basics
•
•
•
•
•
Core components of the Internet – the protocol stack
Multiplexing, circuit switching, and packet switching
Loss and delays
The structure of the Internet
This lecture covers much of chapter 1 in the textbook.
Circuit switching versus Packet switching
• Packet switching brought the networking revolution
• Circuit switching
• Virtual circuit networking
– A half-way point between packet switched and circuit switched
networking
Circuit switching
•
Circuit switching
– Old style phone system
– Each connection gets its own wire or
bandwidth
– Note: calls must be set-up.
– E.g.,
• Me: operator, get my the president.
• Operator: one moment please.
• Then she plugs a cable into a socket so
now I have a physical wired between me
and the president.
– Instead of each connection getting a whole
wire, connections can share a wire via
multiplexing
– The first automatic circuit switching was
developed by Almon Strowger – an
undertaker. There were two undertakers in
a small town and the switch board
operator was the wife of the other
undertaker. So Strowger invented an
automatic circuit switch to rid both
husband and wife of employment.
Division of resources: FDM, TDM
Frequency division multiplexing
On each hop, the connection gets its own bandwidth
phone
end office
300 3400
toll office
100300 103400
end office
200300 203400
phone
300 3400
Frequency division multiplexing is used in
•TV & radio
•Cell phones (not so much today)
Division of resources: FDM, TDM
Time division multiplexing
phone
1 byte for each
channel every 1/8000
seconds
Or
24×7×8000+overhead
= 1.544Mbps
(DS1 or T1)
bytes
4321
4321
3
2
1 byte for each channel
every 1/8000 seconds
Or
28×24×7×8000+overhead
= 44.736Mbps (DS-3)
1
4321
1 byte every 1/8000
seconds
Or 7×8000=56Kbps
(1Kbps=1000bps)
(7 bits of data & 1
bit of control)
Division of resources: FDM, TDM
There are standard bit-rates that support
multiplexing different numbers of calls
Multiplex 28 DS1
= 28*24*64kbps + overhead = 44.736Mbps DS-3
Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1
STS is electrical and oc is optical
OC3 = 155.52Mbps (150.336 payload)
OC12 = 633.08 Mbps (601.344 payload)
OC48 = 2.488Gbps (2.405Gbps)
OC192 = 9.953Gbps (9.6Gbps payload)
Time division multiplexing
phone
1 byte for each
channel every 1/8000
seconds
Or
24×7×8000+overhead
= 1.544Mbps
(DS1 or T1)
bytes
4321
4321
3
2
1 byte for each channel
every 1/8000 seconds
Or
28×24×7×8000+overhead
= 44.736Mbps (DS-3)
1
4321
1 byte every 1/8000
seconds
Or 7×8000=56Kbps
(1kbps=1000bps)
(7 bits of data 1 bit
of control)
•
•
•
•
Note all the control overhead: if the bit is 1, then payload is
control.
Lots of control is needed to setup a circuit. How is it possible to
get channels at each hop?
Also, if there is not data, then nothing is sent. This wastes data.
But the circuit is yours, guaranteed!
Division of resources: FDM, TDM
There are standard bit-rates that support
multiplexing different numbers of calls
Multiplex 28 DS1
= 28*24*64kbps + overhead = 44.736Mbps DS-3
Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1
STS is electrical and oc is optical
OC3 = 155.52Mbps (150.336 payload)
OC12 = 633.08 Mbps (601.344 payload)
OC48 = 2.488Gbps (2.405Gbps)
OC192 = 9.953Gbps (9.6Gbps payload)
Packet switching - Statistical multiplexing
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
Packet format
specification specifies
where the address is
data 1
client
Server: address = 1
Division of resources: Packet Switching
Packet switching - Statistical multiplexing
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
If destination
If destination
is 1, then next
hop is B
A
data 1
is 1, then next
hop is C
B
If destination
is 1, then next
data 1
hop is
data 1
C
data 1
D
client
Server: address = 1
F
Division of resources: Packet Switching
E
Packet switching - Statistical multiplexing
•
•
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
No reservations are needed. First come first serve.
Major benefit:
–
•
If you need more bandwidth, then you can get it, it you don’t need it, then maybe someone else
can use it.
Major drawback:
–
What happens if two packets arrive at a switch and both need to go to the same output interface.
Picture. One packet is either dropped, or is placed in a buffer. Either way, something bad has
happened, the packet is gone or is delayed. This would never happen on a circuit switched
network.  queuing delay and packet loss 
Division of resources: Packet Switching
Packet switching - Statistical multiplexing
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
data 1
client
other 1
other client
Division of resources: Packet Switching
data 1
Server: address = 1
Packet switching - Statistical multiplexing
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
data 1
other
data 1
client
other 1
other client
Division of resources: Packet Switching
other 1
data 1
data 1
other
Server: address = 1
Packet switching - Statistical multiplexing
•
•
•
•
•
•
Data is in packets, not streams.
Must be digital
Each packet has an address
A switch/router reads the whole packet, then reads the address and forwards the packet –
store and forward
No reservations are needed. First come first serve.
Major benefit:
–
•
If you need more bandwidth, then you can get it, it you don’t need it, then maybe someone else
can use it.
Major drawback:
–
What happens if two packets arrive at a switch and both need to go to the same output interface.
One packet is either dropped, or is placed in a buffer. Either way, something bad has happened,
the packet is gone or is delayed. This would never happen on a circuit switched network. 
queuing delay and packet loss 
Division of resources: Packet Switching
Packet vs. Circuit Switching
If usage is random (e.g., web surfing) statistical multiplexing is better.
Suppose that
1. We have a 5Mbps link
2. Each user needs 50kbps
3. And each user is active 20% of the time. (Note that this condition does not matter for circuit switching. Why?)
How many users can be accommodated under circuit switching and how many can be accommodated under packet
switching?
Circuit switching case
The total number of users that can be accommodated with circuit switching is 5×106/50×103 = 100 users
Division of resources: Packet Switching
Packet Switching Case
Now suppose there are 200 users, what is the probability that there are 150 or more active users?
In this case, there would be a problem, since the network cannot support more than 100 active users.
Simpler questions: What is the probability of 150 particular users being active and 50 other being inactive?
0.2150 1  0.2 
200150
How many different ways can I select these 150 active users?
n
n!
  
 k  k! n  k !
200
150
Is the number of ways that you can select k out of n
Is the number of ways that you can select 150 people out of 200
The probability of any 150 users being active and the rest in active is
200
150
0. 2 150 
1 0. 2200150 This is the Binomial distribution
Division of resources: Packet Switching
Packet Switching Case
What is the probability of more than 100 users being active?
The probability of 101 users being active plus, 102 users being active, plus …., plus 200 users being active,
which is
 200  k
k 101 k 0.2 1  0.2200k  1014 This is the binomial complementary cumulative distribution


200
We conclude that if there are 200 users, then in “pretty much always” things will work fine
 300  k
k 101 k 0.2 1  0.2300k  108


300
Suppose that there are 300 users:
 400 
k 101 k 0.2k 1  0.2400k  0.004


400
Suppose that there are 400 users:
Still pretty good
Might be acceptable
performance (if there is some
other mechanism to recover!)
Therefore: circuit switching could support 100 users, while
packet switching can support 400 users. A factor of 4 more!!!
Division of resources: Packet Switching
Packet Switching vs. Circuit Switching
A couple of things:
What does this probability really mean?
 400  k
400k
 0.004

0.2 1  0.2 
k 101 
 k 

400
This means that
• when you walk into the switching center, the probability of finding overload is 10 -8.
• Or, if you random access the link, the probability of finding it in overload.
• Once you find it in overload, or not, the probability that is will be in overload in the next second is more complicated
and requires queuing theory. This analysis might reveal worst performance.
In this example, we assumed 20% user utilization (they were active 20% of the time)
If it the user utilization is smaller, then the difference between packet switching and circuit switching is even greater. But if
it is larger, then there is less of a difference.
What is your user utilization?
•For web surfing
•For cell phone usage
•VoIP call
•For music streaming
•P2P
Division of resources: Packet Switching
Packet Switching vs. Circuit Switching
• If loss and delay are permissible and usage is random, then packet
switching is better than circuit switching.
• If usage is very regular (e.g. TV!), circuit switching is best.
• If losses and delay are not permissible, then circuit switching is best
(e.g., remote controlled surgery).
• With packet switching, congestion control is required. Also, there is
more overhead for each packet.
• For circuit switching, once the circuit is setup, it can be very efficient.
But circuits must be set-up.
• So, for short file transfer, packet switching is good but for long file
transfers, circuit switching might be better.
Division of resources: Packet Switching
Packet Switching vs Statistical Multiplexing
•
•
•
•
•
•
There is a subtle difference between packet switching and statistical
multiplexing.
Statistical multiplexing means to use the resource as needed.
• This leads to the performance improvements mentioned but also the
complications (delay and loss).
Statistical multiplexing requires packet switching to put data into chunks
Circuit switching can work with data packets/chunks, but there is no need for
an address
The phone network uses circuit switching, but the circuits are statistically
multiplexed between users.
In packet switching, links are statistically multiplexed.
Division of resources: Packet Switching
Packet Switching: Statistical Multiplexing
100 Mb/s
Ethernet
A
B
statistical multiplexing
C
1.5 Mb/s
queue of packets
waiting for output
link
D
E
Sequence of A & B packets does not have fixed pattern, bandwidth shared on demand
statistical multiplexing.
TDM: each host gets same slot in revolving TDM frame.
Division of resources: Packet Switching
Time division multiplexing
phone
1 byte for each
channel every 1/8000
seconds
Or
24×7×8000+overhead
= 1.544Mbps
(DS1 or T1)
bytes
4321
4321
3
2
1 byte for each channel
every 1/8000 seconds
Or
28×24×7×8000+overhead
= 44.736Mbps (DS-3)
1
4321
1 byte every 1/8000
seconds
Or 7×8000=56Kbps
(1kbps=1000bps)
(7 bits of data 1 bit
of control)
•
•
•
•
Note all the control overhead: if the bit is 1, then payload is
control.
Lots of control is needed to setup a circuit. How is it possible to
get channels at each hop?
Also, if there is not data, then nothing is sent. This wastes data.
But the circuit is yours, guaranteed!
Division of resources: Packet Switching
There are standard bit-rates that support
multiplexing different numbers of calls
Multiplex 28 DS1
= 28*24*64kbps + overhead = 44.736Mbps DS-3
Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1
STS is electrical and oc is optical
OC3 = 155.52Mbps (150.336 payload)
OC12 = 633.08 Mbps (601.344 payload)
OC48 = 2.488Gbps (2.405Gbps)
OC192 = 9.953Gbps (9.6Gbps payload)
Packet-switching: store-and-forward
L
R
R
R
Example:
• L = 7.5 Mbits
• R = 1.5 Mbps
• transmission delay = 15 sec
• takes L/R seconds to
transmit (push out) packet
of L bits on to link at R bps
• store and forward: entire
packet must arrive at router
before it can be transmitted
on next link
• delay = 3L/R (assuming more on delay shortly …
zero propagation delay)
Division of resources: Packet Switching
Today – networking basics
•
•
•
•
•
Core components of the Internet – the protocol stack
Multiplexing, circuit switching, and packet switching
Loss and delays
The structure of the Internet
This lecture covers much of chapter 1 in the textbook.
Losses and delay in packet switched networks
• Losses
– Transmission losses
• In fiber links, bit-error is 10-12 or better (i.e., less).
– What is the probability of packet error when there are 1500 bytes in a packet?
» 1 - (1 - 10-12)1500×8 = 1.2×10-8
• In wireless links, the bit-error rate can be very high
– Congestion losses.
• If too many packets arrive at the same time, then the buffers will fill up and
packets are lost.
• Increasing the link speeds or reducing the number of users can reduce the
probability of loss.
• Increasing the size of the buffer reduces losses, but also increases delay.
• Delay
–
–
–
–
Queuing delay
Transmission delay
Propagation delay
Processing delay
packet being transmitted (delay)
A
B
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
Loss and Delay
Queuing delay
packet being transmitted (delay)
A
B
•
•
•
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
Queuing delay occurs for the same reason as congestion losses.
The more the network is utilized, the high the queueing delay (and losses)
Utilization =  := actual use / maximum possible use
Suppose that
• the link bit-rate is Z,
• there are X users
• Each users uses data rate Y with probability p, and use no bandwidth with probability 1-p.
 = X×(Y×p)/Z
Loss and Delay: Queuing delay
Queuing delay
Is it possible to have a network run at full utilization?
No! The average delay would be infinite!
From queuing theory
Delay = /(1- )

Loss and Delay: Queuing delay
Delay in packet switched networks
•
Delay
–
–
–
–
Queuing delay
Transmission delay
Propagation delay
Processing delay
How long does it take to transmit a packet?
How long does it take to get all the bits from node on to the wire/air/fiber?
Suppose
•Link bit rate is 10 Mbps
•Packet size is 1400 bytes
How long to transmit the packet?
1400 *8 bits / packet
10*10^6 bits / sec
Loss and Delay: Transmission and Propagation Delay
= .0011 sec = 1.1 ms
Delay in packet switched networks
•
Delay
–
–
–
–
Queuing delay
Transmission delay
Propagation delay
Processing delay
–
Suppose
•
•
How long does it take for a bit to travel along a wire/fiber/through the air?
Speed of light in a vacuum 3108 m/s while in a fiber it is 2108 m/s
How long does it take to transmit a bit from NY to LA = 3962km
–
20ms propagation delay
•
How about from NY to Jakarta, Indonesia = 16,179km
•
How about to a Geostationary satellite?
–
–
–
–
–
–
•
35,786,000 m above the equator
35,786,000 m /3e8 = 120ms (each way), 240ms up and back
On the edge of coverage, the delay can be 280ms
Note: for voice, the maximum delay is 250ms one-way
For the Iraq war, two satellite hops were often used, resulting in a one-way delay over500ms
Medium orbit satellites (e.g., GPS)
–
•
80ms
60ms (each way)
Low-earth orbit satellites (low-earth? What about middle-earth?)
–
–
Iridium at 10ms (each way_
» Note, Iridium paid 5 billion for the network and sold for 25million (1/2%->on sale 99.5% off, everything must go)
– Teledesic. 10ms
Solar powered aircraft – 0.125ms (each way)
Loss and Delay: Transmission and Propagation Delay
transmitter
Loss and Delay: Transmission and Propagation Delay
receiver
Start of bit 0
transmitter0
Loss and Delay: Transmission and Propagation Delay
receiver
Transmitter is transmitting bit 0
transmitter 0
Loss and Delay: Transmission and Propagation Delay
receiver
Transmitter has finished transmitting bit 0, and is starting to transmit bit 1
Start of bit 1
transmitter1
0
Loss and Delay: Transmission and Propagation Delay
receiver
Transmitter is transmitting bit 2
transmitter 2
1
0
Loss and Delay: Transmission and Propagation Delay
receiver
… and so on …
Loss and Delay: Transmission and Propagation Delay
The transmitter is transmitting bit 8
The receiver is starting to receive bit 0
transmitter
8
7
6
5
4
Loss and Delay: Transmission and Propagation Delay
3
2
1
0
receiver
The transmitter is transmitting bit 9.
The receiver has completed receiving bit 0 and is now starting to receive bit 1
transmitter
9
8
7
6
5
Loss and Delay: Transmission and Propagation Delay
4
3
2
1
0receiver
… and so on …
Loss and Delay: Transmission and Propagation Delay
Question: what is the transmission delay?
Answer: The time to transmit a bit = 1/bit-rate
If bit rate = 10Mbps, then the time to transmit a bit is 1/10×106=10-7sec=100nsec
Question: What is this?
transmitter
9
8
7
6
5
4
3
2
1
0receiver
Answer: This is the length of a bit on the wire (in in the air)
Question: How is the length of a bit related to the bit rate and transmission delay?
Question: How far does the beginning of the bit travel while rest of the bit is being transmitted?
Question: How long does it take to transmit the bit?
Answer: If the link is wireless, then the signal is moving at 3108m/sec.
In this case, the start of the bit has traveled 3108m/sec  1/bit-rate
e.g., bit-rate is 10Mbps, the beginning of the bit has traveled: 3108m/sec / (10010-9sec) = 30m
e.g., bit-rate is 10Gbps, the beginning of the bit has traveled: 3108m/sec / (10010-12sec) = 0.03m
Loss and Delay: Transmission and Propagation Delay
If the propagation delay is fixed, but the bit-rate is increased.
Or, equivalently
If the propagation delay is fixed, but the transmission delay is decreased.
transmitter16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
receiver
Higher bit rate => low transmission delay (less time to transmit a bit)
=> More bits fit on the wire (or the air)
Loss and Delay: Transmission and Propagation Delay
If the propagation delay is fixed, but the bit-rate is deceased.
Or, equivalently
If the propagation delay is fixed, but the transmission delay is increased.
transmitter
1
2
1
receiver
Lower bit rate => higher transmission delay (more time to transmit a bit)
=> Fewer bits fit on the wire (or the air)
Loss and Delay: Transmission and Propagation Delay
If the propagation delay is fixed, but the bit-rate is deceased even more.
Or, equivalently
If the propagation delay is fixed, but the transmission delay is increased even more.
transmitter
1
receiver
The receiver receives the bits as the transmitter is still transmitting them.
The wire (or air) doesn’t hold any complete bits
Loss and Delay: Transmission and Propagation Delay
Question: what is the propagation delay?
Answer: The time for the start (or end) of a bit to move from the transmitter to receiver
The beginning of bit 0
6857946835794683579468357946835729468357294transmitter
68357294683572946183572946183572946183572946183507246183507246183507246183507246135072461350724613507246135024613502461350246135024135024135024135024130241302413024130213021302130210210210210101010 0 0 0
receiver
00:00:00
00:00:21
00:00:20
00:00:19
00:00:18
00:00:17
00:00:16
00:00:15
00:00:14
00:00:13
00:00:12
00:00:11
00:00:10
00:00:09
00:00:08
00:00:07
00:00:06
00:00:05
00:00:04
00:00:03
00:00:02
00:00:01
00:00:30
00:00:29
00:00:28
00:00:27
00:00:26
00:00:25
00:00:24
00:00:23
00:00:22
Of course,
the time for the beginning of a bit to travel from the transmitter to receiver
is the same as
the time for the end of a bit to travel from the transmitter to receiver
Loss and Delay: Transmission and Propagation Delay
Question: How long to get a bit from transmitter to receiver?
Or: Once a host starts transmitting, how long until the bit is received?
transmitter
0
Three things
1. Transmit the bit
2. Bit must propagate to receiver
3. Receive bit
Duration = 2TtransmissionDelay + TpropagationDelay ???
No
Loss and Delay: Transmission and Propagation Delay
receiver
Question: How long to get a bit from transmitter to receiver?
Or: Once a host starts transmitting, how long until the bit is received?
transmitter
0
0
receiver
Three things
1. Transmit the bit
2. The end of the bit must propagate to receiver – at which point, the bit has been received
3. Receive bit (already done)
Duration = TtransmissionDelay + TpropagationDelay
Loss and Delay: Transmission and Propagation Delay
Question: How long to get a packet from transmitter to receiver?
Or: Once a host starts transmitting, how long until the packet is received?
transmitter
0
0
receiver
Three things
1. Transmit the packet
2. The end of the packet must propagate to receiver – at which point, the packet has been received
3. Receive packet (already done)
Duration = packetSize  TtransmissionDelayPerBit + TpropagationDelay
Important: This delay is incurred at each hop.
a N hop path will have a transmission delay at each hop
Loss and Delay: Transmission and Propagation Delay
Mild correction:
Maybe a bit that has
value 1 looks like this
voltage
transmitter
receiver
x
length
of bit
Loss and Delay: Transmission and Propagation Delay
Delay in packet switched networks
•
Delay
–
–
–
–
Queuing delay
Transmission delay
Propagation delay
Processing delay
Loss and Delay: Processing Delay
Routers take a bit of time to process packets.
• moving packets inside the router
• Finding which is the next hop
• Applying security or QoS
How to measure delay?
•
•
•
•
Ping: > ping 216.109.124.73
Ping gives help
(linux) Ping –I 10 216.109.124.73 > file.txt
Then read it in excel and plot delay
•
•
Traceroute (linux), tracert (windows)
Traceroute 216.109.124.73 gives the routers and an estimate of the delay to each router.
•
•
•
•
(Question? Does it take larger packets longer to transmit than shorter packets?
Of course, it does.
Can we test it with ping?
Not really. But try it with ping and wireshark)
1.Open wireshark
2.Select correct interface
3.Start recording
4.There are too many packets
5.Filter out everything that is not icmp
6.Run ping for a bit
7.In wireshark export only what is displayed
Loss and Delay: Lab-Ping
8.
9.
10.
11.
12.
13.
Open file in excel
Delete things we don’t want
Save file
Open in matlab
Plot
Repeat for large packets
Estimating the distribution of queuing delay with
Wireshark and other tools
you
google
RTT = 2Tpropagation + Ttransmisison_1 + Ttransmisison_2 +…+ Q1 + Q2 + …
1. ping -n 250 google.com
– type “ping” for help
2. Get/open wireshark
3. Find the correct interface
4. Start collecting data
– Notice packet are being captured
5. Start ping
6. When ping finishes, stop capture
7. Export data
– Select displayed packets option
(lower left)
– Deselect Packet Details (lower
right)
Loss and Delay: Lab-Ping
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
Open data in something like excel
Remove everything but the times
Resave as times.txt
Load times.txt in matlab
u = diff(times);
plot(u)
u = u(u<.2);
plot(u)
What is min(u)?
q = u – min(u);
hist(q,20)
Little’s Theorem
•
Let N = number of items in the system
–
•
Let  be the rate that items arrive into the system
–
•
E.g., the rate that packets at the output of the interface
Let T be the duration an item spends in the system
–
•
Any system. E.g., the number of packets in the output interface of a router
E.g., the time a packet spends in the output of the interface
Little’s theorem
–
N = T
•
 is a rate, so T is the number of items that arrive during period T
•
Suppose that N is the average number of packets in the router and suppose that it takes  seconds to transmit a packet
–
–
–
•
•
•
•
What is the duration that a packet spends in the router?
When the packet arrives, there are N packets already in the router. So the delay is N + , where the N  is the time this
packets spends in the router, and  is the time sitting in the transmitter
Thus, T = N + 
Hence,  T=N => (N + )=N
(  N +  )=N
N (1-  ) =  
N =  /(1-  )
–
Which is the same formula that shows that the buffer occupancy grows to infinity as the utilization,  , goes to 1
Loss and Delay: Lab-Ping
Today – networking basics
•
•
•
•
•
Core components of the Internet – the protocol stack
Multiplexing, circuit switching, and packet switching
Loss and delays
The structure of the Internet
This lecture covers much of chapter 1 in the textbook.
Internet structure: network of networks
•
•
roughly hierarchical
at center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T, Cable and Wireless),
national/international coverage
– treat each other as equals
Tier-1
providers
interconnect
(peer)
privately
Tier 1 ISP
Tier 1 ISP
The components of the Internet
Tier 1 ISP
Tier-1 ISP: e.g., Sprint
POP: point-of-presence
to/from backbone
peering
…
…
.
…
…
…
to/from customers
The components of the Internet
Internet structure: network of networks
•
“Tier-2” ISPs: smaller (often regional) ISPs
– Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs
Tier-2 ISP pays
tier-1 ISP for
connectivity to
rest of Internet
 tier-2 ISP is
customer of
tier-1 provider
Tier-2 ISP
Tier-2 ISP
Tier 1 ISP
Tier 1 ISP
Tier-2 ISP
The components of the Internet
Tier 1 ISP
Tier-2 ISP
Tier-2 ISPs
also peer
privately with
each other.
Tier-2 ISP
Internet structure: network of networks
•
“Tier-3” ISPs and local ISPs
– last hop (“access”) network (closest to end systems)
local
ISP
Local and tier3 ISPs are
customers of
higher tier
ISPs
connecting
them to rest
of Internet
Tier 3
ISP
Tier-2 ISP
local
ISP
local
ISP
local
ISP
Tier-2 ISP
Tier 1 ISP
Tier 1 ISP
Tier-2 ISP
local
local
ISP
ISP
The components of the Internet
Tier 1 ISP
Tier-2 ISP
local
ISP
Tier-2 ISP
local
ISP
Internet structure: network of networks
•
a packet passes through many networks!
local
ISP
Tier 3
ISP
Tier-2 ISP
local
ISP
local
ISP
local
ISP
Tier-2 ISP
Tier 1 ISP
Tier 1 ISP
Tier-2 ISP
local
local
ISP
ISP
The components of the Internet
Tier 1 ISP
Tier-2 ISP
local
ISP
Tier-2 ISP
local
ISP
ISPs and the structure of the Internet
•
http://som.csudh.edu/fac/lpress/netapps/hout/oneWilshire/index.htm
The components of the Internet
MEET ME ROOM
Said to be the most interconnected space in the world and the most expensive real
estate in North America, the “Meet Me Room” (a telco industry term) is the heart of
One Wilshire. Here the primary fiber optic cables are routed, split, and shared.
Because of the presence of so many telcos in this room and the ability to freely
interconnect between them, rackspace here becomes extremely valuable. For
comparison, the average price for office space in downtown Los Angeles is $1.75 per
square foot per month. At the Meet Me Room, $250 per square foot would be a
bargain.
CABLE RISERS
Some 1,800 known conduits contain the fiber optic cables that
flow through the building’s stairwells and vertical utility
corridors, called “risers.” Cable connects the commercial telco
tenants on floors 5 through 29 to the 4th floor Meet Me Room,
and to a new, “wireless” Meet Me Room constructed on the
30th floor.
SURFACE CABLE MAP
Whenever a permit is pulled by a city contractor for any
underground repairs outside One Wilshire, the various telco
companies with cable in the area come out and paint the cable
routes on the asphalt, creating a visible graphic of the complexity
of what lies just under the surface.
HVAC
Computers generate a lot of heat, and maintaining a stable, cool temperature and
a low humidity is essential in telco hotels, so tenants sometimes demand to install
their own cooling systems to safeguard their equipment. At One Wilshire, these
units are installed primarily on the third floor roof. A new closed loop cooling
system has been installed on the 30th floor roof.
CABLE MINING
As tenants’ needs change, cables can go unused. Cable mining is performed to
thin out the obsolete cables and future congestion is alleviated through the
installation of dedicated new ducts.
ELECTRICITY
Power is supplied by DWP, but in the event of a blackout, the building’s
five generators will kick in. It takes the generators three seconds to start
up and stabilize. During this brief period, the entire building runs on
batteries. There are 11,000 gallons of diesel stored on site, enough to run
the generators for 24 hours before being refueled.
MICROWAVE
On the roof, microwave antennas link up One Wilshire to transmission towers located around
the city. Though fiber’s higher capacity has given it dominance over microwave at One Wilshire,
microwave’s relatively low cost over long distances continues to make it economical for some
applications. The roof’s clear line of sight to the south, west, and to other high-rises, along
with the ability to interface with the fiber inside, continues to make One Wilshire an attractive
location for microwave-based transmission.
READING A ROOF
Much can be learned about a building’s function by examining its roof. The
existence of telco hotels in the region around One Wilshire is indicated by the
presence of new and extensive cooling units on the roofs of adjacent buildings,
many of which were nearly vacant until the telco companies moved in.
POINT OF ENTRY
The main fiber optic cables connecting One Wilshire to the world enter the building
from under the street through closets in the walls of the building’s parking garage.
Given the importance of the building to the global communications network, access
to the parking garage is controlled, and the building is said to be monitored
continuously by federal security officials.
Download