Sei sulla pagina 1di 85

Nader F.

Mir
Computer and Communication Networks
2nd Edition
Prentice Hall

ISBN: 0133814742

Copyright © 2015, Pearson Education Inc.,


All Rights Reserved

Chapter 5
Wide-Area Routing and Internetworking
Overview of Chapter 5

 IP packets and basic routing policies


 Path selection algorithms
 Intradomain routing protocols
 Interdomain routing protocols
 Internet Protocol version 6 (IPv6)
 Congestion control at the network layer

Chapter 5 Mir, Computer and Communication Networks, 2e 2


IPv4 Packets
The packet header format of IP version 4 (IPv4). The size of the
header is variable including: 20 bytes of fixed-length header and
a variable options field whose size is variable up to 40 bytes.

IPv4 packet header format


Chapter 5 Mir, Computer and Communication Networks, 2e 3
IPv4 Packets
 Version specifies the IP version.
 Header length (HL) specifies the length of the header
(including options and padding) in terms of 4-byte blocks.
For example, if the total header of a packet (including
options and padding) is 60B, HL=60B/4B=15 which is 1111
in binary.
 Type of service specifies the quality-of-service (QoS)
requirements of the packet, such as priority level, delay,
reliability, throughput, and cost.
 Total length specifies the total length of the packet in
bytes, including the header and data. A total of 16 bits are
assigned to this field.

Chapter 5 Mir, Computer and Communication Networks, 2e 4


IPv4 Packets
 Identification, flags, and fragment offset are used for
packet fragmentation and reassembly.
 Time to live specifies the maximum number of hops after
which a packet must be discarded.
 Protocol specifies the protocol used at the destination.
 Header checksum is a method of error detection and is
described in Chapter 3.
 Source address and destination address are 32-bit fields
specifying the source address and the destination address,
respectively.
 Options is a rarely used variable-length field to specify
security level, timestamp, and type of route.
 Padding is used to ensure that the header is a multiple of 32
bits.
Chapter 5 Mir, Computer and Communication Networks, 2e 5
Routing and Involvement of Protocol Stack

Chapter 5 Mir, Computer and Communication Networks, 2e 6


Routing Policy Parameters
Routing algorithms can be differentiated on several key
characteristics:

 Accuracy. An algorithm must operate correctly so that it can


find the destination in an appropriate amount of time.
 Simplicity. Low complexity of algorithms is particularly
important where routers with limited physical resources involve
software.
 Optimality. This refers to the ability of the routing algorithm to
select the best route.
 Stability. Routing algorithms must perform correctly in the
face of unforeseen circumstances, such as node failure and
routing table corruption.
Chapter 5 Mir, Computer and Communication Networks, 2e 7
Routing Policy Parameters

 Adaptability. When a failure happens in a network, an


algorithm should be able to adapt load increases or
decreases.
 Convergence. Routing algorithms must converge rapidly
when a network distributes routing update messages.
 Load balancing. A good routing algorithm balances load over
eligible links to avoid having a heavily and temporarily
congested link.

Chapter 5 Mir, Computer and Communication Networks, 2e 8


Principal Routing Policies and Protocols

1. Packet fragmentation and reassembly


2. Internet Control Message Protocol (ICMP)
3. Obtaining and assigning IP addresses
4. Dynamic Host Configuration Protocol (DHCP)
5. Network address translation (NAT)
6. Universal Plug and Play (UPnP)

Chapter 5 Mir, Computer and Communication Networks, 2e 9


Packet Fragmentation and Reassembly

 The physical capacity of networks enforces an upper bound on


the size of packets. The maximum transmission unit (MTU)
represents this restriction.
 For example: as a LAN standard, Ethernet limits the size of
flowing frames to 1,500 bytes.
 The objective of inducing this method is that we need a
mechanism that avoids requiring large buffers at intermediate
routers to store the fragments.
 This restriction requires the Internet Protocol to break up large
messages into fragments.

Chapter 5 Mir, Computer and Communication Networks, 2e 10


Packet Fragmentation and Reassembly

 The fragment sizes are limited to the MTU of the underlying


physical network.
 The fragments could in turn be split into smaller fragments,
 The identification, flag, and offset fields of the IP header
help with the fragmentation and reassembly process.
 The identification field is used to distinguish between
various fragments of different packets.
 The flag field has a more-fragment (MF) bit. When the MF
bit is set, it implies that more fragments are on their way.
 The offset field indicates the position of a fragment in the
sequence of fragments making up the packet. The lengths
of all the fragments, with the exception of the last one,
must be divisible by 8.
Chapter 5 Mir, Computer and Communication Networks, 2e 11
Packet Fragmentation and Reassembly

Example. Transmitting a packet of 3,500 bytes. The physical


layer requires an MTU of 1,500 bytes. The packet has an IP
header of 20 bytes plus a combined options and padding header
of 20 bytes. Fragment the packet, and specify the ID, MF, and
offset fields of all fragments.
Solution. The allowable data length 1500-20-20= 1460 bytes.
Because the 1,460-byte portion is not divisible by 8, the
allowable data length is limited to 1,456 bytes. Thus, including
the headers, the data to be transmitted of 3,540 bytes has to be
split into fragments of 1,456, 1,456, and 628 bytes:
fragment 1 = total length 1,456, MF 1, offset 0;
fragment 2 = total length 1,456, MF 1, offset 182; and
fragment 3 = total length 628, MF 0, and offset 364.
Chapter 5 Mir, Computer and Communication Networks, 2e 12
Internet Control Message Protocol (ICMP)

 ICMP is used by hosts or routers to transmit management and


routing information to each other at the network layer.
The need for ICPM:
 Typically ICMP is for reporting errors in wide area networks, as
the Internet Protocol may not be able to deliver a packet to its
destination, resulting in possible failures to connect to a
destination.
 Another issue—related and equally important—is that a
sender cannot know whether a delivery failure is a result of a
local or a remote technical difficulty.

Chapter 5 Mir, Computer and Communication Networks, 2e 13


Internet Control Message Protocol (ICMP)

 ICMP message is encapsulated in the data portion of an IP


packet (datagram).
 When an error occurs:
 ICMP reports it to the originating source of the connection.
 ICMP messages carry the header and the first 8 bytes of
the IP packet that caused the ICMP message to be
generated.
 The source of the ICMP message can determine the
original IP packet that caused the error.
 The source must interpret the error.

Chapter 5 Mir, Computer and Communication Networks, 2e 14


Typical ICMP Messages

Type Code Function

0 0 ping, echo reply

3 0 destination network unreachable

3 1 destination host unreachable

3 2 destination protocol unreachable

3 3 destination port unreachable

3 6 destination network unknown

9 0 router advertisement

10 0 router discovery
Chapter 5 Mir, Computer and Communication Networks, 2e 15
ICMP - Example

With ICMP, a redirect message cannot be sent to R1, since R6 does


not know the address of R1
Chapter 5 Mir, Computer and Communication Networks, 2e 16
Obtaining and Assigning IP Addresses

 IP addresses are organized by a nonprofit organization known


as the Internet Corporation for Assigned Names and Numbers
(ICANN).
 A block of addresses obtained from an ISP can be assigned
over hosts, servers, and router interfaces by a network
manager.
 A unique IP address must always be assigned to each host as
a client or server or router interface (input port or output port).
 Under some circumstances, a globally unique IP address
assignment can be avoided.

Chapter 5 Mir, Computer and Communication Networks, 2e 17


Obtaining and Assigning IP Addresses

Example. Suppose an ISP owns the address block


188.32.8.0/21.

Show how organizations A, B, and C each requesting 256 IP


addresses are allocated address blocks by the ISP.

Chapter 5 Mir, Computer and Communication Networks, 2e 18


Obtaining and Assigning IP Addresses
Solution. The ISP can divide its address block into several
contiguous address blocks and give each of the address blocks
to each of the three organizations requesting address blocks.

The distribution of address blocks is shown below. The third byte


(.8.) is 0000,1000 in binary, and /21 indicates the first 5 bits of
the third byte (i.e., 00001xxx). Thus, 188.32.8.0/21 would give
the ISP all addresses from 188.32.8.0 to 188.32.15.255. The ISP
can then continue assigning the remaining address blocks to
other organizations, companies, or private entities.
 Address block of ISP: 188.32.8.0/21
 Allocated address block to organization A: 188.32.8.0/24
 Allocated address block to organization B: 188.32.9.0/24
 Allocated address block to organization C: 188.32.10.0/24
Chapter 5 Mir, Computer and Communication Networks, 2e 19
Dynamic Host Configuration Protocol (DHCP)
 Automatically assigning an IP address to a host is handled
through a protocol called DHCP.
 DHCP allows a host to learn:
 its subnet mask,
 the address of its first-hop router,
 the addresses of other major local servers.
 Because this addressing automation lets a host learn several
key pieces of information in a network, DHCP is sometimes
called a plug-and-play protocol,

Chapter 5 Mir, Computer and Communication Networks, 2e 20


Process of Dynamic IP Address Allocation

 A given host is allocated the same IP address each time it


connects to the network.
 A new host joining the network may be assigned a temporary
IP address that will be different each time the host connects to
the network.
 If any network administrator does not have a sufficient number
of IP addresses, DHCP is used to assign each of its
connecting hosts a temporary IP address.
 When a host joins or leaves, the management server must
update its list of available IP addresses. If a host joins the
network, the server assigns an available and arbitrary IP
address; each time a host leaves, its address is included in the
pool of available addresses.
Chapter 5 Mir, Computer and Communication Networks, 2e 21
DHCP Steps

Chapter 5 Mir, Computer and Communication Networks, 2e 22


DHCP Steps

Chapter 5 Mir, Computer and Communication Networks, 2e 23


DHCP Steps
 In step 1, the arriving host needs to discover a DHCP
 In step 2, any DHCP server receiving the discover packet
responds to the host with an “offer” packet that is also
broadcast to all nodes on the subnet, again using the IP
broadcast address of 255.255.255.255.
 In step 3, the arriving host chooses from among one or more
DHCP server offers and responds to its selected offer with a
DHCP request packet. This step is also done by multicasting
the request packet with a destination multicast address of
255.255.255.255.
 In step 4, the DHCP server responds by either confirming the
requested parameters of the host (ACK) or denying them
(NAK).

Chapter 5 Mir, Computer and Communication Networks, 2e 24


Network Address Translation (NAT)
 Fact: The total allocated IP addresses are still limited to a
certain level by the associated ISP.
 Besides the popular IPv6, an alternative solution, called
network address translation (NAT), can be used to
overcome the challenge presented by this issue.
 The idea:
 all the users and hosts of a private network do not need to
have globally unique addresses.
 Instead, they can be assigned private unique IP addresses
within their own private networks,
 a NAT-enabled router or server that connects the private
network to the outside world can translate these addresses
to globally unique addresses.
Chapter 5 Mir, Computer and Communication Networks, 2e 25
Network Address Translation (NAT)
 The NAT-enabled router hides from the outside world the
details of the private network.
 The router acts as a single networking device with a single IP
address to the outside world. NAT protocol recommends three
IP address ranges to be reserved for NAT applications. These
IP address ranges are:
 10.x.x.x
 172.16.x.x and 172.31.x.x
 192.168.x.x

Chapter 5 Mir, Computer and Communication Networks, 2e 26


Network Address Translation (NAT)
Example.
 Assume that a host 1 belonging to a private network has an
internal IP address and port number combination of 10.0.0.2-
4527.
 Host 1 requests a connection to server 1 housed in a public
network with IP address 144.55.34.2 and port number 3843,
which belongs to a different country.
 Suppose that the outside port of the connecting NAT-enabled
router is assigned IP address 197.36.32.4.
 The router has dedicated 5557 to host 1 to act as a public port
number. Show the details of the NAT operation.

Chapter 5 Mir, Computer and Communication Networks, 2e 27


Network Address Translation (NAT)
Solution.

Chapter 5 Mir, Computer and Communication Networks, 2e 28


Universal Plug and Play (UPnP)
 UPnP is a protocol that uses the Internet to enable client hosts
to be plugged into a network and automatically know about
each other.
 UPnP makes the task of joining and leaving a network simple
and agile.
 UPnP also allows a host to discover and configure a nearby
NAT device:
 When a host is plugged into the network, it configures
itself, acquires a TCP/IP address, and utilizes a discovery
protocol to announce its presence on the network to other
networking devices.
 The discovery protocol is based on the Hypertext Transfer
Protocol (HTTP.

Chapter 5 Mir, Computer and Communication Networks, 2e 29


Universal Plug and Play (UPnP)
 When a host plugs into a private network:
 an application program running in the host requests A NAT
mapping between its private IP address and port number
and the public IP address and port number.
 the host depends on NAT to accept the request. If the
request is accepted, the NAT device produces the mapping
by which outside users can initiate connections to the
public IP address and port number.

Chapter 5 Mir, Computer and Communication Networks, 2e 30


Path Selection Algorithms
 A link cost between a pair of source and destination nodes
mainly refers to the number of packets currently waiting ahead
in the destination node.
 The path selection process determines a path from a source
host to a destination host and is classified in several ways:
 Least-cost path: the lowest-cost path must be determined
for routing. The most important algorithms:
1. Dijkstra’s algorithm
2. Bellman-Ford algorithm
 Non-least-cost path: the determination of a route is not
based on the cost of a path The most important algorithms:
1. packet flooding algorithm
2. deflection routing algorithm

Chapter 5 Mir, Computer and Communication Networks, 2e 31


Dijkstra’s Algorithm

Chapter 5 Mir, Computer and Communication Networks, 2e 32


Dijkstra’s Algorithm - Example

Chapter 5 Mir, Computer and Communication Networks, 2e 33


Dijkstra’s Algorithm - Example


kb AB
AC
AF
AE
AD
AG

Chapter 5 Mir, Computer and Communication Networks, 2e 34


Bellman-Ford Algorithm

Chapter 5 Mir, Computer and Communication Networks, 2e 35


Bellman-Ford Algorithm - Example

Chapter 5 Mir, Computer and Communication Networks, 2e 36


Bellman-Ford Algorithm - Example

Chapter 5 Mir, Computer and Communication Networks, 2e 37


Packet Flooding Algorithm
With packet flooding algorithm, a packet received from a node
is copied and transmitted on all outgoing links of that node
except for the link that the packet arrived from.

Chapter 5 Mir, Computer and Communication Networks, 2e 38


Deflection Routing Algorithm
With deflection routing algorithm (hot-potato routing algorithm), a packet is
examined with respect to its destination. If the requested link is free, the
packet is sent on that link; otherwise, the packet is deflected onto another
link, selected at random. The deflected packet is given an increment on its
priority field. This increment gives the packet a better chance to win the
contention with others in future contentions.

Chapter 5 Mir, Computer and Communication Networks, 2e 39


Routing Protocols
Routing protocols are classified into:
I. intradomain routing protocol intranetwork routing
protocol (intranet) are mainly classified into:
1. Open Shortest Path First (OSPF) protocol
2. Routing Information Protocol (RIP)

II. interdomain routing protocol or internetwork routing


protocol or extranet. An intradomain routing protocol
routes packets within a defined domain, such as for
routing e-mail or Web browsing within an institutional
network.

Chapter 5 Mir, Computer and Communication Networks, 2e 40


Open Shortest Path First (OSPF) Protocol

Chapter 5 Mir, Computer and Communication Networks, 2e 41


Open Shortest Path First (OSPF) Protocol

Link-State Process:
 In the link-state process, each router sends routing
information to all routers, not only to the neighbors.
 the transmitting router discovers link-cost changes, so
a new link cost is formed.
 Since each router receives all link costs from all routers,
it is able to calculate the least-cost path to each
destination of the network.
 The router can use any efficient routing algorithm, such
as Dijkstra’s algorithm, to find the shortest path.
 The core function of the link-state process is the packet
flooding algorithm, which requires no network topology
information.

Chapter 5 Mir, Computer and Communication Networks, 2e 42


Open Shortest Path First (OSPF) Protocol

Packet header Format:

Chapter 5 Mir, Computer and Communication Networks, 2e 43


Open Shortest Path First (OSPF) Protocol

OSPF Packet header Format:

 Version number indicates the version of OSPF.


 Type is one of the five types of packets for OSPF to choose
from: hello, database description, link-state request, link-
state update, and link-state acknowledgment.
 Packet length specifies the length of the OSPF packet.
 Router ID specifies the packet’s source router ID.
 Area ID refers to the area that the source router belongs to.
 Checksum specifies the standard IP checksum of the
packet contents
 Authentication type identifies which authentication method
to choose
 Authentication specifies the authentication method
Chapter 5 Mir, Computer and Communication Networks, 2e 44
OSPF - Example

Example. Apply OSPF protocol on router A located in the


network. Assume that each of gateway routers C, F, D, G, and
B is further attached to a destination with IP addresses
respectively 152.1.2.45, 178.3.3.2, 123.45.1.1, 148.11.58.2,
and 165.2.2.33. Also assume router A uses 255.255.255.0 as a
mask to determine subnets if there is a need for it.

Chapter 5 Mir, Computer and Communication Networks, 2e 45


Step 3 of OSPF –
A Routing Table for the Example

Destination Designated Destination Next Cost Path Updated

IP Address Mask (If Needed) Router Hop Total Cost

152.1.2.45 255.255.255.0 C C 1 AC 1

178.3.3.2 255.255.255.0 F F 1 AF 1

- - E C 1 ACE 3

123.45.1.1 255.255.255.0 D C 1 ACED 4

148.11.58.2 255.255.255.0 G C 1 ACEDG 6

165.2.2.33 255.255.255.0 B C 1 ACEDB 7

Chapter 5 Mir, Computer and Communication Networks, 2e 46


Routing Information Protocol (RIP)

Chapter 5 Mir, Computer and Communication Networks, 2e 47


Routing Information Protocol (RIP)

Distance Vector Process:


 Was designed mainly for small network topologies.
 The term distance vector derives from the fact that the
protocol includes its routing updates with a vector of
distances, or hop counts.
 Using RIP packets, RIP sends the information containing
“entire routing table” to only “neighboring” nodes.
 In this protocol, each individual node maintains three
vectors:
1. link-cost vector
2. distance vector
3. next-hop vector

Chapter 5 Mir, Computer and Communication Networks, 2e 48


Routing Information Protocol (RIP)
Packet header Format:

 Command indicates a request with value 1 or a reply with


value 2.
 Version number specifies the version: RIP-1 or RIP-2.
 Address family identifier shows the type of address, such as
an IP address.
 IP address provides the IP address in a particular network.
 Metric identifies the distance from a router to a specified
network.
Chapter 5 Mir, Computer and Communication Networks, 2e 49
Interdomain Routing Protocols

 interdomain (internetwork )routing protocols create a network


of networks.
 Interdomain routing protocols route packets outside of a
defined domain (autonomous system (AS)) .

Chapter 5 Mir, Computer and Communication Networks, 2e 50


Autonomous System (AS)

 An autonomous system (AS) in the Internet is defined as a


collection of connected IP routing devices under the control
of one network administrative entity that presents a common
defined routing policy to the Internet.
 The need for autonomous systems is attributed to the
increasing number of routers leading to large overhead
involved in computing, storing, and communicating routing
information.
 An autonomous system can also be called a domain with the
company operating the domain called the ISP.
 A corporation’s internal network can be a single AS.
 Any ISP must have an officially registered autonomous
system number (ASN).

Chapter 5 Mir, Computer and Communication Networks, 2e 51


Border Gateway Protocol (BGP)

 The Border Gateway Protocol (BGP) is a preferred routing


protocol for interdomain (among autonomous systems)
communications.

 BGP is involved in making routing decisions based on


network policies, a network’s path status, and rule sets
configured by a network administrator.

 With BGP, routers exchange comprehensive information


about routes to a certain destination instead of simply costs
and the best link

Chapter 5 Mir, Computer and Communication Networks, 2e 52


BGP Packet Format – Open Packet
(a)Open packet. This packet requests establishment of a
relationship between two routers. This packet has the
following header fields:
• Optional Parameters is a variable-length field containing
a list of optional parameters used to advertise the
support for optional capabilities, such as multiprotocol
extensions, route refresh, etc.
• Optional Parameters Length is a 1-byte field expressing
the total length of the Optional Parameters field.

Chapter 5 Mir, Computer and Communication Networks, 2e 53


BGP Packet Format - Open Packet
• BGP Identifier is a 4-byte field indicating the IP address
assigned to an originating BGP router.
• Hold Time is a 2-byte field indicating the number of
seconds proposed by the originator for the hold time of a
BGP session.
• My Autonomous System is a 2-byte field to indicate the AS
number of the originator. Version is a 1-byte field indicating
the BGP version. Type is a 1-byte field specifying one of
the four packet types.
• Length is a 2-byte field specifying the total length of the
packet including the header.
• Marker is a 16-byte field used to detect the loss of
synchronization between BGP peers and also to
authenticate the packet.
Chapter 5 Mir, Computer and Communication Networks, 2e 54
BGP Packet Format – Update Packet
(b) Update packet. This packet conveys update information
about routes and advertises a single feasible route, or
withdrawn multiple unfeasible routes, or both.
• Network Layer Reachability Information (NLRI) is a
variable-length field containing a list of IP prefixes that can
be reached via this path using the [Length – Prefix]. A
Length value of 0 indicates a prefix that matches all IP
prefixes.

Chapter 5 Mir, Computer and Communication Networks, 2e 55


BGP Packet Format – Update Packet
• Path Attributes is a variable-length field listing the attributes
associated with the Network Layer Reachability Information
field. Each path attribute is a variable-length of [Attribute
Type, Attribute Length, Attribute Value].
• Total Path Attribute Length is a 2-byte field that indicates
the total length of the Path Attributes field, in bytes.
• Withdrawn Routes is a variable-length field containing a list
of unreachable routes that are to be withdrawn from
service.
• Unfeasible Routes Length is a 2-byte field indicating the
total length of the Withdrawn Routes field, in bytes.
• Type, Length, and Marker fields have similar definitions as
appeared for the ones in Open packet.

Chapter 5 Mir, Computer and Communication Networks, 2e 56


BGP Packet Format – Keep-Alive Packet
(c) Keep-alive packet.
Once a relationship between two routers is established, this
packet confirms its neighbor relationship frequently.
Type, Length, and Marker fields have similar definitions as
appeared for the ones in Open packet.

Chapter 5 Mir, Computer and Communication Networks, 2e 57


BGP Packet Format – Update Packet
(d) Notification packet. This packet is used when an error
occurs.
 Error Subcode is 1-byte field providing more specific
information about the nature of the reported error. Each
 Error Code may have one or more Error Subcodes
associated with it. Error Code is a 1-byte field indicating the
error code such as 1 for message header error or code 4
for Hold Timer Expired.
 Type, Length, and Marker fields have similar definitions as
appeared for the ones in Open packet.

Chapter 5 Mir, Computer and Communication Networks, 2e 58


BGP Details
1. Neighbor relationship. A router may reject its
participation in establishing a neighbor relationship for
several reasons, such as the rule of the domain, overload,
or a temporary malfunctioning of external links.
2. Neighbor maintenance. Neighbor maintenance is a
process of maintaining the neighbor relationship already
established. Normally, each corresponding router needs to
find out whether the relationship with the other router is
still available. For this reason, two routers send keep-alive
packet to each other.
3. Network maintenance. Each router keeps a database of
the subnets that it can reach and tries to get the best route
for each subnet. One of the most important techniques in
BGP is the path vector routing protocol.
Chapter 5 Mir, Computer and Communication Networks, 2e 59
BGP Details
Each router sends its link cost to all other routers and then
starts routing calculations. Two issues can arise in link-state
routing:
1. Different independent systems can use different costs and
have different limitations. The link-state protocol allows a
router to make the topology, and its metrics may be
different for each independent system. In this case, it is
impossible to create a reliable routing algorithm.
2. When flood routing occurs, the use of an interdomain
routing protocol across the independent system can be
unstable.

Chapter 5 Mir, Computer and Communication Networks, 2e 60


BGP Details
To resolve these issues :
 BGP considers an alternative solution: the path vector
routing protocol, which provides information about how to
reach a network given a certain router and identifies which
autonomous system should be visited.
 Each path has information about cost and distance.
 All visited autonomous systems and all components of a
domain reaching the destination network are listed in each
routing information package.
 Thus, a router can be programmed to refuse the
acceptance of a particular path if the information about the
path is not included in the package it receives.

Chapter 5 Mir, Computer and Communication Networks, 2e 61


BGP Details

• Host 1 tries to establish a TCP connection to host 2. Each two autonomous systems
can be connected through one or more pairs of border routers; [R15 and R24] act as
paired border routers for autonomous systems 1 and 2 and can exchange routing
information and are often referred to as BGP peers when they engage a long-haul
TCP connection.
• TCP connections can be made through one of the paired border routers [R13 and
R21], [R13 and R24], and [R15 and R24]. Each pair of internal routers creates a
mesh of TCP connections within each autonomous system.
Chapter 5 Mir, Computer and Communication Networks, 2e 62
BGP Details - Routing
 Each autonomous system learns which destinations are reachable
via its neighboring autonomous systems.

 A destination in BGP is the prefix of a CIDR address representing


one or more subnets.
Example: if a subnet with CIDR address 188.32.8.0/24 is attached
to an autonomous system, the autonomous system uses BGP to
advertise the prefix 188.32.8.0/24 (the first 24 bits of 188.32.8.0).

 In an ISP, every border router learns about all routes experienced


by all the other border routers.
Example: when a border router in an ISP learns about an address
prefix, all other routers in the ISP learn of this prefix. This makes it
possible for any router of the ISP to reach the prefix.
Chapter 5 Mir, Computer and Communication Networks, 2e 63
iBGP and eBGP
BGP utilizes two primary modes of data exchange,
 internal BGP (iBGP)
 external BGP (eBGP)

 The My Autonomous System field of the Open packet


indicates the AS number of the originator, and determines
whether the BGP session is iBGP or eBGP.

Chapter 5 Mir, Computer and Communication Networks, 2e 64


iBGP and eBGP
 The iBGP mode may be used for routing within an
autonomous system to communicate with internal peers, and
runs between two BGP routers in the same autonomous
system.
 A BGP session between two BGP peers is said to be an iBGP
session if the BGP peers are in the same autonomous
system. To avoid loops within an autonomous system, an
iBGP peer does not advertise the prefix it learned from a pair
of other iBGP peers.
 BGP is not set up to propagate routes throughout the
autonomous system
 internal peers are configured to advertise any route
advertised by one router to all peers within the autonomous
system. To advertise routes to internal peers, iBGP mode is
used.
Chapter 5 Mir, Computer and Communication Networks, 2e 65
iBGP and eBGP
 In contrast, eBGP can be used for routing beyond an
autonomous system to communicate with external peers and
runs between two BGP routers in different autonomous
systems.
 In eBGP, peering occurs in two different autonomous
systems.
 With eBGP, the time-to-live (TTL) field of a packet is set to 1,
implying that peers are directly connected.
 An eBGP peer advertises all the best routes it knows or that it
has learned from its peers.
 External peers are configured to advertise routes experienced
from eBGP peers to other peers.

Chapter 5 Mir, Computer and Communication Networks, 2e 66


Route Selection Policy with BGP
Some of the important policies used in BGP:
 Route selection based on the highest preference of the
associated autonomous system, set locally by a router and
learned by another router, and implemented by a network
administrator.
 Route selection based on the least number of autonomous
systems. This policy is applied when there are multiple routes
from a source to a destination crossing other autonomous
systems.
 Route selection based on the least-cost path determined
within the autonomous system.
 Route selection based on a learning process so that each
router in an autonomous system may learn a route from the
router it is connected to.
Chapter 5 Mir, Computer and Communication Networks, 2e 67
Internet Protocol Version 6 (IPv6)

An IPv6 packet format

Chapter 5 Mir, Computer and Communication Networks, 2e 68


IPv6 Packet Header
 Version is the same as in IPv4, indicating the version number
of the protocol. Therefore, IPv6 carries a value of 6 for this
field
 Traffic class is an 8-bit field and specifies the priority level
assigned to a packet, and its functionality is similar to ToS in
IPv4.
 Flow label is a 20-bit field and indicates a certain flow of
datagrams (packets).
 Payload length is a 16-bit field that specifies the number of
data (payload) bytes of the datagram.
 Next header specifies the protocol, such as TCP or UDP, to
which the data field of the datagram is delivered.
 Hop limit is the same as the time-to-live field in IPv4.
 Source address and destination address are each
identified
Chapter 5 by a 128-bit field
Mir, Computer address.
and Communication Networks, 2e 69
IPv6 Addressing Scheme
 IPv6 network addressing scheme efficiently represents the
128-bit address:

 Hexadecimal digits are used, A colon separates each of the


four hexadecimal digits.

Example: 2FB4:10AB:4123:CEBF:54CD:3912:AE7B:0932 can


be a source address.

 Compression the address: The address is commonly denoted


in a more compact form. For example, an address denoted by
2FB4:0000:0000:0000:54CD:3912:000B:0932 can be
compressed to 2FB4::::54CD:3912:B:932.

Chapter 5 Mir, Computer and Communication Networks, 2e 70


IPv6 Extension Headers

Chapter 5 Mir, Computer and Communication Networks, 2e 71


IPv6 Addressing Scheme
 IPv6 network addressing scheme efficiently represents the
128-bit address:

 Hexadecimal digits are used, A colon separates each of the


four hexadecimal digits.

Example: 2FB4:10AB:4123:CEBF:54CD:3912:AE7B:0932 can


be a source address.

 Compression the address: The address is commonly denoted


in a more compact form. For example, an address denoted by
2FB4:0000:0000:0000:54CD:3912:000B:0932 can be
compressed to 2FB4::::54CD:3912:B:932.

Chapter 5 Mir, Computer and Communication Networks, 2e 72


Congestion Control at the Network Layer

Comparison among networks in which no congestion,


moderate congestion, and severe congestion exist
Chapter 5 Mir, Computer and Communication Networks, 2e 73
Congestion Control at the Network Layer

Congestion can be either logical or physical. Host A and host B, each


located in a different LAN, try to communicate, passing through their
connected ISP domain. The queueing feature in the two remote devices,
such as the LAN’s layer 3 switches can create a logical bottleneck
Chapter 5 between host
Mir, Computer and A andNetworks,
Communication host 2eB. 74
Unidirectional Congestion Control

A network can be controlled unidirectionally through back-pressure


signaling, transmission of choke packets, and traffic policing.
Chapter 5 Mir, Computer and Communication Networks, 2e 75
Choke Packet Transmission

 In choke-packet transmission, choke packets are sent to


the source node by a congested node to restrict the flow of
packets from the source node.

 A router or even an end host can send these packets


when it is near full capacity, in anticipation of a condition
leading to congestion at the router.

 The choke packets are sent periodically until congestion is


relieved.

 On receipt of the choke packets, the source host reduces


its traffic-generation rate until it stops receiving them.
Chapter 5 Mir, Computer and Communication Networks, 2e 76
Traffic Policing

 The policing congestion method is quite simple.

 An edge router, acts as a “traffic police” and directly


monitors and controls its immediate connected consumers.

 In the figure, R1 is policing traffic coming from “other parts


of WAN” flowing into the network, and may prohibit or slow
down certain patterns of traffic to keep the network
available bandwidth and functionality in good shape.

Chapter 5 Mir, Computer and Communication Networks, 2e 77


Bidirectional Congestion Control

Chapter 5 Mir, Computer and Communication Networks, 2e 78


Bidirectional Congestion Control
 An ISP needs to balance the traffic bidirectionally between
two hot traffic spots and control the rate at which these spots
receive traffic.

 This traffic control has to be based on observable network


conditions, such as delay and packet loss.

 If a source detects long delays and packet losses, it slows


down its packet flow rate.

 All sources in the network adjust their packet-generation rate


similarly; thus, congestion comes under control

Chapter 5 Mir, Computer and Communication Networks, 2e 79


Random Early Detection (RED)
 Random early detection (RED) avoids congestion by
detecting and taking appropriate measures early.

 When packet queues in a router’s buffer experience


congestion, they discard all incoming packets that could not
be kept in the buffer.

 This tail-drop policy leads to two serious problems:


1. global synchronization of TCP sessions
2. prolonged congestion in the network.

 RED overcomes the disadvantages of the tail-drop policy in


queues by randomly dropping the packets when the average
queue size exceeds a given minimum threshold.
Chapter 5 Mir, Computer and Communication Networks, 2e 80
RED Setup at Routers

Chapter 5 Mir, Computer and Communication Networks, 2e 81


RED Setup at Routers
 With RED, a router continually monitors its own:
1. queue length, and
2. available buffer space.

 When the buffer space begins to fill up and the router detects
the possibility of congestion, it notifies the source implicitly
by dropping a few packets from the source.

 The source detects this through one of the


1. a time-out period or
2. a duplicate ACK.

Chapter 5 Mir, Computer and Communication Networks, 2e 82


RED Setup at Routers

 Consequently, the router drops packets earlier than it has to


and thus implicitly notifies the source to reduce its
congestion window size.

 The “random” part of the RED method suggests that the


router drops an arriving packet with some drop probability
when the queue length exceeds a threshold. This scheme
computes the average queue length, , recursively by

Chapter 5 Mir, Computer and Communication Networks, 2e 83


A Quick Estimation of Link Blocking –
Lee’s Method
 Rule 1 (Parallel connection of links) the blocking probability
is estimated by forming the product of the blocking
probabilities for the subnetworks.
 Rule 2 (Serial connection of links) the probability of blocking
is estimated by forming the product of the probabilities of no
blocking for the network. This method makes the assumption
that the probability that a given link is busy is independent
from link to link.

Chapter 5 Mir, Computer and Communication Networks, 2e 84


A Quick Estimation of Link Blocking –
Lee’s Method

Chapter 5 Mir, Computer and Communication Networks, 2e 85

Potrebbero piacerti anche