ConfigureTwo networks principle

118
Implemention principles Implemention principles of East To West Networks of East To West Networks Dr Ahmed Alneami British Institute of Technology and E-Commerce email:- [email protected] Web:- www.bite.ac.uk

description

Simple approach to connect two Nks using the following principle likes: Scalable Routing Protocols and (Scalable network) TCP/IP (Transmission Control Protocol/Internet Protocol) OSPF (Open Shortest Path First) or BGP (Border Gateway Protocol) DHCP (Dynamic Host Configuration Protocol) NAT (Network Address Translation)

Transcript of ConfigureTwo networks principle

Page 1: ConfigureTwo networks principle

Implemention principles of Implemention principles of East To West NetworksEast To West Networks

Dr Ahmed AlneamiBritish Institute of Technology and E-

Commerceemail:- [email protected]

Web:- www.bite.ac.uk

Page 2: ConfigureTwo networks principle

Network Technology Network Technology Final AssignmentFinal Assignment

Submission Date: 6th of Dec. 2010Configure a new network between East and West London branches through a headquater.

East London

West London

Headquarter

Page 3: ConfigureTwo networks principle

Outcomes of this lecture Outcomes of this lecture are: are: 1. Scalable Routing Protocols and

(Scalable network)2. TCP/IP (Transmission Control

Protocol/Internet Protocol)3. OSPF (Open Shortest Path First) 4. or BGP (Border Gateway Protocol)5. DHCP (Dynamic Host

Configuration Protocol)6. NAT (Network Address Translation)

Page 4: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 4

Scalability – myths and Scalability – myths and lieslies

What is scalability not ?◦Raw Speed / Performance◦HA / BCP◦Technology X◦Protocol Y

Page 5: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 5

Scalability – myths and Scalability – myths and lieslies

So what is scalability?

Page 6: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 6

Scalability – myths and Scalability – myths and lieslies

So what is scalability?◦Traffic growth◦Dataset growth◦Maintainability

Page 7: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 7

TodayTodayTwo goals of application

architecture:

Scale

HA

Page 8: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 8

TodayTodayThree goals of application

architecture:

Scale

HA

Performance

Page 9: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 9

ScalabilityScalabilityTwo kinds:

◦Vertical (get bigger)◦Horizontal (get more)

Network Scalability it is a a routing protocol developed for IP NKs. i.e Without a scalable routing system, a Nk may suffer from severe peformance penalties and proven by disastorus events in large network.

Page 10: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 10

Big IronsBig Irons

Sunfire E20k

$450,000 - $2,500,00036x 1.8GHz processors

PowerEdge SC1435Dualcore 1.8 GHz processor

Around $1,500

Page 11: ConfigureTwo networks principle

Web 2.0 Expo NYC, 16th September 2008 11

Cost vs CostCost vs Cost

See the uploaded Scalable –Rep file please.

Page 12: ConfigureTwo networks principle

Routing Information Routing Information ProtocolProtocol

RIPRIPidentify the best path to any given

destination address.

As IP-based networks became both more numerous and greater in size, it became apparent to the Internet Engineering Task Force (IETF) that RIP needed to be updated.

RIP 2 enabled RIP messages to carry more information, which permitted the use of a simple authentication mechanism to secure table updates.

Page 13: ConfigureTwo networks principle

13

Router

Router

Router

Router Router

What is an optimal route ?

What is an optimal route ?

Switch

Switch

Routing Protocol

Page 14: ConfigureTwo networks principle

RIP Routing Metric

•RIP uses a single routing metric (hop count) to measure the distance between the source and a destination network.

•The IP address of the sender is used as the next hop.

•RIP prevents routing loops from continuing indefinitely by implementing a limit on the number of hops allowed in a path from the source to a destination. Max 16•RIP uses numerous timers to regulate its performance. These include a routing-update timer, a route-timeout timer, and a route-flush timer.

Page 15: ConfigureTwo networks principle

IP RIP packet format fields Command—Indicates whether the packet is a request or a response. The request asks that a router send all or part of its routing table.

•Zero—This field is not actually used by RFC 1058 RIP; it was added solely to provide backward compatibility with prestandard varieties of RIP. Its name comes from its defaulted value: zero. •Address-family identifier (AFI)—Specifies the address family used. Each entry has an address-family identifier to indicate the type of address being specified. •Address—Specifies the IP address for the entry. •Metric—Indicates how many internetwork hops (routers) have been traversed in the trip to the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable route. •Version number—Specifies the RIP version used. This field can signal different potentially incompatible versions.

See the uploaded RIP file please.

Page 16: ConfigureTwo networks principle

More details and slides later

Page 17: ConfigureTwo networks principle

The Open Shortest Path The Open Shortest Path First (OSPF) protocolFirst (OSPF) protocol

How OSPF works and how it can be used to design and build large and complicated networks.

Page 18: ConfigureTwo networks principle

Background Background Information Information It was found that Routing

Information Protocol (RIP) incabable in serving the large hetrogeneous internetworks.

Page 19: ConfigureTwo networks principle

The Intermediate System-to-The Intermediate System-to-Intermediate System (IS-IS) Intermediate System (IS-IS) routing protocolrouting protocol

The (IS-IS) routing protocol is an Interior Gateway Protocol (IGP) standardized by the Internet Engineering Task Force (IETF).

Commonly used in large Service Provider networks.

IS-IS may also be deployed in extremely large Enterprise networks.

IS-IS is a link-state routing protocol, providing fast convergence and excellent scalability.

Like all link-state protocols, IS-IS is very efficient in its use of network bandwidth.

Page 20: ConfigureTwo networks principle

Intermediate Systems-to-Intermediate Systems-to-Intermediate Systems IS-ISIntermediate Systems IS-IS

This is dynamic link state routing protocol

All Intermediate Systems are routers,Routers are organised into local

groups called Areas,Several Areas are grouped together

into a “Domain”,IS-IS places area router into layer

(no. 1) and the routers that interconnected the areas into layer 2.

Page 21: ConfigureTwo networks principle

Backbone Area (area 0) is the first area that will always exist in any network using OSPF.

All other areas are connected to be the backbone either Directly or using Virtual Links that “tunnel” through other areas.

Each area is designated by an area number.

All other areas described as having stubbiness

Page 22: ConfigureTwo networks principle

22

Path Determination GraphicPath Determination Graphic

Page 23: ConfigureTwo networks principle

23

Router

Router

Router

Router Router

What is an optimal route ?

What is an optimal route ?

Switch

Switch

Routing Protocol

Page 24: ConfigureTwo networks principle

24

Routing ProtocolsRouting ProtocolsRouting protocols includes the following:

processes for sharing route information allows routers to communicate with other routers to update and maintain the routing tables

Examples of routing protocols that support the IP routed protocol are:

RIP, IGRP, OSPF, BGP, and EIGRP.

Page 25: ConfigureTwo networks principle

25

Routed ProtocolsRouted ProtocolsProtocols used at the network layer that transfer data from one host to another across a router are called routed or routable protocols. The Internet Protocol (IP) and Novell's Internetwork Packet Exchange (IPX) are examples of routed protocols. Routers use routing protocols to exchange routing tables and share routing information. In other words, routing protocols enable routers to route routed protocols.

Page 26: ConfigureTwo networks principle

26

Autonomous System

AS 2000

AS 3000

IGP

Interior Gateway Protocols areused for routing decisionswithin an Autonomous System.

Exterior GatewayProtocols are usedfor routing betweenAutonomous Systems

EGP

AS 1000

An Autonomous System (AS) is a group of IP networks, which has a single and clearly defined external routing policy.

Fig. 48 IGP and EGP (TI1332EU02TI_0004 The Network Layer, 67)

Page 27: ConfigureTwo networks principle

27

IGP

Interior Gateway Protocol(IGP)

Exterior Gateway Protocol (EGP)

EGP

EGP

EGP

Interior Gateway Protocol(IGP)

AS 1000

AS 2000

AS 3000

Fig. 49 The use of IGP and EGP protocols (TI1332EU02TI_0004 The Network Layer, 67)

Page 28: ConfigureTwo networks principle

28

IGP and EGPIGP and EGPAn autonomous system is a network or set of networks under common administrative control, such as the cisco.com domain.

Page 29: ConfigureTwo networks principle

29

Categories of Routing Categories of Routing ProtocolsProtocols

Most routing algorithms can be classified into one of two categories:

• distance vector • link-state

The distance vector routing approach determines the direction (vector) and distance to any link in the internetwork.

The link-state approach, also called shortest path first, recreates the exact topology of the entire internetwork.

Page 30: ConfigureTwo networks principle

30

Distance VectorDistance VectorRouting ConceptsRouting Concepts

Page 31: ConfigureTwo networks principle

31

2 Hops

1 Hop1 Hop

Destination

192.16.1.0

192.16.5.0

192.16.7.0

Distance

1

1

2

Routing table contains the addressesof destinations and the distanceof the way to this destination.

Flow of routinginformationFlow of routinginformation

Router B Router CRouter A Router D

192.16.1.0192.16.1.0 192.16.7.0192.16.7.0

192.16.5.0192.16.5.0

Distance Vector Routing (DVR)

Page 32: ConfigureTwo networks principle

32

Routing Tables GraphicRouting Tables Graphic

Page 33: ConfigureTwo networks principle

33

Distance VectorDistance VectorTopology ChangesTopology Changes

Page 34: ConfigureTwo networks principle

34

Router Metric Router Metric ComponentsComponents

Page 35: ConfigureTwo networks principle

35

RIPv1

Distance Vector Routing Protocol,classful

Distribution of Routing Tables via broadcast to adjacent routers

Only one kind of metric:Number of Hops

Connections with differentbandwidth can not be weighted

Routing loops can occur-> bad convergence in case of a failure

Count to infinity problem(infinity = 16)

Maximum network size is limitedby the number of hops

Fig

. 5

9 P

rop

ert

ies

of

RIP

v1

(TI1

33

2EU

02

TI_

00

04

Th

e N

etw

ork

Layer,

81

)

Page 36: ConfigureTwo networks principle

36

RIP CharacteristicsRIP Characteristics

Page 37: ConfigureTwo networks principle

37

200.14.13.0/24200.14.13.0/24

130.24.13.0/24130.24.13.0/24

Router A

Port 2200.14.13.2/24Port 2200.14.13.2/24

Port 1130.24.13.1/24Port 1130.24.13.1/24

130.24.36.0/24130.24.36.0/24

RIP-1: 130.24.36.0 RIP-1: 130.24.36.0

RIP-1: 130.24.0.0

130.24.25.0/24130.24.25.0/24

RIP-1 permits only a Single Subnet Mask

Fig. 60 RIP-1 permits only a single subnet mask (TI1332EU02TI_0004 The Network Layer, 83)

Page 38: ConfigureTwo networks principle

38

Router ConfigurationRouter ConfigurationThe router command starts a routing process.

The network command is required because it enables the routing process to determine which interfaces participate in the sending and receiving of routing updates.

An example of a routing configuration is:

GAD(config)#router ripGAD(config-router)#network 172.16.0.0

The network numbers are based on the network class addresses, not subnet addresses or individual host addresses.

Page 39: ConfigureTwo networks principle

39

Configuring RIP ExampleConfiguring RIP Example

Page 40: ConfigureTwo networks principle

40

Verifying RIP ConfigurationVerifying RIP Configuration

Page 41: ConfigureTwo networks principle

41

The debug ip rip CommandThe debug ip rip CommandMost of the RIP configuration errors involve an incorrect network statement, discontiguous subnets, or split horizons. One highly effective command for finding RIP update issues is the debug ip rip command. The debug ip rip command displays RIP routing updates as they are sent and received.

Page 42: ConfigureTwo networks principle

42

Problem: Routing Problem: Routing LoopsLoops

Routing loops can occur when inconsistent routing tables are not updated due to slow convergence in a changing network.

Page 43: ConfigureTwo networks principle

43

Problem: Counting to Problem: Counting to InfinityInfinity

Page 44: ConfigureTwo networks principle

44

Solution: Define a MaximumSolution: Define a Maximum

Page 45: ConfigureTwo networks principle

45

Solution: Split HorizonSolution: Split Horizon

Page 46: ConfigureTwo networks principle

46

NAT NAT Network Address Network Address TranslatorTranslator

Fig. 3 NAT (TI1332EU02TI_0003 New Address Concepts, 7)

Page 47: ConfigureTwo networks principle

47

New addressing concepts

Problems with IPv4

Shortage of IPv4 addresses

Allocation of the last IPv4 addresses is forecasted for the year 2005

Address classes were replaced by usage of CIDR, but this is not sufficient

Short term solution

NAT: Network Address Translator

Long term solution

IPv6 = IPng (IP next generation)

Provides an extended address range

Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)

Page 48: ConfigureTwo networks principle

48

NAT: Network Address Translator

NAT

Translates between local addresses and public ones

Many private hosts share few global addresses

Public Network

Uses public addresses

Public addresses are globally unique

Private Network

Uses private address range (local addresses)

Local addresses may not be used externally

Fig. 4 How does NAT work? (TI1332EU02TI_0003 New Address Concepts, 9)

Page 49: ConfigureTwo networks principle

49

NAT

To be translated

exclude

reserve pool

exclude

realm with private addresses

NAT Router

realm with public addresses

map

translate

Fig. 5 Translation mechanism (TI1332EU02TI_0003 New Address Concepts, 9)

Page 50: ConfigureTwo networks principle

50

free NATPool

A timeout value (default 15 min) instructs NAT how long to keep an association in an idle state before returning the external IP address to the free NAT pool.

Fig. 8 How does NAT know when to return the public IP address to the pool? (TI1332EU02TI_0003 New Address Concepts, 15)

Page 51: ConfigureTwo networks principle

51

NAT Addressing TermsNAT Addressing TermsInside Local

◦ The term “inside” refers to an address used for a host inside an enterprise. It is the actual IP address assigned to a host in the private enterprise network.

Inside Global◦ NAT uses an inside global address to represent

the inside host as the packet is sent through the outside network, typically the Internet.

◦ A NAT router changes the source IP address of a packet sent by an inside host from an inside local address to an inside global address as the packet goes from the inside to the outside network.

Page 52: ConfigureTwo networks principle

52

NAT Addressing TermsNAT Addressing TermsOutside Global

◦ The term “outside” refers to an address used for a host outside an enterprise, the Internet.

◦ An outside global is the actual IP address assigned to a host that resides in the outside network, typically the Internet.

Outside Local◦ NAT uses an outside local address to represent

the outside host as the packet is sent through the private enterprise network.

◦ A NAT router changes a packet’s destination IP address, sent from an outside global address to an inside host, as the packet goes from the outside to the inside network.

Page 53: ConfigureTwo networks principle

53

SIEMENSNIXDORF

10.47.10.10 192.50.20.5

WAN

Net A

Net B

SIEMENSNIXDORF

LAN LAN192.50.20.0

10.0.0.0

Router Router

RouterRouter

Router

SA =

10.47.10.10

SA =

10.47.10.10DA = 192.50.20.5DA = 192.50.20.5

SA =

193.50.30.4

SA =

193.50.30.4DA = 192.50.20.5DA = 192.50.20.5

Router A with NATRouter A with NAT

Router BRouter B

Fig. 7 An example for NAT (TI1332EU02TI_0003 New Address Concepts, 13)

Page 54: ConfigureTwo networks principle

54

WAN

138.76.29.7

SIEMENSNIXDORF

Net A10.0.0.0/8

Router

Router

Router

SA = 10.0.0.10SA = 10.0.0.10

DA = 138.76.29.7DA = 138.76.29.7

SA = 138.76.28.4SA = 138.76.28.4

DA =138.76.29.7DA =138.76.29.7

NAT withWAN interface:138.76.28.4

NAT withWAN interface:138.76.28.4

SA = 138.76.29.7SA = 138.76.29.7

DA = 138.76.28.4DA = 138.76.28.4

SA = 138.76.29.7SA = 138.76.29.7

DA = 10.0.0.10DA = 10.0.0.10

10.0.0.10

SIEMENSNIXDORF

Fig. 11 An example for NAPT (TI1332EU02TI_0003 New Address Concepts, 21)

Page 55: ConfigureTwo networks principle

55

Types Of NATTypes Of NATThere are different types of NAT

that can be used, which are◦Static NAT◦Dynamic NAT◦Overloading NAT with PAT (NAPT)

Page 56: ConfigureTwo networks principle

56

Static NATStatic NATWith static NAT, the NAT router

simply configures a one-to-one mapping between the private address and the registered address that is used on its behalf.

Page 57: ConfigureTwo networks principle

57

Dynamic NATDynamic NATLike static NAT, the NAT router

creates a one-to-one mapping between an inside local and inside global address and changes the IP addresses in packets as they exit and enter the inside network.

However, the mapping of an inside local address to an inside global address happens dynamically.

Page 58: ConfigureTwo networks principle

58

Dynamic NATDynamic NAT

Dynamic NAT sets up a pool of possible inside global addresses and defines criteria for the set of inside local IP addresses whose traffic should be translated with NAT.

The dynamic entry in the NAT table stays in there as long as traffic flows occasionally.

If a new packet arrives, and it needs a NAT entry, but all the pooled IP addresses are in use, the router simply discards the packet.

Page 59: ConfigureTwo networks principle

59

PATPAT Port Address Port Address TranslatorTranslator

Fig. 9 NAPT (TI1332EU02TI_0003 New Address Concepts, 17)

Page 60: ConfigureTwo networks principle

60

WAN

138.76.29.7

SIEMENSNIXDORF

Net A10.0.0.0/8

Router

Router

Router

SA = 10.0.0.10, sport = 3017SA = 10.0.0.10, sport = 3017

DA = 138.76.29.7, dpor t= 23DA = 138.76.29.7, dpor t= 23

SA = 138.76.28.4, sport =

1024

SA = 138.76.28.4, sport =

1024DA =138.76.29.7, dpor t= 23DA =138.76.29.7, dpor t= 23

NAPT withWAN interface:138.76.28.4

NAPT withWAN interface:138.76.28.4

SA = 138.76.29.7, spor t= 23SA = 138.76.29.7, spor t= 23

DA = 138.76.28.4, dport = 1024DA = 138.76.28.4, dport = 1024

SA = 138.76.29.7, spor t= 23SA = 138.76.29.7, spor t= 23

DA = 10.0.0.10, dport = 3017DA = 10.0.0.10, dport = 3017

10.0.0.10

SIEMENSNIXDORF

Fig. 11 An example for NAPT (TI1332EU02TI_0003 New Address Concepts, 21)

Page 61: ConfigureTwo networks principle

61

WAN private IP network(e.g. SOHO)

registered IP @, assigned TU port #

local IP @,local TU port #

single public IP address

mapping

pool of TU port numbers

PAT with e.g. a single public IP address PAT with e.g. a single public IP address

TU....TCP/UDPFig. 10 NAPT (TI1332EU02TI_0003 New Address Concepts, 19)

Page 62: ConfigureTwo networks principle

62

NAT&PAT NAT&PAT Network Address Network Address Translation &Translation & Port Address Transation Port Address Transation

Fig. 3 NAT (TI1332EU02TI_0003 New Address Concepts, 7)

Page 63: ConfigureTwo networks principle

63

New addressing concepts

Problems with IPv4

Shortage of IPv4 addresses

Allocation of the last IPv4 addresses is forecasted for the year 2006

Address classes were replaced by usage of CIDR, but this is not sufficient

Short term solution

NAT: Network Address Translator

Long term solution

IPv6 = IPng (IP next generation)

Provides an extended address range

Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)

Page 64: ConfigureTwo networks principle

64

NAT: Network Address Translator

NAT

Translates between local addresses and public ones

Many private hosts share few global addresses

Public Network

Uses public addresses

Public addresses are globally unique

Private Network

Uses private address range (local addresses)

Local addresses may not be used externally

Fig. 4 How does NAT work? (TI1332EU02TI_0003 New Address Concepts, 9)

Page 65: ConfigureTwo networks principle

65

NAT

To be translated

exclude

reserve pool

exclude

private addresses

NAT Router

public addresses

map

translate

Fig. 5 Translation mechanism (TI1332EU02TI_0003 New Address Concepts, 9)

Page 66: ConfigureTwo networks principle

66

free NATPool

A timeout value (default 15 min) instructs NAT how long to keep an association in an idle state before returning the external IP address to the free NAT pool.

Fig. 8 How does NAT know when to return the public IP address to the pool? (TI1332EU02TI_0003 New Address Concepts, 15)

Page 67: ConfigureTwo networks principle

67

NAT Addressing TermsNAT Addressing TermsInside Local “Private address”

◦ The term “inside” refers to an address used for a host inside an enterprise. It is the actual IP address assigned to a host in the private enterprise network.

Inside Global “Public address”◦ NAT uses an inside global address to represent

the inside host as the packet is sent through the outside network, typically the WAN.

◦ A NAT router changes the source IP address of a packet sent by an inside host from an inside local address to an inside global address as the packet goes from the inside to the outside network.

Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)

Page 68: ConfigureTwo networks principle

OSPF (Open Shortest Path First) Protocol

© 2003, Cisco Systems, Inc. All rights reserved. 68

Page 69: ConfigureTwo networks principle

69

OSPF is a Link-OSPF is a Link-SState Routing tate Routing ProtocolsProtocols

◦Link-state (LS) routers recognize much more information about the network than their distance-vector counterparts,Consequently LS routers tend to make more accurate decisions.

◦Link-state routers keep track of the following: Their neighbours All routers within the same area Best paths toward a destination

Page 70: ConfigureTwo networks principle

70

Link-Link-SState Data Structurestate Data Structures

◦Neighbor table: Also known as the adjacency database

(list of recognized neighbors)

◦Topology table: Typically referred to as LSDB

(routers and links in the area or network) All routers within an area have an identical LSDB

◦Routing table: Commonly named a forwarding database

(list of best paths to destinations)

Page 71: ConfigureTwo networks principle

71

OSPF vs. RIPOSPF vs. RIPRIP is limited to 15 hops, it converges slowly, and it sometimes chooses slow routes because it ignores critical factors such as bandwidth in route determination. OSPF overcomes these limitations and proves to be a robust and scalable routing protocol suitable for the networks of today.

Page 72: ConfigureTwo networks principle

72

OSPF TerminologyOSPF TerminologyThe next several slides explain various OSPF terms -one per slide.

Page 73: ConfigureTwo networks principle

73

OSPF Term: LinkOSPF Term: Link

Page 74: ConfigureTwo networks principle

74

OSPF Term: Link StateOSPF Term: Link State

Page 75: ConfigureTwo networks principle

75

OSPF Term: AreaOSPF Term: Area

Page 76: ConfigureTwo networks principle

76

OSPF Term: Link CostOSPF Term: Link Cost

Page 77: ConfigureTwo networks principle

77

OSPF Term: Forwarding OSPF Term: Forwarding DatabaseDatabase

Page 78: ConfigureTwo networks principle

78

OSPF Term: Adjacencies OSPF Term: Adjacencies DatabaseDatabase

Page 79: ConfigureTwo networks principle

79

OSPF Terms: DR & BDROSPF Terms: DR & BDR

Page 80: ConfigureTwo networks principle

80

LLink-ink-SStatetate Data Structure Data Structure: : Network HierarchyNetwork Hierarchy

Link-state routing requires a hierachical network structure that is enforced by OSPF.This two-level hierarchy consists of the following: Transit area (backbone or area 0) Regular areas (nonbackbone areas)

Page 81: ConfigureTwo networks principle

81

OSPF Areas

Page 82: ConfigureTwo networks principle

82

Area Terminology

Page 83: ConfigureTwo networks principle

83

LS Data StructureLS Data Structuress: : Adjacency DatabaseAdjacency Database

◦ Routers discover neighbors by exchanging hello packets.

◦ Routers declare neighbors to be up after checking certain parameters or options in the hello packet.

◦ Point-to-point WAN links: Both neighbors become fully adjacent.

◦ LAN links: Neighbors form an adjacency with the DR and BDR. Maintain two-way state with the other routers (DROTHERs).

◦ Routing updates and topology information are only passed between adjacent routers.

Page 84: ConfigureTwo networks principle

84

OSPF Adjacencies

Routers build logical adjacencies between each other using the Hello Protocol. Once an adjacency is formed:

• LS database packets are exchanged to synchronize each other’s LS databases.

• LSAs are flooded reliably throughout the area or network using these adjacencies.

Page 85: ConfigureTwo networks principle

85

Open Shortest Path First Open Shortest Path First CalculationCalculation

Routers find the best paths to destinations by applying Dijkstra’s SPF algorithm to the link-state database as follows:◦ Every router in an area has the identical

link-state database.◦ Each router in the area places itself into

the root of the tree that is built.◦ The best path is calculated with respect to the

lowest total cost of links to a specific destination.◦ Best routes are put into the forwarding database.

Page 86: ConfigureTwo networks principle

86

OSPF Packet Types

Page 87: ConfigureTwo networks principle

87

OSPF Packet Header Format

Page 88: ConfigureTwo networks principle

88

Neighborship

Page 89: ConfigureTwo networks principle

89

Establishing Bidirectional Communication

Page 90: ConfigureTwo networks principle

90

Establishing Bidirectional Communication (Cont.)

Page 91: ConfigureTwo networks principle

91

Establishing Bidirectional Communication (Cont.)

Page 92: ConfigureTwo networks principle

92

Establishing Bidirectional Communication

Page 93: ConfigureTwo networks principle

93

Discovering the Network Routes

Page 94: ConfigureTwo networks principle

94

Discovering the Network Routes

Page 95: ConfigureTwo networks principle

95

Adding the Link-State Entries

Page 96: ConfigureTwo networks principle

96

Adding the Link-State Entries (Cont.)

Page 97: ConfigureTwo networks principle

97

Adding the Link-State Entries

Page 98: ConfigureTwo networks principle

98

Maintaining Routing Information

• Router A notifies all OSPF DRs on 224.0.0.6

Page 99: ConfigureTwo networks principle

99

Maintaining Routing Information (Cont.)

• Router A notifies all OSPF DRs on 224.0.0.6

• DR notifies others on 224.0.0.5

Page 100: ConfigureTwo networks principle

100

Maintaining Routing Information (Cont.)

• Router A notifies all OSPF DRs on 224.0.0.6

• DR notifies others on 224.0.0.5

Page 101: ConfigureTwo networks principle

101

Maintaining Routing Information

• Router A notifies all OSPF DRs on 224.0.0.6

• DR notifies others on 224.0.0.5

Page 102: ConfigureTwo networks principle

102

router ospf process-id router ospf process-id

Router(config)#

•Turns on one or more OSPF routing processes in the IOS software.

Configuring Basic OSPF: Configuring Basic OSPF: Single AreaSingle Area

network address inverse-mask area [area-id]network address inverse-mask area [area-id]

Router(config-router)#

•Router OSPF subordinate command that defines the interfaces (by network number) that OSPF will run on. Each network number must be defined to a specific area.

Page 103: ConfigureTwo networks principle

103

Configuring OSPF on Internal Routers of a Single Area

Page 104: ConfigureTwo networks principle

104

show ip protocols show ip protocols

Router#

• Verifies the configured IP routing protocol processes, parameters and statistics

Verifying OSPF OperationVerifying OSPF Operation

show ip route ospfshow ip route ospf

Router#

•Displays all OSPF routes learned by the router

show ip ospf interface show ip ospf interface

Router#

•Displays the OSPF router ID, area ID and adjacency information

Page 105: ConfigureTwo networks principle

105

show ip ospf show ip ospf

Router#

•Displays the OSPF router ID, timers, and statistics

Verifying OSPF Operation Verifying OSPF Operation (Cont.)(Cont.)

show ip ospf neighbor [detail]show ip ospf neighbor [detail]

Router#

•Displays information about the OSPF neighbors, including Designated Router (DR) and Backup Designated Router (BDR) information on broadcast networks

Page 106: ConfigureTwo networks principle

106

The show ip route ospf The show ip route ospf CommandCommand

RouterA# show ip route ospf

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,

B - BGP, D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP, i - IS-IS, L1 - IS-ISlevel-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is not set10.0.0.0 255.255.255.0 is subnetted, 2 subnets

O 10.2.1.0 [110/10] via 10.64.0.2, 00:00:50, Ethernet0

Page 107: ConfigureTwo networks principle

107

The show ip ospf interface The show ip ospf interface CommandCommand

RouterA# show ip ospf interface e0

Ethernet0 is up, line protocol is up Internet Address 10.64.0.1/24, Area 0 Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DROTHER, Priority 1 Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2 Backup Designated router (ID) 10.64.0.1, Interface address 10.64.0.1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 10.64.0.2 (Designated Router) Suppress hello for 0 neighbor(s)

Page 108: ConfigureTwo networks principle

108

The show ip ospf neighbor The show ip ospf neighbor CommandCommandRouterB# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface10.64.1.1 1 FULL/BDR 00:00:31 10.64.1.1 Ethernet010.2.1.1 1 FULL/- 00:00:38 10.2.1.1 Serial0

Page 109: ConfigureTwo networks principle

109

show ip protocolshow ip protocol

show ip route

Page 110: ConfigureTwo networks principle

110

show ip ospf neighbor detailshow ip ospf neighbor detail

show ip ospf database

Page 111: ConfigureTwo networks principle

111

OSPF Network Types - 1OSPF Network Types - 1

Page 112: ConfigureTwo networks principle

112

Point-to-Point Links

• Usually a serial interface running either PPP or HDLC

• May also be a point-to-point subinterface running Frame Relay or ATM

• No DR or BDR election required

• OSPF autodetects this interface type

• OSPF packets are sent using multicast 224.0.0.5

Page 113: ConfigureTwo networks principle

113

Multi-access Broadcast Network

• Generally LAN technologies like Ethernet and Token Ring

• DR and BDR selection required

• All neighbor routers form full adjacencies with the DR and BDR only

• Packets to the DR use 224.0.0.6

• Packets from DR to all other routers use 224.0.0.5

Page 114: ConfigureTwo networks principle

114

Electing the DR and BDR

• Hello packets are exchanged via IP multicast.

• The router with the highest OSPF priority is selected as the DR.

• Use the OSPF router ID as the tie breaker.

• The DR election is nonpreemptive.

Page 115: ConfigureTwo networks principle

115

Setting Priority for DR ElectionSetting Priority for DR Election

ip ospf priority numberip ospf priority number

•This interface configuration command assigns the OSPF priority to an interface.

•Different interfaces on a router may be assigned different values.

•The default priority is 1. The range is from 0 to 255.

•0 means the router is a DROTHER; it can’t be the DR or BDR.

Router(config-if)#

Page 116: ConfigureTwo networks principle

116

OSPF Network Types - 2OSPF Network Types - 2

Page 117: ConfigureTwo networks principle

117

Creation of Adjacencies Creation of Adjacencies

RouterA# debug ip ospf adj

Point-to-point interfaces coming up: No election%LINK-3-UPDOWN: Interface Serial1, changed state to upOSPF: Interface Serial1 going UpOSPF: Rcv hello from 192.168.0.11 area 0 from Serial1 10.1.1.2OSPF: End of hello processingOSPF: Build router LSA for area 0, router ID 192.168.0.10OSPF: Rcv DBD from 192.168.0.11 on Serial1 seq 0x20C4 opt 0x2 flag 0x7 len 32 state INITOSPF: 2 Way Communication to 192.168.0.11 on Serial1, state 2WAYOSPF: Send DBD to 192.168.0.11 on Serial1 seq 0x167F opt 0x2 flag 0x7 len 32OSPF: NBR Negotiation Done. We are the SLAVEOSPF: Send DBD to 192.168.0.11 on Serial1 seq 0x20C4 opt 0x2 flag 0x2 len 72

Page 118: ConfigureTwo networks principle

118

Creation of Adjacencies (Cont.)Creation of Adjacencies (Cont.)

RouterA# debug ip ospf adj

Ethernet interface coming up: ElectionOSPF: 2 Way Communication to 192.168.0.10 on Ethernet0, state 2WAYOSPF: end of Wait on interface Ethernet0OSPF: DR/BDR election on Ethernet0OSPF: Elect BDR 192.168.0.12OSPF: Elect DR 192.168.0.12 DR: 192.168.0.12 (Id) BDR: 192.168.0.12 (Id)OSPF: Send DBD to 192.168.0.12 on Ethernet0 seq 0x546 opt 0x2 flag 0x7 len 32<…>OSPF: DR/BDR election on Ethernet0OSPF: Elect BDR 192.168.0.11OSPF: Elect DR 192.168.0.12 DR: 192.168.0.12 (Id) BDR: 192.168.0.11 (Id)