iind week data networks

119
8/13/2019 IInd Week Data Networks http://slidepdf.com/reader/full/iind-week-data-networks 1/119  Bharat Sanchar Nigam Limited Hkkjr lapkj fuxe fyfeVsM BSNL  ES & IT FACULTY COURSE CODE –  BRBCOIF 114 BHARAT RATNA BHIMRAO AMBEDKAR INSTITUTE OF TELECOM TRAINING, RIDGE ROAD, JABALPUR –  482 001 (ISO-9001 : 2008 Certified) JTO Ph-II DATA NETWORK WEEK-2 (IP ROUTING BASIC)

Upload: ajachy

Post on 04-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 1/119

 

Bharat Sanchar Nigam Limited Hkkjr lapkj fuxe fyfeVsM

BSNL ES & IT FACULTY

COURSE CODE –  BRBCOIF 114

BHARAT RATNA BHIMRAO AMBEDKAR

INSTITUTE OF TELECOM TRAINING,

RIDGE ROAD, JABALPUR –  482 001

(ISO-9001 : 2008 Certified)

JTO Ph-II DATA NETWORK

WEEK-2 (IP ROUTING BASIC)

Page 2: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 2/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 1

PHASE II SPECIALIZATION TRAINING

ON

“DATA NETWORKS” FOR JTOs 

I N D E X

Week-2 IP ROUTING BASICS:-

S No Topic Page No.

1.  IP routing principal 2

2.  Overview of IPv6 18

3.  RIP 28

4.  OSPF 43

5.  BGP 69

6.   NIB-I Network NIB-I: Cisco7513, 7507,Catalyst5500,Router Architecture, RAS- AS 5800

90

7.  Cisco Router Configuration Basics 111

8.  Preliminary configuration of Sample Network 115

9.  Cisco Router Configuration: Static & Static/Default Routing 116

10.  Cisco Router Configuration: RIP & RIP Static/Default 117

11.  Cisco Router Configuration: OSPF Multi Area, OSPF Route

Summarization, OSPF Normal/Stub/Totally Stub/NSSA,OSPF/RIP Redistribution, OSPF/Static/Default

117

Page 3: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 3/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 2

R OUTING PRINCIPLES 

Page 4: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 4/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 3

R OUTING PRINCIPLES 

SWITCHING 

A typical electrical switch directs current to one of several wires of the electricalcircuit. Once the connection is made, the switch appears as part of the wire - it(ideally) introduces no resistance, no attenuation, no delay. A networking switch is

designed to behave in much the same way. Its primary feature is speed. Like anelectrical switch, it is designed to appear much like a wire when relaying data signals.

 Networking Switches must implement a normal path selectionalgorithm; they just do it faster. Layer 2 switches bridge whereas layer 3 switchesroute.

 Normal Bridges and Routers will receive an entire packet, analyse its headers, make aforwarding decision, then transmit the packet. The packet is stored in the RAM(Random access Memory) while being processed. These RAM buffers can become

 bottlenecks in a busy network. Switches use special silicon chips than can forward

 packets directly from source to destination without passing through RAM buffers.

Consider a typical Ethernet switch, which acts much like a standard IEEE 802.1d bridge. The difference is that as soon as an incoming packet's header has beenreceived, a forwarding decision is immediately made, before the packet is completelyreceived. If the destination Ethernet segment is idle, the packet begins transmissionthere immediately. As bits are received they are shunted through the switch fabric tothe destination interface. On a 10 Mbps Ethernet, the net delay is perhaps one or twomicroseconds, as opposed to several milliseconds for a typical bridge. This is termedcut-through switching.

With respect to Layer 3, the term switching implies, moving packets from one port toanother port. This is different from Layer 2 switching functionality, which impliesforwarding a packet from one port to another port based on the MAC address only.

Routing

The primary function of a packet switching network is to receive packets from asource and deliver them to the destination. To achieve this, a path or route through thenetwork has to be determined. More than one route may be possible. This requires arouting function/ algorithm to be implemented.

The routing function must achieve the following requirements :

  Correctness

  Simplicity

  Robustness

  Stability

  Fairness

  Optimality

  Efficiency

Page 5: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 5/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 4

Correctness and Simplicity are self explanatory.

Robustness has to do with the routing of packets through alternate routes in thenetwork in case of route failures or overloads.

Stability is an important aspect of the routing algorithm. It implies that the routing

algorithm must converge to equilibrium as quickly as possible, however some neverconverge, no matter how long they run.

Fairness and optimality are competing requirements. A trade-off exists between thetwo. Some performance criteria may give a higher priority to transportation of packets

 between adjacent/ nearby stations in comparison to those between distant stations.This results in higher throughput but is not fair to the stations which have tocommunicate with distant stations.

Efficiency of a routing technique/ algorithm gets decided by the quantum of overhead processing required. Of course these have to be kept to a minimum.

Thus, Routing is essentially a method of path selection and is an overhead activity.

Routing Table ARP Table

1

2

3

4

5

6

7100.3.4.0 100.1.1.5

100.3.6.0 100.1.1.9

100.3.7.0 100.1.1.13

100.1.1.5 3CE9...

100.1.1.9 3C76...

100.1.1.13 3C87...

Network

Data Link

Physical

 

Fig.1 Routing & Switching

Routing & Network Layer Addresses

Routers relay a packet from one data link to another. To relay a packet, a routeremploys two basic functions :

  a path determination function and

  a switching function.

Figure 2 illustrates how routers use the addressing for routing and switching

functions. When a packet destined for network 100.1.0.0 arrives at Router 1, the

Page 6: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 6/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 5

router knows that the packet should be sent out on port S0.

        1        0        0  .

        4  .

        0  .

        0

S1

100.1.0.0

  S0

100.2.0.0S1

S2

100.3.0.0

S0

ROUTER R1

ROUTER R2

DESTINATION

NETWORK AD DR ES S

ROUTER

PORT

100.1.0.0 S0

100.2.0.0 S1

100.3.0.0 S2

100.4.0.0 S2

 Fig. 2 Use of Network Layer Addresses in Routing

Although the path determination function sometimes is capable of calculating thecomplete path from the router to the destination, a router is responsible only for

 passing the packet to the best network along the path. This best path is represented asa direction to a destination network. For example, in figure 2, if a packet that isdestined for network 100.4.0.0 arrives at Router 1, the router knows that the bestdirection to send the packet out is interface S2. Router 2 is the next hop, or router,along the path. The router uses the network portion of the address to make these pathselections.

The switching function enables a router to accept a packet on one interface andforward it on a second interface. The path determination function enables the router toselect the most appropriate interface for forwarding a packet.

Routing assumes that addresses have been assigned to network elements to facilitatedata delivery. In particular, routing assumes that addresses convey at least partialinformation about where a host is located. This permits routers to forward packetswithout having to rely either on broadcasting or a complete listing of all possibledestinations. At the IP level, routing is used almost exclusively, primarily because theInternet was designed to construct large networks in which heavy broadcasting orhuge routing tables are not feasible.

Three general prerequisites must be met to perform routing :

Design :

A plan must exist by which addresses are assigned. Typically, addresses are broken

into fields corresponding to levels in a physical hierarchy. At each level of thehierarchy, only the corresponding field in the address is used, permitting addresses to

Page 7: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 7/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 6

 be handled in blocks. In IP, the most common designs are IP Address Classes, Sub-netting, and CIDR.

Implementation :

The design plan must be implemented in switching nodes, which must be able toextract path information from the addresses. Since router programming is generallynot under a designer's control, designs must be limited by the features provided bymanufacturers. Subnetting's great appeal lies in its great flexibility, while using afairly simple implementation model.

Enforcement :

The plan must be enforced in host addressing. A design is useless unless addresses areassigned in accordance with it. Addressing authority must be centralised.

In the Internet environment, routing is almost always used at the IP level, and bridging almost always used at the Data Link Layer.

For new network installations, the best approach is to plan for routing even if it's notused at first. This requires some advanced planning to design an addressing schemethat will work. However, the overhead is all human - hardware won't know thedifference between organised and haphazard addressing schemes. Network should be

 planned for the ability to put routers in strategic locations, even if those locations willinitially use bridges or just signal boosters (such as Ethernet hubs and repeaters). Inthis manner, routers can be easily added later.

Routed ProtocolA routed protocol is a protocol that contains sufficient network-layer addressinginformation for user traffic to be directed from one network to another network.Routed protocols define the format and use of the fields within a packet. Packets thatuse a routed protocol are conveyed from one end system to another end systemthrough an internetwork.

The internet protocol IP and Novell‘s IPX are examples of routed protocols. 

Routing Protocol

A routing protocol provides mechanisms for sharing routing information. Routing protocol messages move between the routers. A routing protocol allows the routers tocommunicate with other routers to update and maintain routing tables. Routing

 protocol messages do not carry end-user traffic from network to network. A routing protocol uses the routed protocol to pass information between routers.

Types of Routing : Static, Default, Dynamic

Static routing :

Refers to routes to destinations being setup manuallyin the router. Network reachability in this case is not dependent on theexistence and state of the network itself. Whether a destination is up or

Page 8: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 8/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 7

down, the static routes would remain in the routing table, and trafficwould still be sent towards that destination. Static routing generally is not sufficientfor large or complex networks because of the time required to define and maintainstatic route table entries.

Default routing :

R efers to a ―last resort‖ outlet –   traffic to destinationsthat are unknown to the local router are sent to the default outlet router. Defaultrouting is the easiest form of routing for a domain connected to a single exit point. Adefault route is a path on which a router should forward a packet if it does not havespecific knowledge about the packet‘s destination. 

Figure 3 below illustrates the concept of Static and default Routing.

Traffic to 10.1

Static Routing

R 1 R 2

Send all traffic to R1Default Routing

10.1/16

W A N

 

Fig.3 Static and Default Routing

Dynamic routing :

Refers to routes being learnt via an internal or

external routing protocol. Network reachability is dependent on the existence andstate of the network. If a destination is down, the route would disappear from therouting table, and traffic will not be sent toward the destination. Dynamic routing isused to enable routers to build their routing tables automatically and make theappropriate forwarding decisions. This concept is illustrated in Figure 4 below.

Page 9: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 9/119

Page 10: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 10/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 9

 bring the packet one step closer to its destination, and delivers the packet to the nexthop, where the process is repeated.

To make this work, two things are needed :

  First, routing tables match the destination addresses with next hops.

  Second, routing protocols determine the contents of these tables.

Routing algorithms can be grouped into two major classes :

   Non-Adaptive or Static

  Adaptive or Dynamic

Non-Adaptive algorithms 

This algorithm do not base their routing decisions on measurements or estimates ofthe current traffic and topology. Instead, the choice of the route to use to get from I to

J (for all I to J) is computed in advance, off-line, and downloaded to the routers whenthe network is booted. This procedure is also called as Static Routing.

Adaptive algorithms 

This algorithm change their routing decisions to take into account changes in thetopology, and sometimes the traffic as well. Adaptive algorithms will be classifieddepending on :

  where it gets the information from - whether locally, from adjacent Routers, orfrom all Routers

  When does the algorithm decide to change the routes - whether every T sec,when the load changes, or when the topology changes, and

  what metric (parameter) is used for optimisation i.e. either distance, number ofhops, or estimated transit time.

Dynamic Routing Operations

The success of dynamic routing depends on two basic router functions :

  Maintenance of a routing table

  Timely distribution of knowledge  –   in the form of routing updates  –  to other

routers

Dynamic routing relies on a routing protocol to disseminate knowledge. A routing protocol defines the set of rules used by a router when it communicates withneighbouring routers. Typically, a routing protocol describes:

  How updates are conveyed

  What knowledge is conveyed

  When to convey this knowledge

  How to locate recipients of the updates

Page 11: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 11/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 10

Convergence

Information about the network topology needs to be very accurate and also consistentfrom Router to Router. This consistency and accuracy is referred to as Convergence.

The network is considered to have converged when all the Routers contain consistentinformation. 

Representing Distance with Metrics

When a routing algorithm updates the routing table, its primary goal is to determinethe best information to include in the table. Each routing algorithm will interpret―best‖ in its own way. The algorithm generates a number –  called the metric- for each

 path through the network. Typically, the smaller the metric, the better is the path.

Metrics can be calculated based on a single characteristic of the path or by combiningseveral key characteristics such as :

1) Hop Count :

Refers to the number of routers a packet must go through, to reach a destination. Thelower the hop count, the better is the path. Path length is used to indicate the sum ofthe hops to a destination.

2) Cost : 

Path cost is the sum of cost associated with each link toa destination. Costs are assigned (automatically or manually) to the process of

crossing a network. Slower networks typically have a higher cost than fasternetworks. The lowest ‗cost‖ route is the one believed to be the fastest route available.  

3) Bandwidth : 

The rating of a link‘s throughput. Routing through links with greater bandwidth does

not always provide the best routes. For example, if a high-speed link is busy, sendinga packet through a slower link might be faster.

4) Delay : 

Depends on many factors, including the bandwidth of network links, the length ofqueues at each router in the path, network congestion on links, and the physicaldistance to be travelled. A conglomeration of variables that change with internetworkconditions, delay is common and useful metric.

5) Load : 

Dynamic factor that can be based on a variety of measures, including CPU and packet processed per second. Monitoring these parameters on a continual basis can beresource intensive.

Page 12: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 12/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 11

Modern computer networks generally use dynamic routing algorithms  rather thanthe static ones. Two dynamic algorithms in particular,

  distance vector routing and

  link state routing

are the most popular.

Distance Vector Routing

Distance Vector Routing  algorithms require that each router maintain a table (avector) indicating the best known distance to each destination and which line/ port touse to reach there. These tables are constantly updated by exchanging informationwith the neighbours. The algorithms periodically pass copies of a routing table fromrouter to router. Updates between routers also communicate topology changesimmediately when they occur.

The distance vector routing is also known by other names, viz; the distributedBellman-Ford  routing algorithm and the Ford-Fulkerson  algorithm, after theresearchers who developed it (Bellman, 1957; and Ford and Fulkerson, 1962). It wasthe original ARPANET routing algorithm and was also used in the Internet under thename RIP and in early versions of DECnet and Novell‘s IPX.

In distance vector routing, each router maintains a routing table containing one entryfor, each router in the subnet. This entry consists of two parts :

  the preferred outgoing line/ port to use for that destination, and

  an estimate of the time or distance to that destination. The metric used might

 be number of hops, time delay in milliseconds, total number of packet queuedalong the path, or something similar.

The router is assumed to know the ―distance‖ to each of its neighbours. If the metric

is hops, the distance is just one hop. If the metric is queue length, the router simplyexamines each queue. If the metric is delay, the router can measure it directly withspecial ECHO packets that the receiver just time-stamps and sends them back as fastas it can.

Page 13: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 13/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 12

AC

D

B

Routing

Table

Routing

Table

Routing

Table

Routing

Table

ABCD

Fig. 5 Distance Vector Routing Updates  

Each router receives a routing table from other routers connected to the same network,as shown in Figure 5. For example, in the figure, router B receives information fromrouter A, its neighbouring router across the WAN link. Router B adds a distancevector number (such as the number of hops) thereby increasing the distance vector,and then passes the routing table to its other neighbouring router C. This Step-by-step

 process occurs in all directions between directly connected neighbour routers.

In this way, the algorithm accumulates network distances sothat it can maintain adatabase of network topology information. Distance vector algorithms do not allow arouter to know the exact topology of an internetwork.

Distance vector information is similar to the information found on signs at a highwayintersection. A sign points toward a road leading away from the intersection andindicates the distance to the destination. Further down the highway, another sine also

 points towards the destination, but now the distance to the destination is shorter. Aslong as each successive point on the path shows that the distance to the destination issuccessively shorter, we know that the traffic is following the best path.Examples ofdistance vector routing protocols are IPX RIP and IP RIP.

Page 14: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 14/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 13

Distance Vector Network Discovery

Each router using distance vector routing begins by identifying its own neighbours. InFigure 6 the interface to each directly connected network is shown in the routingtables as having a distance of 0.

Routing Table

100.1.0.0 S1 0

100.2.0.0 S2 0

100.3.0.0 S2 1

100.4.0.0 S2 2

Routing Table

100.2.0.0 S2 0

100.3.0.0 S1 0

100.4.0.0 S1 1

100.1.0.0 S2 1

Routing Table

100.3.0.0 S0 0

100.4.0.0 S1 0

100.2.0.0 S0 1

100.1.0.0 S0 2

S1

100.2.0.0 100.1.0.0100.3.0.0

S2S2

S1S0

S1

DB C

Fig. 6 Distance Vector Ro ute Disco very   

As the distance vector network discovery process proceeds, routers discover the best path to destination networks based on accumulated metrics from each neighbour.

For example, router A learns about other networks based on information it receivesfrom router B. Each of the other network entries learnt from router B are placed inrouter A‘s routing table.

Link State Routing

Link State Routing replaced the Distance Vector Routing (used in the ARPANET) in1979. Two problems caused the demise of Distance Vector algorithm. First, since thedelay metric was queue length, it did not take line bandwidth into account whenchoosing the routes. It would have been possible to change the delay metric to takeinto account the line bandwidth, but a second problem existed, namely, the algorithmoften took too long to coverage, even with enhancements like split horizon. For thesereasons, it was replaced by an entirely new algorithm now called link state routing.Variants of link state routing are now widely used.

Page 15: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 15/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 14

The 5 step concept is stated below :

  1. Discover the neighbors and learn their network addresses

  2. Measure the delay or cost to each of the neighbors

  3. Construct a packet telling all that has just been learnt

  4. Send this packet to all other routers

  5. Compute the shortest path to every other router

When a router is booted, its first task is to learn who its neighbours are. This task isaccomplished by sending a special HELLO packet on each point-to-point line. Therouter on the other end is expected to send back a reply telling who it is.

Link-state routing algorithms - also known as shortest path first (SPF) algorithmmaintain a complex database of topology information. Whereas the distance vector

algorithm has entries for distant networks and a metric value to reach those networks but no knowledge of distant routers, a link state routing algorithm maintains fullknowledge of distant routers and how they interconnect. Examples of link-staterouting protocols are : NLSP, OSPF, and IS-IS.

Link state routing is widely used in actual networks. The OSPF  protocol, which isincreasingly being used in the Internet, uses a link state algorithm.

Link-State Network Discovery

Link-state network discovery mechanisms are used to create a common picture of the

entire internetwork. All routers employing the link state routing algorithm share thiscommon view of the internetwork. In Figure 7, four networks (W,X,Y, and Z) areconnected by three link-state routers(A,B, and C).

Routing Table

  Y S1 0

  Z S0 0

Routing Table

  X S1 0

  Y S0 0

Routing Table

  W S0 0

  X S1 0

A B C

X YW Z

Fig. 7 Link State Routin g 

S0S1

S1

S0

S1

 

Link-State Network discovery proceeds as follows :

Page 16: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 16/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 15

  Routers learn about their neighbours; that is, other routers that are on directlyconnected networks with them. This process is often referred to as neighbournotification. In link-state routing, each router connected to a network keepstrack of its neighbours.

  Routers transmit LSPs (Link State Packets) on the network. The LSPs containinformation about networks to which the routers are connected.

  Then, routers constructed their topological databases consisting of all the LSPsfrom the internetwork.

  The SPF algorithm computes network reachability, determining the shortest path from a router to each other network in the link-state protocolinternetwork. The router uses the Dijkstra algorithm to construct this logicaltopology of shortest paths as an SPF tree with itself as root. The SPF treeexpresses paths from the router to all destinations.

  The router computes its best paths and the ports to these destination networksand enters them in the routing table.

After the routers dynamically discover the details of their internetwork, they can usethe routing table for switching packet traffic.

Comparison of Distance Vector Routing & Link-State Routing

You can compare distance-vector routing to link-state routing in several key areas, aslisted in Table 1.

Table 1

Distance Vector Link State

 Network Topology is viewed fromneighbours perspective

Entire Network Topology is common to allRouters

Metrics are incremented as the updatecrosses one Router

Shortest Path to other Routers is calculated

Periodic & Frequent Updates results inslow convergence

Updates are triggered by events. Results infaster convergence

Copies of Routing Tables are passed toneighbouring Routers

Link State Packets are passed to otherRouters

Interior Routing

Interior routing occurs within an autonomous system. Most common interior routing protocols are RIP and OSPF. The basic routable element is the IP network orsubnetwork, or CIDR prefix for newer protocols.

Page 17: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 17/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 16

Exterior Routing

Exterior routing occurs between autonomous systems, and is of concern to service providers and other large or complex networks. The basic routable element is theAutonomous System, a collection of CIDR prefixes identified by an AutonomousSystem number. While there may be many different interior routing schemes, a single

exterior routing system manages the global Internet, based primarily on the BGP-4 (Border Gateway Protocol Version 4) exterior routing protocol.

Distance Vector Protocols :

  1) D-V Protocols such as RIP Version 1 were mainly designed for smallnetwork topologies.

  2) The term Distance Vector derives from the fact that the protocol includesin its routing updates a vector of distances (hop counts).

  3) Low speed links are treated equally or sometimes preferred over a high-speed link, depending on the calculated hop count in reaching adestination. This may lead to inefficient routing behaviour.

  4) Count to infinity restriction : D-V Protocols have a finite limit of hops (15)after which a route is considered unreachable. This would restrict the

 propagation of routing updates and would cause problems for largenetworks.

  5) The reliance on hop counts is one deficiency of distance vector protocols;another deficiency is the way that the routing information gets updated.

6) D-V Protocols work on the concept that routers exchange all the networknumbers they can reach via periodic broadcasts of the entire routing table.In large networks, the routing table exchanged between routers becomes

very hard to maintain, leading to slower convergence.

Autonomous

Systems

AutonomousS stems  

IGP

IGPIGP

BGPBGP

BGP

Fig. 8 General illustration of Protocol relationships

Page 18: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 18/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 17

7) D-V Protocols are considered to be Flat. They present a lack of hierarchy,which translates into a lack of aggregation. This flat nature has made D-VProtocols incapable of scaling to larger and more efficient enterprisenetworks.

Link State Protocols :

  1) Link State Protocols work on the basis that routers exchangeinformation elements, called link states, which carryinformation about links and nodes.

  2) This means that routers running link state protocols do not exchangerouting tables. Each router inside a domain will have enough bits and

 pieces of the big puzzle that it can run a shortest path algorithm and buildits own routing table.

Page 19: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 19/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 18

IPV6

Page 20: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 20/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 19

IPV6

Introduction

By the early 1990s, it was clear that the change to a classful network   introduced adecade earlier was not enough to prevent the IPv4 address exhaustion and that further

changes to IPv4 were needed.[1]

 By the winter of 1992, several proposed systems were being circulated and by the fall of 1993, the IETF announced a call for white papers(RFC 1550) and the creation of the "IPng Area" of  working groups.[1][2] 

IPng was adopted by the  Internet Engineering Task Force on July 25, 1994 with theformation of several "IP Next Generation" (IPng) working groups.[1] By 1996, a seriesof  RFCs were released defining IPv6, starting with RFC 2460. (Incidentally, IPv5 wasnot a successor to IPv4, but an experimental flow-oriented streaming  protocolintended to support video and audio.)

It is expected that IPv4 will be supported alongside IPv6 for the foreseeable future.

However, IPv4-only clients/servers will not be able to communicate directly withIPv6 clients/servers, and will require service-specific intermediate servers or NAT-PT protocol-translation servers.

Features of IPv6

To a great extent, IPv6 is a conservative extension of IPv4. Most transport- andapplication-layer protocols need little or no change to work over IPv6; exceptions areapplications protocols that embed network-layer addresses (such as FTP or  NTPv3).

Applications, however, usually need small changes and a recompile in order to run

over IPv6.

Larger address space

The main feature of IPv6 that is driving adoption today is the larger address space:addresses in IPv6 are 128 bits long versus 32 bits in IPv4.

The larger address space avoids the potential exhaustion of the IPv4 address spacewithout the need for NAT and other devices that break the end-to-end nature ofInternet traffic. It also makes administration of medium and large networks simpler,

 by avoiding the need for complex Subnetting schemes.

The drawback of the large address size is that IPv6 carries some bandwidth overheadover IPv4, which may hurt regions where bandwidth is limited (header compressioncan sometimes be used to alleviate this problem).

Stateless autoconfiguration of hosts

IPv6 hosts can be configured automatically when connected to a routed IPv6 network.When first connected to a network, a host sends a link-local multicast (broadcast) request for its configuration parameters; if configured suitably, routers respond tosuch a request with a router advertisement packet that contains network-layerconfiguration parameters.

Page 21: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 21/119

Page 22: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 22/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 21

regularly updated report projected that the IANA pool of unallocated addresses would be exhausted in May 2011, with the various Regional Internet Registries using uptheir allocations from IANA in August 2012.[5] This report also argues that, ifassigned but unused addresses were reclaimed and used to meet continuing demand,allocation of IPv4 addresses could continue until 2024. The U.S. Government hasspecified that the network backbones of all federal agencies must deploy IPv6 by

2008.[6] Meanwhile China is planning to get a head start implementing IPv6 withtheir  5 year plan for the China Next Generation Internet. 

With the notable exceptions of stateless autoconfiguration, more flexible addressingand Secure Neighbor Discovery (SEND), many of the features of IPv6 have been

 ported to IPv4 in a more or less elegant manner. Thus IPv6 deployment is primarilydriven by address space exhaustion.

Addressing

128-bit length

The primary change from IPv4 to IPv6 is the length of network addresses. IPv6addresses are 128 bits long (as defined by RFC 4291), whereas IPv4 addresses are 32

 bits; where the IPv4 address space contains roughly 4 billion addresses, IPv6 hasenough room for 3.4×1038 unique addresses.

IPv6 addresses are typically composed of two logical parts: a 64-bit (sub-)network prefix, and a 64-bit host part, which is either automatically generated from theinterface's MAC address or assigned sequentially. Because the globally unique MACaddresses offer an opportunity to track user equipment, and so users, across time andIPv6 address changes, RFC 3041 was developed to reduce the prospect of user

identity being permanently tied to an IPv6 address, thus restoring some of the possibilities of anonymity existing at IPv4. RFC 3041 specifies a mechanism bywhich variable over time random bit strings can be used as interface circuit identifiers,replacing unchanging and traceable MAC addresses.

Notation

IPv6 addresses are normally written as eight groups of four   hexadecimal digits. Forexample, 2001:0db8:85a3:08d3:1319:8a2e:0370:7334 is a valid IPv6 address.

If a four-digit group is 0000, the zeros may be omitted and replaced with two

colons(::). For example, 2001:0db8:0000:0000:0000:0000:1428:57ab can beshortened as 2001:0db8::1428:57ab. Following this rule, any number of consecutive0000 groups may be reduced to two colons, as long as there is only one double colonused in an address. Leading zeros in a group can also be omitted. Thus, the addresses

 below are all valid and equivalent:

2001:0db8:0000:0000:0000:0000:1428:57ab2001:0db8:0000:0000:0000::1428:57ab2001:0db8:0:0:0:0:1428:57ab2001:0db8:0:0::1428:57ab2001:0db8::1428:57ab2001:db8::1428:57ab

Page 23: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 23/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 22

Having more than one double-colon abbreviation in an address is invalid, as it wouldmake the notation ambiguous.

A sequence of 4 bytes at the end of an IPv6 address can also be written in decimal,using dots as separators. This notation is often used with compatibility addresses (see

 below). Thus, ::ffff:1.2.3.4 is the same address as ::ffff:0102:0304, and

::ffff:15.16.18.31 is the same address as ::ffff:0f10:121f.

Additional information can be found in RFC 4291 - IP Version 6 AddressingArchitecture.

Literal IPv6 Addresses in URLs

In a URL the IPv6-Address is enclosed in brackets. Example:

http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]/

This notation allows  parsing a URL without confusing the IPv6 address and portnumber:

http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:443/

Additional information can be found in "RFC 2732 - Format for Literal IPv6Addresses in URL's" and "RFC 3986 - Uniform Resource Identifier (URI): GenericSyntax"

Network notation

IPv6 networks are written using CIDR notation. 

An IPv6 network (or subnet) is a contiguous group of IPv6 addresses the size ofwhich must be a power of two; the initial bits of addresses, which are identical for allhosts in the network, are called the network's prefix.

A network is denoted by the first address in the network and the size in bits of the prefix (in decimal), separated with a slash. For example, 2001:0db8:1234::/48 standsfor the network with addresses 2001:0db8:1234:0000:0000:0000:0000:0000 through2001:0db8:1234:FFFF:FFFF:FFFF:FFFF:FFFF

Because a single host can be seen as a network with a 128-bit prefix, you will

sometimes see host addresses written followed with /128.

Kinds of IPv6 addressses

IPv6 addresses are divided into 3 categories [7] :

  Unicast Addresses

  Multicast Addresses

  Anycast Addresses

A Unicast address defines a single interface. It identifies a single network interface A

 packet sent to a unicast address is delivered to that specific computer.

Page 24: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 24/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 23

Multicast addresses are used to define a set of interfaces that typically belong todifferent nodes instead of just one. When a packet is sent to a multicast address, the

 protocol delivers the packet to all interfaces identified by that address. Multicastaddresses begin with the prefix FF00::/8, and their second octet identifies theaddresses scope, i.e. the range over which the multicast address is propagated.Commonly used scopes include link-local (2), site-local (5) and global (E).

Anycast addresses, are also assigned to more than one interface, belonging to differentnodes. However, a packet sent to an anycast address is delivered to just one of themember interfaces, typically the ―nearest‖ according to the routing protocol‘s idea of

distance. Anycast addresses cannot be identified easily: they have the structure ofnormal unicast addresses, and differ only by being injected into the routing protocol atmultiple points in the network.

Special addresses

There are a number of addresses with special meaning in IPv6:

  ::/128 —  the address with all zeros is an unspecified address, and is to be usedonly in software.

  ::1/128  —   the loopback address is a  localhost address. If an application in ahost sends packets to this address, the IPv6 stack will loop these packets backto the same host (corresponding to 127.0.0.1 in IPv4).

  ::/96  —   the zero prefix was used for IPv4-compatible addresses;  it is nowobsolete.

  ::ffff:0:0/96  —  this prefix is used for IPv4 mapped addresses (see Transitionmechanisms below).

  2001:db8::/32  —  this prefix is used in documentation (RFC 3849). Anywherewhere an example IPv6 address is given, addresses from this prefix should beused.

  fc00::/7  —  Unique local IPv6 unicast addresses are routable only within a setof cooperating sites. They were defined in RFC 4193 as a replacement for site-local addresses (see below). The addresses include a 40-bit  pseudorandomnumber that minimizes the risk of conflicts if sites merge or packets somehowleak out.

  fe80::/64 —  The link-local prefix specifies that the address only is valid in the

local physical link. This is analogous to the Autoconfiguration IP address169.254.x.x in IPv4.

  fec0::/10 —  The site-local prefix specifies that the address is valid only insidethe local organisation. Its use has been deprecated in September 2004 by RFC3879 and systems must not support this special type of address.

  ff00::/8  —  The multicast prefix is used for   multicast addresses[8] as defined by in "IP Version 6 Addressing Architecture" (RFC 4291).

There are no address ranges reserved for broadcast in IPv6  —   applications usemulticast to the all-hosts group instead.

Page 25: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 25/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 24

IPv6 packet

The structure of an IPv6 packet header.

The IPv6 packet is composed of two main parts: the header and the payload.

The header is in the first 40 octets  of the packet and contains both source anddestination addresses (128 bits each), as well as the version (4-bit IP version), trafficclass (8 bits, Packet Priority), flow label (20 bits, QoS management), payload lengthin bytes (16 bits), next header (8 bits), and hop limit (8 bits, time to live). The payloadcan be up to 64KiB in size in standard mode, or larger with a "jumbo payload" option.

Fragmentation is handled only in the sending host in IPv6: routers never fragment a packet, and hosts are expected to use PMTU discovery.

The  protocol   field of IPv4 is replaced with a  Next Header   field. This field usually

specifies the transport layer protocol used by a packet's payload.

In the presence of options, however, the Next Header field specifies the presence ofan extra options  header, which then follows the IPv6 header; the payload's protocolitself is specified in a field of the options header. This insertion of an extra header tocarry options is analogous to the handling of AH and ESP in IPsec for both IPv4 andIPv6.

IPv6 and the Domain Name System

IPv6 addresses are represented in the Domain Name System by AAAA records (so-

called quad-A records) for forward lookups; reverse lookups take place under ip6.arpa(previously ip6.int), where address space is delegated on nibble  boundaries. Thisscheme, which is a straightforward adaptation of the familiar A record and in-addr.arpa schemes, is defined in RFC 3596. 

The AAAA scheme was one of two proposals at the time the IPv6 architecture was being designed. The other proposal, designed to facilitate network renumbering,would have had A6 records for the forward lookup and a number of other innovationssuch as bit-string labels and DNAME records. It is defined in the experimental RFC2874 and its references (with further discussion of the pros and cons of both schemesin RFC 3364).

Page 26: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 26/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 25

AAAA record fields

 NAME Domain name

TYPE AAAA (28)

CLASS Internet (1)

TTL  Time to live in seconds

RDLENGTH Length of RDATA field

RDATA String form of the IPV6 address as described in RFC 3513 

RFC 3484 specifies how applications should select an IPv6 or IPv4 address for use,including addresses retrieved from DNS.

IPv6 and DNS RFCs

  DNS Extensions to support IP version 6 - RFC 1886

  DNS Extensions to Support IPv6 Address Aggregation and Renumbering -RFC 2874

  Tradeoffs in Domain Name System (DNS) Support for Internet Protocolversion 6 (IPv6) - RFC 3364

  Default Address Selection for Internet Protocol version 6 (IPv6) - RFC 3484

  Internet Protocol Version 6 (IPv6) Addressing Architecture - RFC 3513

  DNS Extensions to Support IP Version 6 (Obsoletes 1886 and 3152) - RFC3596

IPv6 scope

IPv6 defines 3 unicast address scopes: global, site, and link.. Site-local addresses arenon-link-local addresses that are valid within the scope of an administratively-definedsite and cannot be exported beyond it.

Site-local addresses are deprecated by RFC 3879.  Note that this does not deprecate

other site-scoped address types (e.g. site-scoped multicast).

Companion IPv6 specifications further define that only link-local addresses can beused when generating ICMP Redirect Messages [ND] and as next-hop addresses inmost routing protocols.

These restrictions do imply that an IPv6 router must have a link-local next-hopaddress for all directly connected routes (routes for which the given router and thenext-hop router share a common subnet prefix).

Page 27: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 27/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 26

IPv6 deployment

In February 1999, The IPv6 Forum was founded by the IETF Deployment WG todrive deployment worldwide creating by now over 30 IPv6 Country Fora and IPv6Task Forces [9]. On 20 July 2004 ICANN announced[10] that the root DNS serversfor the Internet had been modified to support both IPv6 and IPv4.

A global view into the IPv6 routing tables, which displays also which ISPs are alreadydeploying IPv6, can be found by looking at the SixXS Ghost Route Hunter  pages:these pages display a list of all allocated IPv6 prefixes and give colors to the ones thatare actually being announced in BGP. When a prefix is announced, that means thatthe ISP at least can receive IPv6 packets for their prefix. They might then actuallyalso offer IPv6 services, maybe even to end users/sites directly.

ISPs that provide IPv6 connectivity to their customers can be found in the Where canI get native IPv6 FAQ. 

The mandate by the United States Government to move to an IPv6 platform for allcivilian and defense vendors by summer 2008 will greatly boost deployment. Theawarding of over $150 billion in contracts in spring of 2007 by the General ServicesAdministration will in itself come close to the total amount spent on the Y2K upgradeof the previous decade, and total cost will swell far beyond that, to as much as $500

 billion.[11]

Transition mechanisms

Until IPv6 completely supplants IPv4, which is not likely to happen in the foreseeablefuture, a number of so-called transition mechanisms are needed to enable IPv6-only

hosts to reach IPv4 services and to allow isolated IPv6 hosts and networks to reachthe IPv6 Internet over the IPv4 infrastructure. [12] contains an overview of the belowmentioned transition mechanisms.

Dual stack

Since IPv6 is a conservative extension of IPv4, it is relatively easy to write a networkstack that supports both IPv4 and IPv6 while sharing most of the code. Such animplementation is called a dual stack, and a host implementing a dual stack is called adual-stack host. This approach is described in RFC 4213. 

Most current implementations of IPv6 use a dual-stack. Some early experimentalimplementations used independent IPv4 and IPv6 stacks. There are no knownimplementations that implement IPv6 only.

Tunneling

In order to reach the IPv6 Internet, an isolated host or network must be able to use theexisting IPv4 infrastructure to carry IPv6 packets. This is done using a techniquesomewhat misleadingly known as tunnelling which consists in encapsulating IPv6

 packets within IPv4, in effect using IPv4 as a link layer for IPv6.

IPv6 packets can be directly encapsulated within IPv4 packets using protocol number

41. They can also be encapsulated within UDP packets e.g. in order to cross a router

Page 28: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 28/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 27

or NAT device that blocks protocol 41 traffic. They can of course also use genericencapsulation schemes, such as AYIYA or  GRE. 

Automatic tunneling

Automatic tunneling refers to a technique where the tunnel endpoints are

automatically determined by the routing infrastructure. The recommended techniquefor automatic tunneling is  6to4[13] tunneling, which uses protocol 41 encapsulation.Tunnel endpoints are determined by using a well-known IPv4 anycast address on theremote side, and embedding IPv4 address information within IPv6 addresses on thelocal side. 6to4 is widely deployed today.

Teredo [14] is an automatic tunneling technique that uses UDP encapsulation and isclaimed to be able to cross multiple NAT boxes. Teredo is not widely deployed today,

 but an experimental version of Teredo is installed with the Windows XP SP2 IPv6stack. IPv6, 6to4 and Teredo are enabled by default in Windows Vista [15]. 

Configured tunneling

Configured tunneling is a technique where the tunnel endpoints are configuredexplicitly, either by a human operator or by an automatic service known as a TunnelBroker[16].  Configured tunneling is usually more deterministic and easier to debugthan automatic tunneling, and is therefore recommended for large, well-administerednetworks.

Configured tunneling typically uses either protocol 41 (recommended) or raw UDPencapsulation.

Proxying and translation

When an IPv6-only host needs to access an IPv4-only service (for example a webserver), some form of translation is necessary. The one form of translation thatactually works is the use of a dual-stack   application-layer proxy, for example a web

 proxy.

Techniques for application-agnostic translation at the lower layers have also been proposed, but they have been found to be too unreliable in practice due to the widerange of functionality required by common application-layer protocols, and arecommonly considered to be obsolete.

Page 29: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 29/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 28

ROUTING INFORMATION PROTOCOL 

(RIP)

Page 30: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 30/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 29

INTRODUCTION

The DARPA Internet Architecture.

Internet Protocols

The Internet system consists of a number of interconnected  packet  networkssupporting communication among host computers using the Internet protocols. These

 protocols include the Internet Protocol (IP), the Internet Control Message Protocol(ICMP), the Transmission Control Protocol (TCP), and application protocolsdepending upon them .

All Internet protocols use IP as the basic data transport mechanism. IP is a datagram, or connectionless, internetwork service and includes provision for addressing, type-of-service specification, fragmentation and reassembly, and security information.ICMP is considered an integral part of IP, although it is architecturally layered uponIP. ICMP  provides error reporting, flow control and first-hop gateway redirection.

Reliable data delivery is provided in the Internet protocol suite by transport-level protocols such as the Transmission Control Protocol (TCP), which provides end-endretransmission, resequencing and connection control. Transport-level connectionlessservice is provided by the User  datagram Protocol (UDP).

Networks and gateways

Constituent networks may generally be divided into two classes.

  Local-Area Networks (LANs)

  Wide-Area Networks (WANs)

In the Internet model, constituent networks are connected together by IP datagram forwarders which are called "gateways" or "IP router s".

A gateway is connected to two or more networks, appearing to each of these networksas a connected host. Thus, it has a physical interface and an IP address on each of theconnected networks. Forwarding an IP datagram  generally requires the gateway  tochoose the address of the next-hop gateway or (for the final hop) the destination host. This choice, called "routing", depends upon a routing data-base within the gateway. This routing data-base should be maintained dynamically to reflect the current

topology of the Internet system; a gateway  normally accomplishes this by participating in distributed routing and reachability algorithms with other gateways.gateways  provide datagram  transport only, and they seek to minimize the stateinformation necessary to sustain this service in the interest of routing flexibility androbustness.

Page 31: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 31/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 30

Autonomous Systems

For technical, managerial, and sometimes political reasons, the gateways  of theInternet system are grouped into collections called "autonomous systems" . Thegateways included in a single autonomous system (AS) are expected to

  Be under the control of a single operations and maintenance (O&M)organization;

  Employ common routing protocols among themselves, to maintain theirrouting data-bases dynamically.

A number of different dynamic routing protocols have been developed; the particularchoice of routing protocol within a single autonomous system is generically called aninterior  gateway  protocol or  IGP. 

An IP datagram  may have to traverse the gateways  of two or more autonomoussystems to reach its destination, and the autonomous systems must provide each other

with topology information to allow such forwarding. The Border Gateway Protocol(BGP) is used for this purpose, between gateways of different autonomous systems.

Routing Information Protocol (RIP)

RIP is one protocol in a series of routing protocols based on the Bellman-Ford (ordistance vector) algorithm. This algorithm has been used for routing computations incomputer networks since the early days of the ARPANET. The particular  packet formats and protocol described here are based on the program "routed", which isincluded with the Berkeley distribution of Unix. It has become a de facto standard forexchange of routing information among gateways and hosts. It is implemented for this

 purpose by most commercial vendors of IP gateways. Note, however, that many ofthese vendors have their own protocols which are used among their own gateways.

This protocol is most useful as an "interior gateway  protocol". In a nationwidenetwork such as the current Internet, it is very unlikely that a single routing protocolwill used for the whole network. Rather, the network will be organized as a collectionof "autonomous systems". An autonomous system will in general be administered bya single entity, or at least will have some reasonable degree of technical andadministrative control. Each autonomous system will have its own routingtechnology. This may well be different for different autonomous systems. The routing

 protocol used within an autonomous system is referred to as an interior gateway 

 protocol, or "IGP". A separate protocol is used to interface among the autonomoussystems. The earliest such protocol, still used in the Internet, is "EGP"  (exteriorgateway  protocol). Such protocols are now usually referred to as inter-AS routing

 protocols. RIP was designed to work with moderate-size networks using reasonablyhomogeneous technology. Thus it is suitable as an IGP  for many campuses and forregional networks using serial lines whose speeds do not vary widely.

RIP is intended for use within the IP-based Internet. The Internet is organized into anumber of networks connected by gateways. The networks may be either point-to-

 point links or more complex networks such as Ethernet or the ARPANET. hosts andgateways  are presented with IP datagrams  addressed to some host.  Routing is themethod by which the host or  gateway decides where to send the datagram. It may beable to send the datagram directly to the destination, if that destination is on one of the

Page 32: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 32/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 31

networks that are directly connected to the host or  gateway. However, the interestingcase is when the destination is not directly reachable. In this case, the host or  gatewayattempts to send the datagram to a gateway that is nearer the destination. The goal of arouting protocol is very simple. It is to supply the information that is needed to dorouting.

This protocol does not solve every possible routing problem. As mentioned above, itis primary intended for use as an IGP,  in reasonably homogeneous networks ofmoderate size. In addition, the following specific limitations should be mentioned

  The protocol is limited to networks whose longest path involves 15 hops. Notethat this statement of the limit assumes that a cost of 1 is used for eachnetwork.

  The protocol depends upon "counting to infinity" to resolve certain unusualsituations.

  This protocol uses fixed "metrics" to compare alternative routes.

RIP Algorithm

Let's look at what happens when a datagram is sent from one source to a destination.If the source and the destination are in the same autonomous system it is delivered bythe system's technology. But, if the destination is in another autonomous system thedatagram should be transferred to that autonomous system. There it will be delivered

 by that system technology. routers  are the ones that should do the transferring.Therefore, they should know all the autonomous systems in the supernet. When theyreceive a datagram addressed to autonomous system `A' they should transfer it to `A'.A trivial way to implement a router is having one router that is connected to allautonomous systems. However this is not practical.

A more practical way is having many routers. Each connected to few autonomoussystems. Let a datagram be sent from one autonomous system to another. The routerof the first autonomous system would transfer the datagram to that autonomoussystem (if it can), or transfer it to another router, that knows how to reach thedestination. Eventually the datagram will reach a router that has a connection to thatautonomous system and the datagram will be transferred correctly.

This way requires each router to hold a database of all the possible destinations. Eachentry in the database should hold the next router that datagrams  should be sent to.This way could have worked very well. Alas, the network cannot be kept still. Newrouters can be installed Old routers can crash. Crashed router can come up. Therefore,our connection through a router is not guaranteed. Even if the router doesn't crash, anew router may be installed, providing better service.

Before we continue this discussion, we have to make few things clearer. We have todefine what we mean by saying that one line is better than the other. There are manyways to measure a connections. You can measure it by the Dollar cost, number ofhops in the way, error rate, latency, etc. We will assume that connection are measured

 by the number of hops in its path. This assumption is no way, obligatory and anysystem administrator can define a measure of his own. We will treat measure as costs.

That means that the lower the number associated with the connection, the better. RIP

Page 33: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 33/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 32

treats any number higher than fifteen as infinity (sixteen). So, sixteen means 'noconnection'. This method of calculating the cost is called metric.

Let d( i , j ) be the cost of the direct link from i to j .

d( i , i ) = 0 for any i .

Let D( i , j ) be the cost of the best route from i to j . It is defined for any two entities i, j .

D( i , i ) = 0 for any i .

D( i , j ) = min [d( i , k ) + D( k , j )] for i <> j

The last equation can be proven using induction over the number of steps in theroutes. The metrics can be calculated using a simple algorithm. Entity i gets itsneighbor k to send their estimates of their distance from j . When i gets the estimatesfrom k , it adds d( i , k ) to each of the numbers. Then i picks the smallest value. A

 proof that this algorithm converges to the correct values of D( i , j ) in finite time,when the network topology does not change. Very few assumption were made aboutthe order in which the entities send each other their information. No assumption weremade on the initial values of D( i , j ), except that they have to be non-negative. Thatmeans that it is safe to run the algorithm asynchronously. Entities can send updates bytheir own clock. Updates may be dropped, as long as they don't get all dropped.Because there are no assumptions on the initials values, the algorithm handleschanges. when the topology changes, the system will move to a new equilibriumusing the old one as its starting point.

Once a router is installed, or started, it should send messages to all of its neighbors.This is necessary in order to update their tables. Consider this case:

A was connected to D through B and C . Once E has been installed, A can connect toD through E . This line costs less. That's why E has to announce its existence to A . IfE should ever crash, A must know about it. Otherwise it will continue to senddatagram s through E . Unfortunately, a router can't always inform others, that it isabout to crash. A router can't depend on such message to warn it.

Page 34: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 34/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 33

Therefore a  router  crash, must be learned in other ways. RIP forces a router   to sendupdate messages every thirty seconds. These messages contain routes, that that router  knows; and their metrics. If a router   does not receive an update message for 180seconds. from another  router . It assumes that router  to be unreachable. This timeout of180 seconds allow a router   to miss five update messages, without being markedunreachable. This is necessary, because the media might be unreliable and loosedatagrams.

The algorithm so far, sends update messages every thirty seconds. Every updatemessage contains a list of the autonomous system the router s knows to reach and theirmetrics. If the metric in an update message is lower than the metric in the router 'stable, the  router   would update the metric and the next hop fields in its table. If forsome destination, an update had come from the next hop, indicating a different metric,then the metric in the table should be changed. This is necessary because if the metricchanges in the next hop, we must change the metric in our router ,  as well. Thisguarantees correct performance, but not good enough. Consider this case:

All links have cost of 1, except for the direct link from C to B which has cost 10. Eachrouter   will have a table showing the next hop and the metric for each destination.We're interested only in the connection to the target network.

Page 35: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 35/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 34

D : directly connected, metric 1.

B : connected via D , metric 2.

C : connected via B , metric 3.

A : connected via B , metric 3.

 Now suppose that the link from B to D fails. The routes should adjust to use the linkfrom C to D . Unfortunately it will take quite a while for this to happen. The routingchanges start when B notices that the route to D is no longer usable. The chart belowassumes that all router s send updates at the same time. the chart shows the metrics forthe target.

time --->

B : unreachable | C , 4 | C , 5 ....

C : B , 3 | A , 4 | A , 5

A : B , 3 | C , 4 | C , 5

The problem is that A and C both believe they can connect to the target through eachother. It happened because they sent messages indicating they can connect to thetarget at cost of 3. When they received the message from B saying that the target isunreachable, they received another message. The second message said they canconnect to the target in cost of 3. This cost is of course not true, because the link fromB to D is unusable. Since A and C don't know that the route from each other usesanother link that is no longer usable, they would both update their tables to point at

each other. Since, they increase the metric by one, they will both report that the cost isnow four. Since A uses C as next connection, and C signals that the cost had change,A would change the cost of the link. Same thing would happen to C . This way thecost of the connection will slowly rise. The worst case is when the target is reallyunusable, and then the cost will rise up to infinity. This effect is called 'counting toinfinity'. This is why infinity was chosen to be such a small number. If someautonomous system  becomes completely unreachable, we would like the counting to

 be over as soon as possible.

There are several ways to prevent this from happening. The ones that RIP uses arecalled 'split horizon with poison reverse' and 'triggered update'.

Page 36: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 36/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 35

Split horizon.

 Notice that the problem above is caused because both A and C deceive each other.They both claim they have a connection. Since they both think they can connectthrough each other, a real link is not established. This could have been prevented if Ahadn't told C that it can connect to the target. Generally, it is not useful to claim

reachability for a destination to the neighbor from which the route was learned. The"simple split horizon" omits routes learned from one neighbor in updates to thatneighbor. "split horizon with poisoned reverse" include those routes but with cost ofinfinity.

If A thinks it can get to D through C its message to C should indicate that D isunreachable. If C still claim reachability to D , then either it is connected directly to D, or it knows another  router that claim reachability. C 's route to the destination cannotgo back to any route that points to C .

In general, split horizon with poisoned reverse, is safer than simple split horizon. If

two router s point at each other, advertising reverse routes with metric of 16 will brakethe loop immediately. If the reverse routes are simply omitted, those routes will haveto be eliminated by waiting for a timeout. Alas, poisoned reverse increases the size ofthe messages. Consider the case of a campus backbone connecting many buildings.Each building has a router . In simple split horizon only the network that is connectedto the router   is included in the updates messages. In split horizon with poisonedreverse, ALL networks learned must be published as well.

Implementors may use simple split horizon if they like. Or they can offer aconfiguration option, to allow the system manager to choose which way to use. It isalso possible to advertise some reverse routes with metric of sixteen, and omit others.

Triggered updates

Split horizon with poisoned reverse will break any loop of two router s. However, it isstill possible for loops of three or more router s, to occur. A may think it can reach thetarget through B . B may think it can reach the target through C . C may think it canreach the target through A . This loop will break only when infinity will be reached.Triggered updates are an attempt to speed up this convergence. To imply triggeredupdates, we simply add a rule that whenever a router  changes the metric of a route, itis required to send update messages almost immediately. The triggered updatemessages will be sent even if it is not time to the regular update message. Consider a

case were G can connect to a target network, and then its link becomes unusable. Gwill send its neighbor updates about the change. Its neighbors will update their tablesif necessary. The ones that updated their tables will send their own update messages.Some of the neighbors' neighbors will update their tables, and send their own updatemessages. The update messages will propagate back, until they reach a portion of thenetwork that uses another route to connect to the target.

If the system could be made to stay still while the update messages propagate back, ithad been possible to prove that counting to infinity would never happen. A bad router  will be removed from the tables, using update messages. Alas, this is not the case.While the triggered updates are being sent, regular updates can be sent, from router  

who hasn't got the update yet. Their update will indicate that the target is stillreachable. It is possible that a router   will receive a false regular update saying the

Page 37: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 37/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 36

target is reachable, after it received a triggered update saying the target isunreachable. This could reestablish a connection incorrectly. Triggered updatesreduce the chance to get counting to infinity, however this can still happen.

Format of RIP Datagram:

The format of the RIP header is shown here:

Each word (line) is 32 bitsThe fields size (e.g, (1) ) are in octets

The portion of the datagram f rom address family field through metric may appear upto 25 times. IP address is the usual 4-octet Internet address, in network order. Thespecial address 0.0.0.0 is used to describe a default route. The address familyidentifier for IP is 2. The metric field must contain a value between 1 and 15inclusive, specifying the current metric for the destination, or the value 16, whichindicates that the destination is not reachable. The maximum datagram size is 512octets. (IP or   UDP headers not counted) Every datagram contains a command, a

version number, and possible arguments.Here is a summary of the commands implemented in version 1 of RIP:

  Request A request for the responding system to send all or part of its routingtable.

  Response A message containing all or part of the sender's routing table. Thismessage may be sent in response to a request or poll, or it may be an updatemessage generated by the sender.

  Traceon Obsolete. Messages containing this command are to be ignored.

  Traceoff Obsolete. Messages containing this command are to be ignored.

IP ADDRESS

UNUSED (SET TO ZERO’S) 

UNUSED (SET TO ZERO’S) 

METRIC

UNUSED (SET TO ZERO’S)  ADDRESS FAMILY IDENTIFIER

UNUSED (SET TO ZERO’S) VERSIONCOMMAND

Octet +3Octet +2Octet +1Octet +0

RIP DataRIP HeaderUDP Header

4B8B + + 25x20B = 512 B

Page 38: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 38/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 37

  Teserved This value is used by Sun Microsystems for its own purposes. If newcommands are added in any succeeding version, they should begin with 6.Messages containing this command may safely be ignored by implementationsthat do not choose to respond to it.

Addressing considerations

The RIP  packet f ormats do not distinguish among various types of address. Fields thatare labeled "address" can contain any of the following:

  host address

  subnet number

  network number

  0, indicating a default route

When routing a datagram , its destination address must first be checked against the listof host addresses. Then it must be checked to see whether it matches any known

subnet or network number. Finally, if none of these match, the default route is used.

"Border" gateway s send only a single entry for the network as a whole to host s  inother networks. This means that a border  gateway will send different information todifferent neighbors. For neighbors connected to the subnetted network, it generates alist of all subnets to which it is directly connected, using the subnet number. Forneighbors connected to other networks, it makes a single entry for the network as awhole, showing the metric associated with that network. (This metric would normally

 be the smallest metric for the subnets to which the gateway is attached.)

Timers

Every 30 seconds, the output process is instructed to generate a complete response toevery neighboring gateway . 

There are two timers associated with each route, a "timeout" and a "garbage-collection time". Upon expiration of the timeout, the route is no longer valid.However, it is retained in the table for a short time, so that neighbors can be notifiedthat the route has been dropped. Upon expiration of the garbage-collection timer, theroute is finally removed from the tables.

The timeout is initialized when a route is established, and any time an update messageis received for the route. If 180 seconds elapse from the last time the timeout was

initialized, the route is considered to have expired, and the deletion process which weare about to describe is started for it.

Deletions can occur for one of two reasons: (1) the timeout expires, or (2) the metricis set to 16 because of an update received from the current gateway .  (See response command for a discussion processing updates from other   gateway s.) In either case,the following events happen:

- The garbage-collection timer is set for 120 seconds.

- The metric for the route is set to 16 (infinity). This causes the route to be removed

from service.

Page 39: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 39/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 38

- A flag is set noting that this entry has been changed, and the output process issignalled to trigger a response.

Until the garbage-collection timer expires, the route is included in all updates sent bythis host , with a metric of 16 (infinity). When the garbage-collection timer expires,the route is deleted from the tables.

Should a new route to this network be established while the garbage- collection timeris running, the new route will replace the one that is about to be deleted. In this casethe garbage-collection timer must be cleared.

Input processing

Before processing the recived datagram s, certain general format checks must bemade. These depend upon the version number field in the datagram , as follows:

  0 datagram s whose version number is zero are to be ignored. These are from a previous version of the protocol, whose  packet f ormat was machine-specific.

  1 datagram s whose version number is one are to be processed as described inthis document. All fields that are described above as "must be zero" are to bechecked. If any such field contains a non-zero value, the entire message is to

 be ignored.

  >1 datagram s whose version number are greater than one are to be processedas described in the rest of this specification. All fields that are described aboveas "must be zero" are to be ignored. Future versions of the protocol may putdata into these fields. Version 1 implementations are to ignore this extra dataand process only the fields specified in this document.

After checking the version number and doing any other preliminary checks, processing will depend upon the value in the command field. 

Page 40: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 40/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 39

Output processing

Let describe the processing used to create response messages that contain all or part ofthe routing table. This processing may be triggered in any of the following ways

- by input processing when a request is seen. In this case, the resulting message is sent

to only one destination.

- by the regular routing update. Every 30 seconds, a response containing the wholerouting table is sent to every neighboring gateway

- by triggered updates. Whenever the metric for a route is changed, an update istriggered. (The update may be delayed.)

Triggered updates require special handling for two reasons. First, experience showsthat triggered updates can cause excessive loads on networks with limited capacity orwith many gateway s on them. Thus the protocol requires that implementors include

 provisions to limit the frequency of triggered updates. After a triggered update is sent,

a timer should be set for a random time between 1 and 5 seconds. If other changes thatwould trigger updates occur before the timer expires, a single update is triggeredwhen the timer expires, and the timer is then set to another random value between 1and 5 seconds. Triggered updates may be suppressed if a regular update is due by thetime the triggered update would be sent.

Second, triggered updates do not need to include the entire routing table. In principle,only those routes that have changed need to be included. Thus messages generated as

 part of a triggered update must include at least those routes that have their routechange flag set. They may include additional routes, or all routes, at the discretion ofthe implementor; however, when full routing updates require multiple  packet s,

sending all routes is strongly discouraged. When a triggered update is processed,messages should be generated for every directly-connected network. Split horizon

 processing is done when generating triggered updates as well as normal updates.

If, after split horizon processing, a changed route will appear identical on a network asit did previously, the route need not be sent; if, as a result, no routes need be sent, theupdate may be omitted on that network. (If a route had only a metric change, or uses anew gateway that is on the same network as the old gateway , the route will be sent tothe network of the old gateway with a metric of infinity both before and after thechange.) Once all of the triggered updates have been generated, the route change flagsshould be cleared.

If input processing is allowed while output is being generated, appropriateinterlocking must be done. The route change flags should not be changed as a result of

 processing input while a triggered update message is being generated.

The only difference between a triggered update and other update messages is the possible omission of routes that have not changed. The rest of the mechanisms aboutto be described must all apply to triggered updates.

Here is how a response datagram is generated for a particular directly-connectednetwork:

Page 41: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 41/119

Page 42: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 42/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 41

The RIP 2 datagram format is:

The Command, Address Family Identifier (AFI), IP Address, and Metric all have thesame meanings as in RIP 1. The Version field specifies version number 2 for RIPdatagrams which use authentication or carry information in any of the newly definedfields.

In RIP 2 there is an optional authentication  mechanism. When in use, this optionabuses an entire RIP entry, and leaves space to at most 24 RIP entries in theremainder of the  packet. The most widespread authentication Type is simple passwordand it is type 2.

The Routing domain  field enables some routing domains  inter-work upon the same physical infrastructure, while logically ignoring each other. This gives the ability tosimply implement various kinds of policies. There is a default routing domain whichis assigned the value '0'.

The Route Tag (RT) field exists as a support for  EGP's. This field is expected to carryAutonomous System  numbers for EGP  and BGP.  RIP systems which receive RIPentry which contains a non-zero RT value must re-advertise that value.

The Subnet Mask  field contains the subnet mask  which is applied to the IP address toyield the non-host  portion of the address. If this field is zero, then no subnet mask  isincluded for this entry.

 Next Hop is the immediate next hop IP address  to which  packets  to the destinationspecified by this route entry should be forwarded. The purpose of the Next Hop fieldis to eliminate  packets being routed through extra hops in the system. It is particularly

useful when RIP is not being run on all of the router s on a network.

IP ADDRESS

NEXT HOP

SUBNET MASK

METRIC

ROUTE TAG ADDRESS FAMILY IDENTIFIER

ROUTING DOMAIN VERSIONCOMMAND

Octet +3Octet +2Octet +1Octet +0

RIP DataRIP HeaderUDP Header

4B8B + + 25x20B = 512 B

Page 43: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 43/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 42

Multi-casting is an optional feature in RIP 2 using IP address 224.0.0.9. This featurereduces unnecessary load on those hosts  which are not listening to RIP 2. The IPmulti-cast address  is used for periodic broadcasts. In order to maintain backwardscompatibility, the use of the multi-cast address is configurable.

RIP 2 is totally backwards compatible with RIP 1. Its applications support fine tuning

to be RIP 1 emulation, RIP 1 compatible, or fully RIP 2.

Page 44: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 44/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 43

OPEN SHORTEST PATH FIRST 

Page 45: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 45/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 44

Open Shortest Path First

What is IP routing?

When several networks are joined together by hosts that are connected to more thanone network, hosts on one network may want to communicate with hosts on another

network. To do so, the messages between them must pass through several (i.e. morethan one) networks on the way. This is accomplished by turning some hosts withconnections to more than one network into routers, which forward messages to thenetworks they can reach (to which they are connected).

Each router has a routing table, which specifies where that router should send amessage it receives. In IP routing, the routing table will usually consist of a networkaddress (and a subnet mask) and the address of the "next hop", which is the target towhich the message should be forwarded if the destination's IP address matches thesubnet mask of the network address. The next hop can be a local network to which therouter is connected physically, or the IP address of another router on the network,

which will then continue forwarding that message according to its own routing table.If the routers are set up correctly and the network is healthy, eventually the messagewill reach its destination.

Static routing

In relatively small networks, or in networks where the network topology rarelychanges, setting up the routing tables can be done manually. This means that in theevent of a malfunction in one of the routers or of a network, the other routers will notknow about the problem and will not circumvent it until someone, usually the networkadministrator, will reconfigure each and every one of them with the new settings.

While this might turn out to be an impossible task for most networks, static routing isstill a viable solution in some cases.

Dynamic routing

Things get complicated when the conditions aren't ideal, and they rarely are. Networks tend to grow, evolve and change, hardware usually isn't impregnable, anderrors tend to occur on computer networks, especially large ones, in such highfrequencies that manually reconfiguring everything every time can be quiteimpossible. This is where dynamic routing comes into play.

In dynamic routing, the routers themselves, by communicating with one another, learnthe topology of the network by themselves. By running the same dynamic routing

 protocol they can get that information and build their routing tables automatically, andrespond to changes in the network much faster than a manual update ever could.

In dynamic routing protocols, routers communicate with neighboring routers, i.e.routers that are connected to the same networks that they are. The protocol dictateswhat information they exchange and when, how the information will be saved on eachrouter, and how the routing table can be constructed from it. We will now be talkingabout dynamic routing protocols of a certain kind: dynamic IGPs.

The Internet is constructed of many networks, and is divided into autonomoussystems (rather than single networks). An autonomous system is a network or several

Page 46: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 46/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 45

connected networks which are controlled by a single entity. For example, a largecorporation's network can be defined as an Autonomous System (named AS, forshort). Within each autonomous system routing is done separately from otherautonomous systems, and there is also routing between autonomous systems. Thelatter kind of routing is standardized throughout the Internet, and is uniformly

 preformed by running a protocol named BGP (Border Gateway Protocol). IGPs are

 protocols for routing within a single autonomous system (IGP stands for InteriorGateway Protocol). These protocols define how to route to networks within the AS,and can also distribute routing information for networks outside the AS (thatinformation will come, naturally, from the routers at the edges of the AS, which alsorun the BGP protocol).

Unlike in intra-AS routing, where there is a clear standard (the BGP routing protocol),there is no single standard for inter-AS routing. The most wide-spread IGP protocol isthe RIP protocol. That protocol, however, is showing signs of aging and is notsuitable for large networks. OSPF is an IGP which is designed to replace RIP, at leastfor large networks.

Link-state vs. distance-vector

IGPs usually work according to the principles of one of the following known problems: the link-state problem and the distance-vector problem. For example, RIPworks on the principles of the distance-vector problem, and OSPF works on the

 principles of the link-state problem.

The both problems solve the problem of a graph, whose vertices "want" to know theshortest path from them to every other vertex in the graph. When thinking about thenetwork as a graph of connected hosts, the resemblance is clear: we'd always like tofind the shortest route to a host, and send our message to it via that route.

The distance-vector solution works by keeping, for each vertex, a vector of distancesfrom it to every other vertex in the graph. The vector starts empty, and, by running analgorithm to solve the problem, it is updated with shorter and shorter routes until astable state is reached and the vector converges. Each vertex only knows of itsimmediate neighbors, and by exchanging their distance vectors between them thesolution is reached together.

Page 47: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 47/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 46

The link-state solution works by gathering the graph's topology information from allthe vertices on it, so that every vertex eventually learns the entire topology of thegraph. Then, from that topology, each vertex can calculate for itself, independently,the shortest path to every other vertex, by running an algorithm.

It's true - the distance-vector solution sounds like a much nicer concept: routers

working together, in unity, to reach a common goal. How ideal, compared to theselfish and almost anti-social link-state, where each vector grabs the topologyinformation and then goes off to a corner and calculates his own distances in solitary.In reality, however, the link-state solution has proven to be a much more efficientsolution, and convergence is reached much fasted this way, and that is why it is set toreplace distance-vector-based protocols, at least for large unstable networks whereRIP's inefficiency can create a perpetual state of non-convergence.

The reasons for creating OSPF

So why was OSPF created? one reason was already stated: it employs the faster link-

state solution, and is thus more suitable for larger networks than RIP. But there aremore reasons than that.

The original RIP protocol isn't suitable at all anymore to the modern networks and theInternet, as it lacks support for subnet masking, so RIP version 2 was created whichimproves the situation quite a bit, but still hasn't cured RIP from it's problems: TheRIP protocol is slow to converge (for networks with fast and constant change, it mightnever become stable), its own protocol traffic bites a significant chunk off the total

 bandwidth, and its metrics system (its way of telling the distance between routers is by counting the networks between them, regardless of line quality or physical length)limits the network's size: a distance of 16 hops from a router is considered infinity, so

a network running RIP can only grow so long as the longest distance between itsrouters is less than 16 hops, which means the protocol doesn't scale well.

OSPF was created to overcome all those shortcomings, and to enable support formany options:

  OSPF is one of the first IGPs that can create separate routing tables for eachtype of service.

  OSPF supports CIDR and subnetting.

  When several routes to a destination exist, OSPF can create a load balance by

using both routes intermittently.  OSPF is open source and offers support for multi-vendor hardware (whereas

some IGPs are proprietary and/or for certain types of hardware from certainvendors).

  OSPF can run on broadcast networks and on non-broadcast networks.

  OSPF brings to a minimum the protocol traffic.

Frequently used terms and their meaning

Router - A device connected to two or more networks, whose purpose is the delivery

of IP packets, of which it is not the source nor the destination.

Page 48: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 48/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 47

Network Neighbors  - two routers R1 and R2 are neighbors if there exists some physical network N, to which both R1 and R2 are connected. i.e. the following occurs:

Interface - We say that some device D has an interface to some physical network N,if D is connected to the network N. Usually, in internets, when a device has aninterface to some physical network, the interface is uniquely identified by an IPaddress.

Point-to-Point network   - A network between two devices. A link connecting thosetwo devices.

Broadcast - Sending a packet in a network, so that every device which is attached tothe network will receive it.

Multicast  - Sending a packet in a network, so that a specific set of devices that areattached to the network will receive it.

Autonomous System (AS)  - A group of networks that are connected to each otherand use the same Interior Gateway Protocol. Usually, an internet is divided intomultiple Autonomous Systems.

MTU - (Maximum Transfer Unit) The maximum amount of data, which can be sent

on a physical network without being fragmented.

Unicast - Sending a packet from one specific device to another specific device.

OSPF: Overview

OSPF is a protocol that runs in the Transport Layer (OSPF runs over IP), and its protocol number in the IP datagram is 89.

OSPF is an Interior Gateway Protocol, which means that it is used by all the routersinside the same Autonomous System in order to route packets inside the AS. In aninternet, which is divided into several AS's, the routing between 2 hosts on differentAS's is done as follows: first, the packet is sent from the original host to some BorderRouter using the Interior Gateway Protocol (IGP). The Border Router uses BorderGateway Protocol (BGP) to route the packet to the AS of the destination. Inside thatAS, the packet is routed through the IGP of that AS.

The general idea behind OSPF is the following:

OSPF is a link-state routing protocol, which is based on the SPF (Shortest Path First)algorithm to find the least cost path to any destination in the network.

Each router sends the list of his neighbors to all the other routers. When a router has

received that information from all other routers, it is ready to deduce the topology of

Page 49: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 49/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 48

the network, which will enable it, through the use of the Dijkstra algorithm, to find theleast-cost path to any IP address on the entire network.

OSPF can be described as follows:

In OSPF, each router maintains a database that describes the current topology of the

network. However, since OSPF is run inside ASs and since ASs can be very large,there is a division of ASs into small sets of networks which are called "Areas". Themain idea is that each router should maintain a database of the topology of the area inwhich it resides.

This database is maintained in the following way:At first, when a router comes online, it uses some protocol (The Hello Protocol) tofind his network neighbors and the cost it takes to reach each neighbor. Thisinformation is referred to as the link-state information of the router. When, this isdone, each router floods his list of neighbors (Link State Advertisement) throughoutthe entire area until all the routers have received it. This is continued until all the

routers in the area, have the list of neighbors from all the other routers.

When this process is done, each router has in its database some representation of thetopology of the area - each router has the list of neighbors of all other routers. Thisinformation is sufficient to know the exact topology of the area, and in addition, it can

 be used to build a routing table, to route packets inside the area using the best path(The path which is the most suitable for the Type Of Service needed by the packetwhich is to be delivered).

Whenever a change in the topology occurs (A router goes down, a new router comesup), this change is quickly discovered using a protocol (Again, the use of the Hello

Protocol), and the router who discovered this change, changed his database, andupdates all the routers in the area by flooding the update throughout the network. Thisensures that all the routers in the same area have the same database.

In order to flood link state information throughout the area, OSPF introduces thenotion of Designated Routers. Once Designated Routers have been selected, wheneversome router want to send link state information, he will transfer it to the Designatedrouter in an exchange protocol. Next, the designated router will transfer theinformation to all the other routers.

When all the routers are synchronized (All the routers have the same information in

their database), they use the Dijkstra algorithm and build a shortest path tree, whereasshortest path means the least cost path (The quickest path to route a packet). In thecase where there are more than one path to the same destination with the same cost,all the paths to the destination with the least cost are saved in the tree. This is laterused for load balancing when routing packets. In addition, there can be a few suchtrees, each for a specified Type Of Service of packets, due to the fact that each TypeOf Service, can have a different definition of a cost of a path. (For example, whenrouting packets of digital video, we would prefer a route with a very small delay).

The shortest-path tree (or trees) is later used to build the routing table of each router.

Page 50: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 50/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 49

Some advanced features of OSPF:

  OSPF supports router authentication before exchange of Link Stateinformation. This enables other routers to verify that the Link Stateinformation they have received, was sent by an authenticated router. Thisfeature is intended to prevent malicious users from interfering in the creation

of routing tables.  OSPF supports subnetting and supernetting - in OSPF each network is

identified by both an IP address and a subnet mask.

  Differences between OSPF 1 and OSPF 2

  Added Support for Stub Areas - Stub Areas are areas that are connected toother areas through a single entry point, i.e. there exists only a single AreaBorder Router. Therefore, routers inside Stub areas do not need to knowanything about other areas, since all packets whose destination is outside thearea, will be routed to the single Area Border Router. Therefore, a new optionwas added which supports routers in stub areas so that no information aboutother areas would be saved in their topology database.

  OSPF enables routers not to route according to Type Of Service of packets - Incontrast to OSPF version 1 where all routing was according the Type OfService, in OSPF version 2, routers can be configured to create only 1 routingtable and not different tables for every Type Of Service.

  OSPF version 2 introduces fixes to many problems which occurred in theoriginal OSPF.

  In order to support all the changes and fixes, there was a need to change the packet formats and the encoding of certain parameters (for example, there was

a change in the encoding of different Types of Service).

The topology database

As was already mentioned earlier, each OSPF router must keep a database, whichholds information that enables to construct the topology of the network from it.Before actually starting to explain how the information is gathered, let's examine themethod of representing the network topology, i.e. the structure of the topologydatabase.

In the OSPF protocol, the topology of the AS is represented as a directed graph,

which the database describes. The vertices in the graph represent the routers andnetworks in the AS: there's a single vertex for each router and for each network. Thedirected edges in the graph represent the connections between routers and networks.An edge connects either between two routers, or between a router and a network.

An edge connecting two router-vertices indicates that the two routers are directlyconnected to each other (physical point-to-point connection). For such a directed edgefrom router A to router B, there will almost always be another directed edge in theother direction, since most point-to-point connections are bi-directional.An edge connecting a router-vertex and a network-vertex indicates that that router hasan interface on that network, i.e. that it is connected to that network and has an

address on it.

Page 51: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 51/119

Page 52: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 52/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 51

The topology database is the following:

How routers establish neighbors

Every OSPF router maintains three tables: the neighbors table, the topology table, andthe routing table. The neighbors table lists all of the neighboring routers of the router,i.e. all the other routers that are connected to one or more of the networks that therouter is connected to. The neighbors are discovered dynamically via the Hello

 protocol, and then they start exchanging topology information, which is kept in thetopology table (whose structure was discussed in the previous section). Then thealgorithm for finding the shortest paths is run on the topology graph, and the routingtable is built. All of these operations will be discussed in their order of happening, andfirst, the building of the neighbors table.

Identifying routers

Beyond the difficulty of exchanging topography information and the constant need tokeep it updated, the task would be tenfold more difficult if routers were misidentified.For example, imagine two networks and two routers, and the two routers are

connected to both routers. On each network, each host has an IP address, so therouters have two different IPs.

Page 53: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 53/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 52

R1 will find that, on the first network, 1.0.1.2 is an OSPF router (how? We'll come tothat soon), and mark it as its neighbor on that network. On the second network, R1will find that 2.3.18.2 is an OSPF router, and will mark it as its neighbor on thatnetwork. So now R1's neighbors table contains two entries, and R1 has no idea thatthey are both R2, which means that its view of the network is twisted and will not beeasily fixed (for example, if a third router on the second network reports that it's

connected to a third network, then R1 will know that 2.3.18.2 has access to that thirdnetwork also, but 1.0.1.2 doesn't have, in R1's tables, a connection to that network).

Therefore arises a need to uniquely identify every router, by attaching to each router aunique router ID. From now on every router will be identified by its router ID and not

 by it's IP address on a certain network, and such irregularities as were just describedwould be avoided.

How is the router ID selected uniquely? The moment a router becomes active, it scansall of its interfaces to discover to what networks it's currently connected and what isits IP address on each network. Also, some routers have loopback IP addresses, and if

it has any it looks at them too. Now, if the router has at least one loopback address,the router will choose the highest loopback address and that will become its router ID.If the router has no loopback address, it will select the highest IP address of hisvarious interfaces in the AS, and that will become its router IP. It's important toremember that this process only occurs when the router becomes active, and does notrepeat as long as the router is active. This means that even if, at a later stage, therouter is connected to another network and gets an even higher IP address, the routerID will not become that address (as that would involve updating the records of all theother routers). The router ID, once determined, is fixed for the duration of theoperation of the router.

Discovering neighbors

When a new OSPF router is attached to a network, it will try to discover neighboringrouters on that network by running the Hello protocol, which is also responsible formaintaining neighbors (i.e. making sure they're still active). The Hello protocol uses

 packets named "Hello packets" to announce new neighbors and establish bi-directional neighbor relationship between other neighboring routers by changing thestate of the relationship as more information is gathered.

Before describing the structure of the Hello packet and the operation of the Hello protocol, it's important to note the difference in operation between running it on

 broadcast networks and non-broadcast (NBMA) networks, since from this point onthe explanation will refer to running in on broadcast networks for simplicity's sake(the operation is the same on both types, but the overhead is higher). On non-

 broadcast networks running the Hello protocol (and therefore running OSPF) requiresextra configuration for enabling it to do its job. Each router that will possibly becomethe DR (Designated Router, which will be discussed later) needs to have a list of allthe routers on that network. It will then begin the DR election process as usual (the

 process will be discussed later) with those routers that may also become the DR, andthen continue with running the Hello protocol with each of its neighbors. From this

 point on the description will be for broadcast networks or point-to-point connections(between two routers). In broadcast networks with multicasting capabilities, the Hello

 packets are always directed to the address 224.0.0.5, which is the multicast address of

Page 54: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 54/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 53

all the OSPF routers on that network. In broadcast networks with no multicastcapabilities, the Hello packets are just broadcasted to everyone.

The Hello packet's structure is as follows:

The first 24 bytes of the packet are common to all OSPF packets, and are named the"OSPF message header". The packet fields are:

  Version Number - the version of the OSPF protocol. For OSPF 2, it will havethe value "2".

  Type - the type of the OSPF packet. As mentioned, all OSPF packets share the

first 24 bytes, so the Type field indicates what kind of message this is. Thevalue of "1" indicates that this is a Hello packet.

  Packet Length - the total length of the packet.

  Router ID - the ID of the router that sent this packet.

  Area ID - the identification number of the area the message is for. We willdiscuss using areas later.

  FCS - the checksum on the packet, for detecting errors.

  Authentication Type and the Authentication Fields - specify the method used

to authenticate that a participating router is indeed a legitimate router and not amalicious user's router. The authentication is cryptographically, and is beyondthe scope of this text.

   Network Mask - specifies the subnet mask of the network on which the packetwas sent.

  Hello Interval - specifies how often Hello packets are sent through thenetwork, in seconds. On Ethernet, for example, the Hello Interval is usually setto 10 seconds, which means each router must broadcast a Hello packet every10 seconds.

  Options - this field is a field of flags, specifying various operations of theOSPF protocol that are supported by that router.

Page 55: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 55/119

Page 56: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 56/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 55

 be specified the router ID of router B, and thus router B will also enter the 2WAYstate with router A.

This process is repeated for every router on that network. Routers continue to sendnew Hello packets every few seconds (as specified in the Hello Interval field), and

 process each received Hello packet to see that routers hadn't disappeared (a router that

hasn't sent out a Hello packet for the length of time specified in the Dead Interval fieldis considered dead on that network), and to discover new neighboring routers as they

 become active. On a network, stability is reached when all the neighboring routers onthe network are in at least the 2WAY state with each other (there are other, "stronger"states than 2WAY, which will be discussed later).

The designated router

The job of the designated router is to reduce protocol traffic by acting as thedistributor of topology information. In OSPF, changes in the networks topology areflooded through the AS by routers in the form of special packets known as link-state

advertisements, or LSAs. These will be discussed a bit later. These packets aresomewhat lengthy, and the protocol states that these packets, in order that the OSPF

 protocol could be run on various non-broadcast networks as well, are sent in unicast.The problem with this is that when you have a certain network with more than tworouters, there's a lot of traffic generated by this, since all the routers that receive anLSA will send it unicastly to all the other routers (except for the one they got it from),even those who already got it.

OSPF's solution to this problem is to use a designated router (also known as DR) foreach network (on point-to-point connections there are only two routers so the solutiondoesn't have a higher overhead than the simple transfer solution would take), which

will receive the LSAs from routers that have topology changes to report, and willdistribute them (by sending them unicastly) to all the other neighboring routers on thatnetwork. This clearly removes all the redundant traffic within each network.However, there is still the issue of electing and letting everyone know who the DR is.In addition, since router problems aren't so common, it wouldn't be wise to let a singlerouter do all the work and thus become a single point of failure on that network, andthat is why there's a backup DR (referred to as BDR), which gets all the traffic sent tothe DR, and thus holds an exact copy of what the DR has. When the DR fails therouters will detect it (via the Hello protocol all the routers will see that the DR is nowdead), and the BDR will simultaneously switched to be the DR, and there will be anelection for the new BDR among the active routers.

Before describing the election process, it's vital to understand how the use of both DRand BDR is done. When two routers exchange topology change information, theymove to a new state, the FULL state, which is a higher state than 2WAY. However, asalready has been mentioned, we want to have as little protocol traffic as possible, andusing the DR as the distributor reduces the pairs of routers that are in the FULL stateto a minimum. When a router has a topology change to report, it will send it to bothDR and BDR (either by unicasting it to both - their router IDs are specified in allHello packets, or, if supported by the network, multicasting it to 224.0.0.6, which isthe multicast address for all OSPF designated routers on that network (which includesthe DR and BDR)). Then the DR will begin exchanging the topology information with

all the other routers, as will be described later.

Page 57: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 57/119

Page 58: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 58/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 57

Whenever a new router comes online, he uses the hello protocol to find his neighbors.Once this router finds a neighbor, who is the Designated Router (or the BackupDesignated Router), an adjacency is formed between them in the following way:

The new router R1 sent a hello packet on all interfaces. Once some Designated RouterR2 received this packet, it adds the R1 to his list of neighbors. When R1 gets the

Hello packet from R2 with its Router ID in it, it sees that the Designated Router is R2.R1 received a Hello packet from Designated Router R2 stating that R1 is a neighbor.R1 enters the ExStart state, which means that he is about to exchange informationwith R2.

When R1 is in the ExStart state, it sends R2 a packet, which is called "a DatabaseDescription Packet", with some random sequence number. R2 upon receiving this

 packet, also enters the ExStart state, and sends his own ExStart packet with his ownrandom sequence number. After this first exchange of Database Description packets,

 both routers enter a new state - Exchange. The first 2 packets that were sent while R1and R2 were in the ExStart state have only one purpose and that is to select a Master

and a Slave. Therefore, these first 2 packets do not contain any LSA headers. Themaster is the router with the higher Router ID and the other router is the Slave. Thesequence number of the Master is denoted as SEQ.

Once both R1 and R2 are in the Exchange state, they exchange Database Description packets, which summarizes the knowledge of each of them. The Database Description packets contain a set of Link State Advertisement (LSA) headers. Link StateAdvertisement describes the neighborhood of a specific router and an LSA headeruniquely identifies the LSA and its time of creation.

The Database Description packet exchange is done as follows:

The master sends his first Database Description packet (sometime, the database of therouter can take more than one Database Description packet), along with the sequencenumber SEQ that he has chosen in the ExStart state. The Slave responds with aDatabase Description packet of his own (which describe the Slave's database) andwith the same sequence number (SEQ). If needed, the Master then sends his nextDatabase Description packet, and attaches to it, the sequence number SEQ+1. TheSlave answers with his next Database Description packet and with SEQ+1. This

 process goes on, and in each iteration, the Master sends his next Database Description packet with the next sequence number (SEQ+n), and the Slave responds with his ownDatabase Description packet and with the same sequence number (SEQ+n).

When both sides have finished exchange Database Description packets, each sideknows which LSAs the other side has. The sides now enter the Loading state.

When both sides are in the Loading state, each side know what LSAs the other sidehas, since this information is specified in the LSA headers, which are in the DatabaseDescription packets. Each side goes over the list of LSA headers that it has received,and marks the LSAs that it needs.

A router R1 needs an LSA that describes the Link State of some router R2 if one ofthe following happens:

Page 59: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 59/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 58

  R1 has no prior LSAs of R2.

  R1 has prior LSAs of R2 but the LSA header shows that the LSA that isidentified is a newer version. This means that one of the sides (the Master orthe Slave) has a newer description (LSA) of some router R2, and the other sidetherefore needs this LSA.

After each side marks the LSAs it needs, each side sends to the other side a requestfor the LSAs in a message which is called Link State Request (LSR). These packetsare responded to by special packets, which are called Link State Update (LSU), whichcontain the requested LSAs.

The process of exchanging LSRs and LSUs is as follows:

If one of the sides needs some LSAs, it will put the list of LSA headers that it needsinto LSRs and will send the LSRs to the other side. The other side responds to eachLSR with an appropriate LSU. LSAs inside the LSU are acknowledged by a message,which is called a Link State Acknowledgement. If one of the sides had sent an LSR

 but didn't get an answer, it resends the LSR. When one side, finished receiving all theLSAs that it had needed, it enters the FULL state, which means that it is in fulladjacency with the other side.

This process is continued until both sides are in the FULL state.

Page 60: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 60/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 59

This process occurs when some router comes online and is forming full adjacencywith a Designated Router. However, the topology of the area can change and in thatcase, OSPF needs to update the databases of each of the routers in the area. Inaddition, when the Designated Router receives from one of its neighbors, some new

LSAs, it needs to inform the other routers of the new LSA.

Page 61: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 61/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 60

Until now, we have seen that a router R1, which is not a designated router, formsadjacencies with all the Designated Routers, which are connected to the same physicalnetworks as it is. However, R1 stays in 2WAY state with all the other routers (routers,which are not Designated Routers).

Once some router learns of a new LSA, whether by being a Designated Router and

receiving a new LSA, or by discovering (using the Hello Protocol) a new neighbor, orthat a neighbor has gone down. The router, which has a new LSA, needs to flood itthroughout the network.

This process is done as follows:

Once a router R1 receives (or generates) a new LSA, it checks every interface. Oneach interface, all the neighbors are checked (except for the neighbor, who has sentR1, the new LSA). If a neighbor on a certain interface has started to form anadjacency with R1 (or is already in full adjacency with R1), and R1 discovers that thisneighbor does not have this new LSA, then R1 does the following:

If R1 is the Designated Router or Backup Designated Router on that interface, it sendsthe new LSA to all the routers on that interface. In networks, which support multicast,the LSA is sent to the multicast address AllSPFRouters. Otherwise, unicast is used tosend the message to each router.

If R1 is not the Designated Router, nor the Backup Designated Router, it sends thenew LSA to the Designated Router and to the Backup Designated Router. Onnetworks which support multicast, the LSA is sent to the multicast addressAllDRouters. Otherwise, unicast is used.

The LSA is sent in an LSU (Link State Update) packet.

The routers, which have received the new LSA, will continue to send it on theirinterfaces, and this causes the new LSA to be "Flooded" throughout the area.

The different packets

During the description of the information exchange in OSPF, some packet types werementioned. The following is a description of the packets format in OSPF.

Database Description Packets

The structure of these packets is the following:

Page 62: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 62/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 61

This packet starts with the OSPF packet header (The first 24 bytes, that are in allOSPF packets). The Type field in this header is set to 2.

After this come some other fields. The Meaning of the fields is:

Interface MTU - The MTU on the specified interface.

Options - This field is identical to the options field in the Hello Packet.

I bit (Init Bit) - This bit is set only in the first Database Description packet and its purpose is to signal that this is the first packet.

M bit (More Bit) - This bit is set if this is not the last Database Description packet.

MS bit (Master/Slave Bit) - This bit is set in packets sent by the Master.

Database Description Sequence Number - This field saves the sequence number,which is used in the Exchange state.

After these fields, there are a few LSA headers. Each LSA header has the sameformat:

Page 63: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 63/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 62

LSA header: (The LSA header is used to identify an LSA)

The fields in the LSA header are:

LS age - The age of the LSA (How much time ago, was it created.)

Options - This field is identical to the Options field of the Hello Packet and of theDatabase Description Packet.

LS type - This field stores information of the type of the LSA. OSPF supports LSAsof many types. LSAs which describe a regular router's state, a network's state, LSAswhich describe links of Autonomous Systems Border Routers, and LSAs, whichdescribe links that were discovered by some other form (not by OSPF).

Link State ID - This field uniquely defines what the LSA contains. LSAs specify thecurrent state of a device or a network. This field identifies that device or the network.

Advertising Router - The Router ID of the router, which published this LSA.

LS Sequence Number - the first LSA, which describes some device or network, has a

sequence number chosen. The next LSA, which describes the same device (ornetwork), will contain the next sequence number and so on.

LS checksum - A checksum of the LSA.

Length - The length of the LSA.

Page 64: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 64/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 63

Link State Request

The packet starts with the regular OSPF header with the Type field containing 3. Theonly fields in this packet (Besides the fields which are in all OSPF packets) are LinkState ID and Advertising Router, which were described before (During the descriptionof the LSA header). These fields uniquely identify the LSA that is needed.

Link State Update

This packet starts with the common OSPF header with the Type set to 4. After this,comes a field that is called #LSAs and it contains the number of LSAs, which appearin this packet. After this field, come all the LSAs.

There are several types of LSAs, which are supported by OSPF. These types include

LSAs, which describe the state of a specific router, LSAs that describe the state of a

Page 65: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 65/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 64

network, and LSAs that contain information of Area Border Routers and LSAs thatcontain information of AS Boundary Routers.

The main LSA type is the LSA, which describe a router state. The format of the packet for such an LSA is the following:

The first 20 bytes are the LSA header that we have explained before. The LS typefield is set to 1 in this type of LSA packet.

The main fields are:

The E bit - This bit indicates whether this router is an AS boundary router.

The B bit - This bit indicates whether this router is an Area Border Router.

# links - The number of links, which will be described.

After this field, comes information for each of the described links:

Type - Describes the type of the link. There are 4 appropriate values, which aredescribed in the RFC.

Link ID - A unique identifier of the device that is on the other end of the link.According to the Type field, this field is set. For example, if the Type field describesthat this is a Point-to-Point link to another router, then the Link ID is the other router'sRouter ID.

Link Data - This field saves more information on the link, and it is again according tothe Type field. This field is very useful during the building of the Routing Table.

Page 66: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 66/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 65

# TOS - Since OSPF supports TOS routing, each link can have a different cost foreach Type Of Service. Therefore, there can appear K different costs, each cost for adifferent Type Of Service. The number K will be saved in this field.

Metric - The cost of this link without any relation to a specific Type Of Service.

After this field appears all the different Types Of Service, which are identified in theTOS field by the appropriate IP Type Of Service number. For each such Type OfService, there appears the cost for this link in relation to the Type of Service, in theTOS metric field.

Link State Acknowledgment

This packet is very simple. It consists of the OSPF packet header (The same header,which is in all the OSPF packets) with the type set to 5.

After this, follows LSA headers of all the LSAs that the router wishes toacknowledge.

The SPF problem

The OSPF protocol, as has been stated before, calculates the routing table for eachrouter by solving the SPF problem on the topology graph stored at that router. In theliterature, this problem is also referred to as the "Single-Source Shortest Paths"

 problem. The definition of the SPF problem is this:

"Given a directed weighted graph and a vertex in it, find a sub-graph of the graphwhich is a tree graph, on which the weight along the path from the specified vertex to

any other vertex is equal to the lowest weight path from the same source to the samedestination on the original graph".

Page 67: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 67/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 66

For each router's topology graph a solution to the SPF problem will be calculated, andfrom that tree the routing table will be constructed. Note that in our case, the weightof the edge is the cost of the link.

Dijkstra's algorithm - a solution to SPF

One proven and well-known algorithm to solve the SPF problem for a given weighteddirected graph and a vertex in it is the Dijkstra algorithm. Dijkstra's algorithmassumes all the weights on the graph are non-negative, but, since in OSPF there is noreason to assign negative numbers, it can and in fact is used in the OSPF protocol.

To describe the algorithm, let's first explain the various symbols that will be used inits description. The directed weighted graph will be denoted G, its group of verticeswill be denoted V, and its group of edges will be denoted E. An edge will be denotedas a pair of vertices. For example, (v,u) will denote and edge starting from v andending in u. The weight associated with the edge (v,u) will be denoted w(v,u). Thealgorithm works by maintaining a set S of vertices for whom we already figured out

the minimum cost of path from the given vertex. The denomination d[v] will state thelowest cost of route from the given vertex to vertex v we found at a certain time. Thealgorithm also keeps a priority queue Q of the vertices in G, in which the vertices areordered according to their d[v] values. In addition to all of those, for each vertex v thealgorithm also denoted by p[v] the predecessor of v. The p[v] value can be either

 NULL or a vertex, and, when the algorithm is complete, for every vertex other thanthe source vertex for which the algorithm is run will have a non-NULL predecessor,and determining the lowest-cost path from v to the source vertex will be easily done

 by running on the predecessor of v, and the predecessor of the predecessor of v, andso on, until arriving at the source vertex.

So, given a weighted graph G and a source vertex s, the algorithm is the following:

  For every vertex v in V such that v isn't s, set d[v]=infinity and p[v]=NULL.Also set p[s]=NULL, and d[s]=0.

  S is now an empty set.

  Insert into the priority queue Q all the vertices in V.

  While Q isn't empty, do:

  Mark u as the minimum item in the priority queue Q.

  Add u to S.

  For every vertex v in the adjacency of u, if d[v] > d[u] + w(u,v), then do:

  d[v]=d[u]+w(u,v)

   p[v]=u

The algorithm's proof shows that the algorithm ends in a finite time, and in the end,for a given vector v and the source vector s, the path of:

s->p[p[p[p[p...[p[p[p[v]]]...]]]]] -> ... -> p[p[v]] -> p[v] -> v

is a path that is in G, and it has a cost that is equal to the lowest cost of a path from sto v in G.

Page 68: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 68/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 67

Thus, Dijkstra's algorithm finds the shortest paths tree from the source vertex to everyother vertex in G. Here's an example of running the algorithm on a relativelystraightforward directed weighted graph:

Creating the routing table using the Dijkstra algorithm

We use Dijkstra's algorithm for creating the routing table for each OSPF router in thefollowing manner. First, we determine, for each network and link, what is its cost.Then, for each router, we run Dijkstra's algorithm on the topography graph (stored inits topography database), with itself as the source vertex.

 Now, for every network in the AS, we will look at its vertex in the graph. We alreadysaw how to get the path to that vertex from the result of the algorithm, but in the

routing table we only need the next hop, so we take the first router that appears in pathwhich isn't the source router, and that, clearly, is the next hop router (since no twonetworks are connected with an edge). If there is no such router, then the next hopdoes not exist and the packet to be routed is locally generated and the router does notforward it.

We're just about done. We've constructed the discovered neighbors, exchangedtopology information, and built the routing table. All that is left to discuss is howweights are determined in the graph.

The weights on each link are of course determined by the network administrators,

which can have their own reasoning as to how to assign costs, but in mostcircumstances, three elements should effect the decision of determining the cost Linedelay, Connection throughput and Network connectivity. Delay and throughput areespecially important when routing according to type of service (which will bedescribed later), and the connectivity of the network (how good is the connect, howoften does it break down) is naturally a topology factor as well. One OSPF standarduses the bandwidth itself as the direct basis to computing the weights of links andnetworks, by determining that the weight of a line is 10^8 divided by the bandwidthof the line. Thus for example the cost of a 56Kbps link is 10^8 / 56000 = 1785, thecost of a T1 link is 10^8 / 1544000 = 64, and the cost of a 100MB Ethernet is 10^ 8 /(100 * 10^6) = 1.

Page 69: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 69/119

Page 70: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 70/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 69

BORDER GATEWAY PROTOCOL (BGP 4 ) 

Page 71: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 71/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 70

Border Gateway Protocol (BGP 4 )

INTRODUCTION

The Border Gateway Protocol (BGP), defined in RFC 1771, provides loop-freeInterdomain routing between autonomous systems. (An autonomous system [AS] is a

set of routers that operate under the same administration.) BGP is often run among thenetworks of Internet service providers (ISPs). We will briefly study how BGP worksand how we can use it to participate in routing with other networks that run BGP.Everyone responsible for Internet backbone wants to know about BGP. What is it?How do you use it? What is it used for? Let us try to understand at least the basics ofBGP here.

The following points are covered:

  BGP Fundamentals

  BGP Decision Algorithm

  Controlling the Flow of BGP Updates

BGP went through different phases and improvements from its earlier version, BGP1,in 1989 to today‘s version , BGP4, deployment of which started in 1993. BGP4 is thefirst version that handles aggregation (CIDR) and supernetting &  allows theannouncement of "classless routes" - routes that aren't strictly on "Class A", "ClassB", or "Class C" boundaries - but instead can also be "subnets" or "supernets"..

BGP imposes no restrictions on the underlying Internet topology. It assumes thatrouting within an autonomous system is not via an intra-autonomous system routing

 protocol. BGP constructs a graph of autonomous systems based on the informationexchanged between BGP neighbors. This directed graph environment is sometimesreferred to as a tree. As far as BGP is concerned, the whole Internet is a graph of ASs,with each AS identified by an AS number. Connections between two ASs togetherfrom a path, and the collection of path information forms a route to reach a specificdestination. BGP ensures that loop-free interdomain routing is maintained.

Page 72: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 72/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 71

Figure 1 illustrates this general path tree concept.

Figure 1 Example of AS_Path tree.

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 staticroutes, or in a more complicated but robust way, with active internal routing protocolssuch as RIP, RIPv2, OSPF, and IS-IS.

It's obviously critical that any box inside your network know how to get (directly orindirectly) to any other box inside your network. Before you invite people to senddata to your network, you've got to have a running and happy network to take thedata. If you default route into one or more providers, external routing isn't somethingyou 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 datagoes on the Internet, you will be taking at least some external routes into yournetwork and will do so with BGP.

WHY IS BGP INTERESTING?

Well, as mentioned above, it's nice to have routing data for parts of the Internet inyour routers. But it is much more useful to tell people outside your network (upstream

 providers or "peers") about what routes (or portions of the IP address space) you"know how to get to" inside your network. The primary purpose of BGP4 is toadvertise routes to other networks ("Autonomous Systems").

AS2AS1

ASnASn

AS_Path Tree

-----------BGP links

AS3

AS4 ASn-1

AS5

Page 73: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 73/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 72

Autonomous Systems

An AS, or Autonomous System, is a way of referring to "someone's network". Thatnetwork could be yours; VSNL, MTNL, MCI's; Sprintlink's; or anyone's. Normally anAS will have someone or ones responsible for it (a point of contact, typically called a

 NOC, or Network Operations Center) and one or multiple "border routers" (where

routers in that AS peer and exchange routes with other ASs), as well as a simple orcomplicated internal routing scheme so that every router in that AS knows how to getto every other router and destination within that AS.

When you "advertise" routes to other entities (ASs), one way of thinking of thoseroute "advertisements" is as "promises" to carry data to the IP space represented in theroute being advertised. For example, if you advertise 192.204.4.0/24 (the "Class C"starting at 192.204.4.0 and ending at 192.204.4.255), you promise that if someonesends you data destined for any address in 192.204.4.0/24, you know how to carrythat data to its ultimate destination.

The cardinal sin of BGP routing is advertising routes that you don't know how to getto. This is called "black-holing" someone - because if you advertise, or promise tocarry data to, some part of the IP space that is owned by someone else, and thatadvertisement is more specific than the one made by the owner of that IP space, all ofthe data on the Internet destined for the black-holed IP space will flow to your borderrouter. Needless to say, this makes that address space "disconnected from the 'net" forthe provider that owns the space, and makes many people unhappy. The second mostheinous sin of BGP routing is not having strict enough filters on the routes youadvertise.

Also, one terminology note: Classless routes are sometimes called "prefixes". When

someone talks about a prefix they're 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 are not the same prefix (route).

Every IP address that you can get to on the Internet is reachable because someone,some where, has advertised a route that covers it. The corollary to this is that if thereis not a generally-advertised route to cover an IP address, no one on the Internet will

 be able to reach it.

HOW BGP WORKS?

BGP is a path vector protocol used to carry routing information between autonomoussystems. The term  path vector   comes from the fact that BGP routing informationcarries a sequence of AS numbers, which indicates the path a route has traversed.BGP uses TCP as its transport protocol (port 179). This ensures that all the transportreliability such as retransmission is taken care of by TCP and does not need to beimplemented in BGP itself.

Two BGP routers form a transport protocol connection between each other. Theserouters are called neighbors or peers. Figure 2 illustrates this relationship. Peer routersexchange multiple messages to open and confirm the connection parameters, such asthe BGP version running between the two peers (for example, version3 for BGP 3 and

version 4 for BGP4). In case of any disagreement between the peers, notificationerrors are sent, and the peer connection does not get established.

Page 74: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 74/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 73

Initially all candidate BGP routes are exchanged, as illustrated in figure 3.Incremental updates are sent as network information changes. The incremental updateapproach has shown an enormous improvement as far as CPU overhead and

 bandwidth allocation compared with complete periodic updates used by previous protocols, such as EGP.

Figure 2 . BGP routers become neighbors.

Figure 3 Exchanging all routing updates.

Routes are advertised between a pair of BGP routers in UPDATE messages. TheUPDATE message contains, among other things, a list of <length, prefix> tuples thatindicate the list of destinations reachable via each system. The UPDATE messagealso contains the path attributes, 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 withdrawing invalid routes and injecting newrouting information. As illustrated in figure 4, Withdrawn routes are part of the

UPDATE message. These are the routes not available for use. Figure 5 illustrates a

Establishing a neighboringSession with 1.1.1.1

Establishing a neighboringSession with 2.2.2.2

N12.2.2.2

N2

N31.1.1.1

N4

N1N2N3

N4

N3,N4

N12.2.2.2

N2

N31.1.1.1

N4

N3N4N1

N2

N1,N2

Page 75: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 75/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 74

steady state situation: if no routing change occur, the routers exchange onlyKEEPALIVE packets.

Figure 4 N1 goes down; partial update sent.

Figure 5. Steady state; N1 is still down.

KEEPALIVE messages are sent periodically between BGP neighbors to ensure thatthe connection is kept alive. KEEPALIVE packets (19 byte each) should not causeany 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 keeps a table version number to keep track of the instance of the BGP routingtable. If the table changes, BGP will increment the table version. A table version thatis incrementing rapidly is usually an indication of instabilities in the network.

N1N2N3

N4

 Withdraw N1N1

2.2.2.2

N2

N31.1.1.1

N4

N3N4N1 N2 

N2N3

N4

2.2.2.2

N2

N31.1.1.1

N4

N3N4

N2

Page 76: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 76/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 75

BGP FUNDAMENTALS :BGP MESSAGE HEADER FORMAT

The BGP message header format is a 16-byte marker field, followed by a 2-bytelength field and a 1-byte type field. Figure 6 illustrates the basic format of the BGPmessage header.

Figure 6. BGP message header format.

There may or may not be a data portion following the header, depending on themessage type. KEEPALIVE messages, for example, consist of the message headeronly, with no following data.

The marker field is used to either authenticate incoming BGP messages or to detectloss of synchronisation between two BGP peers. The marker field can have two

formats:

  If the type of the message is OPEN or if the OPEN message has noauthentication information, the marker field must be all ones.

  Otherwise, the marker field will be computed based on part of theauthentication mechanism used.

The length indicates the total BGP message length including the header. The smallestBGP message is no less than 19 bytes (16+2+1) and no grater than 4,096.

The type indicates the message type, from the following possibilities:

  OPEN

  UPDATE

   NOTIFICATION

  KEEPALIVE

 Now here we will examine the purpose and format of each of the four message typesin more detail.

0 7 15 23 31

Length Type

Marker

Page 77: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 77/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 76

BGP Neighbor Negotiation

One of the basic steps of the BGP protocol is establishing neighbors between BGP peers. Without successful completion of this step, no exchange of updates will evertake effect. Neighbor negotiation is based on the successful completion of a TCPtransport connection, the successful processing of the OPEN message, and periodic

detection of the KEEPALIVE messages.

OPEN Message Format

Figure 7 illustrates the format of the OPEN message.

Figure 7 OPEN Message format.

  Version - A 1-byte field that indicate the version of BGP protocol such asBGP3 or BGP4.

  My autonomous system - A 2-byte field that indicates the AS number of theBGP router.

  Hold Time - The maximum time in seconds that may elapse between thereceipt of successive KEEPALIVE or update messages.

  BGP indetifier - A 4-byte field that indicates the senders ID (Router ID)whichis calculated as the highest IP address on the router or the highest loop backaddress at BGP session startup. (Loop back address is the representation of theIP address of a virtual software interface that is considered to be up at alltimes, irrespective of the state of any physical interface.)

  Optional parameter - This field is represented by triplet <parameter type, parameter length, parameter value>. Example - Authentication information parameter

NOTIFICATION Message

A notification message is always sent whenever an error is detected, after

which the peer connection is closed. These are required to determine the specificnature of errors that emerge in the routing protocol.

OPEN Message

Optional Parameters

Opt parm Len

BGP Identifier

Hold Time

My Autonomous System

 Version

0 7 15 23  31

Page 78: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 78/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 77

KEEPALIVE Message

KEEPALIVE messages are periodic messages exchanged between peers to determine

whether peers are reachable.

UPDATE Message and Routing Information

Central to the BGP protocol is the concept of routing updates. Routing updatescontain all the necessary information that BGP uses to construct a loop free picture ofthe Internet. The following are basic blocks of an update message:

   Network Layer Reachability Information (NLRI)

  Path Attributes

  Unreachable Routes

Figure 8 illustrates these components in the context of an update message format.The NLRI is an indication, in the form of an IP prefix route, of the network beingadvertised. The path attribute list provides BGP with the capabilities of detectingrouting loops and the flexibility to enforce local and global routing policies.

Figure 8 BGP Routing Update

Unfeasible Routes Length (2 bytes)

 Withdrawn Routes (variable)

Total Path Attribute Length (2 bytes)

Path Attribute (Variable)

<length.prefix>• • 

Length (1byte) Prefix (variable)

Unreachable

routes

information

PathAttribute

information

NLRIinformation

Page 79: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 79/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 78

EBGP vs. IBGP 

EBGP and IBGP share the same low-level protocol for exchanging routes, and alsoshare some of the algorithms, but EBGP is used to exchange routes between differentAutonomous Systems, while IBGP is used to exchange routes between the sameAutonomous System. In fact, IBGP is one of the "interior routing protocols" that youcan use to do "active routing" inside your network.

The major difference between EBGP and IBGP is that EBGP tries like crazy toadvertise every BGP route it knows to everyone - you have to put "filters" in place tostop it from doing so. IBGP is actually pretty difficult to get working because it trieslike crazy not to redistribute routes - in fact, all IBGP-speakers inside your networkhave to peer with all other IBGP "speakers" in order to make it work. This is called a"routing mesh" and, as you can imagine, is quite a mess. If you have 20 routers, each

router has to peer with every other router.

Also, IBGP has major drawbacks as an IGP. The main one is the necessity to "peerup" every set of routers in the network (or in one POP if you're using confederations).Protocols like OSPF and IS-IS just "find" each other over serial and Ethernetinterfaces (they're "broadcast" protocols). This can be a pain (you don't want toaccidentally merge your IGP with a customer's or peer's) but turning off broadcastingon certain ports is easier than turning on peering sessions between a new router andevery other router on your network. Also, IBGP doesn't do as good a job at"convergence" (closing the gap and re-routing around failed network segments) asOSPF and IS-IS.

Routers that belong to the same AS and exchange BGP updates are said to be runninginternal BGP (IBGP), and routers that belong to different ASs and exchange BGPupdates are said to be running external BGP (EBGP).

Figure 9 shows a network that demonstrates the difference between EBGP and IBGP.

Before it exchanges information with an external AS, BGP ensures that networkswithin the AS are reachable. This is done by a combination of internal BGP peeringamong routers within the AS and by redistributing BGP routing information toInterior Gateway Protocols (IGPs) that run within the AS, such as Interior GatewayRouting Protocol (IGRP), Intermediate System-to-Intermediate System (IS-IS),Routing Information Protocol (RIP), and Open Shortest Path First (OSPF).

Page 80: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 80/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 79

Fig 9 EBGP, IBGP and Multiple ASs

BGP uses the Transmission Control Protocol (TCP) as its transport protocol(specifically port 179). Any two routers that have opened a TCP connection to eachother for the purpose of exchanging routing information are known as  peers orneighbors. In Figure 9, Routers A and B are BGP peers, as are Routers B and C, and

Routers C and D. The routing information consists of a series of AS numbers thatdescribe the full path to the destination network. BGP uses this information toconstruct a loop-free map of ASs. Note that within an AS, BGP peers do not have to

 be directly connected. BGP peers initially exchange their full BGP routing tables.Thereafter, BGP peers send incremental updates only. BGP peers also exchangekeepalive messages (to ensure that the connection is up) and notification messages (inresponse to errors or special conditions).

For routers that run EBGP, neighbors are usually directly connected, and the IPaddress is usually the IP address of the interface at the other end of the connection.For routers that run IBGP, the IP address can be the IP address of any of the router‘s

interfaces.

Refer the following about the ASs shown in Figure 9

  Routers A and B are running EBGP, and Routers B and C are running IBGP. Note that the EBGP peers are directly connected and that the IBGP peers arenot. As long as there is an IGP running that allows the two neighbors to reachone another, IBGP peers do not have to be directly connected.

  All BGP speakers within an AS must establish a peer relationship with eachother. That is, the BGP speakers within an AS must be fully meshed logically.BGP4 provides two techniques that alleviate the requirement for a logical fullmesh: confederations and route reflectors.

AS 100 100AS 300

AS 200

IBGP

EBGPEBGP

129.213.1.2 192.208.10.1

192.208.10.2129.213.1.1

175.220.212.1 175.220.1.2

R A R D

R B R C

Page 81: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 81/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 80

  AS 200 is a transit AS for AS 100 and AS 300 — that is, AS 200 is used totransfer packets between AS 100 and AS 300.

Internal BGP

Internal BGP (IBGP) is the form of BGP that exchanges BGP updates within an AS.Instead of IBGP, the routes learned via EBGP could be redistributed into IGP withinthe AS and then redistributed again into another AS. However, IBGP is more flexible,

 provides more efficient ways of controlling the exchange of information within theAS, and presents a consistent view of the AS to external neighbors. For example,IBGP provides ways to control the exit point from an AS. Figure 10 shows a topologythat demonstrates IBGP.

Fig 10 Internal BGP Example

When a BGP speaker receives an update from other BGP speakers in its own AS (that

is, via IBGP),the receiving BGP speaker uses EBGP to forward the update to externalBGP speakers only. This behavior of IBGP is why it is necessary for BGP speakerswithin an AS to be fully meshed. For example, in Figure 10 if there were no IBGPsession between Routers B and D, Router A would send updates from Router B toRouter E but not to Router D. If you want Router D to receive updates from Router B,Router B must be configured so that Router D is a BGP peer.

Loop back Interfaces

Loop back interfaces are often used by IBGP peers. The advantage of using loopbackinterfaces is that they eliminate a dependency that would otherwise occur when you

use the IP address of a physical interface to configure BGP.

180.10.30.1 AS 100

AS 500

AS 300 AS 400

170.10.0.0 175.10.0.0

170.10.20.2 175.10.40.1

170.10.20.1 175.10.40.2

190.10.50.1

IBGP

IBGP

150.10.30.1

R A  R B 

R C R E 

R D 

BA

D

Page 82: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 82/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 81

 EBGP Multihop

Usually, the two EBGP speakers are directly connected (for example, over a wide-area network [WAN] connection). Sometimes, however, they cannot be directlyconnected. In this special case,the neighbor EBGP-multihop router configurationcommand is used. Multihop is used only for EBGP, but not for IBGP.

Synchronization

When an AS provides transit service to other ASs and if there are non-BGP routers inthe AS, transit traffic might be dropped if the intermediate non-BGP routers have notlearned routes for that traffic via an IGP. The BGP synchronization rule states that ifan AS provides transit service to another AS, BGP should not advertise a route untilall of the routers within the AS have learned about the route via an IGP. The topologyshown in Figure 11 demonstrates the synchronization rule.

Fig 11 Synchronization

As 300

170.10.0.0

As 100

150.10.0.0

IBGP

IGP IGP

As 400

175.10.0.0

2.2.2.2

R A 

R E 

R B 

R D R C 

2.2.2.1

A

E

CD

B

Page 83: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 83/119

Page 84: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 84/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 83

BGP Decision Algorithm

When a BGP speaker receives updates from multiple ASs that describe different pathsto the same destination, it must choose the single best path for reaching thatdestination. Once chosen, BGP propagates the best path to its neighbors. The decisionmaking process is based on the value of following attributes:

  AS path Attribute

  Origin Attribute

   Next Hop Attribute

  Weight Attribute

  Local Preference Attribute

  Multi-Exit Discriminator Attribute

  Community Attribute

BGP ATTRIBUTE Details

Value Code Possible Values

---- ----------------------------------------------------- ---------------------------------------------

1 ORIGIN 0 (IGP); 1 (EGP); 2 (Incomplete)

This attribute specifies the origin of a route.

Straightforward except that "Incomplete" means

that the route got into BGP by redistribution from

an IGP.

2 AS_PATH 0 - N, 2-byte values

A list of the ASNs of all ASs the route has traversed.

3 NEXT_HOP IP Address

The most critical attribute; where to send data destined

for this route.

4 MULTI_EXIT_DISC 0-2^32

A weight; designed to go outside and inside of an ASN.

5 LOCAL_PREF 0-2^32

A weight; not designed to go outside of an ASN.

6 ATOMIC_AGGREGATE TRUE/FALSE: If present, true; otherwise, false.

Page 85: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 85/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 84

Present if this route was not the most specific one

known by the advertiser.

7 AGGREGATOR {ASN,Ip address} pair.

Data to indicate who formed the route if the route

is an aggregate of smaller routes.

8 COMMUNITY 0 - N, 4-byte values ("communities")

9 ORIGINATOR_ID Used for BGP Route Reflection

10 CLUSTER_LIST Used for BGP Route Reflection

AS-PATHS

Every time a route is advertised via BGP, it is "stamped" with the ASN of the routerdoing the advertising. As a route moves from Autonomous System to AutonomousSystem (network to network), it builds up an "AS-PATH". Each route starts out with a"null AS-PATH", represented by the regular expression  "^$". The AS-PATH isuseful for a number of reasons:

  It provides a "diagnostic trace" of routing on the Internet. If you have "fullroutes" in one of your routers, or have "query access" to a router that does(such as telnet://route-server.cerf.net), you can find the route that encompasses

a particular IP address and see which ASNs have advertised it. If you do some poking around, you can even see how a provider is actually connected.

  It is one of a number of metrics that determines how routes "heard" via BGPare inserted into the actual IP routing table.

  It is something that allows you to do "policy routing" of sorts - basically, youuse the AS-PATH to filter routes. Why would you want to do this?

BGP PATH SELECTION PROCESS

BGP selects only one path as the best path. When the path is selected, BGP puts the

selected path in its routing table and propagates the path to its neighbors. BGP usesthe following criteria, in the order presented, to select a path for a destination:

1. If the path specifies a next hop that is inaccessible, drop the update.

2. Prefer the path with the largest weight.

3. If the weights are the same, prefer the path with the largest local preference.

4. If the local preferences are the same, prefer the path that was locally originated(by BGP running on this router).

5. If no route was originated, prefer the route that has the shortest AS_path.

6. If all paths have the same AS_path length, prefer the path with the lowest origintype (where IGP is lower than EGP, and EGP is lower than Incomplete).

Page 86: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 86/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 85

7. If the origin codes are the same, prefer the path with the lowest MED attribute.

8. If the paths have the same MED, prefer the external path over the internal path.

9. If the paths are still the same, prefer the path through the closest IGP neighbor.

10. Prefer the path with the lowest IP address, as specified by the BGP router ID."

Controlling the Flow of BGP Updates

For controlling the flow of BGP updates, the techniques include the following:

  Administrative Distance

  BGP Filtering

  BGP Peer Groups

  CIDR and Aggregate Addresses

  Confederations

  Route Reflectors

  Route Flap Dampening

Administrative Distance

Administrative distance is used to discriminate between routes learned from morethan one protocol The route with the lowest administrative distance is installed in theIP routing table

BGP default distances

Distance Default value Function

External 20 Applied to routes learned from EBGP

Internal 200 Applied to routes learned from IBGP

Local 200 Applied to routes originated by the router

Distance does not influence the BGP path selection algorithm, but it does influence

whether BGP learned routes are installed in the IP routing table.

BGP Filtering

We can control the sending and receiving of updates by using the following filteringmethods:

  Prefix Filtering

  AS_path Filtering

  Route Map Filtering

  Community Filtering 

Page 87: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 87/119

Page 88: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 88/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 87

Route Flap Dampening

Route flap dampening is a mechanism for minimizing the instability caused by routeflapping. The following terms are used to describe route flap dampening:

  Penalty — A numeric value that is assigned to a route when it flaps.  Half-life time — A configurable numeric value that describes the time required

to reduce the penalty by one half.

  Suppress limit — A numeric value that is compared with the penalty. If the penalty is greater than the suppress limit, the route is suppressed.

  Suppressed — A route that is not advertised even though it is up. A route issuppressed if the penalty is more than the suppressed limit.

  Reuse limit — A configurable numeric value that is compared with the penalty.If the penalty is less than the reuse limit, a suppressed route that is up will no

longer be suppressed.  History entry — An entry that is used to store flap information about a route

that is down.

A route that is flapping receives a penalty of 1000 for each flap. When theaccumulated penalty reaches a configurable limit, BGP suppresses advertisement ofthe route even if the route is up. The accumulated penalty is decremented by the half-life time. When the accumulated penalty is less than the reuse limit, the route isadvertised again (if it is still up).

Dampening is not applied to routes that are learned via IBGP. This restriction avoids

forwarding loops and prevents IBGP peers from having a higher penalty for routesthat are external to the AS.

Page 89: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 89/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 88

WHAT IS ROUTE FLAP AND WHY IS IT BAD?

When you "assert" a route - saying "I know how to get to 192.204.4.0/24" based onsome internal knowledge that you actually do know how to get to 192.204.4.0/0, thenatural (and previously-though-to-be-correct-thing-to-do) is to "withdraw" thatassertion if you in fact no longer know how to get to 192.204.4.0.

But look at what happens when you withdraw that assertion. Your provider(s) mustthen also withdraw that assertion. And then their provider(s) and peer(s) must do thesame. All in all, thousands of routers around the world now have to look at that routeand decide if they have a next-best path in their BGP (or other routing) table, andinsert it as the current best path in their IP routing table. This consumes many CPU-seconds on routers that are sometimes very busy.

In fact, it was consuming so much CPU time a few years ago that Sean Doran ofSprintlink said "this must stop" and a few people came up with an idea (which Ciscoimplemented in record time) to "damp"(en) the "route flap"s.

What this means in practice today is that if your routes flap more than one or twocomplete up-down-up cycles, you will be dampened by many providers for at least anhour or so. So even if you're only "single-homed", you will be dampened if your

 provider withdraws your routes every time your link flips up and down a few times.

INTERNET CONNECTIVITY WITHOUT BGP!

Let's review what happens when we are connected to the Internet without speakingBGP to upstream provider. We can create a default route towards upstream provider,and all non- local packets go out the interface specified by the route; and upstream

 provider probably put static routes towards us on their side, and redistributes  thosestatic routes into their IGP, and then probably redistributes their IGP into BGP -unless all of their BGP is done statically .

Basically, if we have any address space "inside" of upstream provider's larger"netblock" or "aggregate", we won't be advertised to the outside world specifically -upstream provider will just advertise their larger block. If we have any other networks(an old Class C; customers with address space; etc...) upstream provider will juststatically announce those routes to the world and statically route them inside theirnetwork to our leased-line/ router interface(s).

With BGP, upstream provider gives us all of the routes they have (the easy part), andlistens to our route announcements and then redistributes some or all of those to their

 peers and customers. The net difference is "just" that they may start advertising amore specific route (no mean task in a complicated network designed, as mostnetworks are, to prevent the accidental "leaking" of more specific routes) or that theroutes that they normally advertise for us under just their ASN will now have ourASN attached as well.

BGP AND THE SINGLE-HOMED

If you've only got one upstream provider, why speak BGP to them? Well, you could

say "practice", but in general, no upstream provider's going to waste their timeconfiguring BGP with you (since it generally involves a fair amount of behind-the-

Page 90: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 90/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 89

scenes work on their part) unless you have a good reason. And you don't really need"full routes" if you're single-homed. Since every packet destined for the Internet (asopposed to your internal network ) is going to go out the same router interface, itdoesn't matter whether it's via one default route or via searching a list of 45,000 ormore routes heard via BGP.

The only really valid reason is that you want to be able to have more control inadvertising  your routes. Of course, you'll have to argue around the flap argumenteven if you have your own provider-independent address space (if you're singly-connected to the 'net, why bother all of the routers in the world by telling themwhether you're reachable or not currently) and the routing-table space argument (ifyou're in your provider's IP space or "aggregate announcement"), why pollute therouting tables with an extra few routes by announcing your routes more specifically?

The ISPs have to answers to these questions and decide routing policies accordingly.If you do want to configure BGP and are single-homed, follow the instructions onhow to announce your networks (routes), and either filter all incoming routes - oraccept them if you feel you really want to.

MULTI-HOMING AND LOAD-BALANCING

Generally, the goal of multi-homing is to use both connections in a same manner and"load-balance" them somehow. Ideally, you'd like roughly half the traffic to go in andout of each connection. You'd also like "fail-over" routing, where if one connectiongoes down the other one keeps you connected to the Internet. In an ideal network,you'd be able to have any one of your connections to the 'net go down and stillmaintain connectivity and speed.

We'll talk a bit about how you load-balance incoming and outgoing traffic to and from

your network. Incoming traffic is controlled by how you announce your routes to theworld (packets will flow into your network because someone out there heard and isusing a route announcement). Outgoing traffic is controlled by the routes that youallow to flow into your border router(s) - and is thus much easier to control and tune.

Page 91: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 91/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 90

NIB-I Network 

Page 92: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 92/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 91

Cisco 7500 Series Product Overview

The Cisco 7500 series includes the following routers: Cisco 7505, Cisco 7507, Cisco7513, and Cisco 7576. The Cisco 7500 series routers support multiprotocol,multimedia routing and bridging with a wide variety of protocols and anycombination of Asynchronous Transfer Mode (ATM), Basic Rate Interface (BRI),

channel attachment, channelized E1, T1, and T3, Ethernet, Fast Ethernet, FiberDistributed Data Interface (FDDI), High-Speed Serial Interface (HSSI), multichannel,Primary Rate Interface (PRI), Packet over OC-3, synchronous serial, and Token Ringmedia.

The first four sections of this chapter describe the Cisco 7500 series routers, andinclude the following:

  Cisco 7507 Overview 

  Cisco 7513 Overview 

The remaining sections of this chapter describe components in the Cisco 7500 seriesrouters, which are considered to be standard equipment and ship with each router:

  Route Switch Processor (RSP) Overview 

  AC-Input and DC-Input Power Supply Overview 

  Arbiter Overview 

  Chassis Interface Overview 

  Fan Tray and Blower Assembly Overview 

  Interface Processor Overview 

This section provides a general overview of interface processors; for a completediscussion and description of all interface processors available for the Cisco 7500series routers, refer to the companion publication  Interface Processor Installation and

Configuration Guide. 

  System Software Overview 

Terms and Acronyms

Following is a list of acronyms, initializations, and terms that identify the Cisco 7500series system components and features:

  AIP---Asynchronous Transfer Mode (ATM) Interface Processor.

  Backplane---the single or dual system bus to which Cisco interface processorsand system processors attach within a Cisco 7500 series router.

  Card cage---the assembly in which the backplane is mounted.

  CIP2---Channel Interface Processor.

  CT3IP---Channelized T3 Interface Processor.

  CxBus---Cisco Extended Bus, the 533-megabit-per-second (Mbps) data bus in

the Cisco 7000 series routers.

Page 93: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 93/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 92

  CyBus---Cisco Extended Bus, the 1.067-gigabit-per-second (Gbps) data bus inthe Cisco 7500 series routers; the Cisco 7505 has one CyBus; the Cisco 7507and the Cisco 7513 have two CyBuses (called the  dual CyBus) for anaggregate bandwidth of 2.134 Gbps. The Cisco 7576 has two dual CyBuseson a single split backplane creating two independent routers. Each Cisco 7576independent router has an aggregate bandwidth of 2.134 Gbps. (Interface

 processors designed for the CxBus work with the CyBus.)

  dBus---Diagnostic bus for Route Switch Processor diagnostic and controlaccess, system discovery and control, microcode download, and faultdiagnosis for all processors connected to the CyBus.

  DIMM---dual in-line memory module.

  DRAM---dynamic random-access memory.

  EIP---Ethernet Interface Processor.

  FEIP---Fast Ethernet Interface Processor.

  FIP---FDDI Interface Processor.

  FSIP---Fast Serial Interface Processor.

  FRU---Field-replaceable unit, defined as any spare part that requiresreplacement by a Cisco-certified service provider.

  Gbps---gigabits per second.

  HSA---High System Availability.

  HIP--- HSSI Interface Processor.

  Interface processor---printed circuit card attached to a metal carrier that provides the electrical interfaces used by the Cisco 7500 series routers.

  Mbps---megabits per second.

  MIP---MultiChannel Interface Processor.

   NVRAM---nonvolatile random-access memory.

  PCMCIA---Personal Computer Memory Card International Association.

  POSIP---Packet over OC-3 Interface Processor.

  Processor modules---describes all interface processors and main system

 processors used in the Cisco 7500 series routers.  RSP---Route Switch Processor; the main system processor. In this publication,

the term  RSP   includes all RSP models (differences between RSP models areclearly noted)

  RSP1---specific main system RSP for the Cisco 7505.

  RSP2---specific main system RSP for the Cisco 7507 and Cisco 7513.

  RSP4---optional main system RSP for the Cisco 7507 and Cisco 7513, andthe specific main system RSP for the Cisco 7576.

  SIMM---single in-line memory module.

Page 94: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 94/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 93

  Spares---spare parts that do not require replacement by a Cisco-certifiedservice provider.

  SRAM---static random-access memory.

  TDM bus---Connectors on the backplane of the Cisco 7576 that are designedfor future Time Division Multiplexing hardware as it becomes available.

  TRIP---Token Ring Interface Processor.

  VIP2---Second-Generation Versatile Interface Processor: incorporatesinterchangeable port and service adapters for flexible interface functionalities.

Cisco 7507 Overview

The Cisco 7507 supports multiprotocol, multimedia routing and bridging with a widevariety of protocols and any combination of available electrical interfaces and media.

 Network interfaces reside on interface processors that provide a direct connection between the two CyBuses in the Cisco 7507 and your external networks. The Cisco7507 has seven slots: interface processor slots 0 and 1, Route Switch Processor(RSP2 or RSP4) slots 2 and 3, and interface processor slots 4 through 6.

There are bays for up to two AC-input or DC-input power supplies. The chassis willoperate with one power supply. While a second power supply is not required, it allowsload sharing and increased system availability.

Caution Due to agency compliance and safety issues, mixing AC-input andDC-input power supplies in the same Cisco 7507 is not a supported

configuration and should not be attempted. Doing so might cause damage.

The Cisco 7507 front panel, shown in Figure 1-4, contains three status indicators andtwo removable panels for access to the internal components. The three light emittingdiodes (LEDs) on the front panel indicate normal system operation and the currentlyactive power supplies. On the back of the router, a normal LED on the RSP2 (orRSP4) and LEDs on the power supplies indicate the same status.

Page 95: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 95/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 94

Figure 1-4: Cisco 7507 (Front View)

Figure 1-5 shows details on the rear, interface-processor end of the Cisco 7507.

Figure 1-5: Cisco 7507 (Rear View)

Cisco 7507 Dual CyBus Backplane

The dual CyBus backplane provides the physical connections for the RSPs andinterface processors, and transfers information at up to 2.134 Gbps (1.067 Gbps perCyBus). The dual CyBus has seven slots: interface processor slots 0 and 1 (Cybus 0),RSP slots 2 and 3, and interface processor slots 4 through 6 (CyBus 1), as shown inFigure 1-6. 

Page 96: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 96/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 95

Figure 1-6: Dual CyBus Backplane in the Cisco 7507

An RSP2 or RSP4 in either slot 2 or slot 3 controls both CyBus 0 and CyBus 1. Thedual CyBus backplane in the Cisco 7507 has an aggregate bandwidth of 2.134 Gbps.The two CyBuses are independent of one another. Interface processors connected toone CyBus are unaffected by the traffic generated by the interface processorsconnected to the other.

The backplane slots are keyed so that the processor modules can be installed only inthe slots designated for them. Keys on the backplane fit into two key guides on eachmodule. Although the RSP uses unique keys, all five interface processor slots use thesame key, so you can install an interface processor in any interface processor slot, butnot in the RSP slot.

Cisco 7513 Overview

The Cisco 7513 router supports multiprotocol, multimedia routing and bridging with awide variety of protocols and any combination of available electrical interfaces and

media. Network interfaces reside on interface processors that provide a directconnection between the two CyBuses in the Cisco 7513 and your external networks.The Cisco 7513 has thirteen slots: interface processor slots 0 through 5, Route SwitchProcessor (RSP2 or RSP4) slots 6 and 7, and interface processor slots 8 through 12.

There are bays for up to two AC-input or DC-input power supplies. The chassis willoperate with one power supply. While a second power supply is not required, it allowsload sharing and increased system availability. The Cisco 7513 is shown in Figure 1-7. The three front-panel LEDs indicate system and power supply status, and LEDs onthe RSP, interface processors, and power supplies indicate status.

Page 97: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 97/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 96

Caution Due to agency compliance and safety issues, mixing AC-input andDC-input power supplies in the same Cisco 7513 is not a supportedconfiguration and should not be attempted. Doing so might cause damage.

Figure 1-7: Cisco 7513 (Front View)

Page 98: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 98/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 97

Figure 1-8 shows details on the rear, interface-processor end of the Cisco 7513.

Figure 1-8: Cisco 7513 (Rear View) 

Cisco 7513 Dual CyBus Backplane

The dual CyBus backplane, located at the rear of the Cisco 7513's removable cardcage, provides the physical connections for the RSPs and interface processors, andtransfers information at up to 2.134 Gbps (1.067 Gbps per CyBus).

The dual CyBus has 13 slots: interface processor slots 0 through 5 (CyBus 0); twoRSP slots (slots 6 and 7); interface processor slots 8 through 12 (CyBus 1), asshown in Figure 1-9. 

Page 99: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 99/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 98

Figure 1-9: Dual CyBus Backplane in the Cisco 7513

An RSP2 or RSP4 in either slot 6 or slot 7 controls both CyBus 0 and CyBus 1. Thedual CyBus backplane in the Cisco 7513 has an aggregate bandwidth of 2.134 Gbps.Interface processors connected to one CyBus are unaffected by the traffic generated

 by the interface processors connected to the other CyBus. The two CyBuses areindependent of one another.

The backplane slots are keyed so that the processor modules can be installed only inthe slots designated for them. Keys on the backplane fit into two key guides on eachmodule. Although the RSP uses unique keys, all eleven interface processor slots usethe same key, so you can install an interface processor in any interface processor slot,

 but not in the RSP slot.

Note  A spare card cage assembly ships as Product Number MAS-7513CDCAGE=.For maintenance information about the card cage assembly, refer to the section"Removing and Replacing the Cisco 7513 and Cisco 7576 Card Cage Assembly"  inthe chapter "Maintaining the Cisco 7513 and Cisco 7576."

Cisco 7513 System Specifications

Table 1-3 lists the specifications for the Cisco 7513 system.

Table 1-3: Cisco 7513 Specifications 

Description Specification

Backplane Two 1.0677-Gbps CyBuses: 11 interface processor slots, twoRSP slots

Page 100: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 100/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 99

Dimensions(H x W x D)

33.75 x 17.5 x 22 in. (85.73 x 44.45 x 55.88 cm)Chassis width including rack-mount flanges is 18.93 in. (48.1cm)Chassis depth including power cables and cable-management

 bracket is 24 in. (60.96 cm)

Weight Chassis with blower module: 75 lb (34.02 kg)Chassis with blower module and one power supply: 100 lb(45.36 kg)Chassis with blower module and two power supplies: 125 lb(56.7 kg)Chassis with blower module, two power supplies, and all slotsfilled: ~160 lb (72.58 kg), each processor module weighs ~2.5lb (1.13 kg)

Power dissipation 1600W with a maximum configuration and one AC-input power

supply1600W with a maximum configuration and one DC-input powersupply1700W nominal with a maximum configuration and either twoAC-input or two DC-input power supplies

Heat dissipation 1600W (5461 Btu/hr)

AC-input voltage 100 to 240 VAC

Frequency 50/60 Hz

AC-input cable 12 AWG, with three leads, an IEC-320 plug on the router end,and a country-dependent plug on the power source end

AC-input voltageand current

100 VAC at 16 amps (A) maximum, wide input with powerfactor correction (PFC)240 VAC at 7A maximum

DC-input voltageand current

-48 VDC nominal, at 35A in North America(-60 VDC at 35A in the European Community)

DC-input cable 8 AWG (recommended minimum), with three leads and rated forat least 194° F (90° C) (you supply the cable)

Power distribution +5.2 VDC @ 75A, +12 VDC @ 15A, -12 VDC @ 3A, +24VDC @ 5A

Airflow/noise level Bottom to top through chassis by variable-speed blower (62 to70 dBA)

Temperature 32 to 104° F (0 to 40° C), operating; -4 to 149° F (-20 to 65° C),

nonoperating

Page 101: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 101/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 100

Relative humidity 10 to 90%, noncondensing

Softwarerequirement

Cisco IOS Release 10.3(571) or later for the RSP2 and Cisco7513.Cisco IOS Release 11.1(8)CA or later for the RSP4 in the Cisco

7513

Agency approvals Safety: UL 1950, CSA 22.2-950, EN60950, EN41003, TS001,AS/NZS 3260EMI: FCC Class A, EN60555-2, EN55022 Class B, VDE 0878Part 3, 30 Class BImmunity: EN55101/2 (ESD), EN55101/3 (RFI), EN55101/4(Burst), EN55101/5 (Surge), EN55101/6 (Conducted), IEC77B(AC Disturbance)

Catalyst 5500 Switch

The Catalyst 5500 switch chassis has 13 slots. Slot 1 is for the supervisor engine,which provides switching, local and remote management, and multiple uplinkinterfaces. Slot 2 can contain an additional redundant supervisor engine, which acts asa backup in case the first module fails. A failure of the active supervisor engine isdetected by the standby module, which takes control of supervisor engine switchingfunctions. If a redundant supervisor engine is not required, slot 2 is available for anyswitching module.

Slots 3 through 12 are available for any combination of switching modules.

Slot 13 is a dedicated slot, which accepts only the ATM switch processor (ASP)module or the Catalyst 8510 Campus Switch Router (CSR) switch route processor(SRP). When using the ASP in slot 13, the Catalyst 5500 switch accepts LightStream1010 ATM port adapters in slots 9 through 12. When using the Catalyst 8510 CSRSRP in slot 13, the Catalyst 5500 switch accepts Catalyst 8510 CSR modules in slots9 through 12.

The Catalyst 5500 switch has a 3.6-Gbps media-independent switch fabric and a 5-Gbps cell-switch fabric. The backplane provides the connection between powersupplies, supervisor engine, switching modules, and backbone module. The 3.6-Gbps

media-independent fabric supports Ethernet, Fast Ethernet, Gigabit Ethernet,FDDI/CDDI, ATM LANE, ATM dual PHY DS3, RSM, and RSM/VIP2 modules.The 5-Gbps cell-based fabric supports an ASP module and ATM port adapters. SeeTable 1-1 for additional information.

Page 102: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 102/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 101

Figure 1-6: Catalyst 5500 Switch 

Cisco AS5800 Product Overview

The Cisco AS5800 is a high-density, ISDN and modem WAN aggregation systemthat provides both digital and analog call termination. It is intended to be used inservice provider dial point-of-presence (POP) or centralized enterprise dialenvironments.

The access server components include a Cisco 5814 dial shelf and a Cisco 7206 routershelf. Two versions of an optional AC power shelf is also available, either standard orenhanced. Dial shelf cards communicate with the host router shelf over a dial shelfinterconnect cable. This nonblocking interconnect cable supports 100-Mbps, full-duplex data transfer.

The access server is designed with environmental monitoring and reporting functionsto help maintain normal system operation and resolve adverse environmentalconditions prior to loss of operation. If conditions reach critical thresholds, the systemshuts down to avoid equipment damage from excessive heat or electrical current.

Downloadable software and microcode allow you to load new software images intoFlash memory remotely, without having to physically access the router shelf, for fastand reliable upgrades.

This chapter provides physical and functional overviews to familiarize you with yournew Cisco AS5800. It contains physical descriptions of system hardware and major

components and functional descriptions of component features.

Page 103: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 103/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 102

Note  Descriptions and examples of software commands appear in this document only

when they are necessary for installing the system hardware. For software

configuration information, refer to the Cisco AS5800 Universal Access ServerSoftware Installation and Configuration Guide  that shipped with your system. The

Cisco AS5800 Universal Access Server Software Installation and ConfigurationGuide  will be replaced by the Cisco AS5800 Universal Access Server Operation,

Administration, Maintenance, and Provisioning Guide, available later this year.

System Components

The following sections in this chapter describe the core system components:

  Cisco 5814 Dial Shelf  

  Dial Shelf Backplane 

  Dial Shelf Field-Replaceable Units 

  Dial Shelf Controller Card 

  Dial Shelf Filter Module 

  Cisco 7206 Router Shelf  

  DC-Input Power Specifications 

  Power Requirements 

The Cisco AS5800 is designed to be rack-mounted. A rack-mount kit is included witheach Cisco 5814 dial shelf and each Cisco 7206 router shelf. Each rack-mount kit

 provides the hardware needed to mount the dial shelf and router shelf in a standard,

19-in. equipment rack or standard telco rack. If you plan to use a 23-in. equipmentrack, you must provide your own brackets or shelves to accommodate the Cisco 7206router shelf and optional AC power supply. For clearance requirements and rack-mount installation considerations, refer to the section "Site Specifications"  in thechapter "Preparing for Installation."

Figure 1-1 shows a front view of a Cisco AS5800, and Figure 1-2 shows a rear view.

Figure 1-3 shows a front view of a Cisco AS5800 with the enhanced power supply,and Figure 1-4 shows a rear view of a Cisco AS5800 with the enhanced power supply.

Page 104: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 104/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 103

Figure 1-1:Cisco AS5800 — Front View

Figure 1-2: Cisco AS5800 — Rear View

Page 105: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 105/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 104

Figure 1-3: Cisco AS5800 with Enhanced AC-Input Power Shelf  — Front View

Figure 1-4: Cisco AS5800 with Enhanced AC-Input Power Shelf  — Rear View

Page 106: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 106/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 105

Cisco 5814 Dial Shelf

The Cisco 5814 dial shelf contains 14 slots (numbered 0 to 13 on the backplane) andcan support as many as 10 modem cards, 2 T3 or 4 T1 trunk cards, and 2 dial shelfcontrollers (DSCs). Slots 12 and 13 in the dial shelf are dedicated slots for the DSCs.Metal guard pins on the backplane module prevent you from installing any other type

of card in these two slots. The modular chassis supports online insertion and removal(OIR) and redundant power and includes environmental monitoring and feedbackcontrol.

The dial shelf contains CT1/CE1 or CT3 Primary Rate Interfaces (PRIs) thatterminate ISDN and modem calls and break out individual calls from the appropriatetelco services. Digital signal level 0 (DS0) or ISDN calls are terminated on the trunkcard High-Level Data Link Control (HDLC) controllers, and analog calls are sent tomodem resources on the modem cards. As a result, any DS0 can be mapped to anyHDLC controller or modem module. You can install multiple ingress interface cardsof like or different types, which enables you to configure your systems as fullyoperative, port redundant, or card redundant, depending on your specific needs.

Dial Shelf Backplane

The Cisco AS5800 is equipped with a field-replaceable backplane module, which isdesigned to meet critical safety, isolation, and electromagnetic compatibility (EMC)requirements. The Cisco 5814 dial shelf backplane includes 14 slots that seat theingress trunk cards, the modem cards, and the dial shelf controller cards.  Figure 1-6shows the Cisco 5814 dial shelf with no cards installed, as viewed from the systemfront.

Figure 1-6: Cisco 5814 Dial Shelf Backplane — Front View

The dial shelf backplane contains no active components, except for the nonvolatilerandom-access memory (NVRAM) used for system identification. This is locatedtoward the top of the backplane and provides 1024 bits of nonvolatile read-writememory.

Page 107: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 107/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 106

The dial shelf backplane contains the connectors that connect directly with the dialshelf cards and dial shelf controller cards. It also includes a 20-pin molex MiniFitconnector that connects to the blower assembly. The dial shelf backplane alsoincludes additional maintenance bus (MBus) connectors to the power-entry modules(PEMs) and filter module, which are used for monitoring environmental conditions.

The dial shelf backplane first receives -48 VDC power from the DC-input powersupplies by way of the filter module, and the power is then distributed throughout thedial shelf. The DC PEMs connect to the backplane using four blind-mating 1.25-in.

 power studs, which are located near the bottom of the backplane.

Three bus connections are routed over the backplane:

  The backplane interconnect bus (BIC bus) connects the dial shelf cards to thedial shelf controller cards and provides communication between the dial shelfand the router shelf.

  The TDM bus transmits clocks and frame pulses to all dial shelf cards and dial

shelf controller cards.

  The maintenance bus (MBus) monitors system environmental conditions.

Dial Shelf Controller Card

The dial shelf controller card is the main processor card for the dial shelf, and it performs the following functions:

  Links the dial shelf to the router shelf, where data is transferred as Ethernet packets encapsulated in proprietary protocol

  Interconnects trunk cards and modem cards  A backplane interconnect concentrator on each dial shelf controller card

connects to each dial shelf card installed in the dial shelf.

  Boots and reloads software images

  Provides source clocks used by all dial shelf cards and power supplies

  Extracts an external reference clock from an external E1 or T1 signal througha BNC connector on the front panel

  Connects to an external alarm source through a DB-15 serial connector locatedon the front panel

Install the dial shelf controller card in the Cisco 5814 dial shelf in either of the twofar-right slots (numbered 12 and 13). The card plugs directly into the backplane.

The dial shelf controller card consists of the following components:

  CPU (IDT R4700)

  150-MHz microprocessor

  I/O controller

  Onboard Flash memory

  PCMCIA Flash memory

Page 108: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 108/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 107

  Boot Flash memory

  EPROM

Cisco 7206 Router Shelf

This section provides physical and functional overviews of the Cisco 7206 router

shelves. It contains physical descriptions of the router hardware and majorcomponents and functional descriptions of hardware-related features.

The Cisco 7206 router supports call signaling for PRI interfaces; packet processing;and multiprotocol, multimedia routing and bridging with all commonly used high-speed LAN and WAN interfaces, including Ethernet, Fast Ethernet (FE),Asynchronous Transfer Mode (ATM), High-Speed Serial Interface (HSSI), and FiberDistributed Data Interface (FDDI).

The Cisco 7206 router shelf handles upper layer routing tasks and provides thefollowing features:

OIR  — Allows you to add, replace, or remove port adapters without interrupting thesystem or entering any console commands.

Dual hot-swappable, load-sharing power supplies — Provide system powerredundancy; if one power supply or power source fails, the other power supplymaintains system power without interruption. Also, when one power supply is

 powered off, the second power supply immediately takes over the router's powerrequirements without interrupting normal operation.

Environmental monitoring and reporting functions — Allow you to maintain normal

system operation by resolving adverse environmental conditions prior to loss ofoperation.

Downloadable software — Allows you to load new images into Flash memoryremotely, for fast, reliable upgrades without having to physically access the Cisco7206 router.

Page 109: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 109/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 108

 Note In Figure 1-19 a blank port adapter is installed in slot 5. To ensure adequate

airflow across the port adapters, each slot must be filled with either a port adapter or a blank port adapter.

Network Interfaces

 Network interfaces reside on port adapters that provide the connection between therouter's three peripheral component interconnect (PCI) buses and external networks.The Cisco 7206 has six slots (slots 1 to 6) for the port adapters, one slot for anInput/Output (I/O) controller, and one slot for a network processing engine (NPE).

You can place port adapters in any of the six available slots.

The front of the Cisco 7206 provides access to an I/O controller and up to six networkinterface port adapters. The I/O controller contains the following:

Local console port for connecting a data terminal or data terminal equipment (DTE)and an auxiliary port for connecting a modem or other data communicationsequipment (DCE) or other devices for configuring and managing the router

Two personal computer memory card international association (PCMCIA) slots forFlash memory cards

Optional Fast Ethernet port, which provides a 100-Mbps connection to the network

 Note The I/O controller is available with or without a Fast Ethernet port. The I/Ocontroller with a Fast Ethernet port is equipped with both a media-independentinterface (MII) receptacle and an RJ-45 receptacle; however, only one of these tworeceptacles can be used at a time.

The port adapters installed in the Cisco 7206 router are of the same type as thoseinstalled on the second-generation Versatile Interface Processors (VIP2s) in the Cisco

Page 110: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 110/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 109

7500 series routers, in Cisco 7000 series routers using the Cisco 7000 series RouteSwitch Processor (RSP7000) and Cisco 7000 series Chassis Interface (RSP7000CI),and in the Cisco uBR7246 universal broadband router. The port adapters installed inthe Cisco 7206 support OIR. For an explanation of OIR, see the "Online Insertion andRemoval" section. 

 Note The I/O controller does not support OIR. You must power down the Cisco 7206 before removing the I/O controller from either router shelf.

Port adapter slots in the Cisco 7206 routers are numbered from left to right from the bottom up, beginning with port adapter slot 1 and continuing through port adapter slot6. Port adapter slot 0 is the Fast Ethernet port on the I/O controller. (See  Figure 1-20.)

Figure 1-20: Port Adapter Slot Numbering

Power Supplies

The Cisco 7206 router is equipped with one 280W AC-input or one 280W DC-input power supply. A fully configured Cisco 7206 router operates with only one installed power supply; however, a second, optional power supply of the same type provideshot-swappable, load-sharing, redundant power. Figure 1-21 shows the rear of a Cisco7206 router configured with a single AC-input power supply. (A power supply filler

 plate is installed over the second power supply bay.)

Caution Do not mix power supplies in the Cisco 7206. In dual power supplyrouter configurations, both power supplies must be of the same type (two AC-input power supplies or two DC-input power supplies).

The power supply has the router's main power switch and either an AC-input powerreceptacle or a hardwired DC-input power cable (depending on the type of installed

 power supply). The rear of the Cisco 7206 router provides access to the network processing engine and the power supplies. Adjacent to the power supply bays are twochassis ground receptacles that provide a chassis ground connection for ESD

equipment or a two-hole grounding lug. (See Figure 1-21.)

Page 111: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 111/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 110

Figure 1-21: Cisco 7206 Router  — Rear View

Three internal fans draw cooling air into chassis and across internal components tomaintain an acceptable operating temperature. The three fans are enclosed in a tray

that is located in the subchassis.

Caution To ensure the proper flow of cooling air across the internal components,make sure blank port adapters are installed in all unoccupied port adapter slotsand power supply filler plates are installed in unoccupied power supply bays.

Page 112: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 112/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 111

Router Configuration

Lesson 1 - Becoming familiar with the Router 

The initial display when you access a router through the console port.

You will see the prompt "Router>". This is the user mode prompt.Type "?" and press enter. This will show you the commands available from this

 prompt.Do not run any of the commands yet, you will use all commands in later lessons.

Type "enable" and press enter. This will take you into privileged mode.Type "?". This will show you the commands available from this prompt.

You will see the prompt "Router#". This is the privileged mode prompt.Type "config" to enter configuration mode.

When prompted, "Configuring from terminal, memory, or network [terminal]?", press enter.Type "?". This will show you the commands available from this prompt.

Type "line vty 0 4". This is the virtual terminal (telnet) configurationType "?". This will show you the commands available from this prompt.

Type "exit" to return to the config prompt.

Type "interface ethernet 0". This is the configuration for the Ethernet port.Type "?". This will show you the commands available from this prompt.Press CTRL-Z to exit from config mode, to privileged mode.

Type "show running-config" to show how your router is configured.There should not be much information here yet. Later, after you configure your router,you will observe how this changes.

Type "show history" to view the recent commands that you typed.

Type "disable" to exit privileged mode.

Type "show version" to gather information about your IOS.

Page 113: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 113/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 112

Lesson 2 - Changing hostname and passwords 

You will see the prompt "Router>". This is the user mode prompt.Type "enable" to take you into privileged mode.You will see the prompt "Router#"

Type "config terminal" to go directly into configuration mode.

Type "hostname Router1" to change the name of the router to Router1

 Note that your prompt has now changed to reflect the new hostname.

You will now add security to your router by adding passwords. The first two passwords that you will enter are the password [i.e simple password or passwordwhich is saved unencrypted in router] and the secret [i.e. encrypted password]. Bothof these passwords are used to challenge users as they enter privileged mode. The

simple password is only used if there is no secret password or else secret will overridethe simple password.

While still in config mode, type "enable password en123". (To configure simple password on your router).

 Now let's try the password.

Use CTRL-Z to exit configure mode.

Type "disable" to leave privileged mode.

Type "enable" to re-enter privileged mode.

You will be prompted for a password. Type "en123", or the password you chose.Your password should be accepted, and you should now be in privileged mode.

Type "show running-config". Notice that your password is displayed in theconfiguration.

Type "config terminal" to enter configuration mode.

Type "enable secret secret123". (You can use any valid password for this exercise).This is the secret that you will provide when you next enter privileged mode.

 Now let's try the password.

Use CTRL-Z to exit configure mode.

Type "disable" to leave privileged mode.

Type "enable" to re-enter privileged mode.

You will be prompted for a password. Type "en123". Notice that your access isdenied.Type "secret123". Your password should be accepted, and you should now bein privileged mode.

Type "config terminal" to go directly into configuration mode.

Page 114: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 114/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 113

Type "line vty 0 4". This is the configuration command for virtual terminals of 5users i.e. 0-4, and is used for telnet sessions. Here you can provide the telnet

 password. The maximum number of users supported for telnet session may changefrom router to router.

Type "password vty123". This enters the password vty123 for telnet connections.

Type "login". This command tells the router to allow users to connect through telnet.

Type "exit" to leave virtual terminal configuration. Please note: The password youhave just assigned applies to telnet sessions.

 Now, we will configure a password on a line console.

Type "line console 0" to enter the console configuration.

Type "login"

Type "password con123". This sets the console password to con123. The console password is used to log into routers via direct console connection.

Type "ctrl-z" to exit config mode.

If you want to remove the passwords, follow these steps:

Type "configure terminal" to enter config mode.

Type "no enable password en123" to remove the enable simple password.

Type "no enable secret secret123" to remove the enable secret.

Type "ctrl-z" to exit config mode.

Page 115: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 115/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 114

Lesson 3 - Saving and Restoring configurations 

Enter the router in user mode. (If you are in config mode, type exit to enter usermode).

Type "show running-config

" to show how your router is configured. ( or you can use“do” keyword before “show” command in order to run ―show‖ command in config

mode i.e. you can type ―do show running-config‖ in config mode to show how yourrouter is configured.)

Your running configuration is the settings that are currently stored in memory on yourrouter. Your startup configuration is the configuration that the router will load whenyou reboot. Since these are not always the same, it is important to save your runningconfiguration to your startup configuration, whenever permanent changes are made tothe router's configuration.

Type "enable" to enter privileged mode.

Type "configure terminal" to enter config mode.

Type "hostname router1" to change the name of the router.

Type "Ctrl-z" to exit out of configuration mode.

Type "copy running-config startup-config" to save the configuration in memory toyour start-up configuration.

 Now restart your router. Note that the hostname is "Router1", and not the default"Router".

Type "enable" to enter privileged mode.

Type "config terminal" to go directly into configuration mode.

 Now change the router name to whatever you like.

Type "Ctrl-z" to exit out of configuration mode.

 Now, in privileged mode , type "copy startup-config running-config" to load thestart-up config into memory without rebooting the router.

 Note that when the startup config loads, the prompt returns to "Router1"

At this point, you have learned how to:How to navigate through the different prompts on your router.How to change the hostname of your router.How to configure and remove passwords on your router.How to save your configurations on your router.

Page 116: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 116/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 115

Lesson 4 - Setting up the Interfaces

Type “show interface ?” to get the list of interfaces available in the router.

Type "show interface ethernet 0". (Note here that line protocol is down because you may not be connected through cable to this port. 0 here represents number through which routeridentifies Ethernet port. If there is one Ethernet port in your router, then its number willalways be 0. If there are two then one is identified by 0 and other by 1. The same conceptapplies for more than two Ethernet ports. The number and type of ports supported in routermay change from router to router. For example, some router may not have Ethernet port butthey may be having Fast Ethernet or Gigabit Ethernet port or combination of both.)

Type "show interface serial 0". (To see the description of serial port if available in yourrouter. If no cable is connected then line protocol will be down else it will be up.)

Type "config terminal" to go directly into configuration mode.

Type "interface ethernet 0" to enter interface configuration mode for the Ethernet interface.

Suppose network interface of the router is to be configured with an IP address of 172.10.0.1.We will assign this IP address and a default subnet mask to this interface:

Type "ip address 172.10.0.1 255.255.0.0" to assign the IP configuration.

Type "no shutdown" to enable the interface.

Type "exit" to leave the Ethernet interface configuration.

Here's how you configure the serial interface:

Type "interface serial 0" to enter interface configuration mode for the serial interface.

Type "ip address 210.16.54.1 255.255.255.0" to assign the IP address and subnet mask.

Type "no shutdown" to enable the interface.

Type "exit" to leave the serial interface configuration.

Type "ctrl-z" to leave config mode.

 Now we can check our configurations:

Make sure you are in privileged mode.

Type "show interface ethernet 0". Note that line protocol is up. If it is not up, repeat this lab.

Type "show interface serial 0". Note that line protocol is up. If it is not up, repeat this lab.

Type "show running-config". Note the IP addresses of Ethernet0 and Serial0 entries.

Page 117: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 117/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 116

Lesson 5 - Static Routing

Type "show ip route". Note that two directly connected routes are shown.

Enter configuration mode to enter routing information. (Type "configure terminal"

or the abbreviated version "config t". Either command can be used on a router).

To add a route, you must specify the destination network and the port that traffic mustuse to reach the remote network. To reach 192.168.10.0 traffic must flow through theserial port 210.16.54.1.

Type "ip route 192.168.10.0 255.255.255.0 210.16.54.1". This command establishesan IP route to network 192.168.10.0 with a 24 bit net-mask through port 210.16.54.1

Type "ip route 192.168.50.0 255.255.255.0 210.16.54.1". This command establishesan IP route to network 192.168.50.0 with a 24 bit net-mask through port 210.16.54.1

Type "Ctrl-z" to exit from config mode.

Type "show ip route". Note that the two static routes are shown in addition to the twodirect routes. If you do not see both static routes, repeat this lesson from the

 beginning.

We will now look at how to remove static routes:

Enter config mode. (Type "configure terminal" or "config t")

To undo a command, like setting a route, we need to type the same command, withthe word NO in front of it:

Type "no ip route 192.168.10.0 255.255.255.0 210.16.54.1". This command removesthe route to network 192.168.10.0

Type "no ip route 192.168.50.0 255.255.255.0 210.16.54.1". This command removesthe route to network 192.168.50.0

Type "Ctrl-z" to exit from config mode.

Type "show ip route". Note that the two static routes are now gone, and only directlyconnected routes remain

At this point, you have learned how to:How to configure interfaces with IP address and subnet masks.How to display configurations for the interfaces.How to configure static routes on your router.How to remove static routes on your router.

Page 118: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 118/119

―DATA NETWORK‖ FOR JTOs PH-II

BRBRAITT : June-2011 117

Lesson 6 - Dynamic Routing 

 Note: To use dynamic routing, the other routers in your network must use the samerouting protocol. For this the other router will work with either RIP or OSPF.

Start the router Go into privileged mode.

Type "show ip route". Note that two directly connected routes are shown.

Enter config mode. (Type "configure terminal" or "config t")

Type "router rip" to enable RIP on your router.

Once RIP is enabled on a router, you must specify each network in which the routerwill advertise routing.

Type "network 210.16.54.0"

Type "network 172.10.0.0"

Dynamic routing is now configured through RIP.

Type Ctrl-z to exit config mode.

Type "show ip route". Note that routes to all four networks are shown.

The same steps would be used to establish OSPF routing:

Enter config mode. (Type "configure terminal" or "config t")

First remove RIP by typing "no router rip"

Type "router OSPF" to enable OSPF on your router.

Once OSPF is enabled on a router, you must specify each network in which the routerwill advertise routing.

Type "network 210.16.54.0 0.0.0.255 area 0" (If this interface is in area 0. Theformat of mask is complement (i.e. opposite) of the format that is usually used. Thismask is obtained by replacing 1 by 0 and 0 by 1 in the original mask).

Type "network 172.10.0.0 0.0.255.255 area 0"

Dynamic routing is now configured through OSPF.

Type Ctrl-z to exit config mode.

Type "show ip route". Note that routes to all four networks are shown.

Page 119: IInd Week Data Networks

8/13/2019 IInd Week Data Networks

http://slidepdf.com/reader/full/iind-week-data-networks 119/119

―DATA NETWORK‖ FOR JTOs PH-II

Lesson 7 - On your own: Practice makes perfect! 

Check to see how well you do from memory. Each of the following exercises comesfrom the lessons above. See if you can remember the commands and complete thislesson without reviewing previous lessons.

 Now proceed with the following exercises:

1. Copy your running configuration to your startup configuration.

2. Set up passwords for privileged mode, Telnet, and the console.

3. Change the hostname of the router to "Router1".

4. Set the IP address of the serial interface.

5. Set the IP address of the LAN interface.

6. Establish static routing.

7. Establish Dynamic routing on the router using RIP.

8. Establish Dynamic routing through OSPF.

9. Verify your connections by pinging the other hosts in your network (if available itwill work).