Você está na página 1de 22

IP ADDRESSING, SUBNETTING,

SUPERNETTING, CIDR TCP/IP AND


ROUTING PROTOCOLS
JTO Phase – I Data Communications

CHAPTER 8
IP ADDRESSING, SUBNETTING, SUPERNETTING, CIDR TCP/IP
AND ROUTING PROTOCOLS

CONTENTS

8.1 OBJECTIVES

8.2 INTRODUCTION

8.3 TCP

8.4 IP

8.5 CONCEPT OF IP ADDRESS

8.6 DOTTED DECIMAL NOTATION

8.7 CONCEPT OF SUBNETING

8.8 VLSM

8.9 CIDR

8.10 STATIC & DYNAMIC ROUTING

8.11 ROUTING PROTOCOL

8.12 RIP

8.13 OSPF

8.14 INTERIOR & EXTERIOR ROUTING

8.15 AUTONOMOUS SYSTEM

8.16 BGPV4

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 141


JTO Phase – I Data Communications

CHAPTER 8
IP ADDRESSING, SUBNETTING, SUPERNETTING,
CIDR TCP/IP AND ROUTING PROTOCOLS

8.1OBJECTIVES
The objectives of this chapter is to understand
i) Concept of TCP/IP
ii) Concept of IP Address
iii) Concept of class A, B, and C IP addresses
iv) Concept of subnetting
v) Concept of VLSM
vi) Concept of Classless Inter-Domain Routing (CIDR)
vii) Concept of Routing Protocol
viii) RIP, OSPF and BGP

8.2 INTRODUCTION
In the mid-1990s, the Internet is a dramatically different network than when it
was first established in the early 1980s. There is a direct relationship between the
value of the Internet and the number of sites connected to the Internet. Over the past
few years, the Internet has experienced two major scaling issues as it has struggled to
provide continuous and uninterrupted growth. The eventual exhaustion of the IPv4
address space The ability to route traffic between the ever increasing number of
networks that comprise the Internet The first problem is concerned with the eventual
depletion of the IP address space.

8.3 TCP
TCP is a connection-oriented transport protocol that sends data as an
unstructured stream of bytes. By using sequence numbers and acknowledgment
messages, TCP can provide a sending node with delivery information about packets
transmitted to a destination node. Where data has been lost in transit from source to
destination, TCP can retransmit the data until either a timeout condition is reached or
until successful delivery has been achieved. TCP can also recognize duplicate
messages and will discard them appropriately. If the sending computer is transmitting
too fast for the receiving computer, TCP can employ flow control mechanisms to slow
data transfer. TCP can also communicate delivery information to the upper-layer
protocols and applications it supports. Figure below shows the relationship of the
Internet Protocol Suite to the OSI Reference Model

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 142


JTO Phase – I Data Communications

8.4 IP
IP is the primary layer 3 protocol in the Internet suite. In addition to
internetwork routing, IP provides error reporting and fragmentation and reassembly of
information units called datagrams for transmission over networks with different
maximum data unit sizes. IP represents the heart of the Internet protocol suite.

IP addresses are globally unique, 32-bit numbers assigned by the Network


Information Center. Globally unique addresses permit IP networks anywhere in the
world to communicate with each other.

An IP address is divided into three parts. The first part designates the network
address, the second part designates the subnet address, and the third part designates
the host address.

IP addressing supports three different network classes. Class A networks are


intended mainly for use with a few very large networks, because they provide only 8
bits for the network address field. Class B networks allocate 16 bits, and Class C
networks allocate 24 bits for the network address field. Class C networks only provide
8 bits for the host field, however, so the number of hosts per network may be a
limiting factor. In all three cases, the leftmost bit(s) indicate the network class. IP
addresses are written in dotted decimal format; for example, 34.0.0.1. Figure below
shows the address formats for Class A, B, and C IP networks.

CLASS A 0

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 143


JTO Phase – I Data Communications

Host N/W Host

CLASS B 10

Host N/W Host

CLASS C 110

Host N/W Host

8.5 CONCEPT OF IP ADDRESS


The current version of IP, IP version 4 (IPv4), defines a 32-bit address which
means that there are only 232 (4,294,967,296) IPv4 addresses available. This might
seem like a large number of addresses, but as new markets open and a significant
portion of the world's population becomes candidates for IP addresses, the finite
number of IP addresses will eventually be exhausted. The address shortage problem is
aggravated by the fact that portions of the IP address space have not been efficiently
allocated. Also, the traditional model of classful addressing does not allow the address
space to be used to its maximum potential.

In order to provide the flexibility required to support different size networks,


the designers decided that the IP address space should be divided into three different
address classes - Class A, Class B, and Class C. This is often referred to as "classful"
addressing because the address space is split into three predefined classes, groupings,
or categories. Each class fixes the boundary between the network-prefix and the host-
number at a different point within the 32-bit address.

One of the fundamental features of classful IP addressing is that each address


contains a self-encoding key that identifies the dividing point between the network-
prefix and the host-number.

CLASS A NETWORKS (/8 PREFIXES)


Each Class A network address has an 8-bit network-prefix with the highest
order bit set to 0 and a seven-bit network number, followed by a 24-bit host-number.
Today, it is no longer considered 'modern' to refer to a Class A network. Class A
networks are now referred to as "/8s" (pronounced "slash eight" or just "eights") since
they have an 8-bit network-prefix. A maximum of 126 (27 -2) /8 networks can be
defined. The calculation requires that the 2 is subtracted because the /8 network
0.0.0.0 is reserved for use as the default route and the /8 network 127.0.0.0 (also
written 127/8 or 127.0.0.0/8) has been reserved for the "loopback" function. Each /8
supports a maximum of 16,777,214 (224-2) hosts per network. The host calculation
requires that 2 is subtracted because the all-0s ("this network") and all-1s
("broadcast") host-numbers may not be assigned to individual hosts.

CLASS B NETWORKS (/16 PREFIXES)

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 144


JTO Phase – I Data Communications

Each Class B network address has a 16-bit network-prefix with the two
highest order bits set to 1-0 and a 14-bit network number, followed by a 16-bit host-
number. Class B networks are now referred to as"/16s" since they have a 16-bit
network-prefix.A maximum of 16,384 (214 ) /16 networks can be defined with up to
65,534 (216 -2) hosts per network.

CLASS C NETWORKS (/24 PREFIXES)


Each Class C network address has a 24-bit network-prefix with the three
highest order bits set to 1-1-0 and a 21-bit network number, followed by an 8-bit host-
number. Class C networks are now referred to as "/24s" since they have a 24-bit
network-prefix. A maximum of 2,097,152 ( 221 )/24 networks can be defined with up
to 254 (28 -2) hosts per network.

8.6 DOTTED-DECIMAL NOTATION


To make Internet addresses easier for human users to read and write, IP
addresses are often expressed as four decimal numbers, each separated by a dot. This
format is called "dotted-decimal notation."Dotted-decimal notation divides the 32-bit
Internet address into four 8-bit (byte) fields and specifies the value of each field
independently as a decimal number with the fields separated by dots.

.The classful A, B, and C octet boundaries were easy to understand and


implement, but they did not foster the efficient allocation of a finite address space. A
/24, which supports 254 hosts, is too small while a /16, which supports 65,534 hosts,
is too large. In the past, the Internet has assigned sites with several hundred hosts a
single /16 address instead of a couple of /24s addresses.

8.7 SUBNETTING
In 1985, RFC 950 defined a standard procedure to support the subnetting, or division,
of a single Class A, B, or C network number into smaller pieces. Subnetting was
introduced to overcome some of the problems that parts of the Internet were
beginning to experience with the classful two-level addressing hierarchy:

Subnetting attacked the expanding routing table problem by ensuring that the
subnet structure of a network is never visible outside of the organization's private
network. The route from the Internet to any subnet of a given IP address is the same,
no matter which subnet the destination host is on. This is because all subnets of a
given network number use the same network-prefix but different subnet numbers. The
routers within the private organization need to differentiate between the individual
subnets, but as far as the Internet routers are concerned, all of the subnets in the
organization are collected into a single routing table entry. This allows the local
administrator to introduce arbitrary complexity into the private network without
affecting the size of the Internet's routing tables. Subnetting overcame the registered
number issue by assigning each organization one (or at most a few) network
number(s) from the IPv4 address space. The organization was then free to assign a
distinct subnetwork number for each of its internal networks. This allows the
organization to deploy additional subnets without needing to obtain a new network
number from the Internet.

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 145


JTO Phase – I Data Communications

The router accepts all traffic from the Internet addressed to network 130.5.0.0,
and forwards traffic to the interior subnetworks based on the third octet of the classful
address. The deployment of subnetting within the private network provides several
benefits: The size of the global Internet routing table does not grow because the site
administrator does not need to obtain additional address space and the routing
advertisements for all of the subnets are combined into a single routing table entry.
The local administrator has the flexibility to deploy additional subnets without
obtaining a new network number from the Internet. Route flapping (i.e., the rapid
changing of routes) within the private network does not affect the Internet routing
table since Internet routers do not know about the reachability of the individual
subnets - they just know about the reachability of the parent network number.
Extended-Network-Prefix Internet routers use only the network-prefix of the
destination address to route traffic to a subnetted environment. Routers within the
subnetted environment use the extended-network- prefix to route traffic between the
individual subnets. The extended-network-prefix is composed of the classful network-
prefix and the subnet-number.
The extended-network-prefix has traditionally been identified by the subnet
mask. For example, if you have the /16 address of 130.5.0.0 and you want to use the
entire third octet to represent the subnet-number, you need to specify a subnet mask of
255.255.255.0. The bits in the subnet mask and the Internet address have a one-to-one
correspondence. The bits of the subnet mask are set to 1 if the system examining the
address should treat the corresponding bit in the IP address as part of the extended-
network- prefix. The bits in the mask are set to 0 if the system should treat the bit as
part of the host-number.
The standards describing modern routing protocols often refer to the extended-
network-prefix- length rather than the subnet mask. The prefix length is equal to the
number of contiguous one-bits in the traditional subnet mask. This means that
specifying the network address 130.5.5.25 with a subnet mask of 255.255.255.0 can
also be expressed as 130.5.5.25/24. The /<prefix-length> notation is more compact
and easier to understand than writing out the mask in its traditional dotted-decimal
format.
8.8 VARIABLE LENGTH SUBNET MASKS (VLSM)
In 1987, RFC 1009 specified how a subnetted network could use more than
one subnet mask. When an IP network is assigned more than one subnet mask, it is
considered a network with "variable length subnet masks" since the extended-
network-prefixes have different lengths.RIP-1 Permits Only a Single Subnet Mask
When using RIP-1, subnet masks have to be uniform across the entire network-prefix.
RIP-1 allows only a single subnet mask to be used within each network number
because it does not provide subnet mask information as part of its routing table update
messages. In the absence of this information, RIP-1 is forced to make very simple
assumptions about the mask that should be applied to any of its learned routes.

How does a RIP-1 based router know what mask to apply to a route when it
learns a new route from a neighbor? If the router has a subnet of the same network
number assigned to a local interface, it assumes that the learned subnetwork was
defined using the same mask as the locally configured interface. However, if the
router does not have a subnet of the learned network number assigned to a local
interface, the router has to assume that the network is not subnetted and applies the
route's natural classful mask.Assuming that Port 1 of a router has been assigned the IP

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 146


JTO Phase – I Data Communications

address 130.24.13.1/24 and that Port 2 has been assigned the IP address
200.14.13.2/24. If the router learns about network 130.24.36.0 from a neighbor, it
applies a /24 mask since Port 1 is configured with another subnet of the 130.24.0.0
network. However, when the router learns about network 131.25.0.0 from a neighbor,
it assumes a "natural" /16 mask since it has no other masking information
available.How does a RIP-1 based router know if it should include the subnet-number
bits in a routing table update to a RIP-1 neighbor? A router executing RIP-1 will only
advertise the subnet-number bits on another port if the update port is configured with
a subnet of the same network number. If the update port is configured with a different
subnet or network number, the router will only advertise the network portion of the
subnet route and "zero-out" the subnet-number field.

For example, assume that Port 1 of a router has been assigned the IP address
130.24.13.1/24 and that Port 2 has been assigned the IP address 200.14.13.2/24. Also,
assume that the router has learned about network 130.24.36.0 from a neighbor. Since
Port 1 is configured with another subnet of the 130.24.0.0 network, the router assumes
that network 130.24.36.0 has a /24 subnet mask. When it comes to advertise this
route, it advertises 130.24.36.0 on Port 1, but it only advertises 130.24.0.0 on Port
2.For these reasons, RIP-1 is limited to only a single subnet mask for each network
number.

However, there are several advantages to be gained if more than one subnet
mask can be assigned to a given IP network number: Multiple subnet masks permit
more efficient use of an organization's assigned IP address space.Multiple subnet
masks permit route aggregation which can significantly reduce the amount of routing
information at the "backbone" level within an organization's routing domain.Efficient
Use of the Organization's Assigned IP Address Space.VLSM supports more efficient
use of an organization's assigned IP address space. One of the major problems with
the earlier limitation of supporting only a single subnet mask across a given network-
prefix was that once the mask was selected, it locked the organization into a fixed-
number of fixed-sized subnets. For example, assume that a network administrator
decided to configure the 130.5.0.0/16 network with a /22 extended-network-prefix.

A /16 network with a /22 extended-network prefix permits 64 subnets (26 ),


each of which supports a maximum of 1,022 hosts (2 10 -2). This is fine if the
organization wants to deploy a number of large subnets, but what about the occasional
small subnet containing only 20 or 30 hosts? Since a subnetted network could have
only a single mask, the network administrator was still required to assign the 20 or 30
hosts to a subnet with a 22-bit prefix. This assignment would waste approximately
1,000 IP host addresses for each small subnet deployed! Limiting the association of a
network number with a single mask did not encourage the flexible and efficient use of
an organization's address space. One solution to this problem was to allow a subnetted
network to be assigned more than one subnet mask. Assume that in the previous
example, the network administrator is also allowed to configure the 130.5.0.0/16
network with a /26 extended-network-prefix. Please refer to Figure 16. A /16 network
address with a /26 extended-network prefix permits 1024 subnets (210 ), each of
which supports a maximum of 62 hosts (26 -2). The /26 prefix would be ideal for
small subnets with less than 60 hosts, while the /22 prefix is well suited for larger
subnets containing up to 1000 hosts.

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 147


JTO Phase – I Data Communications

Conceptually, a network is first divided into subnets, some of the subnets are
further divided into sub-subnets, and some of the sub-subnets are divided into sub 2
-subnets. This allows the detailed structure of routing information for one subnet
group to be hidden from routers in another subnet group.
11.0.0.0./8
11.1.0.0/16
11.2.0.0/16
11.3.0.0/16
11.252.0.0/16
11.253.0.0/16
11.254.0.0/16
11.1.1.0/24
11.1.2.0/24
11.1.253.0/24
11.1.254.0/24
11.253.32.0/19
11.253.64.0/19
11.253.160.0/19
11.253.192.0/19
11.1.253.32/27
11.1.253.64/27
11.1.253.160/27
11.1.253.192/27
The 11.0.0.0/8 network is first configured with a /16 extended-network-prefix.
The 11.1.0.0/16 subnet is then configured with a /24 extended-network-prefix and the
11.253.0.0/16 subnet is configured with a /19 extended-network-prefix. Note that the
recursive process does not require that the same extended-network-prefix be assigned
at each level of the recursion. Also, the recursive sub-division of the organization's
address space can be carried out as far as the network administrator needs to take it.

Likewise, Router C is able to summarize the six subnets behind it into a single
advertisement (11.253.0.0/16). Finally, since the subnet structure is not visible outside
of the organization, Router A injects a single route into the global Internet's routing
table -11.0.0.0/ 8 (or 11/8).

8.9 CLASSLESS INTER-DOMAIN ROUTING (CIDR)


By 1992, the exponential growth of the Internet was beginning to raise serious
concerns among members of the IETF about the ability of the Internet's routing
system to scale and support future growth. These problems were related to:

The near-term exhaustion of the Class B network address space. The rapid
growth in the size of the global Internet's routing tables. The eventual exhaustion of
the 32-bit IPv4 address space. Projected Internet growth figures made it clear that the
first two problems were likely to become critical by 1994 or 1995. The response to
these immediate challenges was the development of the concept of Supernetting or
Classless Inter-Domain Routing (CIDR). The third problem, which is of a more long-
term nature, is currently being explored by the IP Next Generation (IPng or IPv6)
working group of the IETF. CIDR was officially documented in September 1993 in
RFC 1517, 1518, 1519, and 1520. CIDR supports two important features that benefit

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 148


JTO Phase – I Data Communications

the global Internet routing system: CIDR eliminates the traditional concept of Class
A, Class B, and Class C network addresses. This enables the efficient allocation of the
IPv4 address space which will allow the continued growth of the Internet until IPv6 is
deployed. CIDR supports route aggregation where a single routing table entry can
represent the address space of perhaps thousands of traditional classful routes. This
allows a single routing table entry to specify how to route traffic to many individual
network addresses. Route aggregation helps control the amount of routing information
in the Internet's backbone routers, reduces route flapping (rapid changes in route
availability), and eases the local administrative burden of updating external routing
information. Without the rapid deployment of CIDR in 1994 and 1995, the Internet
routing tables would have in excess of 70,000 routes (instead of the current 30,000+)
and the Internet would probably not be functioning today!
CIDR Promotes the Efficient Allocation of the IPv4 Address Space CIDR
eliminates the traditional concept of Class A, Class B, and Class C network addresses
and replaces them with the generalized concept of a "network-prefix." Routers use the
network-prefix, rather than the first 3 bits of the IP address, to determine the dividing
point between the network number and the host number. As a result, CIDR supports
the deployment of arbitrarily sized networks rather than the standard 8-bit, 16- bit, or
24-bit network numbers associated with classful addressing. In the CIDR model, each
piece of routing information is advertised with a bit mask (or prefix-length). The
prefix-length is a way of specifying the number of leftmost contiguous bits in the
network-portion of each routing table entry. For example, a network with 20 bits of
network-number and 12-bits of host-number would be advertised with a 20-bit prefix
length (a /20).
The clever thing is that the IP address advertised with the /20 prefix could be a
former Class A, Class B, or Class C. Routers that support CIDR do not make
assumptions based on the first 3-bits of the address, they rely on the prefix-length
information provided with the route. In a classless environment, prefixes are viewed
as bit wise contiguous blocks of the IP address space. For example, all prefixes with a
/20 prefix represent the same amount of address space (212 or 4,096 host addresses).
Furthermore, a /20 prefix can be assigned to a traditional Class A, Class B, or Class C
network number.

It is important to note that there may be severe host implications when you
deploy CIDR based networks. Since many hosts are classful, their user interface will
not permit them to be configured with a mask that is shorter than the "natural" mask
for a traditional classful address. For example, potential problems could exist if you
wanted to deploy 200.25.16.0 as a /20 to define a network capable of supporting 4,094
(2 12 -2) hosts. The software executing on each end station might not allow a
traditional Class C (200.25.16.0) to be configured with a 20-bit mask since the natural
mask for a Class C network is a 24-bit mask. If the host software supports CIDR, it
will permit shorter masks to be configured. However, there will be no host problems
if you were to deploy the 200.25.16.0/20 (a traditional Class C) allocation as a block
of 16 /24s since non-CIDR hosts will interpret their local /24 as a Class C. Likewise,
130.14.0.0/16 (a traditional Class B) could be deployed as a block of 255 /24s since
the hosts will interpret the /24s as subnets of a /16. If host software supports the
configuration of shorter than expected masks, the network manager has tremendous
flexibility in network design and address allocation.

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 149


JTO Phase – I Data Communications

8.10 STATIC AND DYNAMIC ROUTING


Static Routing:
Interior Gateway Protocol
Dynamic Routing:
Routing Information Protocol (RIP)
Open Short Path First (OSPF)
Exterior Gateway Protocols
Border gateway Protocol

8.11 ROUTING PROTOCOLS


Hosts and Gateways are presented with datagram addressed to some host.
Routing is the method by which the host or Gateway decides, where to send the
datagram. It may be able to send the Datagram directly to the destination if it is
connected to that n/w or gateway directly. If the destination is not directly reachable,
then it will try to send the datagram to a gateway that is nearer to the destination.
The goal of routing protocol is simple: It supplies the information that is needed to do
the routing. There are many type of Routing protocols used, but for the NIB nodes
following are the routing protocols recommended:
• RIP
• OSPF
• BGP4
Interior Gateway Protocols & Exterior Gateway Protocols
Interior Gateway Protocol (IGP)
Routing Information Protocol version 1
RIP version 2
Open Short Path first (OSPF)
Exterior Gateway Protocol (EGP)
Border Gateway Protocol (BGP4)
Inter Domain routing Protocol (IDRP)

Port IP address
(i.e., 132.2.2.2) 133.3.0.0 133.4.0.0
2
2.2 3.3
132.2.0.0
1 3.4 4.5
1.1 3
130.1.0.0

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 150


JTO Phase – I Data Communications

IP Routing Table - RIP

Network Number Next Hop Hops Learned from Port

132.2.0.0 Direct 1 RIP 1

133.3.0.0 Direct 1 RIP 2

130.1.0.0 Direct 1 RIP 3

134.4.0.0 Indirect 2 RIP 2

Routing Protocols - Distance Vector

0 Hop
134.4.0.0

1
2

134.3.0.
1Hop 0

2Hop
134.5.0.
0

Metric used by RIP is hop count, with 1 signifying a directly connected network of
the advertising router & 16 signifying unreachable network

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 151


JTO Phase – I Data Communications

Updating Other Routers (Distance Vectors)


Upon initialization, each router reads its preconfigured IP address and metric
(cost in hops) of all its active ports. Each router transmits a portion of its routing table
(network ID, metric) to each “neighbor” router. Each router uses the most recent
updates from each neighbor. Each router uses the update information to calculate its
own “shortest path” (distance in hops) to a network.
Tables are updated only:
• If the received information indicates a shorter path to the destination network.
• If the received update information indicates a network is no longer reachable
• If a new network is found.

8.12 ROUTING INFORMATION PROTOCOL (RIP)


RIP is distance vector protocol designed to serve as an IGP for the exchange of
routing information within an autonomous system. RIP is a simple protocol suitable
for use in networks of relatively small size not requiring complex metrics. Hop count
is used as the metric for path selection. RIP supports point-point links and broadcast
networks. Max, allowable hop count is 15 (16 is unreachable).
RIP is the routing protocol based on the Bellman ford (distance vector)
algorithm. Name distance vector is derived from the fact that routes are advertise as
vector of (distance, direction), where distance is defined in forms of a metric and
direction in terms of the next-hop router. This algorithm for routing computations in
the computer n/w is since the days of ARPANET. It has become an defacto standard
for exchange of routing information among gateways & hosts. It is most useful as IGP
(interior gateway protocol).

RIP PARAMETERS
RIP packets are carried over UDP and for routing purposes use port 520.
Unless triggered by a configuration change RIP packets are sent every 30 seconds. If
no update packets re received for within 180 seconds the distance for that route is set
to infinity and will subsequently be removed from the routing table. The address
0.0.0.0. represents the default route to exit the AS.
Routing Information Protocol (Version 1)
RIP process operates from UDP port 420. Router sends a Response message
out to every RIP-enabled interface every 30 seconds. RIP defines two message type:
Request Messages and
Response Messages

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 152


JTO Phase – I Data Communications

RIP RIP
Header Data
UDP UDP
Header Data
IP IP
Header Data
D S T D CR
A A F ata C

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 153


JTO Phase – I Data Communications

RIP OPERATIONAL TYPES


RIP can operate in either ACTIVE or PASSIVE mode. Active means that it
builds routing tables and response to RIP requests. Passive means that it can build a
routing table for its own use, but it does not respond to any RIP requests. Most works
stations (PCs) use a default gateway (I.e., router) and not a routing update protocol
like RIP

RIP ALGORITHM
RIP defines the “best” route as the one with least number of routing hops.
Once a router is installed, or started, it should send messages to all of its neighbors.

A B C D

A B C D

A Bigger Update

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 154


JTO Phase – I Data Communications

Z 1 Route
Route
Hop
Y 1 Hop X
1
Router Y
Z A Y 1

Route HopX
Route Hop
Route Hop
Network Hop Router
WPort 1 Local 2 W 1
X 1
X 1 Local 1 Y 2
Y 2 B 1 Z 3
Z 3 B 1

Which Rout is chosen by RIP

Source Router C Router D


10.1.4.0 10.1.5.0
64
k 9.6
? 10.1.3. k Router E
10.1.1.0 0

E1

10.1.2.0 E1
E3
Router A Router B

Target

RIP will select 64 k - 9.6 k Route as it has got less hop than other E1-E3-E1 Route

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 155


JTO Phase – I Data Communications

ROUTERS & SUBNET-MASKS


RIPv1 requires that a subnet mask be uniform across an entire network RIPv1
does not supply a subnet-mask entry in its Routing updates. It assumes that the mask
the same for the learned Subnet of the same network ID as its configured ports.

150.1.0.0

160.1.0.0. 150.1.3.0
0
160.1.0.0 150.1.1.0 150.1.3.0
255.255.255.0 255.255.255.0 255.255.255.0

RIVv1 supports only one subnet-mask for Network ID

RIPV2 -- MULTICAST SUPPORT


• RIPv2 uses the multicast address of 224.0.0.9 to multicast
• Does not broadcast its table.
• MAC address of01-00-5E-00-00-09.
• RIPv1 uses a broadcast address in both the IP header
• And the MAC header
• RIPv1 only-version 1 messages will be sent
• RIPv1 compatibility – RIP 2 messages a broadcast
• RIPv2-Messages are multicast

8.13 OSPF
OSPF is high functionality, Non-propriety (IGP Internet Gate way Protocol for
TCP/IP protocol family. OSPF based on link state technology Authentication of
routing updates It Supports the following: -
• VLSM (Variable Length Subnet Mark), CIDR super netting (It won’t Support
RIP)
• Route Summarization
• OSPF uses IP multicast to send link state updates. This ensures less processing
on routers that are not listening to OSPF packets.
• Updates are sent only in case of routing changes occur instead of periodically.
• Better use of Bandwidth
• Better convergence

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 156


JTO Phase – I Data Communications

• No Limitation of hop count


• The intelligent use of VLSM & Super netting & efficient IP address allocation.
• Supports fully class less behaviors
• Uses IP multicast to send link state updates.
• Better convergence than RIP, this is because routing changes are propagated
instance only and not periodically.
• Routing authentication by different method of password authentication.
• Keeps tracks of external routes injected by external Protocol such as BGP

LINK STATE
OSPF is a link state, we can think of a link as being an Interface and of its
relationship to its neighboring routers. A descriptions of interface include:
IP address of interface, the Mark, the type of N/W it is connected to, routers
connected to that N/W.
The collection of all these link state, would from Link State Database.
LINK STATE ALGORITHM
OSPF uses link state Algorithm to build and calculate the shortest path to all
its known destination. Upon initialization or due to any change in routing information,
a router will generate a link state advertisement. All router will exchange link states
by means of flooding. Each router that receives a link state update should store a copy
In its link state database and then propagate the update to other routers. After the
database of each router is completed the router with calculate the shortest path Tree
for all destinations (using Dijkastra Algorithm ). In case of no changes in the OSPF
N/W occur such as cost of link or a N/W being added or deleted, OSPF should be
very quite. Any changes that are occur are communicated via link state packets, and
the Dijkastra algorithm is recalculated to find shortest path.
SHORTEST PATH ALGORITHM
Algorithm places each router at the root of a tree and calculate shortest path to
each destination based on the communication, cost required to reach that destination
OSPF cost:
Cost (called metric) of an interface in OSPF is overhead required to send
packets across a certain interface. Cost is inversely proportional to the Bandwidth of
that interface. Higher Bandwidth indicates lover cost.
Area and Router Types
OSPF uses folding to exchange link state updates bet routers. Any change in
routing flooded to all routers in the N/W. Areas are introduced to put a boundary on
the explosion of link state updates. Dijkastra algorithm on a router limited to within
an area. All routers within an area have the exact link state database. Routers that
belongs to multiple areas, called Area Border Routers (ABR). ABR disseminating
routing information or routing changes between areas. A router that has all of its
interfaces with in the same area is called An Internet Router (IR)

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 157


JTO Phase – I Data Communications

Router that has interface in multiple areas is called Area Border Router (ABR)
ABR connect one or more areas to backbone and act as a gateway for inter area
traffic. An ABR has at least one interface that belongs to backbone and Maintain
separate link state data base for each of its area. That is why ABR has more memory
and powerful processor. All ABR are backbone router but all backbone router are not
ABR. An IR whose interfaces all belong to areas is also backbone router. ASBR
(Asynchronous System Boundary router) are gateways for external traffic, injecting
traffic routes into OSPF domain that were Learned from some other protocol, such as
the BGP and EIGRP Processes. An ASBR can be located anywhere within the OSPF
as, it may be IR, backbone Router or ABR

OSPF OVERVIEW
Upon initialization, each router records information about all its Interfaces.
Each router builds a packet know as the Link State Advertisement (LSA). Contains a
listing of all recently seen routers and their cost LSAs are restricted to being
forwarded only in the Originated area. Received LSAs are flooded to all other routers.
Each router makes a copy of the most recently “seen” LSA. Each outer has complete
knowledge of the topology of the Area to which it belongs. Adjacencies are formed
between a Designated Router ‘DR’ and Backup DR and other routers on a network.
Shortest Path Trees are constructed after routers exchange their databases using
Dijkstra’s algorithm. Router algorithm run only when changes occur (or every 30
minutes, Whichever is shorter.
Stub areas

Area 0

AS 2

Contain AS2
Route entries
Does not
Contain AS2 Area 2
Area 1 Route entries

An area that has only one entry and one exit point (must be the same
area).Used to reduce the number of external advertisements. A stub area blocks AS
external link advertisements.

Stub Network: A network which is connected to only one router e.g. a LAN to
a router.

8.14 ROUTING: INTERNAL (INTERIOR) AND EXTERNAL


Internal routing is the art of getting each router in your network to know how
to get to every location (destination) in your network. You can do this simply, with

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 158


JTO Phase – I Data Communications

static routes, or in a more complicated but robust way, with active internal routing
protocol such a s RIP, RIPv2, OSPF and IS-IS.
It’s obviously critical that any box inside your network know how to get
(directly or indirectly) to any other box inside your network. Before your invite
people to send data to your network, you’ve got to have a running and happy network
to take the data. If your default route into one or more providers, external routing is
not something you have in your network. But if you do want to “peer’ with someone
– or to “multi-home” to multiple providers and have a little bit more control over
where your data goes on the internet, you will be taking at least some external routes
into your network and will do so with BGP.

8.15 AUTONOMOUS SYSTEM


An, AS is a way of referring to “Someone Network” (VSNL, BSNL, MTNL
etc.) Normally an AS will have Someone or ones responsible for it (a point of
contract, typically called a NOC, or Network Operation Centre). And one or multiple
“Border Routers” (Where Routers in that ‘AS’ peer and exchange routes with other
AS s). As well as a simple or complicated internal routing scheme so that every router
in that AS known how to get to every other router and destination within that AS.
When you “advertise” routes to other ‘ASs’, One way of thinking of those route
“advertisements” is as “promise” to carry data to the IP space represented in the route
Being advertised. e.g. if you advertise 192.202.4.0/24, the class ‘C’ starting at
192.202.4.0 and Ending at 192.202.4.255. You promise that if someone send you
data destined for any address in 192.202.4.0/24, You know how to carry that data to
its ultimate destination. The cardinal sin of BGP is routing is advertising routes that
you don’t know how to get to.
This is called “black holing” someone – because if you advertise, or promis to
carry data to, some part of the IP space that is owned by someone else, and that
advertisement is more specific that the one made by the owner fo that IP space, all of
the data on the internet destined for the black holed IP space will flow to your border
router.
Needless to say, this makes that address space “disconnected from the net” for
the provider that owns the space, and makes many people unhappy. The second most
heinous sin of BGP routing is not having strict enough filters on the routes you
advertise. Also, one terminology note: Classless routes are sometimes called
“prefixes”. When someone talks about a prefix they are talking about a route with a
particular starting point and a particular specificity (length) . So 207.8.96.0/24 and
207.8.96.0/20 and not the same prefix (route).
Every IP address that you can get to on the Internet is reachable because
someone, somewhere, has advertised a route that covers it. The corollary to this is
that if there is not a generally- advertised a route to cover an IP address, no one on the
internet will be able to reach it.

8.16 BORDER GATEWAY ROUTING PROTOCOL(BGP4)


The Border Gateway Protocol (BGP), defined RFC 1771, provides loop-free
Inter domain routing between autonomous system. An autonomous system (AS) is a

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 159


JTO Phase – I Data Communications

set of routers that operate under the same administration. BGP is often run among the
networks of Internet service providers (ISPs).
BGP went through different phases and improvements from it earlier version, BGP1,
in 1989 to today’s version, BGP4, deployment of which started in 1993. BGP$ is the
first version that handles aggregation (CIDR), super netting & allows the
announcement of “classless routes”- routes that aren’t strictly on “class A”, “ Class
B”, or “Class C” boundaries – but instead can also be “subnets” or “ super nets”.
BGP imposes no restrictions on the underlying internet topology. It assumes
that routing within an autonomous system is not via an intra-autonomous system
routing protocol. BGP constructs a graph of autonomous systems based on the
information exchanged between BGP neighbors. This directed graph environment is
sometimes referred to as a tree. As far as BGP is concerned, the whole internet is a
graph of Ass, with a path, and the collection of path information forms a route to
reach a specific destination. BGP ensures that loop free inter domain routing is
maintain

AS2
AS1
AS3

AS n-
AS4 1

AS
AS5 n

8.2HOW BGP WORKS


BGP is Path Vector Protocol carry information between ASs. The term Path Vector
comes form the fact that BGP routing information carries a sequence of AS numbers,.
which indicates the path a route has transferred. BGP user TCP as its transport
protocol (Port 179). This ensures that all the transport reliability such as
retransmission is taken care of by TCP and does not need to be implemented in BGP
itself. Two BGP routers forms a transport protocol connection between each other,
These routers are called peers or neighbors. Peer routers exchange multiple message
to open and each confirm the connection parameters, such as the BGP version running
between the two peers. In case of disagreement between the peers, notification errors
are sent and peer connection does not get established.
Initially all candidate BGP routes are exchanged, incremental update s are sent
as network information changes. The incremental updates approach has shown an

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 160


JTO Phase – I Data Communications

enormous improvement as far as CPU overhead and bandwidth allocation compared


with complete periodic updates used by previous protocols, such as EGP.
Routes are advertised between a pair of BGP routers in update message. The
update message contains , among other things, a list of <length, prefix> tuples that
indicate the list of destinations reachable via each system. The update message also
contains the path attribute, which include such information as the degree of preference
for a particular route.
In case of information changes, such as route being unreachable or having a
better path, BGP informs its neighbors by with drawing invalid routes and injecting
new routing information.
Keep alive message sent periodically every 60 seconds (if no routing change)
between BGP neighbors to ensure that the connection is kept alive. Keep alive packets
(19 byte each) should not cause any strain on the router CPU or link bandwidth as
they consume a minimal bandwidth (about 2.5 bits/sec for a periodic rate of 60 sec).

BGP routers become neighbors

BRBRAITT ISO 9001 : 2000 Certified / Nov – 2008 161

Você também pode gostar