2. 2
Congestion Control
• General Principles of Congestion Control
• Congestion Prevention Policies
• Congestion Control in Virtual-Circuit Subnets
• Congestion Control in Datagram Subnets
• Load Shedding
• Jitter Control
3. 3
Congestion Control
• When too many packets are present in the subnet,
performance degrades. This Situation is called
Congestion.
• Congestions can be brought on by several factors:
– All of a sudden, streams of packets arrive on multiple input
lines and all of them need the same output line, a queue is
built up. Allocating more memory may help to a point but
with infinite memory, congestion gets worse because packets
are timed out.
– Slow processors make queue to be built up even though there
are enough bandwidth.
– Low-bandwidth also causes congestion.
5. 5
Congestion Control vs. Flow Control
• They are highly related to each other.
• Congestions control is a global issue, involving all
hosts, routers, and other factors
• Flow control relates to the point-to-point traffic
between a given sender and a given receiver, making
sure a faster sender won’t swamp a slow receiver.
6. 6
Open Loop Vs Close Loop
• Open loop – solve the problem by essentially good
design.
– deciding when to accept new traffic, when to discard
packets, etc., without regard to the current state of the
network
• Close loop – solve the problem based on the feedback.
– Monitor the system to detect when and where
congestion occurs.
– Pass information to where action can be taken.
– Adjust system operation to correct the problem.
7. 7
General Principles of Congestion Control
• The presence of congestion means that the load is
greater than the resources can handle
• Two solutions
– Increase the resource: increase the bandwidth, Split the
traffic over multiple routes, Put spare routers on-line
– Decrease the traffic: deny service to new users (hire-
freezing), degrade service to some/all users (reduce salary),
drop some users (lay off)
9. 9
Congestion Control in Virtual-Circuit
Subnets
This is a Closed Loop System.
One Technique that is widely used to keep congestion that
has already started from getting worst is Admission Control.
Admission Control: Once Congestion has been signalled, no
more VC’s are Setup until the problem has gone away.
Second approach is to Allow New Virtual circuits but
Carefully route all New virtual circuits away from problem
area
10. 10
Congestion Control in Virtual-Circuit
Subnets
(a) A congested subnet. (b) A redrawn subnet, eliminates
congestion and new virtual circuit from A to B.
11. 11
Congestion Control in Datagram Subnets
This is a Closed Loop System.
Choke Packet Technique
Jitter Control
12. 12
Hop-by-Hop Choke Packets
(a) A choke packet that affects only the source.
(b) A choke packet that affects each hop it passes
through.
21. 21
How Networks Can Be Connected
(a) Two Ethernets connected by
a switch.
• A router that can handle multiple protocols is called a
multiprotocol router.
• With a switch (or bridge), the entire frame is transported on the
basis of its MAC address.
• With a router, the packet is extracted from the frame and the
address in the packet is used to decide where to send it.
(b) Two Ethernets connected by
routers.
22. 22
Two types of internetworking
• Concatenated Virtual Circuits:
– A connection to a remote host is set up by concatenating
virtual circuits in all networks it passes by.
– Gateways response for converting packet format and
maintaining VC.
– Work best when all network have the same properties.
• all reliable or all unreliable.
– Can also be done on transport layer.
• Connectionless internetworking:
– inject datagrams into subnets and hope for the best
– packets may not follow the same route
– also works on VC subnet.
25. 25
Concatenated Virtual Circuits
• Advantages:
– Buffers can be reserved.
– Sequencing can be guaranteed.
– Shorter headers can be used.
– Troubles caused by delayed duplicate packets can be avoid.
• Disadvantages:
– Table space required in the router for each open connection.
– No alternate routing to avoid congested areas.
– Vulnerability to router failure along the path.
– Difficult to implement if one of the networks is an unreliable
datagram network.
26. 26
Connectionless internetworking
• Advantages:
– More potential for adapting to congestion
– Robustness in the face of router failures
– Various adaptive routing algorithms are possible.
– It can be used over subnets that do not use virtual
circuits inside.
• Disadvantages:
– More potential for congestion
– Longer header needed
27. 27
Tunneling
• Internetworking for the general case is extremely
difficult.
– Common case: The source and destination are on the same
type of network but different networks are in between.
– Tunneling is the transmission of data in such a way that the
routing nodes in the network are unaware that the
transmission is from a different network.
– How it works?
• Source sends packets to an intermediate gateway
• Intermediate gateways put the whole packet into the
payload field (don't interpret it).
• The destination will understand the packet
30. 30
Internetwork Routing
• Two-level routing algorithms can be built up:
– Within each network an interior gateway protocol
is used.
– Between the networks, an exterior gateway
protocol is used.
• Each network in an internetwork is independent
of all the others. It is often referred to as an
Autonomous System (AS).
32. 32
Fragmentation
• Each network imposes maximum size on its
packets. These limits have various causes:
– Hardware (e.g., the size of an Ethernet frame).
– Operating system (e.g., all buffers are 512 bytes).
– Protocols (e.g., the number of bits I nthe packet
length field).
– Compliance with some (inter)national standard.
– Desire to reduce error-induced retransmissions to
some level.
– Desire to prevent one packet from occupying the
channel too long.
33. 33
Fragmentation
• Maximum packet size is different in different networks
• Fragmentation deals with the cases when large packet
sends to the network whose maximum packet size is
small.
• Solutions:
– Use a routing algorithm that avoids to sending
packets through networks that cannot handle it.
Infeasible if the destination can handle large
packets.
– Chop the large packet into small fragments and send
fragments as individual internet packets.
34. 34
Fragmentation
• Reassemble at gateways:
– transparent to other networks
– high overhead - all packet must pass through the same exit
gateway
– ATM
• Reassemble at the destination:
– every fragment is treated as an internet packet
– smart end hosts (may not always be true)
– fragments must be numbered
– retransmission overhead (can be complicated).
– IP
37. 37
Fragmentation when the elementary data size is 1
byte.
(a) Original packet, containing 10 data bytes.
(b) Fragments after passing through a network
with maximum packet size of 8 payload bytes
plus header.
(c) Fragments after passing through a size 5
gateway.
38. 38
The Network Layer in the Internet
• The IP Protocol
• IP Addresses and Subnet Mask
• Internet Control Protocols
• OSPF – The Interior Gateway Routing Protocol
• BGP – The Exterior Gateway Routing Protocol
39. 39
The Network Layer in the Internet
• The Internet can be viewed as a collection of
subnetworks or Autonomous Systems (AS).
• IP (Internet Protocol) hosts the whole Internet together.
• Communication in the Internet works as follows:
– The transport layer takes data streams and breaks them up
into datagrams. In theory, datagrams can be up to 64 Kbytes
each, but in practice they are usually not more than 1500
bytes so they fit in one Ethernet frame.
– Each datagram is transmitted through the Internet.
– When all the pieces finally get to the destination machine,
they are reassembled by the network layer, which inserts it
into the receiving process’ input stream.
41. 41
The IP Protocol
• Philosophy
– minimum functionality in the IP, smartness at the
end system.
• What does IP do?
– Addressing and fragmentation (Internetworking).
– Routing provided by other protocols
• What does IP not do?
– congestion control
– error control
– resource management
42. 42
IPv4 Header Format
• Version – The IP version number, 4.
• Header length – The length of the datagram header in 32-bit
words.
• Type of service – Contains six subfields that specify the
priority, delay, throughput, reliability, desired for a packet. This
field is not widely used on the Internet.
• Total length – The length of the datagram in bytes including the
header, options, and the appended transport protocol segment or
packet. The maximum length is 65535 bytes.
• Identification – An integer that identifies the datagram.
• DF – Don’t fragment
43. 43
IPv4 header format
• MF – More Fragments. All fragments except the last one have
this bit set.
• Fragment offset – The relative position of this fragment
measured from the beginning of the original datagram in units
of 8 bytes.
• Time to live – How many routers a datagram can pass through.
Each router decrements this value by 1 until it reaches 0 when
the datagram is discarded. This keeps misrouted datagrams from
remaining on the Internet forever.
• Protocol – The high-level protocol type.
44. 44
IPv4 header format
• Header checksum – A number that is computed to ensure the
integrity of the header values.
• Source address – The 32-bit IPv4 address of the sending host.
• Destination address – The 32-bit IPv4 address of the receiving
host.
• Options – A list of optional specifications for security
restrictions, route recording, and source routing. Not every
datagram specifies an options field.
• Padding – Null bytes which are added to make the header length
an integral multiple of 32 bytes as required by the header length
field.
47. 47
IP Addresses
• An IP address really refers to a network interface, so if a host is
on two networks, it must have two IP addresses.
• Traditionally, IP addresses were divided into the five categories:
A, B, C, D, E.
• Network numbers are managed by a nonprofit corporation
called ICANN (Internet Corporation for Assigned Names
and Numbers) to avoid conflicts.
• Network address, which are 32-bit numbers, are usually written
in Dotted Decimal Notation. In this format, each of the 4 bytes
is written in decimal, from 0 to 255, usually beginning with the
network address and ending in the host address.
– For example, the 32-bit address is written as 192.41.6.20.
49. 49
IP Addresses
• The value 0 means this network or this host. The value
of -1 (all 1s) is used as a broadcast address to mean all
hosts on the indicated network.
• 0.0.0.0 is used by hosts when booted.
• IP addresses with 0 as network number refer to the
current network.
• 255.255.255.255 broadcast on local network
• The addresses with a network number and all 1s in the
host field allow machines to broadcast to remote
LANs.
• 127.0.0.1, loopback
51. 51
Subnets
• Network Under the Network is called as Subnet.
• Segmentation or Breaking of N/W logically is known as
Subnetting.
• Subnet Mask is used for Subnetting.
• Difference between network and host is called as Subnet Mask.
Default Subnet Mask For various Classes
• Class A: N.H.H.H
Subnet mask: 255.0.0.0
• Class B: N.N.H.H
Subnet mask: 255.255.0.0
• Class C: N.N.N.H
Subnet mask: 255. 255.255.0
Need for Subnetting:
1) Security, 2)Flexibility and 3) Efficient use of Bandwidth.
52. 52
NAT – Network Address Translation
Placement and operation of a NAT box.
53. Internet Control Message Protocol
53
• The Operation of the internet is monitored closely
by the routers
• When some thing unexpected occurs the event is
reported by the ICMP.
• Each ICMP msg is encapsulated in an IP Packet.
ICMP Messages are of two types
1) Error reporting msgs.
2) Query msgs.
55. 55
ARP– The Address Resolution Protocol
• ARP: Address Resolution Protocol
– find out the Ethernet address for an IP address
– a host broadcast to everyone asking “who owns IP address
xxx.xxx.xxx.xxx”
– The host with that IP address response with its Ethernet
address.
• RARP: Reverse Address Resolution Protocol
– Find out a host’s IP address.
– The host broadcast to everyone asking “My Ethernet address
is xx:xx:xx:xx:xx:xx, who knows my IP address?”
– The RARP server looks up the configuration file and reply
with its IP address.
56. 56
ARP– The Address Resolution Protocol
Three interconnected /24 networks: two Ethernets and an FDDI ring.
57. 57
Dynamic Host Configuration Protocol
• BOOTP (Bootstrap Protocol) is a protocol that lets a
network user be automatically configured (receive an
IP address) and have an operating system booted
(initiated) without user involvement.
– Needs manually configuration (a table to map MAC to IP
address)
• DHCP (Dynamic Host Configuration Protocol) is a
communications protocol that lets network
administrators manage centrally and automate the
assignment of IP addresses in an organization's
network.
– It is not necessary to have one DHCP server on each network
but a DHCP relay agent is needed on each LAN.
59. 59
The Interior Gateway Routing Protocol
• Two-level routing:
– interior gateway protocol – a routing algorithm
within an AS.
– exterior gateway protocol – a routing algorithm
between Autonomous systems.
60. 60
OSPF – The Interior Gateway Routing
Protocol
• Design goals of OSPF (Open Shortest Path First):
1. The algorithm should be published in the open literature.
2. It should support a variety of distance metrics.
3. It had to be a dynamic algorithm
4. It had to support routing based on type of service.
5. It had to do load balancing.
6. It supports for hierarchical systems.
7. Some security was required.
8. It is able to deal with routers connected to the Internet via
a tunnel.
61. 61
OSPF – The Interior Gateway Routing
Protocol
• OSPF supports three kinds of connections and
networks:
1. Point-to-pint lines between exactly two routers.
2. Multiaccess networks with broadcasting (e.g., most
LANs.)
3. Multiaccess networks without broadcasting (e.g., most
packet-switched WANs).
• A multiaccess network is one that can have multiple
routers on it, each of which can directly communicate
with all the others.
• OSPF represents the actual network as a graph like
this and then compute the shortest path from every
router to every other router.
63. 63
OSPF – The Interior Gateway Routing
Protocol
• OSPF allows Autonomous systems to be divided into
numbered areas, where an area is a network or a set of
contiguous networks.
• Every AS has a backbone area (area 0). All areas are
connected to the backbone.
• OSPF distinguishes four classes of routers:
– Internal routers are wholly within one area.
– Area border routers connect two or more areas.
– Backbone routers are on the backbone
– AS boundary routers talk to routers in other AS.
66. 66
BGP – The Exterior Gateway Routing Protocol
• BGP (Border Gateway Protocol) is a protocol
for exchanging routing information between
gateway hosts (each with its own router) in a
network of autonomous systems.
• BGP have been designed to allow many kinds
of routing policies to be enforced in the
interAS traffic.
67. 67
BGP – The Exterior Gateway Routing Protocol
• Exterior gateway protocol routers have to worry
about politics (security, billing, etc.)
– BGP (Border Gateway Protocol) is essentially a
distance vector protocol.
– But keep track of entire path.
– Discard the route through itself solve count-to-
infinity.
– Select route based on the distance (score). Any route
violating polices has infinite score and is discarded
as it pass F.
68. 68
BGP – The Exterior Gateway Routing
Protocol
(a) A set of BGP routers. (b) Information sent to F.
69. 69
Internet Multicating
• IP supports multicasting, using class D addresses.
• Two kinds of the group addresses are supported:
– Permanent groups:
• 224.0.0.1: all system on a LAN
• 224.0.0.2: all routers on a LAN
• 224.0.0.5: all OSPF routers on a LAN
• 224.0.0.6: all designated OSPF routers on a LAN
– Temporary groups must be created before used.
• The query and response packets sent and received by
multicast routers are called IGMP (Internet Group
Management Protocol). It has two kinds of packets:
query and response.
• Multicasting routing is done using spanning tree.