Sie sind auf Seite 1von 7

Chapter 5

Network layer is for end to end transmission of datagrams, compared to DLL- point to point forwarding of frames.
Mechanism employed is store and forward packet switching – store packet at router till it is fully arrived, compute
checksum.

Provides a service to transport layer, which expects that:


1. Services rendered would be independent of router technology.
2. shielded from number, type and topology of routers present
3. a uniform addressing scheme across LANs and WANs

2 options: Connection less service:


Simply move packets (internet view, 30yrs)
Assume subnet is unreliable, do flow control, error control. Simple primitives: SEND PACKET & RECEIVE
PACKET.
Note: flow control done 2x, each packet must carry full destination address.
Eg network: Internet
A Datagram subnet, no setup from source to destination required.

Routers hold routing table for every possible destination. Pairs of entries hold destination + outgoing line.

A routing Algorithm required to determine route to destinations, (ie to update the table.)

Connection oriented service: (telephone operators view 100yrs)


Provide reliable connection oriented service. Good QoS is dominant factor. Especially suited for real time traffic. Eg
video, audio.

Eg network: ATM

Virtual circuit employed.


A new route is not setup for every packet sent, rather at connection setup, route is setup and stored inside the routers.
Same route used for all packets on that connection. Virtual circuit is release when connection is terminated.
Routers assign connection identifiers to different traffic. (implies they replace connection identifier in outgoing
packets) – sometimes this is called label switching.

Issue Datagram subnet Virtual circuit subnet


Addressing Full source+destination in pkt Packet contains only short VC
number
State Information Routers do not hold state info Each VC requires table space
about connections per connection (more mem
required)
Routing Each packet routed After VC setup, all pkts follow
independently same route
Effect of Router failure None All VCs that pass through that
router are terminated
QoS Difficult Easy, reserve/allocate resources
at connection establishment
Congestion control difficult Easy –as above
Note: to set up a VC , still need to route connection setup packets too!!
It is possible to establish permanent virtual circuits esp if there is a fixed set of nodes (eg Bank ATM network)
Trade –off: faster to forward packets in a virtual ciruit cf complicated loop for destination in a datagram subnet.
However, setup phase in VC is time consuming.

Routing Algorithms:
-responsible for determining which output line an incoming packet should be transmitted on.
In a VC, it is called session forwarding.

N Amanquah. Ashesi University College. 1


Process for updating routing tables is called routing alg
(routing tables updated by routing alg, packets are forwarded based on routing table data)
Routing algorithms should:
cope with topology changes over time
seek to optimize global efficiency & fairness to individual nodes

Types: non-adaptive or static


Adaptive – these get updates from neighbouring routers.
Shortest path algorithms: find shortest queuing delay, min number of hops,

Flooding –a static algorithm – is to send every income packet on every outgoing line. (apart from one on which it
arrived): can be used as a benchmark for other algs as flooding always uses shortest path to destination.(shortest
delay)
Avoid infinite propagation by using a decreasing hop count.
To avoid forwarding a packet a second time, use a sequence number – note received packets, if new packet has a
higher sequence number than previously seen, do not forward => previously seen.

Selective flooding – forward packets in approximately the correct direction.

Distance vector routing.: (dynamic)


Maintain tables of shortest distance. Called Bellman-Ford, Ford-Fulkerson algorithms
For each router on subnet {router, no_of_hops, outgoing line}
Update tables with peer data

Count to infinity problem (good news travels fast, bad travels slowly –when a link breaks.

A—B—C—D—E

B—C—D—E
(solve by setting infinity to max no of paths +1)

Delay metric in dist vector routing is queue length. Not take account of bandwidth. Also Dist Vector Routing takes
long to converge
Newer algorithm takes in to consideration.
Link state routing.

Also Hierarchical routing


Broadcast routing – send so a number of nodes when forwading.
Options:
1. flooding
2. multi-destination routing (include range of destination addresses)
3. use spanning tree
4. reverse path forwarding.:-arriving (hello) packets used the shortest route to arrive at router,
discard subsequent packets.

Other routing algorithms: for wirless networks


Use of home location, home agent and foreign agent. (mobile)

MANETS eg AODV

Congestion control algorithms


Not same as flow control ie do not overrun destination
Rather: global issues of letting subnet carry the traffic

N Amanquah. Ashesi University College. 2


Congestion control algorithms
When there are too many packets present on the subnet, the resulting performance degradation as a result of inability
to handle packets quickly enough is congestion. Congestion occurs when the load is temporarily greater than the
resources in part of the system can handle. As traffic increases beyond the point where routers can handle, they
begin to loose packets. This further worsens congestions because lost packets need to be retransmitted.

Congestion is caused by sudden arrival of streams of data on multiple lines with a fewer output lines, slow
processors with inadequate memory (buffers for queuing), low bandwidth (low throughput)

Congestion control is different from flow control.


Cf: flow control: a super computer must be regulated to prevent it from flooding a slower PC. Flow control deals
with point to point connections, and often requires direct feedback for the control
Congestion control relates to the ability of the subnet to support the offered load (global), and involves the reaction
of all nodes on the subnet. Eg. 1000high speed computers sending 1MB files over 100kbps lines.

General principles of congestion control.


Two solutions: open loop and closed loop control:
Open loop control receives no feedback, does not consider current state of the network, attempts to solve the
congestion problem by preventing its occurrence.
Closed loop control monitors the network to determine where congestion takes place, passes information to where
action can be taken to correct the problem. Metrics employed include average queue length, number of time outs
and retransmissions, average packet delay, standard deviation of packet delay (jitter).

Router sends feedback as a packet to the source of the traffic, or sends notification by a flag bit. Can also warn
routers on outgoing lines. Can also proactively find out about state of network by sending out probe packets.

How to control/mange congestion:


Increase the resources- provide additional capacity eg alternative routes, additional routers, links, increase transmit
power in a satellite system.
Decrease the load - denial of service, degrade service,
Usually for virtual circuits- congestion control is done at network layer. For datagram subnets, can often be done at
transport layer.
Methods: OPEN LOOP methods:
See fig 5.26 (p 388 of 4th ed)
Layer Policy
Transport (all just like DLL)
Retransmission policy
Ack policy
Flow control policy
Timeout determination - more difficult to
determine as transit over routers in subnet is less
predicable than in DLL.
Out of order caching

Network Treating connections as Virtual ccts vs. datagram


in the subnet
Packet queuing and service policy - use different
queues per line, how are queues served-round
robin or PQ? when to discard packet in queue
Routing algorithm- bad alg will send packets to
already congested area.
Packet lifetime mgt - too short - timeout and
retransmissions occur,

N Amanquah. Ashesi University College. 3


Data link layer ? Retransmission policy- how fast do packet
time out? Go back n?
? Out of order caching -buffering?
? Ack policy- piggy back? What about
delayed piggy back because of no flow in
opposite direction -> time out!
? Flow control policy-use windows?

Closed loop:
On a virtual circuit:
carry out admission control. -when congestion is detected, do not set up more virtual circuits until the problem has
cleared.
Careful routing around the problem routers atg VC setup
Set up an agreement (negotiate it) at connection time, to guarantee resources for the connection.
On a datagram subnet
Signal congestion by sending a warning bit in all ack packets to warn/alert source to cut back
Send choke packet to source. Till it arrives, more pkts will be sent. Note that after a fixed interval, source monitors
for more choke pkts. Increases after congestion are in smaller increments than when cutting back.
Send hop by hop choke packets - congested router gets immediate relief, at the expense of use of buffers at
preceding routers. -see fig 5.28 p 393

Load shedding - resort to disarding packets when congestion does not disapear in a reasonable time
RED= random early detection: eg in TCP - reduce transmission rates before congestion occurs (NB: TCP was
designed for wired networks where packet loss is mostly due to buffer overruns, rather than transmission errors)

Jitter control - Jitter= variation/standard deviation in the packet arrival times. Algorithms can be employed to speed
up delayed pkts, ie process delayed packets sooner than ones ahead of schedule to minimise jitter (if these pkts are
competing for transmission). Jitter can be controlled/eliminated by employing a buffer.

QOS:
A stream of packets from a source to a destination is called a flow. A flow is characterized by reliability, delay, jitter
and bandwidth.
Providing a guarantee for these parameters to match the application needs determine the QoS of the flow.
See fig 5-30 on p 397
What is the importance of these parameters?
App Reliability Delay Jitter Bandwidth
Email High Low Low Low
File Transfer
Web access high medium low medium
Remote login
Audio on
Demand
Video on low low high high
Demand
Telephony
Video low high high high
Conferencing

N Amanquah. Ashesi University College. 4


Techniques for achieving good QoS:
Over provisioning
Buffering
Traffic shaping -use of token bucket and leaky bucket algorithms,
Resouce reservation
Admission control

Internetworking
Define The Internet, internet, intranet
Two or more interconnected networks = internet
Networks differ in physical and datalink layers-the way packets are framed, etc.
internet work is necessary to send packets from one network type to another, of a different type, or the need to
transit a network of a different type.
Packet sizes are different. Addressing conventions. Networks may be connection oriented or connection-less, some
networks support multicasting, and other support re-ordered packets. Flow control, error control and congestion
control are implemented differently. Some networks support encryption, others do not.
See Fig 5.43 on p 420

Internetworking is needed for communication.


Employ hubs and repeaters at physical layer
Switches and bridges at data link layer- minor protocol translation may be done by bridge. Eg Ethernet to 802.11 or
to FDDI. Forwarding is based on examining MAC address

Network layer -use router. If different protocols are employed on the different network, use a multiprotocol router.
Transport layer: employ transport layer gateway eg to support flow between TCP and SNA.

Application layer: employ application gateways eg email to sms.

A special case of internet work when source and destination networks are similar, but the intermediate network is
different: employ tunneling.. A multiprotocol router strips off the framing, and frames it for the WAN interface. The
destination strips off the framing and creates an IP for the destination network. Essentially, the IP packet is
encapsulated in a WAN packet.
Note: to transit and ATM network (with small cell sizes), an IP packet name need to be segmented and re-assembled
at the exit router. This is transparent segmentation /fragmentation.

The IP Protocol
See IP packet format on page 434, fig 5.53
A packet header has among other things source and destination addresses. Maximum packet size (total length field)
is 65,535bytes

IP Addressing:
An IP address refers to a network interface => a host can have more than one IP address eg, a host with two cards
will have two addresses.
Classful addressing and classless addressing -see network videos - TCP/IP networking.

An IP address is written as four bytes, dot separated. (32 bits) (dotted decimal notation)
Class A, B, C, D, E
Class A starts with 0, and has 7bits for network number, 24 bits for network address
See fig 5.55

class Starting bits #network bits #host bits Address range


A 0 7 24

N Amanquah. Ashesi University College. 5


B 10 30 128.0.0.0-
223.255.255.255
C 110 21 8 192.0.0.0-
223.255.255.255
D 1110
E 1111 Reserved for
future use

An all 11111 address is a broadcast address


An all 00000 as the network number refers to the current network -means a host can refer to its current network
without knowing the network number.
Address 27.x.x.x are loopback addresses. The packets are not placed on the wire, but are treated as incoming
packets. Useful for loopback testing.
Note: a single class A address refers to the network (one network) not a collection of networks.

To implement subnetting, some bits are taken away from the host number to create a subnet number, eg instead of a
14-bit network number and 16-bit host number for a class B network, a 6-bit subnet can be created with a 10bit host
number. Ie 14-bit network number+6bit subnet +10bit host number. It is then possible to create 64 networks
(subnets) (ie 6bits) each with 1022 hosts (10bits, less all-0 and all-1 address).
A subnet mask is also needed to indicate split between (network number+subnet number) and host number. Simply
add the bits in the subnet to the network portion. Thus, for this example, the subnet mask will consist of 2+14+6 bits
ie 22bits, resulting in a doted decimal notation of 255.255.252.0. The alternative notation is to write /22 namely
255.255.252.0/22. A normal class B address can be written as /16.

Note that the numbering of the network will proceed as follows:


xxxxxxxx xxxxxxxx 0000 00|01 xxxxxxxx
xxxxxxxx xxxxxxxx 0000 00|10 xxxxxxxx
xxxxxxxx xxxxxxxx 0000 00|11 xxxxxxxx etc.

That is to say, the first 22 bits are whre the changes will occur, rather than in the first 24-bits as in the case of a
typical class c address..

Routing is done by performing a logical AND between an address and the subnet mask. The result gives the
destination network number.

CIDR= classless interDomain routing. - this allocates IP addresses in variable sized block, rather than by classes.
Employing the classful method of addressing wastes blocks of IP addresses.

NAT- network address translation:


A network may run out of addresses. Eg an ISP or a company with several distributed LANs. Each organization is
assigned one public IP address (or a few). On the LAN side, private IP addresses are employed. However, packets
leaving the local network for the Internet are processed by a NAT host which converts the private IP address into the
public one. The NAT host keeps a mapping of source port and local IP address in a table so that packets returned
can be returned to the requesting local host. The NAT host actually modifies the outgoing packet, usually with a
different “source port number”, because it is possible for local hosts A and B with different IP addresses to have
identical source ports. The source port on the outgoing packet will be different for these connections, so that when a
response comes in, the NAT box can hash using the new source port, and correctly identify who the intended
recipient is.

Drawbacks;
? Whole networks may be represented to the world as just one IP, rather than each host appearing uniquely.

N Amanquah. Ashesi University College. 6


? NAT makes connectionless networks take on the connection-oriented property, as NAT hosts must maintain
connection information for all flows through it.
? NAT violates the fundamental rule of protocol layering - NAT inspects TCP headers in the network layer, and
does so successfully because it knows about the current implementation of TCP
? NAT will fail if a protocol that is neither TCP nor UDP is employed.
? NAT still has a limitation. It can map up to 16-bit source ports, implies max of 65,536 hosts.

Internet protocols:
ICMP: Internet Control Message Protocol- for control messages between routers etc.
ARP: Address resolution protocol; Network layer communications are IP based, but must be mapped to specific 48-
bit MAC addresses. Nodes broadcast a request for the MAC whose IP corresponds to the desired IP. That host
replies accordingly. Information received is cached for a short period for subsequent communications.-
Optimization: when a host boots, it requests for its own IP address. All nodes get to know

N Amanquah. Ashesi University College. 7

Das könnte Ihnen auch gefallen