Вы находитесь на странице: 1из 241

IP and Networking Basics

Outline
• Origins of TCP/IP
• OSI Stack & TCP/IP Architecture
• Client Server Architecture
• IP Addressing & Numbering Rules
• IP Forwarding and default route
• Network Troubleshooting Tools
Origins of TCP/IP
• 1950’s – 1960’s – US Govt.
requirement for “rugged” network
that would continue to work in
case of a nuclear attack
• RAND Corporation (America’s
leading think thank) & DoD
formed ARPA (Advanced
Research Project Agency)
• 1968 – ARPA engineers proposed
Distributed network design for
ARPANET Network
Distributed Network Design

• Pre-ARPANET networks
– “connection oriented”
– Management & control was
centralized
• “New” Network – ARPANET
– Connectionless
– Decentralised
• Modern Internet has evolved from
the ARPANET
Simplified view of the Internet
Internetworks

• Start with lots of little networks


• Many different types
– Ethernet, dedicated leased lines, dialup,
ATM, Frame Relay, FDDI
• Each type has its own idea of
addressing and protocols
• Want to connect them all together and
provide a unified view of the whole lot
(i.e. act as a single large network)
A small internetwork or “Internet”
The unifying effect of the network
layer
• Define a protocol that works in the same way
with any underlying network
• Call it the network layer (IP)
• IP routers operate at the network layer
• There are defined ways of using:
• IP over Ethernet
• IP over ATM
• IP over FDDI
• IP over serial lines (PPP)
• IP over almost anything
OSI Stack & TCP/IP Architecture
What is TCP/IP?

• In simple terms is a language that enables


communication between computers
• A set of rules (protocol) that defines how two
computers address each other and send data to
each other
• Is a suite of protocols named after the two most
important protocols TCP and IP but includes
other protocols such as UDP, RTP, etc
Open Systems & TCP/IP

• TCP/IP formed from standardized communications


procedures that were platform independent and open
• Open systems
– open architecture - readily available to all
• What is open system networking?
– network based on well known and standardized protocols
– standards readily available
– networking open systems using a network protocol
OSI - Layered Model Concept

• Divide-and-conquer approach
• Dividing requirements into groups, e.g
transporting of data, packaging of messages,
end user applications
• Each group can be referred to as a layer
– Upper layers are logically closer to the user and deal
with more abstract data, relying on lower layer
protocols to translate data into forms that can
eventually be physically transmitted.
• Open Systems Interconnection Reference Model
(OSI-RM) adopted as a standard for networking
OSI Model
OSI Model

7 Application
APPLICATION
6 Presentation • Upper Layers
• Application oriented
5 Session • Independent of layers below

4 Transport
3 TRANSPORT
Network • Lower Layers
• Transmission of data
2 Data Link • No differentiation of upper layers

1 Physical
Layers 7, 6, 5

• 7: Application layer
– Provides different services to the applications
– Uses the underlying layers to carry out work
• e.g. SMTP (mail), HTTP (web), Telnet, FTP, DNS
• 6: Presentation layer
– Converts data from applications into common format
and vice versa
• 5: Session layer
– organizes and synchronizes the exchange of data
between application processes
Layer 4

• 4: Transport layer
– Provides end to end transportation of segments
– E.g. TCP
• encapsulates TCP segments in network layer packets
• adds reliability by detecting and retransmitting lost packets
• uses acknowledgements and sequence numbers to keep track
of successful, out-of-order, and lost packets
• timers help differentiate between loss and delay
– UDP is much simpler: no reliability features
Layer 3

• 3: Network layer
– Routes the information in the
network
– E.g. IP is a network layer
implementation which defines
addresses in such a way that route
selection can be determined.
• Single address space for the entire
internetwork
• adds an additional layer of addressing,
e.g. IP address, which is different from
MAC address.
Layer 3

• 3: Network layer (e.g. IP)


– Unreliable (best effort)
• if packet gets lost, network layer doesn’t care
for higher layers can resend lost packets
– Forwards packets hop by hop
• encapsulates network layer packet inside
data link layer frame
• different framing on different underlying
network types
• receive from one link, forward to another link
• There can be many hops from source to
destination
Layer 3

• 3: Network layer (e.g. IP)


– Makes routing decisions
• how can the packet be sent closer to
its destination?
• forwarding and routing tables
embody “knowledge” of network
topology
• routers can talk to each other to
exchange information about network
topology
Layer 2

• 2: Data Link layer


– Provides reliable transit of data across a physical network
link
– bundles bits into frames and moves frames between hosts
on the same link
– a frame has a definite start, end, size
– often also a definite source and destination link-layer
address (e.g. Ethernet MAC address)
– some link layers detect corrupted frames while other layers
re-send corrupted frames (NOT Ethernet)
Layer 1

• 1: Physical layer
– moves bits using voltage, light,
radio, etc.
– no concept of bytes or frames
– bits are defined by voltage levels,
or similar physical properties

1101001000
OSI and TCP/IP

7 Application
Mail, Web, etc.
6
Presentation Application
5 Session
4 TCP/UDP – end to end
Transport Transport reliability

3 Network Network IP - Forwarding (best-effort)

2 Data Link Data Link & Framing, delivery

1 Physical Physical Raw signal

OSI TCP/IP
TCP/IP Layer Model
Protocol Layers:
The TCP/IP Hourglass Model

Application layer
SMTP HTTP Audio Video
FTP Telnet DNS

TCP UDP RTP Transport layer


IP Network layer
Data link layer
Ether Token Frame HDLC
ATM X.25 PPP Relay
net Ring
Layer Interaction

Application, Presentation and Session


protocols are end-to-end
Transport protocol is end-to-end
– encapsulation/decapsulation over network protocol
on end systems
Network protocol is throughout the
internetwork
– encapsulation/decapsulation over data link protocol
at each hop
– Link and physical layers may be different on
each hop
Layer Interaction:
OSI 7-Layer Model

Application Application

End Presentation Presentation


to Session Session
end Transport Transport
Network Network Network Network
Ho
Link Link Link Link Link Link
p
by Physical Physical Physical
hop Router
Host Router Host
Layer Interaction:
TCP/IP Model

No session or presentation layers in TCP/IP


End model
to Application Application
end TCP or UDP TCP or UDP
IP IP IP IP
Ho
Link Link Link Link Link Link
p
by Physical Physical Physical
hop
Host Router Router Host
Encapsulation & Decapsulation
• Lower layers add headers (and sometimes
trailers) to data from higher layers

Application
Data
Transport Header Transport Layer Data
Header Header Data
Network
Network Header Network Layer Data

Data Link Header Link Layer Data Trailer


Data Link Header Header Header Data Trailer
Frame, Datagram, Segment, Packet

• Different names for packets at


different layers
– Ethernet (link layer) frame
– IP (network layer) datagram
– TCP (transport layer) segment
• Terminology is not strictly
followed
– we often just use the term “packet”
at any layer
Layer 2 - Ethernet frame
Preamble Dest Source Length Type Data CRC
6 bytes 6 bytes 2 2 46 to 1500 4 bytes
bytes bytes bytes

 Destination and source are 48-bit MAC


addresses
 Type 0x0800 means that the data portion
of the Ethernet frame contains an IP
datagram. Type 0x0806 for ARP.
Layer 3 - IP datagram
Versio IHL Type of Total Length
n Service
Identification Flags Fragment Offset
Time to Live Protocol Header Checksum
Source Address
Destination Address
Options Padding
Data
 Version = 4
 Protocol = 6 means
 If no options, IHL = 5 data portion contains a
 Source and Destination TCP segment. Protocol
are 32-bit IP addresses = 17 means UDP.
Layer 4 - TCP segment
Source Port Destination Port
Sequence Number
Acknowledgement Number
Data Reserved U A E R S F Window
Offset R C OS YI
GKL T NN

Checksum Urgent Pointer


Options Padding
Data
• Source and Destination are 16-bit TCP port numbers (IP
addresses are implied by the IP header)
• If no options, Data Offset = 5 (which means 20 octets)
Client Server Architecture

• simple example layer 7 protocol: HTTP


• Client makes requests, Server serves requests –
e.g HTTP for transferring “websites”. This is the
easiest way to provide services on demand and
provides a means of sharing resources more
effectively.
• Example: Mimicking the browser with telnet
(client) talking to a web server (server)
– telnet www.google.com 80
– GET / HTTP/1.1
– Host: www.google.com
IP Addressing
Purpose of an IP address

• Unique Identification of
– Source
Sometimes used for security or
policy-based filtering of data
– Destination
So the networks know where to
send the data
• Network Independent Format
– IP over anything
Purpose of an IP Address

• Identifies a machine’s connection to a


network
• Physically moving a machine from one
network to another requires changing the
IP address
• TCP/IP uses unique 32-bit addresses
Basic Structure of an IP Address

32 bit number (4 octet number):


(e.g. 133.27.162.125)
Decimal Representation:
133 27 162 125
Binary Representation:
100001 000110 101000 011111
01 11 10 01
Hexadecimal Representation:
85 1B A2 7D
IP Address Allocation

• Private IP address ranges:


– 10/8 (10.0.0.0 – 10.255.255.255)
– 192.168/16 (192.168.0.0 – 192.168.255.255)
– 172.16/12 (172.16.0.0 – 172.31.255.255)
• Public IP address space
– Assigned by an appropriate authority such as RIPE, ARIN,
AFRINIC, etc. or Local Internet Registries (LIRs)
– Public Address space for the Africa Region available from
AfriNIC
• Choose a small block from whatever range you have,
and subnet your networks (to avoid problems with
broadcasts)
Addressing in Internetworks

• The problem we have


– More than one physical network
– Different Locations
– Larger number of computers
• Need structure in IP addresses
– network part identifies which
network in the internetwork (e.g. the
Internet)
– host part identifies host on that
network
Address Structure Revisited

• Hierarchical Division in IP
Address:
– Network Part (Prefix)
• describes which physical network
– Host Part (Host Address)
• describes which host on that network

205 . 154 . 8 1
11001101 10011010 00001000
00000001Network Host
– Boundary can be anywhere
• very often NOT at a multiple of 8 bits
Network Masks

• Network Masks help define which bits


are used to describe the Network Part
and which for hosts
• Different Representations:
– decimal dot notation: 255.255.224.0
– binary: 11111111 11111111 11100000 00000000
– hexadecimal: 0xFFFFE000
– number of network bits: /19
• Binary AND of 32 bit IP address with
32 bit netmask yields network part of
address
Classless Addressing

• IP address with the subnet mask defines


the range of addresses in the block
– E.g 10.1.1.32/28 (subnet mask
255.255.255.240) defines the range 10.1.1.32
to 10.1.1.47
– 10.1.1.32 is the network address
– 10.1.1.47 is the broadcast address
– 10.1.1.33 ->46 assignable addresses
Forwarding

• Computers can only send packets directly to


other computers on their subnet
• If the destination computer is not on the same
subnet, packets are sent via a “gateway”
• defaultrouter option in /etc/rc.conf sets the
default gateway for this system.
• IP forwarding on a FreeBSD box
– turned on with the gateway_enable option in
/etc/rc.conf otherwise the box will not forward packets
from one interface to another.
How DNS fits

• Computers use IP Addresses but Humans


find names easier to remember
• DNS provides a mapping of IP Addresses
to names and vice versa
• Computers may be moved between
networks, in which case their IP address
will change BUT their names can remain
the same
Network Troubleshooting Tools

• ping
• traceroute
• tcpdump
Virtual LANs
VLAN introduction

VLANs logically segment switched


networks based on the functions, project
teams, or applications of the organization
regardless of the physical location or
connections to the network.
All workstations and servers used by a
particular workgroup share the same
VLAN, regardless of the physical
connection or location.
VLAN introduction

A workstation in a VLAN group is


restricted to communicating with file
servers in the same VLAN group.
VLAN introduction
VLANs function by logically
segmenting the network into different
broadcast domains so that packets
are only switched between ports that
are designated for the same VLAN.

Routers in VLAN
topologies
provide
broadcast
filtering, security,
and traffic flow
management.
VLAN introduction

VLANs address scalability, security, and


network management.
Switches may not bridge any traffic
between VLANs, as this would violate the
integrity of the VLAN broadcast domain.
Traffic should only be routed between
VLANs.
Broadcast domains with VLANs and routers

A VLAN is a broadcast domain


created by one or more switches.
Broadcast domains with VLANs and routers

Layer 3 routing allows the router to


send packets to the three different
broadcast domains.
Broadcast domains with VLANs and routers

Implementing VLANs on a switch causes the


following to occur:
 The switch maintains a separate bridging table for each
VLAN.
 If the frame comes in on a port in VLAN 1, the switch
searches the bridging table for VLAN 1.
 When the frame is received, the switch adds the source
address to the bridging table if it is currently unknown.
 The destination is checked so a forwarding decision can
be made.
 For learning and forwarding the search is made against
the address table for that VLAN only.
VLAN operation

Each switch port could be


assigned to a different VLAN.
Ports assigned to the same
VLAN share broadcasts.
Ports that do not belong to that
VLAN do not share these
broadcasts.
VLAN operation
Users attached to the same shared segment, share the
bandwidth of that segment.
Each additional user attached to the shared medium
means less bandwidth and deterioration of network
performance.
VLANs offer more bandwidth to users than a shared
network.
The default VLAN for every port in the switch is the
management VLAN.
The management VLAN is always VLAN 1 and may not
be deleted. All other ports on the switch may be
reassigned to alternate VLANs.
VLAN operation

Dynamic VLANs allow for


membership based on the
MAC address of the device
connected to the switch port.
As a device enters the
network, it queries a database
within the switch for a VLAN
membership.
VLAN operation
In port-based or port-centric VLAN membership, the port is assigned
to a specific VLAN membership independent of the user or system
attached to the port.

All users of the same port must be in the


same VLAN.
VLAN operation

Network administrators are responsible for configuring


VLANs both manually and statically.
Benefits of VLANs

The key benefit of VLANs is


that they permit the network
administrator to organize the
LAN logically instead of
physically.
VLAN types
There are three basic VLAN
memberships for determining and
controlling how a packet gets
assigned: -
 Port-based VLANs
 MAC address based
 Protocol based VLANs
The frame headers are encapsulated
or modified to reflect a VLAN ID
before the frame is sent over the link
between switches.
Before forwarding to the destination
device, the frame header is changed
back to the original format.
VLAN types

Port-based VLANs
MAC address based VLANs
Protocol based VLANs
Membership by Port
Membership by MAC-Addresses
VLAN types

The number of VLANs in a switch vary


depending on several factors:
Traffic patterns
Types of applications
Network management needs
Group commonality
VLAN types
An important consideration in
defining the size of the switch and
the number of VLANs is the IP
addressing scheme.
Because a one-to-one
correspondence between VLANs
and IP subnets is strongly
recommended, there can be no
more than 254 devices in any one
VLAN.
It is further recommended that
VLANs should not extend outside
of the Layer 2 domain of the
distribution switch.
VLAN types
There are two major methods of frame tagging, Inter-Switch
Link (ISL) and 802.1Q.
ISL used to be the most common, but is now being replaced
by 802.1Q frame tagging.
Introduction to IP Routing
Routing

• How do packets get from A to B in the


Internet?

Internet
A B
Connectionless Forwarding

• Each router (switch) makes a LOCAL


decision to forward the packet towards B
R1 R4

R7

R6

R2
A B
R8

R3
R5
Connectionless Forwarding

• This is termed destination-based


connectionless forwarding
• How does each router know the correct
local forwarding decision for any possible
destination address?
– Through knowledge of the topology state of
the network
– This knowledge is maintained by a routing
protocol
Routing Protocols

• Distribute the knowledge of the current


topology state of the network to all routers
• This knowledge is used by each router to
generate a forwarding table, which
contains the local switching decision for
each known destination address
Routing Protocols

• correct operation of the routing state of a


network is essential for the management
of a quality network service
– accuracy of the routing information
– dynamic adjustment of the routing information
– matching aggregate traffic flow to network
capacity
ISP Routing Tasks

• customers
• internal
• peer / upstream
Exterior routing

Interior routing

Customer routing
Interior Routing

• discovers the topology of a network


through the operation of a distributed
routing protocol
Path Selection

R1 R4
5
R7
40
45
5
5
6
10 R6

20
R2
A B
10 15
R8

4 10

R3
R5 10
5

Minimum cost from A to B is 39 units


Dynamic Path Adjustment

R1 R4
5
R7
40
45
5
5
6
10 R6

20
R2
A B
10 15
R8

R3
R5 10
5

If R5 – R7 breaks, minimum cost path from A to B is


Now 46 units
Interior Routing Protocols

• describe the current network topology


• Routing protocols distribute how to reach
address prefix groups
• Routing protocols function through either
– distributed computing model (distance vector)
– parallel computing model (link state)
Routing Protocols

• Distance Vector Routing Protocols


– Each node sends its routing table (dest,
distance) to all neighbors every 30 seconds
– Lower distances are updated with the
neighbor as next hop
– cannot scale
– cannot resolve routing loops quickly

– RIP is the main offender


Routing Protocols

• Link State Routing Protocols


– Each link, the connected nodes and the
metric is flooded to all routers
– Each link up/down status change is
incrementally flooded
– Each router re-computes the routing table in
parallel using the common link state database

– OSPF is the main protocol in use today


Suggestions

• Just engineering a physical link does not


ensure that traffic will flow
– some system somewhere must provide
routing information about how to reach the
newly connected network
• Installing backup circuits is easy, making
the routing work may not be
Suggestions

• need a clear understanding of how the


client networks want their traffic to flow
before you can start making routing
configuration changes
Interior and Exterior Routing Protocols

Interior
Interior RouteAS1221
AS1
Route Space
Space

Interior
Route AS3561
Exterior Routing Space Space

Interior
Route AS2402
Space
Interior
Route AS701
Space
Exterior Routing Protocols

• You tell me all the address prefixes you can


reach, but don’t tell me the path you use to get
there
– I’ll tell you the same
• If anything changes, please let me know
• If you tell me an address I’ll send you traffic
destined to that address.
– If I tell you an address I will accept traffic destined to
that address
Exterior Routing Protocols

• Border Gateway Protocol version 4


(BGP4)
• Each interior route collection is described
by an Autonomous System (AS) number
• Internal topology is hidden
• Routes are announced with associated AS
value
– 139.130.0.0/16 + AS 1221
BGP example

AS 1221 AS 3561

139.130.0.0/16
148.10.0.0/16
203.10.60.0/24
24.192.36.0/24
202.23.45.0/23
148.10.0.0/16 3561
24.192.36.0/24 3561
139.130.0.0/16 1221
202.23.45.0/23 3561
203.10.60.0/24 1221
BGP Example of TRANSIT

AS 3561
AS 1221

139.130.0.0/16 i 148.10.0.0/16 i
203.10.60.0/24 I 24.192.36.0/24 i
AS 5727
202.23.45.0/23 i
148.10.0.0/16 3561
24.192.36.0/24 3561 210.10.0.0/16 5727
202.23.45.0/23 3561 130.1.0.0/16 5727
210.10.0.0/16 i
210.10.0.0/16 3561,5727
139.1.0.0/16 3561,5727 139.130.0.0/16 1221 130.1.0.0/16 I
203.10.60.0/24 1221
148.10.0.0/16 3561
24.192.36.0/24 3561
202.23.45.0/23 3561

139.130.0.0/16 3561,1221
203.10.60.0/24 3561,1221
Exterior Routing Protocols

• Internal transit paths use I-BGP

A AS 3561
B
AS 1221
AS 5727

Q: How does router A tell router B about AS1221 addresses?


A: Router A sets un an INTERIOR BGP session with router B
Exterior Routing Protocols

AS 1221
AS 1
I-BGP

E-BGP AS3561

AS 2402

AS 701
Exterior Routing Protocols

• Normally chose minimal AS


path length

203.10.60.0/24 701,3561,1221
203.10.60.0/24 5727,1221

Selected path is via peer session to AS 5727 as this


Is 1 AS shorter that the other path
Exterior POLICY

• How can I share the traffic load between 2 or


moreexterior providers?
• How can I create a backup link to support my
main exterior link?

• You can bias minimal path selection by AS path


filter lists or community attributes or local
preferences
Exterior Routing Protocols plus Policy

AS 1221
AS 1
Accept AS paths
1221
2402
AS 3561
1221,3561
2402,701

AS 2402
AS 701
Exterior Routing Protocols plus Policy

• policy settings control


– what you advertise to your immediate peers
– What you accept from your immediate peers
– What transits you will accept (send traffic)
• you cannot control
– transit path of received traffic
– symmetry of transit policy
Basic Elements of OSPF
OSPF

• Open Shortest • Variable length


Path First netmasks
• Link State or SPF • Non-contiguous
technology subnets
• Developed by the • No need for periodic
IETF’s OSPF updates
working group • Route authentication
(RFC 1247) • OSPF is defined in
• Designed for RFC2328
TCP/IP
• Fast Convergence
Link-State
Z’s Link-state
Q’s Link-state
Z

A Q 2
B Z 13
Q Y
C X 13

Topology information is
stored in a DB separate
X from the routing table
X’s Link-state
Link-State Routing

• Neighbor discovery
• Construct a Link State Packet (LSP)
• Distribute the LSP
– Link State Announcement – LSA
• Route calculation
• If a link fails
– Flood new LSPs
– All routers recalculate their routing tables
Low Bandwidth Utilization

FDDI
Dual Ring
LSA

X R1

LSA

• Only propagate changes


• Use Multicast in multi-access networks
Using the Optimal Path
The optimal path is determined by
adding the costs of the interfaces :
Cost = 10^8/(Bandwidth)
Cost = 1 Cost = 1

FDDI FDDI N3
N2 Dual Ring Dual Ring

R2

R3

N1 R1 N5
Cost = 10
R4

N4 Cost = 10
Fast Convergence
• Detection plus LSA/SPF

R2

Alternate Path

N1
R1
X R3
N2

Primary Path
Fast Convergence

• Finding a new path


– Flood LSAs in the area
– Based in LSA
acknowledgements (Ack)
– Synchronized topology
N1
R1
X
DB
– Each router calculates its
routing table for each
destination network
Uses IP Multicast to Send/Receive changes

• Multi-Access networks
– All routers must accept packets sent to the
AllSPFRouters (224.0.0.5) address
– All DR and BDR routers must accept packets
sent to the AllDRouters (224.0.0.6) address
• Hello packets are sent to the
AllSPFRouters address (Unicast for
point-to-point and virtual links)
OSPF Areas

• Group of contiguous
nodes/networks
• Per area topology DB
– Invisible outside the Area 2 Area 3
area
– Reduces routing traffic Area 0
• Backbone Area is Backbone Area
contiguous
– All others areas must
connect to the
backbone
• Virtual Links
Area 1
Area 4
Router Classification

IR

Area 2 Area 3

ABR/BR
Area 0
• Internal Router (IR)
IR/BR • Area Border Router
ASBR (ABR)
• Backbone Router
To another AS (BR)
Area 1 • Autonomous
System Border
Router (ASBR)
OSPF Route Types

Area 2 Area 0 Area 3

ABR Intra-Area Route


– All routes within an area

ASBR Inter-Area Route


– Routes announced from
To Another AS area to another by an
ABR

External Route
– Routes imported into
OSPF from another
protocol or Static routes
Inter-Area Route Summarization

• Prefix or all subnets


• Prefix or all R2
networks
• ‘Area range’
command FDDI Backbone
Dual Ring
Area 0

With Summarization Network Next Hop R1 (ABR)


1 R1
Area 1
Without Network Next Hop
Summarization 1.A R1
1.A 1.B 1.C
1.B R1
1.C R1
External Routes

• Redistributed into OSPF


• Flooded without changes throughout the AS
• OSPF supports two type of external metrics
– Type 1
– Type 2 (Default)

RIP
IGRP
EIGRP
OSPF BGP
etc.
Redistribute
External Routes

• Type 1 external metric: metrics


are added to the internal link cost
To N1
External Cost = 1
Cost = 10
R1
To N1
R2 External Cost = 2

Cost = 8

R3
Network Type 1 Next Hop
N1 11 R2
Selected
N1 10 R3
Route
External Routes
• Type 2 external metric: metrics are
compared without adding the internal link
cost To N1
External Cost = 1
Cost = 10
R1
To N1
R2 External Cost = 2

Cost = 8

R3
Network Type 2 Next Hop
N1 1 R2 Selected Route
N1 2 R3
Topology/Links-State DB

• A router has a separate DB for each


area it belongs
• All routers within an area have an
identical DB
• SPF calculation is done separately for
each area
• LSA flooding is limited to the particular
area
Protocol Functionality

• Bringing up adjacencies
• LSA Types
• Area Classification
The Hello Protocol

• Responsible to establish and


maintain neighbor relationships
• Elects designated router in multi-
access networks

Hello

FDDI
Dual Ring
Hello Hello
The Hello Packet

• Router Priority
• Hello Interval
Hello
• Router dead
interval FDDI
• Network mask Hello
Dual Ring
Hello
• Options: T-bit, E-
bit
• List of neighbors
Designated Router (DR)
 One per multi-access network
Generates network links
advertisements
Assists in DB synchronization
Backup
Designated Designated
Router Router

Designated Backup
Router Designated
Router
Designated Router by Priority
• Configured priority (per interface)
• Otherwise determined by the highest
router ID
– The router ID is the loopback interface
address, in configured otherwise is the
highest IP address

131.108.3.2 131.108.3.3

DR

R1 Router ID = 144.254.3.5 R2 Router ID = 131.108.3.3

144.254.3.5
Neighbor States

• 2-way
– The router sees itself in other Hello packets
– DR is selected from neighbors in state 2-
way or greater
2-way

DR BDR
Neighbor States

• Full
– Routers are fully
adjacent
– DB is synchronized
– Relationship to the
DR and BDR Full

DR BDR
When to Become Adjacent

• Underlying network is point-to-point


• Underlying network type is virtual link
• The router itself is the DR
• The router itself is the BDR
• The neighboring router is the DR
• The neighboring router is the BDR
LSAs Propagate Along Adjacencies

DR BDR

• LSAs acknowledged along


adjacencies
Routing Protocol Packets

• Share a common protocol header


• Routing protocol packets are sent with
a TOS of 0
• Five types of OSPF routing protocol
packets
– Hello – packet type 1
– DB Description – packet type 2
– Link-state request – packet type 3
– Link-state update – packet type 4
– Link-state Acknowledgment – packet type 5
Different Types of LSAs

• Five LSA types


– Type 1 : Router LSA
– Type 2 : Network LSA
– Type 3 y 4: Summary LSA
– Type 5 y 7: External LSA
Introduction to
ISIS

121
IS-IS Standards History
 ISO 10589 specification that defines IS-IS as an OSI
routing protocol for CLNS traffic
 A Link State protocol with a 2 level hierarchical architecture
 With Type/Length/Value (TLV) options for protocol
enhancements
 The RFC 1195 added Support for IP
 Thus Integrated IS-IS
 I/IS-IS runs on top of the Data Link Layer or rather L2
 Requires CLNP (Connectionless Network Protocol) to be
configured
 RFC5308 adds IPv6 address family support to IS-IS
 RFC5120 defines Multi-Topology concept for IS-IS
 Permits IPv4 and IPv6 topologies which are not identical

122
ISIS Levels

 ISIS has a 2 layer hierarchy;


 Level-1 (the areas)
 Level-1 (the backbone)

 A router can be either;


 Level-1 (L1) router
 Level-2 (L2) router
 Level-1-2 (L1L2) router

123
ISIS Levels

 Level-1 router
 Has neighbours only on the same area
 Has a level-1 LSDB with all routing information
for the area
 Level-2 router
 May have neighbours in the same or other
areas
 Has a Level-2 LSDB with all routing
information about inter-area
 Level-1-2 router
 May have neighbours on any area.
 Has two separate LSDBs: level-1 LSDB &
level-2 LSDB
124
Backbone & Areas
 ISIS does not have a backbone area as such
(like OSPF typical area 0)
 Instead the backbone is the contiguous
collection of Level-2 capable routers
 ISIS area borders are on the wire or rather
links and not routers
 Each router is identified with a unique
Network Entity Title (NET)
 NET is a Network Service Access Point (NSAP)
where the n-selector is 0
 (Compare with each router having a unique
Router-ID with IP routing protocols)
125
L1, L2, and L1L2 Routers

Area-3
L1-only
L1L
2
Area-2 L2-only
L1L
L1L 2
L1-only
2
Area-4
L1L L1-only
Area-1 2
L1L
2
L1-only
126
NSAP and Addressing

 NSAP: Network Service Access Point


 Total length between 8 and 20 bytes
 Area Address: variable length field (up to 13
bytes)
 System ID: defines either an ES or IS in an area.
 NSEL: N-selector. identifies a network service
 NET: The address of the network entity itself
• Example 47.0001.aaaa.bbbb.cccc.00 Where,
– Area Address = 47.0001
– SysID = aaaa.bbbb.cccc
– Nsel = 00 127
Typical NSAP Addressing

49.0f01.0002.4444.4444 Area 3
.4444.00
49.0f01.0003.6666.6666
.6666.00
Area 2
49.0f01.0002.3333.3333.
3333.00

49.0f01.0004.7777.7777. Area 4
7777.00

49.0f01.0001.2222.2222.
2222.00 49.0f01.0004.8888.8888.
Area 1 8888.00

49.0f01.0001.1111.1111.1
111.00 128
Addressing Common Practices
 ISP's typically choose NSAP
addresses thus:
 First 8 bits – pick a number (usually
49)
 Next 16 bits – area
 Next 48 bits – router loopback address
(BCP)
 Final 8 bits – zero
 Example:
 NSAP: 49.0001.1921.6800.1001.00
 Router: 192.168.1.1 (loopback) in Area
1
129
Addressing & Design Practices
 ISPs typically use one area (eg.49.0001)
 Multiple areas only come into consideration
once the network is several hundred routers
big
 NET begins with 49
 “Private” address range
 All routers are in L2 only (Core Network)
 Note: Cisco IOS defaults to L1L2
 Set L2 under ISIS router configuration (can
also be done per interface)

130
Adjacencies – Hello PDU (IIS)
 Hello Protocol Data Units (PDUs) are exchanged
between routers.
 Typically to establish and maintain adjacencies
between IS's.

ISIS adjacency through IIH

 IS-IS area addresses are also exchanged in


this IIH PDUs.
 A PDU is an IS-IS equivalent of a packet

131
Link State PDU (LSP)

 Each router creates an LSP and floods it


to neighbours
 A level-1 router will create level-1 LSP(s)
 A level-2 router will create level-2 LSP(s)
 A level-1-2 router will create
 Independent level-1 LSP(s) and
 Independent level-2 LSP(s)

132
The ISIS LSP
 LSPs have a Fixed Header and TLV coded contents
 Typically an LSP header contains
 LSP-id Sequence number
 Remaining Lifetime Checksum
 Type of LSP (level-1, level-2)
 Attached bit
 Overload bit
 The LSP contents are coded as TLV (Type, Length,
Value) and contain;
 Area addresses
 IS neighbours
 Authentication Information
133
Link State Database Content

 Each IS maintains a separate LSDB


for either level-1 or level-2 LSPs
 The LSDB contains:
 LSP headers and contents
 SRM = Send Routing Message
 SSN = Send Sequence Number
 SRM bits: set per interface when a
router has to flood an LSP through that
interface
 SSN bits: set per interface when
router has to send a PSNP for this
LSP
134
Flooding of LSPs

 New LSPs are flooded to all


neighbors
 All IS's get all LSPs
 Each LSP has a sequence
number
 There are 2 kinds of flooding:
 Flooding on a point to point link
and
 Flooding on a LAN
135
Flooding on a p2p link

 Once the adjacency is established either


routers send CSNP packet.
 And in case of any missing LSP's, if not
present in the received CSNP both routers
would send a request!!!!!
 This is done through a PSNP packet request
 PSNP (Partial Sequence Number PDU)
 CSNP (Complete Sequence Number PDU)

136
Flooding on a LAN
 Each LAN has a Designated Router (DIS)
 The DIS has two tasks
 Conducting LSP flooding over the LAN
 Creating and updating a special LSP
describing the LAN topology (Pseudo-node
LSP)
 DIS election is based on priority
 Best practice is to select two routers and give
them higher priority
 Thus, in case of any failure one provides
deterministic backup for the other
 DIS Tie breaker is router with the highest
MAC address 137
Flooding on a LAN Cont...

 DIS conducts the flooding over the LAN


 DIS multicasts CSNP every 10 seconds
 All routers on the LAN check the CSNP
against their own LSDB.
 In case of any missing content withing
the LSP, the IS may request for specific
re-transmissions of uptodate LSP's via a
PSNP request
138
Complete Sequence Number PDU
 Used to distribute a routers complete link-
state database
 If the LSDB is large, multiple CSNPs are
sent
 Used on 2 occasions:
 Periodic multicast by DIS (every 10 seconds) to
synchronise the LSDB over LAN subnets
 On p2p links when link comes up

139
Partial Sequence Number PDUs

 Typically exchanged on p2p links,


PSNP are used to ack and request
link-state info
 Two functions
 Acknowledge receipt of an LSP
 Request transmission of latest LSP
 PSNPs describe LSPs by its header
 LSP identifier
 Sequence number
 Remaining lifetime
 LSP checksum
140
Network Design Issues

 As in all IP network designs, the key


issue is the addressing layout
 ISIS supports a large number of routers
in a single area
 When network is so large requiring the
use of areas, employ summary-
addresses
 >400 routers in the backbone is quite
doable … according to Philip Smith :-)
141
Network Design Issues

 Link cost
 Default on all interfaces is 10
 (Compare with OSPF which sets cost according to link
bandwidth)
 Manually configured according to routing strategy
 Summary address cost
 Equal to the best more specific cost
 Backbone has to be contiguous
 Ensures continuity through redundancy
 Area partitioning
 Design in a way that backbone can NOT be partitioned

142
Scaling Issues
 Areas vs. single area
 Use areas where
 sub-optimal routing is not an issue
 areas with one single exit point

 Start with L2-only everywhere


 Thus future implementation of any level-1
areas would become easier
 Backbone continuity is ensured from start

143
Typical ISP Design
49.0001.1921.6800.1006.
49.0001.1921.6800.1004 00
.00
PoP 3
PoP 2

49.0001.1921.6800.1003
.00

49.0001.1921.6800.1007.
PoP 4
00

49.0001.1921.6800.1002
.00
PoP 1 49.0001.1921.6800.1008
.00

All routers are in L2


49.0001.1921.6800.1001. only and only one
00
area is used 144
IP NGN Architecture
– The IP NGN is a next-generation service provider
infrastructure for video, mobile, and cloud or
managed services.
– It provides an all-IP network for services and
applications, regardless of access type.
Mobile Access Residential Access Business Access

Application Layer

Services Layer
Mobile Services Video Services Cloud Services

IP Infrastructure Layer

Access Aggregation IP Edge Core


IP NGN Infrastructure Layer
– Routing protocols used in service provider
environments focus on the
IP infrastructure layer of the Cisco IP NGN.
– Routing protocols used in service provider
environments focus on service provider core and
edge devices and customer devices.
Access Aggregation IP Edge Core
Residential

Mobile Users

Business

IP Infrastructure Layer
Access Aggregation IP Edge Core
Overview of Routing Protocols
– High-level objective:
• Provide connectivity to the Internet for end
customers and subordinate ISPs
• Optionally, provide transit connectivity between
service providers
(that are Tier 1 ISPs)

Transit connectivity in
Tier 1 ISPs
SP SP

SP Network
Customer Internet
Access

Customer Customer Customer Customer


Overview of Routing Protocols (Cont.)
– IGP: exchange local routing information
– BGP: exchange external routing information

BGP
Exchange internal
SP routing information SP
BGP
IGP
Exchange external
routing information SP Network
BGP

Customer Customer Customer Customer

SP = service provider
Routing Requirements
• Routing tasks:
– IGP provides reachability for:
• BGP next-hop addresses (typically directly
connected edge subnets)
• BGP neighbors
– BGP provides reachability to remote
destinations through next-hop addresses:
• External BGP sessions with customers and other
ISPs
• Internal BGP session within an autonomous
system (administrative domain)
Interior Gateway Protocols
– Scalable routing protocols for ISP
backbones:
• Open Shortest Path First (OSPF)
• Intermediate System-to-Intermediate System (IS-IS)
• Enhanced Interior Gateway Routing Protocol (EIGRP)
– OSPF and IS-IS are the recommended
choices:
• Standard protocols
• Support additional features required in MPLS-enabled
networks
Routing Example
• Part 1: BGP
1. R1 receives an external BGP update: 209.165.201.0/24; next hop
is 192.168.200.2.
2. R4 receives an internal BGP update:
• By default, next-hop address does not change.
• Optionally, BGP on R1 can be configured to change the next-
hop address to its own address (typically a loopback address).
3. R4 forwards the update and changes the next-hop address to
192.168.11.1.
209.165.201.0/24 209.165.201.0/24
209.165.201.0/24
NH= 192.168.200.2 NH= 192.168.200.2
NH= 192.168.11.1
EBGP IBGP EBGP
IGP IGP IGP

R4 R3 R2 R1
192.168.11.1 10.1.1.1 192.168.200.2

NH = next hop
Routing Example (Cont.)
• Part 2: IGP
– R1 propagates the BGP next-hop address to all
routers in the domain:
• Edge subnet (192.168.200.0/30) for reachability of
external BGP next-hop addresses
• Loopback address (10.1.1.1/32) for reachability of
internal BGP neighbors
– R2 and R3 forward the information:
• Unchanged (required if the network also uses MPLS-
based services such as MPLS VPNs and Cisco MPLS
TE)
• Optionally, summarization can be used within IGP for
optimization
Routing Example (Cont.)
• Part 3: Routing Table
• End-to-end connectivity is provided
thorough recursive routing table lookups
(optimized by Cisco Express Forwarding):
– BGP for end prefixes
– IGP for BGP next-hop reachability
Overview of OSPF
– Link-state protocol: routers aware of network topology
– Hierarchical: dual-layer architecture:
• Backbone area: Area 0
• Nonbackbone areas interconnected through Area
0
OSPF Domain
Area 0

Area 1 Area 2 Area 3 Area 4


Overview of OSPF (Cont.)
– Creates a neighbor relationship by exchanging hello
packets
– Propagates LSAs rather than routing table updates
• Link: Router interface
• State: Description of an interface and its relationship to
neighboring routers
– Floods LSAs to all OSPF routers in the area, not just
directly connected routers
– Pieces together all the LSAs generated by the OSPF
routers to create the OSPF link-state database
– Uses the SPF algorithm to calculate the shortest path
to each destination and places it in the routing table
Link-State Data Structures
– Neighbor table:
• Also known as the adjacency database
• Contains list of recognized neighbors
– Topology table:
• Typically referred to as LSDB
• Contains all routers and their attached links in the area
or network
• Identical LSDB for all routers within an area
– Routing table:
• Commonly named a forwarding database
• Contains list of best paths to destinations
Area Terminology and Router Types
– ABR: Area Border Router
– Internal router
– ASBR: Autonomous System Boundary Router
– Backbone router External Routing Domain

OSPF Domain
Area 0 ASBR

Backbone Router Backbone Router


Area 1 Area 2 Area 3 Area 4
ABR ABR ABR ABR

Internal Internal Internal Internal


Routers Routers Routers Routers
OSPF Areas
– Backbone area—Area 0
– Regular nonbackbone area
– Stubby area or totally stubby area
– Not-so-stubby area (NSSA) or totally NSSA
OSPF Domain
Area 0

Regular Stubby NSSA Totally NSSA Totally


Area Area Stubby
Area

 Area routes  Summaries  Summaries  Default route  Default route


 Summaries  External routes  External routes only
 External routes
OSPF Metric
– Each link is assigned a cost:
• Default cost calculated from interface bandwidth
• Default reference bandwidth is 100 Mb/s
• Modify reference bandwidth in 1 Gb/s networks
• Cost can be statically configured for an interface
– Ensure consistent configuration of costs:
• Same cost on both sides of a link when manually configuring the
cost
• Same reference bandwidth on all routers in an OSPF domain

Cost = Reference Bandwidth


Interface Bandwidth
Typical OSPF Designs
– Single-area design:
• All routers in Area 0
• Simple routing design
• Mostly point-to-point adjacencies
• Optimal routing decisions
• Scalability limited to a few hundred routers in the network
– Multi-area design:
• Regular areas or NSSA typically used
• Scales to thousands of routers in the network
• Mostly point-to-point adjacencies
• More complex routing design
• May result in suboptimal routing (for example, dual attached areas)
• Less practical in MPLS-enabled networks
Overview of IS-IS
– Stable protocol
– Originally deployed by ISPs because U.S.
government mandated Internet support of OSI and IP
– IS = router
– IS-IS was originally designed as the IGP for the
Connectionless Network Service (CLNS), part of the
OSI protocol suite.
– The OSI protocol suite Layer 3 protocol is the
Connectionless Network Protocol (CLNP).
– IS-IS uses CLNS addresses to identify routers and
build
the LSDB.
Hierarchical Design
– Hierarchical: dual-layer architecture:
• Level 1 used within local areas
• Level 2 interconnects areas

IS-IS Domain
Level 2 Area
L1L2 L1L2 L1L2 L1L2

L2 L2

Level 1 Level 1 Level 1 Level 1


Area Area Area Area
L1L2 L1L2 L1L2 L1L2

L1 L1 L1
L1
IS-IS Characteristics
– Link-state routing protocol (routers aware of network
topology)
– Supports VLSMs
– Uses Dijkstra SPF algorithm, has fast convergence
– Uses hellos to establish adjacencies and LSPs to
exchange link-state information
– Efficient use of bandwidth, memory, and processor
– Supports two routing levels:
• Level 1: Builds common topology of system IDs in local area
and routes within area using lowest cost path.
• Level 2: Exchanges prefix information (area addresses)
between areas. Routes traffic to area using lowest-cost path.
IS-IS Characteristics (Cont.)
– Each router has topology information for its area.
– IS-IS is part of OSI and was originally used with CLNS
only.
– IS-IS still uses CLNS to maintain adjacencies and build
an SPF tree.
– Integrated IS-IS can also carry IP routing information in
its updates.
– Wide-style metric should be used for large high-speed
service provider networks (24-bit link metric, 32-bit
path metric).
– Link cost defaults to 10.
– Each router is identified using a unique NSAP address.
Router and Link Types
• Router types: IS-IS Domain
– Level 1 routers only peer with
other Level 1 routers. Level 2
Area L2 L2
– Level 2 routers only peer with L2
other Level 2 routers. L1 & L2
– Levels 1 and 2 routers can peer L1L2
L2
L1L2

with any router.


• Link types: L2
Level 1
– Level 1: Only for Level 1 Area L1 L1L2
adjacencies within the same area L1

– Level 2: Only for Level 2 L1


adjacencies
– Level 1 and Level 2: For Level 1
adjacencies within the same area
and Level 2 adjacencies
BGP Overview
– BGP is designed for routing information exchange
between different administrative domains
(autonomous systems).
– Each AS is identified using a unique AS number.
– BGP is designed with the following major
characteristics:
• Scalability: It needs to carry the full Internet routing table
(several hundreds of thousands of routes).
• Stability: The size of the routing table results in higher
chances of constant flapping of routes.
• Security: Advanced filtering options for protection from other
administrative domains.
• Flexibility: Advanced mechanisms in combination with many
BGP attributes enable the implementation of complex routing
policies.
BGP Architecture
• There are two types of BGP sessions:
– External BGP (EBGP) sessions exchange
routing information.
– Internal BGP (IBGP) sessions exchange routing
information between routers within the same AS.

AS 65002 AS 65001 AS 65003


EBGP
EBGP
IBGP
IBGP
IBGP

IBGP
EBGP
EBGP EBGP
EBGP

AS 65004 AS 65005 AS 65006 AS 65007


BGP Characteristics
• BGP is a path vector protocol with enhancements:
– Reliable updates
– Triggered updates only
– Rich metrics (called path attributes)
– Designed to scale to huge internetworks
• Reliable updates:
– TCP used as transport protocol
– No periodic updates
– Periodic keepalives to verify TCP connectivity
– Triggered updates batched and rate-limited
• Every 5 seconds for internal peer
• Every 30 seconds for external peer
BGP Characteristics (Cont.)
• BGP was designed to perform well in these
areas:
– Interdomain routing applications
– Huge internetworks with large routing tables
– Environments that require complex routing policies
• Common BGP uses:
– Customers connected to more than one service
provider
– Service provider networks (transit autonomous
systems)
– Service providers exchanging traffic at an exchange
point (CIX, GIX, NAP, and so on)
– Network cores of large-enterprise customers
AS Number
• 16-bit AS number:
– Notation: X (for example, “65001”)
– Public range from 1 to 64511 for use on the Internet
– Private range from 64512 to 65535 can be used in isolated
environments
– Depleted
• 32-bit AS number:
– Notation: X.Y (for example, “65100.65200”)
– Carried in a new attribute
– Compatible with old systems:
• AS 23456 used in old AS path to represent autonomous
systems using new AS number format
• AS 0.X used to encode old AS numbers in new AS path attribute
BGP Sessions
– BGP uses TCP on port 179 to establish adjacencies.
– OPEN messages are used at session setup to negotiate
fundamental session parameters and capabilities:
• AS numbers must match configuration and determine session type (EBGP
versus IBGP).
• EBGP peers must be reachable through a directly connected link (by
default).
• IBGPs are typically established between loopbacks. (IGP ensures
reachability of loopback addresses.)
• IP addresses must match the configuration.
• Hold time (default is 180 seconds).

AS 65001 AS 65002 AS 65001 AS 65001


IBGP
EBGP 10.1.1.1 10.1.1.2

192.168.1.1 192.168.1.2
EBGP Sessions
– EBGP sessions can form any topology, subject to
agreements between autonomous systems.
– Received EBGP updates are sent to all other neighbors.
– By default, EBGP neighbors must be directly connected.

AS 65001 AS 65003

AS 65002 AS 65006

AS 65004 AS 65005
IBGP Sessions
– By default, IBGP sessions require a full mesh between all routers within
an autonomous system:
• By default, IBGP updates received are not forwarded to other IBGP
neighbors.
• Does not scale in large autonomous systems.
– IBGP neighbors can be multiple hops away.

IBGP
EBGP EBGP

AS 65002 AS 65001 AS 65003


Single-Homed Customers
– Typically, do not require BGP:
• Static route for customer ISP-assigned address space on edge
router
• Static default route on customer router
– BGP can be used to detect link failures and trigger dial
backup:
• ISP originates only the default route
• Customer originates address space
• Private AS numbers can be assigned to customers by the ISP

209.165.201.0/24
Customer ISP
AS 65001 AS 123
0.0.0.0/0

ADSL
Dual-Attached Customers
– Mitigate link and device failures
– Two design options:
• Primary and backup routing
• Load balancing
209.165.201.0/24

Customer 0.0.0.0/0 SP
AS 65001 AS 123
209.165.201.0/24

0.0.0.0/0
Multihomed Customers
– Mitigate link, device, and path failures
– Should connect to independent service
providers
– Two design options:
• Primary and backup routing
• Load balancing
SP
209.165.201.0/24
AS 123
Customer Full
AS 100 209.165.201.0/24
SP
Full AS 456
Upstream ISP
– Mitigates link, device, and path failures
– Should connect to independent upstream ISPs
– Two design options:
• Primary and backup routing
• Load balancing
– ISP receives the full Internet routing table
– ISP forwards the following:
• Summaries for owned address space
• Prefixes from BGP customers using independent
address space
Customer Summary SP
Customer
Full
AS 123
SP
AS 100 Summary
Customer
Full SP
Customer AS 456
Transit ISP
– Mitigates link, device, and path failures
– Routing policy depends on agreements with
other ISPs
– Tier 1 ISP forwards full Internet routing table
Tier 1 ISP
Full
AS 123
Tier 1 ISP Full Tier 1 ISP Full
AS 789 Full
AS 100 Full

Partial AS 456
Tier 2 ISP
Understanding OSPF Operation
Objectives
– Describe the functions performed by OSPF
– Describe the OSPF Packet Format
– Describe each of the OSPF packet types
– Describe OSPF neighbor adjacencies establishment, LSDB exchange,
and synchronization
– Describe the link-state flooding process
– Describe how to debug OSPF packets
– Describe OSPF network types
– Describe how the designated router (DR) and backup designated router
(BDR) are elected
– Describe OSPF in non-broadcast multiaccess (NBMA) networks
– Describe OSPF in Metro Ethernet and EoMPLS networks
– Describe OSPF in MPLS VPN networks
– Describe implementation steps when enabling OSPF on point-to-point,
point-to-multipoint, non-broadcast multiaccess, and broadcast links
OSPF Functions
• High-level functions of OSPF include the following:
– Discover neighbors and form adjacencies
– Flood link-state database (LSDB) information
– Compute the shortest path
– Install routes in the route-forwarding table
• Additional functions of OSPF include the following:
– Detect changes in the link state
– Propagate changes to maintain link-state database
synchronization
• Several OSPF packet types are involved.
OSPF Packet Format
CE1#debug ip ospf packet
OSPF packet debugging is on Type Packet Description
*Aug 16 09:18:53.974: OSPF: rcv. v:2 t:1 l:48 rid:10.1.1.1
Discovers
aid:0.0.0.11 chk:8224 aut:0 auk: from GigabitEthernet0/0 neighbors and
1 Hello
builds adjacencies
between them
Checks for
database
2 DBD
synchronization
between routers
Requests specific
3 LSR link-state records
from another router
Link IP OSPF Link
Sends specifically
Header Header Packet Trailer 4 LSU requested link-state
records
Acknowledges the
5 LSAck
Protocol ID Number 89 other packet types

OSPF Packet
Authen-
Version Packet Check- Authen-
Type Router ID Area ID tication Data
Number Length sum tication
Type
OSPF Packets

Hello

Hello DBD LSR LSU LSAck


Router ID
– Use of multicast and unicast IP address
Hello and dead intervals*
– Four types of update packets
Neighbors
– LSDB synchronization process
Area ID*
̶ Discover neighbor
Router priority ̶ Establish bidirectional communication
DR IP address ̶ Elect a designated router, if desired
BDR IP address ̶ Form an adjacency
Authentication password* ̶ Discover the network routes
* StubEntries must
area flag*
̶ Update and synchronize link-state databases
match on neighboring
routers
OSPF Neighbor Adjacency
R1 R2 R2
172.16.6.0/24

Gi0/0 172.16.5.1/24 Gi0/1 172.16.5.2/24

No active neighbor detected


Down
Attempt No recent information received from
the neighbor. Send hello packet.
I am router ID 172.16.5.1, and I see no one.
To 244.0.0.5
Hello
Hello packet received
INIT
Establishing Add 172.16.5.1
Bidirectional to neighbors list
Communication
I am router ID 172.16.5.2, and I see 172.16.5.1.
Unicast to R1
Hello
Add 172.16.5.2
to neighbors list
Two-way The router see itself in the hello
packets coming from a neighbor
OSPF Neighbor Adjacency (Cont.)
R1 R2 R2
172.16.6.0/24

Gi0/0 172.16.5.1/24 Gi0/1 172.16.5.2/24


Master and slave roles determined
Exstart
I will start exchange because I have router ID 172.16.5.1.
DBD
No, I will start exchange because I have a higher router ID.
DBD
Discovering Exchange Database description packets sent
the Network Here is a summary of my LSDB.
Routes DBD
Here is a summary of my LSDB.
DBD
Thanks for the information!
LSAck LSAck
Loading
Exchange of LSRs and LSUs
I need the complete entry for network 172.16.6.0/24
Adding the LSR Here is the entry for network 172.16.6.0/24.
Link-State LSU
Entries Thanks for the information!
LSAck Neighbors fully adjacent
Full
Link-State Flooding
The SPF algorithm is triggered in these cases:
– The LSA Options field changes.
– The age of the LSA instance is set to MaxAge.
– The length field in the LSA header changes.
– The contents of the LSA (excluding the LSA header) changes.

3. LSU: The DR notifies


others on 224.0.0.5.
DR
R3

1. Link-State Change: Router R1


detects a topology change, adjusts 4. LSU
its LSA, and floods the LSA. R2
R1

X 5. The LSDBs of all routers


must be synchronized.
2. LSU: Router R1 notifies all OSPF neighbors
using 224.0.0.5, or, on LAN links, all OSPF
DRs and BDRs using 224.0.0.6.
Debug OSPF Packets
Cisco IOS XR: debug ospf 1 packet

ospf[1010]: Recv: HLO l:48 rid:10.2.1.1 aut:0 auk: from 192.168.112.20 to 224.0.0.5 on
GigabitEthernet0/0/0/1, vrf default vrfid 0x60000000
OSPF: rcv. v:2 t:1 l:48 rid:10.1.1.1 aid:0.0.0.11 chk:8224 aut:0 auk: from GigabitEthernet0/0

Field Description Cisco IOS/IOS XE:


OSPF: OSPF packet debug ip ospf packet

Recv: / rcv. was received


v: Provides the version of OSPF
Specifies the OSPF packet type:
HLO / t:
1: hello; 2: DBD; 3: LSR; 4: LSU; 5: LSAck
l: Specifies the OSPF packet length in bytes
rid: Provides the OSPF router ID
aid: Shows the OSPF area ID
chk: Displays the OSPF checksum
Provides the OSPF authentication type:
Aut:
0: No authentication; 1: Simple password; 2: MD5
auk: Specifies the OSPF authentication key, if used
keyid Displays the MD5 key ID; only used for MD5 authentication
seq Provides the sequence number; only used for MD5 authentication
OSPF Network Types
Point-to-point:
 A network that joins a single pair of routers
 Does not require DR or BDR election
 Neighbor is automatically detected
 Sends OSPF packets using multicast 224.0.0.5
 Default OSPF hello interval is 10 seconds
 Default OSPF dead interval is 40 seconds

Broadcast:
 DR and BDR selection is required
 Other routers form adjacencies with the DR and BDR only
 Packets to the DR and BDR use 224.0.0.6
 Packets from DR to all other routers use 224.0.0.5
 Default OSPF hello interval is 10 seconds
 Default OSPF dead interval is 40 seconds

Nonbroadcast multiaccess (NBMA):


 Single interface interconnects multiple sites
 Without broadcasting capabilities
 Default OSPF hello interval is 30 seconds
 Default OSPF dead interval is 120 seconds
Point-to-multipoint:
 No DR or BDR election
 Automatic neighbor discovery
 Each adjacency treated as point-to-point
IP NGN Infrastructure Layer
– Broadcast OSPF network type is used in service provider
environments and focuses on IP edge devices.
– Point-to-point OSPF network type is used in service
provider environments and focuses on core devices.
Access
Aggregation
IP Edge
Core
Residential

Broadcast Point-to-point
Mobile Users

Business

IP Infrastructure Layer

Access Aggregation IP Edge Core


Electing the DR and BDR
 Hello packets are exchanged Broadcast
via IP multicast.
DROTHER DROTHER DROTHER
 DR: The router with the highest
OSPF priority
 BDR: The router with the P=1 P=1 P=0
second-highest priority value P=3 P=2
 OSPF router ID is used as the
tie-breaker.
 DR election is nonpre-emptive. DR BDR

 OSPF considers NBMA to be like other Nonbroadcast


broadcast media.
 DR and BDR need to have fully meshed DROTHER
connectivity with all other routers, but DR
NBMA networks are not always fully
meshed. DROTHER

 DR and BDR each need a list of neighbors.


 OSPF neighbors are not automatically DROTHER
discovered by the router.
Setting the Priority
– 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 cannot be the DR or BDR.
– A router that is not the DR or BDR is DROTHER.
– The priority takes effect when the existing DR goes
down. router ospf 1
area 11
interface GigabitEthernet0/0 interface GigabitEthernet0/0/0/0
ip ospf priority 2 priority 3

CE1 OSPF Area 11 PE1 OSPF Area 1


Gi 0/0 Gi 0/0/0/0
Lo 0 Lo 0

Gi 0/0/0/1
OSPF Area 0
OSPF over NBMA Network Types
compliant modes

Nonbroadcast (NBMA)
RFC 2328-

Full-mesh Hello timer: Manual


One subnet Original subnet
partial-mesh 30 seconds DR and BDR

Point-to-multipoint
Hello timer: Automatic
Partial-mesh/star One subnet Generates /32
30 seconds No DR and BDR

Point-to-multipoint nonbroadcast
Hello timer: Manual
Partial-mesh/star One subnet Generates /32
30 seconds No DR and BDR
Cisco modes

Broadcast
Full-mesh Hello timer: Automatic
One subnet Original subnet
partial-mesh 10 seconds DR and BDR

Point-to-point
Partial-mesh/star, Hello timer: Automatic
Different subnets Original subnet
using subinterface 10 seconds No DR and BDR
OSPF Adjacency over Metro
Ethernet and EoMPLS
– EoMPLS and Metro Ethernet service does not
participate in STP, nor does it learn MAC addresses.
– Customer routers R1 and R2 exchange Ethernet
frames via an interface or VLAN subinterfaces.
– OSPF behaves the same as on Ethernet.
• OSPF network type = multiaccess broadcast network
• DR and BDR are elected
• Routers form full adjacencies with DR and BDR only
Ethernet
interface or
L2 MPLS VPN backbone VLAN
OSPF subinterface

R1 PE1 PE2 R2
OSPF Adjacency Over MPLS VPN
– Customer routers run OSPF and exchange routing
updates with the PE routers.
• PE routers appear as another router in the customer’s
network.
• Service provider routers are hidden from the customer.
• Customer routers are unaware of MPLS VPN.
• Customer and service provider must agree on OSPF
parameters.
– Customer routers-to-PE connection can be of any
type.
• OSPF behaves per the connection type (point-to-point,
broadcast, NBMA) P2P,
Broadcast, or
NBMA

L2 MPLS VPN backbone

R1 PE1 PE2 R2
OSPF OSPF
Steps to Configure NBMA Mode
interface type number router ospf 1
ip ospf priority 0 Define the OSPF area 11
ip ospf network non-broadcast network type interface type number
! network non-broadcast
router ospf 1 Statically define a neighbor 192.168.101.11 priority 0
neighbor 192.168.101.10 neighbor relationship neighbor 192.168.101.21 priority 0

CE1 OSPF
Lo 0 PE1
10.1.10.1 192.168.101.11
CE2 Lo 0
192.168.101.10 10.1.1.1
Lo 0
192.168.101.21
10.2.10.1

RP/0/RSP0/CPU0:PE1#show ospf neighbor


* Indicates MADJ interface
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
10.2.10.1 0 FULL/DROTHER 00:01:45 192.168.101.21 type number
Neighbor is up for 00:15:41
10.1.10.1 0 FULL/DROTHER 00:01:56 192.168.101.11 type number
Neighbor is up for 00:15:41

Total neighbor count: 2


Subinterfaces
– Several logical subinterfaces can be created
over all multiaccess WAN networks:
• point-to-point interface Serial0.1 point-to-point Point-to-point
Automatic
No DR and BDR

• multipoint interface Serial0.2 multipoint Nonbroadcast (NBMA)


Manual
DR and BDR

• Each subinterface requires an IP subnet.


• Logical interfaces behave in exactly the same way as physical interfaces for
routing purposes.
• Statistics and traffic-shaping behavior differs between interfaces and
subinterfaces.
Point-to-Point Mode
Leased-line Automatic
Single subnet
emulation No DR and BDR

router ospf 1
area 11
interface GigabitEthernet0/0 interface GigabitEthernet0/0/0/0
ip ospf network point-to-point network point-to-point

CE1
OSPF
Lo 0 Gi 0/0 PE1
10.1.10.1 192.168.101.11
Gi 0/0/0/0 Lo 0
192.168.101.10 10.1.1.1

RP/0/RSP0/CPU0:PE1#show ospf interface GigabitEthernet 0/0/0/0


GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 192.168.101.10/24, Area 11
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_POINT, MTU 1500, MaxPktSz 1500
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/2, flood queue length 0
< text omitted >
Point-to-Multipoint Mode
Automatic
Partial-mesh/star Single subnet
No DR and BDR

router ospf 1
area 11
interface type number interface type number
ip ospf network point-to-multipoint network point-to-multipoint

CE1
OSPF
Lo 0 PE1
10.1.10.1 192.168.101.11
CE2 Lo 0
Lo 0 192.168.101.10
10.1.1.1
10.2.10.1 192.168.101.21

RP/0/RSP0/CPU0:PE1#show ospf interface type number


type number is up, line protocol is up
Internet Address 192.168.101.10/24, Area 11
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT, MTU 1500, MaxPktSz 1500
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Index 1/2, flood queue length 0
< text omitted >
Point-to-Multipoint Non-Broadcast Mode
Manual
Partial-mesh/star Single subnet
No DR and BDR

interface type number


ip ospf network point-to-multipoint non-broadcast
router ospf 1
area 11
interface type number
network point-to-multipoint non-broadcast
neighbor 192.168.101.11
neighbor 192.168.101.21

CE1
OSPF
Lo 0 PE1
10.1.10.1 192.168.101.11
CE2 Lo 0
Lo 0 192.168.101.10 10.1.1.1
10.2.10.1 192.168.101.21
RP/0/RSP0/CPU0:PE1#show ospf neighbor
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
10.1.10.1 0 FULL/ - 00:01:49 192.168.101.11 type number
Neighbor is up for 00:06:18
10.2.10.1 1 FULL/ - 00:01:41 192.168.101.21 type number
Neighbor is up for 00:06:32
Total neighbor count: 2
IPv6 Support for OSPF Modes
CE1(config-if)#ipv6 ospf network ?
broadcast Specify OSPF broadcast multi-access network
non-broadcast Specify OSPF NBMA network
point-to-multipoint Specify OSPF point-to-multipoint network
point-to-point Specify OSPF point-to-point network

CE1
OSPFv3
PE1

CE2

RP/0/RSP0/CPU0:PE1(config)#router ospfv3 1
RP/0/RSP0/CPU0:PE1(config-ospfv3)#area 11
RP/0/RSP0/CPU0:PE1(config-ospfv3-ar)#interface type number
RP/0/RSP0/CPU0:PE1(config-ospfv3-ar-if)#network ?
broadcast Specify OSPFv3 broadcast multi-access network
non-broadcast Specify OSPFv3 NBMA network
point-to-multipoint Specify OSPFv3 point-to-multipoint network
point-to-point Specify OSPFv3 point-to-point network
Implementing OSPF Special
Area Types

Implement OSPF in the Service Provider Network


Objectives
– Describe inter area and external OSPF route
summarization
– Describe how OSPF interarea routes are summarized
– Describe how OSPF external routes are summarized
– Describe how default routes are injected into OSPF
– List and describe different OSPF area types
– Describe OSPF stub area rules, and implement OSPF
stub and totally stubby areas
– Describe OSPF NSSA rules, and implement OSPF
NSSA and totally NSSA
Summarization
– Networks are normally translated into type 3 LSAs in other areas.
– Route summarization is the consolidation of advertised
addresses.
• On ABR, summarize type 3 LSAs
External Routing Domain
• On ASBR, summarize type 5 LSAs
– A good addressing plan is required.
– A drawback is the possibility of
suboptimal routing.
OSPF Domain
Minimizes the number of
routing table entries ASBR
Area 0

Reduces LSA flooding and saves


CPU resources Backbone Router

Area 1 Area 2
ABR ABR
Localizes the impact of a
topology change
Interarea Route Summarization
– A summary route is generated if at least one subnet
within the area falls in the summary address range.
– A summarized route metric will be equal to the lowest
cost of all subnets within the summary address range.
– The ABR creates a route to Null0 to avoid loops, only for
the summary routes of connected areas.
Area 0
O IA 172.16.8.0 255.255.248.0
router ospf 1
O IA 172.16.16.0 255.255.252.0 area 1
range 172.16.8.0/21
range 172.16.16.0/22
O 172.16.8.0 255.255.255.0
O 172.16.9.0 255.255.255.0
O 172.16.10.0 255.255.255.0
O 172.16.11.0 255.255.255.0
Area 1 Area 2
O 172.16.12.0 255.255.255.0 ABR ABR
O 172.16.13.0 255.255.255.0
O 172.16.14.0 255.255.255.0
O 172.16.15.0 255.255.255.0
O 172.16.16.0 255.255.255.0
O 172.16.17.0 255.255.255.0
O 172.16.18.0 255.255.255.0
O 172.16.19.0 255.255.255.0
External Route Summarization
– Summarization can be used for external routes:
• On an AS boundary for type 5 LSAs (redistributed
routes)
• On an NSSA ABR for type 5 LSAs translated from
type 7 LSAs
– A summary route to Null0 will be created for each
summary range.
D 10.1.1.0 255.255.255.0 External Domain router ospf 1
D 10.1.2.0 255.255.255.0 summary-prefix 10.1.0.0/16
D 10.1.3.0 255.255.255.0
D 10.1.4.0 255.255.255.0
D 10.1.5.0 255.255.255.0
D 10.1.6.0 255.255.255.0

OSPF Domain
ASBR

O E2 10.1.0.0 255.255.0.0
Default Routes in OSPF
– A default route is injected into OSPF as an external type 5 LSA.
– Default route distribution is not on by default.
A smaller Service Provider A Service Provider B
routing table

OSPF Domain
Fewer resources used
in the router ASBR ASBR

0.0.0.0 Cost 20 0.0.0.0 Cost 30

Originate a type 5 default route if it


router ospf 1 has the gateway of last resort.
default-information originate
default-information originate metric 20 Sets cost 20 Originate a type 5 default route
default-information originate always even if there is no gateway of last
default-information originate route-policy route_in_RT resort (optional).

Use the route map to define a dependency on any


condition inside the route map (optional).
OSPF Area Types and Structure
– OSPF is based on a two-level hierarchical area structure.
– Each area has its own topology database.
Backbone area: Connects all other areas
OSPF Domain
Area 0

Summaries Summaries Default route only Summaries Default route


External routes Default route Default route

Regular Stubby Totally NSSA Totally


Area Area Stubby NSSA
External routes
Area External routes External routes

External Routing
Domain

Normal area: Contains Stub area: Contains internal Totally stubby area: Not-so-stubby area: Totally NSSA:
all of the internal and and area routing information, Contains area routing Contains area and Summaries
external routing but not external routing information only; Cisco external routing suppressed
information information proprietary information
Configuring OSPF Area Types
router ospf 1 router ospf 1 router ospf 1 router ospf 1 router ospf 1
area 0 area 2 area 3 area 4 area 5
area 1 stub stub no-summary nssa nssa no-summary

OSPF Domain
Area 0

Regular Stubby Totally NSSA Totally


Area Area Stubby NSSA
Area

External Routing Domain


OSPF Router and LSA Types
– ABR generates
summary LSAs. External Routing Domain

– ASBR generates OSPF Domain


external LSAs. ASBR
External routes

– Summary and ABR ABR


Summaries
external LSAs canExternal routes Summaries
be blocked and Regular
Area
Stubby
Area
Default

default route sent External routes


Internal
instead.
ASBR
External Routing Domain
Stub and Totally Stubby Area Rules
•An area can be stub or
totally stubby in these cases:
– There is one ABR or more. OSPF Domain
– All routers that are members Area 0
of the stub area are
configured as stub routers.
– There is no ASBR in the
Stubby Totally
area. Area Stubby
Area
– The area is not an Area 0.
– No virtual links go through
the area.
OSPF Stub Areas
Interarea Route
(LSA3) Passed
Backbone
Intra-area Route
– Stub Area: (LSA1)

• No external routes Stub Area


• Interarea routes present
External Route
• Intra-area routes present (LSA5) Blocked

• Default route generated default route generated instead

– Totally Stubby Area (stub no-summary):


Interarea Route
• No external routes (LSA3) Blocked
Backbone
Intra-area
• No interarea routes Route (LSA1)

• Intra-area routes present Stub Area

• Default route generated External Route


(LSA5)
• Cisco proprietary feature Blocked
default route generated instead
Configuring OSPF Stub Areas
router ospf 1
area 2 Backbone
stub
default-cost 10
Stub Area
router ospf 1
area 2
stub

router ospf 1
area 2
stub no-summary
default-cost 10 Backbone

router ospf 1
area 2 Totally
stub
Stubby Area
OSPF NSSA and Totally NSSA Rules
– NSSA breaks stub area
rules.
– ASBR is allowed inside. OSPF Domain
Area 0
– LSA type 7 sent by ASBR.
– ABR converts LSA type 7
to LSA type 5. NSSA Totally
Area NSSA
– ABR sends the default Area

route into NSSA instead of


external (LSA type 5) External Routing Domain

routes.
OSPF NSSA and Totally NSSA
Interarea Route
– NSSA: (LSA3) Passed
Backbone
• Behaves like stub Intra-area Route NSSA
(LSA1) ABR
area
• May introduce Stub Area
external
routes locally in the External Route
(LSA5) Blocked
area
NSSA NSSA External default route generated instead
ASBR Route (LSA7)
– Totally NSSA (no- NSSA External Route
Changes to LSA5
summary):
Interarea Route
• Behaves like totally (LSA3) Blocked
NSSA Backbone
stubby area Intra-area Route ABR
• May introduce (LSA1)

external Stub Area


routes locally in the
External Route
area (LSA5) Blocked
• Cisco proprietary default route generated instead
feature NSSA NSSA External
Route (LSA7) NSSA External Route
ASBR
Changes to LSA5
Configuring OSPF NSSA and Totally
NSSA
router ospf 1
area 2 Backbone
nssa
default-cost 10

Stub Area
router ospf 1
area 2
nssa

router ospf 1
area 2
nssa no-summary
default-cost 10 Backbone

router ospf 1
area 2 Totally
nssa
Stubby Area
Introducing IS-IS Routing

Implement Integrated IS-IS in the Service Provider


Network
Cisco IP NGN Infrastructure Layer
– Large service providers use IS-IS routing on the IP edge and core
devices.
– IS-IS is a stable routing protocol.
Access
Aggregation
IP Edge
Core
Residential

Mobile Users

Business

IP Infrastructure Layer

Access Aggregation IP Edge Core


Integrated IS-IS Routing
– Integrated IS-IS is an IS-IS for multiple protocols (IPv4, IPv6, and CLNS).
– Integrated IS-IS uses its own PDUs to transport IP routing information;
updates are not sent in IP packets.
– Integrated IS-IS requires CLNS addresses, even if it is only routing for IP.

IS-IS Domain
Level 2 Area
L1L2 L1L2 L1L2 L1L2

L2 L2

Level 1 Level 1 Level 1 Level 1


Area Area Area Area
L1L2 L1L2 L1L2 L1L2

L1 L1 L1
L1
Integrated IS-IS Design Principles
– IP and CLNP addresses – Summarization:
must be planned. • Limits update traffic
• Minimizes router memory and CPU usage
– The two-level hierarchy
is used for scalability: – Default narrow metrics are limited to a
6-bit interface and 10-bit path metric.
• Limits LSP flooding
• Provides opportunity
– Wide metrics allow a 24-bit interface
for summarization and 32-bit path metric.
– The default metric is 10 on all
interfaces.
IS-IS Domain
Level 2 Area
L1L2 L1L2 L1L2 L1L2

L2 L2
Summarize Summarize Summarize Summarize

L1L2 L1L2 L1L2 L1L2

Level 1 Level 1 Level 1 Level 1


L1 L1 L1
Area L1 Area Area Area
Similarities Between IS-IS and OSPF
– Integrated IS-IS and OSPF are both open-
standard link-state protocols with these similar
features:
• Link-state representation, aging timers, and LSDB
synchronization
• SPF algorithms
• Update, decision, and flooding processes
• VLSM support
– Scalability of link-state protocols has been proven
(used in service provider backbones).
– IS-IS and OSPF both converge quickly after
changes.
Integrated IS-IS vs. OSPF: Area Design
• OSPF is based on a central • In IS-IS, the area borders lie on
backbone with all other areas links:
attached to it: – Each IS-IS router belongs to
– In OSPF the border is inside exactly one area.
routers (ABRs). – IS-IS is more flexible when
– Each link belongs to one area. extending the backbone.

OSPF Areas IS-IS Areas


Area 0 Area 49.0000
L1L2

ABR Backbone L2

Area
49.0002

Area 2 L1L2
Internal Totally Stubby L1
Comparison of OSPF and Integrated IS-IS
• OSPF characteristics: • Integrated IS-IS characteristics:
– Area border inside routers (ABRs) – Area border on links
– Each link in only one area – Each router in only one area
– More complex to extend backbone – Simple extension of backbone
– Many small LSAs sent – Fewer LSPs sent
– Runs on top of the data link layer
– Runs on top of IP
– Requires IP and CLNS addresses
– Requires IP addresses
– Default metric is 10 for all interfaces
– Default metric is scaled by interface
– Easy to support new protocols with new TLV
bandwidth
tuples
– Not easy to extend – Equipment, personnel, and information not as
– Equipment, personnel, and information easily available
more readily available

OSPF Areas IS-IS Areas


Router LSA Area 0 Area 49.0000
Network LSA L1L2
Summary LSA
ABR Backbone L2
External LSA L1 LSP
Area L2 LSP
Router LSA
Network LSA 49.0002
Area 2 L1L2
L1 LSP
Internal Totally Stubby L1
OSI Addresses
– OSI network layer addressing is implemented with NSAP
addresses.
– An NSAP address identifies a system in the OSI network; an
address represents an entire node, not an interface.
– Various NSAP formats are used in various systems, because
different protocols may use different representations of NSAP.
– NSAP addresses are a maximum of 20 bytes:
• Higher-order bits identify the interarea structure.
• Lower-order bits identify systems within an area.
For router NSEL = 0
CLNS address NSAP address NET
Integrated IS-IS NSAP Address Structure
– The Cisco implementation of Integrated IS-IS distinguishes
only the following three fields in the NSAP address:
• Area address: Variable-length field (1 to 13 octets) composed of the
higher-order NSAP octets, excluding system ID and NSEL (typically
at least 1 byte, AFI set to 49 plus area ID)
• System ID: Intermediate system identifier in an area; fixed length of
six octets in Cisco IOS software
• NSEL: One octet NSAP selector, service identifier (0 for a router)
– Total length of NSAP is from 8 (minimum) to 20 octets
(maximum).
AFI IDP DSP
Address Domain
Value
AFI IDI High-Order DSP System ID NSEL
ISO Data Country Code
39
(DCC) Variable-Length 6 Bytes 1 Byte
45 E.164 Area Address
ISO 6523 International Code 49 00 01 0000.0c12.3456 00
47
Designator (ICD)
Area address System ID NSEL
Locally administered
49
(private) 3 Bytes 6 Bytes 1 Byte
Cisco Implementation
Identifying Systems in IS-IS
– All routers within an area must use the same area address.
– The area address is used in Level 2 routing.
– The system ID identifies the intermediate system.
– The system ID is used in Level 1 routing and must be unique within an area.
– The system ID must be unique within Level 2 routers that form the routing
domain.
– A domain-wide unique system ID is used; it may be a MAC or IP address.

Area 1

49.0001.0000.0C11.1111.00

Area Address System ID Area 4 49.0001.0000.0C22.2222.00


49.0004.0000.0C88.8888.00

49.0004.0000.0C99.9999.00
Level 1, Level 2, and Level 1-2 Routers
– Level 1 (similar to OSPF internal non-
backbone routers):
• Intra-area routing enables routers to
communicate. IS-IS Domain

• Level 1 area is a collection of Level 1 and Level 2


Level 1-2 routers. Area L2 L2
• Level 1 intermediate system keeps a copy of L2
the Level 1 area LSDB. L1 and L2
– Level 1-2 (similar to OSPF ABR): L1L2
L2
L1L2

• Intra-area and interarea routing are used.


• Level 1-2 intermediate system keeps
separate Level 1 and Level 2 LSDBs, and L2
Level 1
advertises the default route to Level 1 Area L1 L1L2
routers.
– Level 2 (similar to OSPF backbone routers): L1

• Interarea routing is used. L1


• The Level 2 (backbone) area is a contiguous
set of Level 1-2 and Level 2 routers.
• The Level 2 intermediate system keeps a
copy of the Level 2 area LSDB.
IS-IS Routing Logic
– Level 1 router: For a Area address is used to route between
areas; system ID is not considered.
destination address, compare
the area address to this area: IS-IS Domain
• If not equal, pass to the nearest
Level 2
Level 1-2 router. Area L2 L2
• If equal, use the Level 1 database L2
L1 and L2
to route by the system ID. L1L2 L1L2
L2

– Level 1-2 router: For a


L2
destination address, compare Level 1
Area L1 L1L2
the area address to this area:
• If not equal, use the Level 2 L1

database to route by the area L1


address.
• If equal, use the Level 1 database System ID is used to route within an
area; area address is not considered.
to route by the system ID.
IS-IS Routing Example
Area 49.00AA
R2-L1 R4-L1

49.00AA.0000.0C22.2222.00 49.00AA.0000.0C44.4444.00

R3-L1L2 R1-L1L2

49.00AA.0000.0C33.3333.00 49.00AA.0000.0C11.1111.00

49.00CC.0000.0C88.8888.00

49.00BB.0000.0C55.5555 .00
R5-L1L2 R8-L1L2

49.00C C.0000.0C99.9999.00
R6-L1 R7-L1 R9-L1
Area 49.00BB Area 49.00CC

49.00BB.0000.0C66.6666.00 49.00BB.0000.0C77.7777.00
Asymmetric IS-IS Routing
L1 Area 2 L1 Y

10 L1L2 15

10 10 10 L2
10 Area 3
10 L1L2
L1L2 L1
15 15
10
10
10

10 10
10 10
X L1L2 L1L2 L1L2
Area 5
L1 Area 1 L1 Area 4
Legend:
The path that X uses to reach Y
The path that Y uses to reach X
Symmetric IS-IS Routing
– Route leaking helps reduce suboptimal routing by allowing Level 2
information to be leaked into Level 1.
– An up/down bit in the TLV field is used.Legend:
The path that X uses to reach Y
The path that Y uses to reach X
L1 Area 2 L1 Y
10 L1L2 15

10 10 10 L2
10 10 Area 3
L1 L1L2
L1L2
15 15 10
10
10
10 10
10 10
X L1L2 L1L2 L1L2
Area 5
L1 Area 1 Level 2 route leaks into Level 1 LSDB. L1 Area 4
OSI and IS-IS PDUs
– A unit of data is a PDU:
• Network PDU = Datagram, packet
• Data-link PDU = Frame
– IS-IS PDUs are encapsulated directly into a data-link
frame.
– There is no CLNP or IP header in a PDU.
– IS-IS defines four types of PDUs:
• Hello PDU:
– End system hello (ESH)
– Intermediate system hello (ISH)
– IS-IS Hello (IIH)
• LSP PDU
• Partial sequence number PDU (PSNP)
• Complete sequence number PDU (CSNP)
Link-State Packet
PDU type, length, LSP ID,
– A router describes itself with an LSP. sequence number, remaining
– LSPs are sequenced to prevent duplication: lifetime
• LSPs assist with synchronization.
• Sequence numbers begin at 1.
• Sequence numbers are increased to indicate the LSP Header
newest LSP. TLV 1
– LSPs in LSDB have a remaining lifetime: TLV 2
• Allows synchronization And so on
• Decreasing timer  IS neighbors
 ES neighbors
– Each set of information includes a TLV.  Authentication information
TLV Type Code Length Field Value Variable Length
Area address 1 Area ID length + 1 Areas
Intermediate system
2 Neighbor count + 1 IS neighbors
neighbors
Connected IP prefixes—4-byte metric,
IP internal reachability 128 Number of connected prefixes
4-byte prefix, 4-byte mask
IP external reachability Number of redistributed Redistributed IP prefixes—4-byte
130
prefixes metric, 4-byte prefix, 4-byte mask
Integrated IS-IS for IPv6
– Two TLVs are added to introduce IPv6 routing:
• IPv6 reachability TLV (0xEC or 236)
• IPv6 interface address TLV (0xE8 or 232)
– There is a new protocol identifier:
• IPv6 NLPID (0x8E or 142) advertised by IPv6-enabled
routers
– A multitopology extension is used:
• Single SPF instance for IPv4 and IPv6
• Separate SPF instances, one for IPv4 and one for IPv6
IS-IS Network Representation
– Generally, physical links can be placed in
these two groups:
• Broadcast: Multiaccess subnetworks that support
the addressing of a group of attached systems
• Point-to-point: Permanent or dynamically
established links
– Only two link-state representations are
available in IS-IS:
• Broadcast for LANs and multipoint WANs
• Point-to-point for all other topologies
– IS-IS has no concept of NBMA networks.
Broadcast Mode
– It is used for LAN and multipoint WAN interfaces.
– Adjacency is recognized through hellos; there are separate adjacencies
for Level 1 and Level 2.
– Designated IS (DIS) creates a pseudonode and represents a LAN.
– DIS for Level 1 and Level 2 may be different.
– DIS is elected, based on these criteria: The pseudonode is
• Only routers with adjacencies are eligible. logically connected to
all other nodes.
• The highest interface has priority.
• The highest SNPA (MAC) breaks ties. IS IS
– There is no backup DIS. DIS

All physical routers still


establish adjacency to Logical
each other.
IS IS
Level 1 and Level 2 LSPs and IIHs
– The two-level nature of IS-IS requires
separate types of LSPs: Level 1 and Level 2
LSPs.
– DIS is a representative of a LAN:
• DIS sends pseudo-Level
Broadcast 1 and pseudo-Level
Point-to-Point 2
Usage
LSPs for aLAN,
LAN.full-mesh WAN PPP, HDLC, partial-mesh WAN
Hello timer 3.3 sec for DIS, else 10 sec 10 sec
• There is a separate
Adjacencies n*(n-1)/2 DIS for Level 1 n-1 and Level 2.
Uses DIS Yes No
LSP and IIH sent as multicast sent as unicast
IIH type Level 1 IIH, Level 2 IIH Point-to-point IIH
LSP Flooding
– A single procedure is used for flooding, aging, and updating of LSPs.
– Large PDUs are divided into fragments that are independently
flooded.
L1 Area 2
L1 LSDB: Area 2
L1

L1 LSDB: Area 2

L1L2 L1L2
Separate LSDBs are L1 LSDB: Area 2 L1 LSDB: Area 2
maintained for Level 1 and Level 2 LSDB
Level 2 LSPs. Level 2 LSDB
Level 2 backbone
L1 LSDB: Area 1
Level 2 LSPs are flooded
Level 2 LSDB throughout the Level 2
backbone.
L1L2

L1 LSDB: Area 1
Level 1 LSPs are flooded
L1 Area 1 within an area.
LSDB Synchronization
– SNP packets are used to ensure synchronization and reliability:
• Contents are LSP descriptions
– PSNP is used:
• For acknowledgment of LSPs
• To request missing pieces of LSDB
– CSNP is used:
• Periodically by DIS on the LAN to ensure LSDB accuracy
• On point-to-point link when the link comes up

CSNP sent
periodically
R2-DIS 1. CSNP: LSP 76, 77, 78
R1
3. LSP 77
3. PSNP: ACK for new LSP
2. PSNP: I missed LSP 77
4. PSNP: ACK for LSP 77 1. Link went down

X
2. New LSP
R2 R3
LAN R1 Point-to-point
IS-IS Adjacencies
IS-IS adjacencies are established, based on the
area address and the router type.

L1 L1L2 L1L2

LAN

Level 1
Level 2
L1 L1L2
Area 1 Area 2

L1 No adj. L1 L2
L1 L1 L2 L1 L1 L1L2 L2 L1L2

Area 1 Area 1 Area 1 Area 1


L1L2 No adj. L2
L1L2 L1L2 L1 L1L2 L2 L1L2
P2P
Area 1 Area 1 Area 2 Area 1 Area 2
Single Topology Restrictions
• IS-IS for IPv6 uses the same SPF for both IPv4 and IPv6:
– Not really suitable for an existing IPv4 IS-IS network
where customer wants to turn on scattered IPv6 Disable adjacency check
support
– If using IS-IS for both IPv4 and IPv6, then the IPv4 and router isis
no adjacency-check
IPv6 topologies must match exactly. Cannot run IS-IS
IPv6 on some interfaces, IS-IS IPv4 on others.
router isis 1
– Will only form adjacencies with similarly-configured address-family ipv6 unicast
routers (e.g., an IS-IS IPv6-only router will not form an adjacency-check disable
adjacency with an IS-IS IPv4/IPv6 router) (Exception is
over Level 2-only interface)
– Cannot join two IPv6 areas via an IPv4-only area.
Level 2 adjacencies will form, but IPv6 traffic will black-
hole in the IPv4 area. Level 2 routers may be
IPv4, IPv6 IPv4, IPv6 IPv4, IPv6 IPv4, IPv6
L1 configured differently,
All routers in an area
Area 1 Area 2 but no routing hole can
must run the same set
exist.
of protocols.
X
L1 XL1 L2 L2 IPv6 Backbone is not
Consistency check can contiguous!
Area 1 Area 3
be disabled.  IPv6 traffic between Area 1
IPv4 only IPv4 only and Area 2 will fail.
Multitopology IS-IS for IPv6
– Removes limitations from network design when it is running IS-IS for both IPv4
and IPv6
– Runs two SPF instances
– Allows the use of different metrics for IPv4 and IPv6
– Transition mode allows easier migration from single-topology to multitopology
environment.

IPv4 IPv4 IPv4 IPv4


L1 L2
Area 1 Area 2
IPv4 IPv4

L1 L1 L2 L2
Area 1 IPv6 IPv6 Area 3
IPv4 L1 IPv4
IPv4 IPv4

IPv6 IPv6
Area 1 L2
IPv6 Area 1 Area 2
IPv6 IPv6

Вам также может понравиться