CS代考 INTRODUCTION TO NETWORK LAYER

INTRODUCTION TO NETWORK LAYER

• Networklayerservices
• Networklayeraddressingmechanisms • Networklayerperformance

Copyright By PowCoder代写 加微信 powcoder

• Packetforwardinginnetwork-layer

Network Layer Services
• Thenetworklayerisresponsibleforthehost-to-host delivery of datagrams (packets)
• Itprovidesservicestothetransportlayerandreceives services from the data-link layer
• Itisresponsiblefor: – Packetizing
– Routing and Forwarding

Network Layer Services – Packetizing
Packetization service includes:
– encapsulating the payload in a network-layer packet
at the source and
– decapsulating the payload from the network-layer packet at the destination
Addsaheaderthatcontainsthesourceanddestination addresses and some other information that is required by the network-layer protocol (as discussed later) and delivers the packet to the data-link layer
The source is not allowed to change the content of the payload unless it is too large for delivery and needs to be fragmented

Network Layer Services – Routing
• Thenetworklayerisresponsibleforroutingthepacket from its source to the destination
• Thereismorethanoneroutefromthesourcetothe destination. The network layer is responsible for finding the best route among possible routes. The network layer needs to have some specific strategies for defining the best route.
• Routingisapplyingstrategiesandrunningsomerouting protocols to create the decision-making tables for each router

Network Layer Services – Forwarding
• Forwardingcanbedefinedastheactionappliedbyeach
router when a packet arrives at one of its interfaces
• Thedecision-makingtablearouternormallyusesfor applying this action is sometimes called the:
– forwarding table
– routing table
• Whenarouterreceivesapacketfromoneofits attached networks, it needs to forward the packet to another attached network (in unicast routing) or to some attached networks (in multicast routing)

Network Layer Services – Forwarding
• therouterusesapieceofinformationinthepacket header, which can be the destination address or a label, to find the corresponding output interface number in the forwarding table

Routing & Forwarding
• therouterusesapieceofinformationinthepacket header, which can be the destination address or a label, to find the corresponding output interface number in the forwarding table

Network Layer Services – Other Services
• ErrorControl:packetinthenetworklayermaybe fragmented at each router, which makes error checking at this layer inefficient
– Checksum field of the datagram is added to detect any corruption in the header, but not in the whole datagram
• FlowControl:ThenetworklayerintheInternet,does not directly provide any flow control. The datagrams are sent by the sender when they are ready, without any attention to the readiness of the receiver. Why?
– No error checking
– No Buffering
– Handled by higher layers

Network Layer Services – Other Services
• Congestion Control: Congestion in the network layer is a situation in which too many datagrams are present in an area of the Internet. Congestion may occur if the number of datagrams sent by source computers is beyond the capacity of the network or routers
– Routers may drop some of the datagrams. As more datagrams are dropped, the situation may become worse because, due to the error control mechanism at the upper layers, the sender may send duplicates of the lost packets
– Not implemented in the Internet

Network Layer Services – Other Services • QualityofService:usedinsomeapplicationssuchas
multimedia communication
– it entails certain requirements related to the quality
of service (QoS) of the communication Response time: latency/jitter
– provisions are mostly implemented in the upper layer

Network Layer Services – Other Services • Security: was not a concern when the Internet was
originally designed
– The network layer was designed with no security provision. Today, security is a big concern
– To provide security for a connectionless network layer, we need to have another virtual level that changes the connectionless service to a connection- oriented service.
– This virtual layer is called IPSec

Packet Switching
• Arouterisakindofaswitchthatcreatesaconnection
between an input port and an output port
• Datacommunicationswitchingtechniquesaredivided into two broad categories,
– circuit switching: mostly used at the physical layer
– packet switching: connecting devices decide how to route the packets to the final destination – divided into 2 categories
Connectionless used at the network layer Virtual Circuit used at the data link layer

Datagram: Connectionless Service

Datagram: Connectionless Service Forwarding

Delay in a datagram network

Virtual-Circuit, Connection-Oriented
• Connection-oriented service (also called virtual- circuit approach), there is a relationship between all packets belonging to a message
• Beforealldatagramsinamessagecanbesent,avirtual connection should be set up to define the path for the datagrams. After connection setup, the datagrams can all follow the same path
• Packetmustcontainthesourceanddestination addresses, and must also contain a flow label, a virtual circuit identifier that defines the virtual path the packet should follow

Virtual-Circuit Approach: Connection-Oriented

Virtual-Circuit Forwarding

Delay in a virtual-circuit network

Network Layer Performance
• Theperformanceofanetworkcanbemeasuredin terms of
– throughput, and – packet loss.
• Congestioncontrolisanissuethatcanimprovethe performance

• Delaysinanetworkcanbedividedintofourtypes: – transmission delay,
– propagation delay,
– processing delay, and
– queuing delay

– transmission delay: A source host or a router cannot send a packet instantaneously. A sender needs to put the bits in a packet on the line one by one. If the first bit of the packet is put on the line at time t1 and the last bit is put on the line at time t2, transmission delay of the packet is (t2 − t1).
Delaytr = (Packet length) / (Transmission rate).

– propagation delay: the time it takes for a bit to travel from point A to point B in the transmission media
Delaypg = (Distance) / (Propagation speed)
– processing delay: the time required for a router or a destination host to receive a packet from its input port, remove the header, perform an error detection procedure, and deliver the packet to the output port (router) or deliver the packet to the upper-layer protocol (destination host).
Delaypr = Time required to process a packet in a router or a destination host

– queuing delay: normally happen in a router,
router has an input queue connected to each of its input ports to store packets waiting to be processed; the router also has an output queue connected to each of its output ports to store packets waiting to be transmitted
measured as the time a packet waits in the input queue and output queue of a router
Delayqu = The time a packet waits in input and output queues in a router

Total Delay
• ifweknowthenumberofrouters,n,inthewholepath, the total delay is given by:
•= ∑+++∑()

Throughput
• Throughputatanypointinanetworkisdefinedasthe number of bits passing through the point in a second, which is actually the transmission rate of data at that point
• Inapath,throughputiscalculatedby:
– Throughput = minimum {TR1, TR2, . . . TRn}

Throughput
• TheInternetbackbonehasaveryhightransmission rate, in the range of gigabits per second. This means that the throughput is normally defined as the minimum transmission rate of the two access links that connect the source and destination to the backbone

Throughput
• Sharedlinkswillexperiencereducedthroughput
– Throughput will be divided by number of sharing links

Packet Loss
• The number of packets lost during transmission
• Arouterhasaninputbufferwithalimitedsize.
• Atimemaycomewhenthebufferisfullandthenext packet needs to be dropped.
• TheeffectofpacketlossontheInternetnetworklayer is that the packet needs to be resent, which in turn may create overflow and cause more packet loss.

Congestion Control
• Congestionatthenetworklayerisnotexplicitly addressed in the Internet model
• Congestion study at the network layer is related to: – throughput and

Congestion – delay
• Whenloadiswellbelowcapacitydelayisminimum,due to propagation delay and processing delay
• Whenloadgetshigher,queuingdelaybecomedominant factor
• Whencapacityisreacheddelaybecomeinfinitelyhigh

Congestion – Throughput
• Whentheloadisbelowthecapacityofthenetwork,the throughput increases proportionally with the load
• Thethroughputdeclinessharplybeyondcapacitydueto the discarding of packets by the routers

Congestion Control
• Congestioncontrolreferstotechniquesand mechanisms that can either prevent congestion before it happens or remove congestion after it has happened.
• Wecandividecongestioncontrolmechanismsintotwo broad categories:
– open-loop congestion control (prevention) and – closed-loop congestion control (removal)

Open-Loop Congestion Control
• Retransmission Policy:
– Retransmission is sometimes unavoidable
– good retransmission policy can prevent congestion
– retransmission policy and the retransmission timers must be designed to optimize efficiency and at the same time prevent congestion
• Window Policy:
– The type of window at the sender may also affect congestion. The Selective Repeat window is better than the Go-Back-N window for congestion control
Why: some retransmitted packets could have been successfully received

Open-Loop Congestion Control • Acknowledgment Policy:
– The acknowledgment policy imposed by the receiver may also affect congestion. If the receiver does not acknowledge every packet it receives, it may slow down the sender and help prevent congestion
 A receiver may send an acknowledgment only if it has a packet to be sent or a special timer expires.
A receiver may decide to acknowledge only N packets at a time

Open-Loop Congestion Control • Discarding Policy:
– A good discarding policy by the routers may prevent congestion and at the same time may not harm the integrity of the transmission
– Particularly in multimedia, selective discarding may not affect the quality of the output
• Admission Policy:
– admission policy, which is a quality-of-service mechanism, can also prevent congestion in virtual- circuit networks
– A router can deny establishing a virtual-circuit connection if there is congestion in the network or if there is a possibility of future congestion

Closed-Loop Congestion Control
• Closed-loopcongestioncontrolmechanismstryto alleviate congestion after it happens.
• Severalmechanismshavebeenusedbydifferent protocols:
– Backpressure
– Choke Packet
– Implicit Signaling – Explicit Signaling

Closed-Loop Congestion Control
• Backpressure refers to a congestion control mechanism in which a congested node stops receiving data from the immediate upstream node or nodes
– Backpressure is a node-to-node congestion control that starts with a node and propagates, in the opposite direction of data flow, to the source
– backpressure technique can be applied only to virtual circuit networks, in which each node knows the upstream node from which a flow of data is coming

Closed-Loop Congestion Control
• Achokepacketisapacketsentbyanodetothe source to inform it of congestion
• backpressureandchoke-packetaredifferentmethods
– backpressure, the warning is from one node to its upstream node
– choke-packet method, the warning is from the router, which has encountered congestion, directly to the source station

Closed-Loop Congestion Control • Implicit Signaling
– The source guesses that there is congestion somewhere in the network from other symptoms, e.g. ACK delay
• Explicit Signaling
– The node that experiences congestion can explicitly send a signal to the source or destination

References
• DataCommunicationsandNetworking5thedition– 2013, Behrouz A. Forouzan; Chapter 18-1:3

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com