代写代考 The Network Core, Protocol Layers, Delays, Throughput

The Network Core, Protocol Layers, Delays, Throughput

Main Topics
What is the Internet?

Copyright By PowCoder代写 加微信 powcoder

What is a protocol? Network Structure
Network Edge, some useful tools
What is a router?
Access Networks and Physical media
Packet switching vs. Circuit Switching
Network delays, loss, throughput in networks
Protocol layers Encapsulation

The Network Core • mesh of interconnected routers

1. circuit switching:
The Network Core
fundamental question: How is data transferred through net?
Different approaches to moving data through the Network Core:
dedicated circuit per call: telephone net
2. packet-switching:
data sent through net in discrete “chunks”

The Network CORE
Circuit Switching vs. Packet Switching
A Restaurant Analogy
Circuit-switched Networks
Resources are reserved for the duration of the
Restaurant which requires reservation
communication session
• With a reservation, you can order right away when you get there • guaranteed seats
Packet-switched Networks
Messages use the resources on demand; thus, may have
Restaurant which does not require any reservation
to wait (queue) for access to a communication link
• you may have to wait on a queue to be served • no sure seats

Circuit Switching
Used by digital telephone networks

Network Core: Circuit Switching
End-end resources reserved for “call”
– Reserved link bandwidth or switch capacity, buffers
– Switches on the path between sender and receiver maintain connection state for the duration of the session
– Resources are dedicated; thus, no sharing
– Advantage: circuit-like (guaranteed) performance
– Guaranteed constant transmission rate
• In the diagram, each link has four circuits (4 simultaneous connections).
– Pre-allocates use of transmission link and switch capacity regardless of demand
• call gets 2nd circuit in top link and 1st circuit in right link.
– call set-up required (unless infinite resources are available)

Network Core: Circuit Switching How is it implemented?
By dividing the link bandwidth into “pieces”
1. frequency division
2. time division
Drawback: Resource piece is idle if not used by owning call (no sharing)

Circuit Switching: FDM and TDM Frequency Division Multiplexing (FDM)
Network dedicates a frequency band to each connection for the session
4 users (or 4 circuits)

Circuit Switching: FDM and TDM Time Division Multiplexing (TDM)
Time divided into frames and frames divided into slots.
Used solely by one
End System
Network dedicates one time slot to each connection, in every frame.
Each connection utilises the full bandwidth of the link for a fraction of the time.

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit- switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Each link has 24 circuits Host A
Further assume that propagation delay is negligible.

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit-switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Connection establishment time + transmission time
Each circuit has a transmission rate of (1.536 Mbps)/24 slots = 64kbps (or 64,000 bps).

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit-switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Connection establishment time + transmission time
Each circuit has a transmission rate of (1.536 Mbps)/24 slots = 64kbps (or 64,000 bps).
Formula for computing the transmission time?
In Physics, we have the formula 𝑠 􏰀 𝑑 𝑡
d = distance t = time

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit-switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Connection establishment time + transmission time
Each circuit has a transmission rate of (1.536 Mbps)/24 slots = 64kbps (or 64,000 bps).
Formula for computing the transmission time?
In Physics, we have the formula
d = distance t = time
Similarly in computer networks,
𝑅𝑅 􏰀􏰀 𝐿𝐿 𝑡𝑡
R = transmission rate L = length of data
t = transmission time
By transposing t to the left of the equation, w e h a v e : 𝑡𝑡 􏰀􏰀 𝐿𝐿

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit-switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Connection establishment time + transmission time
Each circuit has a transmission rate of (1.536 Mbps)/24 slots
= 64kbps (or 64,000 bps).
Compute for the transmission time by applying the formula:
𝑡𝑡 􏰀􏰀 𝑅𝑅𝐿𝐿
R = transmission rate (bits/sec.) L = length of data (bits)
t = transmission time (sec.)
(Transmission time) So, it takes (640,000 bits)/(64,000 bps)= 10 sec. to transmit the file.

Question 1
How long does it take to send a file of 640,000 bits from Host A to Host B over a circuit-switched network? Assume that all links in the network use TDM with 24 slots and have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec. to establish an end-to-end circuit before Host A can begin to transmit the file.
Connection establishment time + transmission time
Each circuit has a transmission rate of (1.536 Mbps)/24 slots
= 64kbps (or 64,000 bps).
(Transmission time) So, it takes (640,000 bits)/(64,000 bps)= 10 sec. to transmit
The transmission time would be 10 sec even if the end-to-end circuit passed through 1 link or 100 links. (but the actual end-to-end delay also includes a propagation delay)
Considering the circuit establishment time, we add 0.5 sec; therefore, it takes 10.5 sec. to transmit the file.

Packet Switching used by the Internet

Network Core: Packet Switching
 Packet-switching: hosts break application-layer messages into packets
 packets are forwarded from one router to the next, across the links on the path from source to destination
 each packet is transmitted at full link capacity
Introduction 1-18

Packet Switching: Store-and-Forward L bits
per packet
A packet can only be transmitted if there is no other packet currently being transmitted
Router is awaiting for the remaining bits of a packet before forwarding
destination
 Transmission delay
 takes L/R seconds to transmit (push out) an L-bit packet into link at
 Routers need to receive, store, and process the entire packet
before forwarding.
Introduction 1-19

Question 2
Packet Switching:
Consider a message that is 7.5 x 106 bits long. Suppose that between source and destination, there are 2 packet switches and 3 links, and that each link has a transmission rate of 1.5 Mbps. Assuming that there is no congestion in the network and negligible propagation, processing and queuing delay (more details about these later), how much time is required to move the message from source to destination with packet switching?

Question 2
Packet Switching:
Consider a message that is 7.5 x 106 bits long. Suppose that between source and destination, there are 2 packet switches and 3 links, and that each link has a transmission rate of 1.5 Mbps. Assuming that there is no congestion in the network and negligible propagation, processing and queuing delay (more details about these later), how much time is required to move the message from source to destination with packet switching?
Transmission delay
(7.5 Mb/1.5 Mbps) * 3 = 15 sec.
𝑡𝑡 􏰀􏰀 𝑅𝑅𝐿𝐿
R = transmission rate (bits/sec.) L = length of packet (bits)
t = transmission time (sec.)

Two Key Network Core Functions
routing: determines source- destination route taken by packets
forwarding: move packets from router’s input to appropriate router output
 routing algorithms routing algorithm
local forwarding table header value output link 0100 3
These are the causes of nodal processing delays.
dest address in arriving packet’s header
0101 2 0111 2 1001 1
Network Layer 4-22

Network Core: Packet Switching Statistical multiplexing – on-demand sharing of resources
Ethernet statistical multiplexing
Nodes A and B
queue of packets
waiting for transmission at the output link
Receiver: Node E E
 sequence of A & B packets has no fixed timing pattern  bandwidth shared on demand: by the router using statistical
multiplexing.
 Compare this to TDM: each host gets same slot in revolving TDM frame.

Forwarding table
Packet Switching: queueing delay, loss
R = 100 Mb/s B
R = 1.5 Mb/s
queue of packets waiting for output link
For each link, packets are maintained in a queue • If queue is full, packets will be dropped
When does packet queuing and loss occur?
 if arrival rate (in bits) to link exceeds transmission rate of link for a period of time:
• packets will queue, wait to be transmitted on link
• packets can be dropped (lost) if memory (buffer) fills up

• The performance of many Internet applications are greatly affected by network delays. In order to acquire a deep understanding of packet switching and computer networks, we must understand the nature and importance of these delays.

sharing the same link
Shared link
Network Delays
• The most important of these delays are the nodal processing delay, queuing delay, transmission delay, and propagation delay.
dend-end = dproc + dqueue + dtrans + dprop
Let us study network delays in the context of the following set-up: 2 hosts

Transmission vs. Propagation Delay
Transmission Delay
– amount of time it takes to push the packet onto the link – typically in the order of μsecs to msec. in practice
How to calculate the transmission delay?
ttransmission 
• L = packet size (in bits)
• R = link’s bandwidth or transmission rate (in bits/sec)
packet Host

Transmission vs. Propagation Delay
Propagation Delay
– amount of time for a bit to travel from one end of the link to the other. – In wide-area networks, typically on the order of msec.
How to calculate the propagation delay?
tpropagation  ds
• d = length of the link (in meters)
• s = propagation speed of medium (in m/sec)
packet Host
Speed depends on the physical media (e.g. fibre, copper wire)

Question 3
Transmission vs. Propagation Delay
Apply the formulas to solve the given problem.
Transmission Delay
• L = packet size (in bits)
• R = link’s bandwidth (in bits/sec)
ttransmission  td
Propagation Delay
• d = length of the link (in meters)
• s = propagation speed of medium (in m/sec)
propagation
Given the following scenario, solve for the combined transmission and propagation delay. See the applet.
𝑡transmission 􏰇 propagation 􏰀 1.56𝑚𝑠𝑒𝑐. 􏰈0.04𝑚𝑠𝑒𝑐 􏰀 1.6𝑚𝑠𝑒𝑐.

Packet Queuing Delay
Packet Queuing Delay
 time spent by the packet waiting at the output link for transmission  packets queue in router buffers
• When the packet arrival rate to link (temporarily) exceeds output link capacity
• In turn the packets queue up, and wait for their turn
• depends on congestion level of router
• can be on the order of microseconds to milliseconds in practice
packet being transmitted (delay)
packets queueing (delay) free (available) buffers: arriving packets
(Packet loss) Packets are dropped if there are no free buffers
Introduction 1-30

Loss in Packet-Switched Networks
Lost packet
• Incoming packet is dropped
• packet in queue is dropped
– Retransmitted by application or transport layer protocol
– Length of Queue is finite
– Packets are lost when queue is full

the time it takes to process a packet in a router, which is dependent on the speed of the device
• checkbiterrors
• calculate route
• determineoutputlink
• typically<μsec(microsecondsorless) packet being processed (delay) Four sources of packet delay propagation nodal processing transmission dend-end = dproc + dqueue + dtrans + dprop We can use the Traceroute network tool to observe the actual end-to-end delay between hosts in a packet-switched network. Protocol Layering Networks are complex, with many “pieces”: Is there any hope of organizing the structure of networks, so that we can study the entire system systematically? – links of various media Protocol “Layers” – applications – protocols – hardware, software Interestingly, yes! the internet is implemented using a multi- layered architecture that we can examine one layer at a time. Introduction 1-35 An analogy: layering of airline functionality ticket (purchase) baggage (check) gates (load) runway (takeoff) airplane routing airplane routing airplane routing ticket (complain) baggage (claim gates (unload) runway (land) airplane routing gate takeoff/landing airplane routing departure airport intermediate air-traffic control centers arrival airport  Protocol layering readily allows for the division of services/functions across layers, information hiding and encapsulation, etc.  Components working on one layer rely on the services provided by components belonging to the next layers below.  There is symmetry in the services offered at the departure and arrival Introduction 1-36 Internet protocol stack • application: supporting network applications – ftp, smtp, imap, http Mostly software implemented application • transport: process-to-process data transfer transport – tcp, udp Guaranteed delivery of application layer messages • network: host-to-host communication service, routing of datagrams from source to destination IP, routing protocols (Hardware+Software) Defines fields in IP datagrams (destination address), how end systems and routers act on them • link: data transfer between neighbouring physical nodes Moves packets from one node (host or packet – WiFi, Ethernet, ppp switch) to the next node • physical: bits “on the wire” Move individual bits within frame from one node to the next Ethernet cards implement both Link and Physical Layers Internet protocol stack message segment application transport network link physical Encapsulation M Ht M datagram Hn Ht M frame Ht M destination Hn Ht Ht network link physical M application Ht M transport network physical link physical Introduction: 1‐38 Traceroute Traceroute Given a target host, traceroute sends a series of ordinary IP datagrams (packets), with the IP address of the target host and with increasing Time To Live values (i.e. TTL=1, TTL=2, TTL=3, ... and so on). It has a UDP segment payload with an unreachable port number. tracert www.google.co.nz target host packet Target Host www.google.co.nz Web browser 130.123.246.32 A timer will record the start time for each of the packets so that the elapsed time can be calculated later after receipt of an ICMP from the routers/destination host. IP datagram UDP segment Destination Port: 33434 Dest IP address: Traceroute The TTL field is decremented every time the packet is processed by a router. Once a router sees a packet with TTL equal to zero, it generates an ICMP (ICMP time exceeded) error message back to the source host. tracert www.google.co.nz target host Target Host Web browser 130.123.246.32 TTL=1 TTL=2 Traceroute The TTL field is decremented every time the packet is processed by a router. Once a router sees a packet with TTL equal to zero, it generates an ICMP (ICMP time exceeded) error message back to the source host. Target Host • Internet Control Message Passing Protocol • An error-reporting protocol used by routers, hosts and gateways to send network-level information. Source host 130.123.246.32 ICMP message Traceroute Using a sequence of datagrams with increasing TTL values, eventually the target host will be reached. When this happens the target host will find that the destination port number is unreachable and will send an ICMP Destination unreachable message back to the source. This error message indicates to the source host that the target has been reached. tracert www.google.co.nz target host ICMP Destination unreachable Web browser 130.123.246.32 Target Host Traceroute Using a sequence of datagrams with increasing TTL values, eventually the target host will be reached. When this happens the target host will find that the destination port number is unreachable and will send an ICMP Destination unreachable message back to the source. This error message indicates to the source host that the target has been reached. Using this strategy and a timer mechanism, Target Host tracert www.google.co.nz Traceroute is able to work out the list of routers ICMP Destination unreachable on the path to the destination, as well as their round-trip times.target host Web browser • Nodal processing delay • Queuing delay • Transmission delay • Propagation delay 130.123.246.32 Traceroute Let’s examine some actual measurements of packet round trip times... 6 columns: hop number, trip_delay1, trip_delay2, trip_delay3, name of router, address of router What possibly caused this? Queuing delay varies in time! Let’s try to contact Massachusetts Institute of Technology at 77 Massachusetts Avenue, Cambridge, MA, USA It takes only 4ms to contact the website of MIT! https://www.akamai.com/our-thinking/cdn/what-is-a-cdn Traceroute Some hostnames can be accessed more quickly than others because of the help of Content Delivery Networks (CDN). Content Delivery Networks (CDN) CDN is a group of geographically distributed servers that speed up the delivery of web content by bringing it closer to where users are. national or global ISP CDNS cache content like web pages, images and video 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com