Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
How it all works
• Internet model
eBGP eBGP
AS X AS Y AS Z
Barry Greene & Philip Smith “Cisco ISP Essentials”
2
Recap
• In ISP networks, IGPs
– Allow routers within an AS to learn about each other
– Carry next-hop reachability info
• Carries infrastructure info (loopbacks & ptp)
• NOT customer routes!
– scalability and fast convergence
• Hence, minimise the number of prefixes carried in IGP!
• BGP
– Carries customer prefixes
– Exchanges network info with other networks
• Carries internet route across the AS
3
OSPF - Intro
• Link-state protocol
– SPF algorithm
– Protocol number (89) – runs on top of IP
4
Link State Operation
R2
R2 R1
R1 LSAs LSDB (Topology)
LSAs
Dijkstra’s SPF
R3 R4
Routing Table
Best Paths
SPF Tree
5
Link State Operation
• Each link-state router learns about its links and
connected networks
– builds a link state packet – LSP (LSAs for each link)
6
Shortest Path First (SPF) Tree
8
OSPF Metric
• Uses link/path cost as metric
9
Router ID
• Uniquely identifies a link-state router
– 4-byte Router ID
• Either:
IOS:
router-id <4-byte>
– Explicitly configured => Junos:
set routing-options router-id <4-byte>
– ** Loopbacks preferred!
• Why??
10
OSPF Packets
OSPF Header OSPF Message
11
OSPF Packets
• Hello packet
12
OSPF Packets
• DBD packet
– To sync LSDBs
13
OSPF Packets
• LSR packet
– During the sync process, if the local router finds its LSDB is
out of date (older LSAs than those received in the DBD –
seq#)
14
OSPF Packets
• LSU packet
– Link state info is propagated through LSAs
– LSUs contain
• # of LSAs
• List of LSAs (single or multiple)
15
OSPF Packets
• LSAck packet
– OSPF routers need to acknowledge receipt of each LSA
• LSAck
– Dataless packet
16
Neighbor States
+----+
|Down|
+----+
Hello received (no local Router-ID)
+----+
|Init|
+----+
2-way received (local Router-ID seen)
+-----+
|2-way| DR/BDR selected from the “neighbor” list
+-----+
+-------+
Master-Slave decision + DBD Seq# |ExStart|
(higher router ID) +-------+
+--------+
|Exchange| Exchange DBD (local LSDB)
+--------+
N Y - more recent LSAs req?
+----+ +--------+
Adjacency estb
|Full| |Loading | LSRs sent to neighbor
(inc Router LSAs &
+--------+
Network LSAs) +----+
17
Scaling - Hierarchy
• With single area OSPF, as network grows:
– Larger LSDB and routing table
– Frequent LSA flooding and SPF compute
ABR ABR
ABR
10.10.10.64/26
10.10.10.192/26
2001:db8:0:1::/64
10.10.10.128/26 2001:db8:0:3::/64
Area 1 2001:db8:0:2::/64 Area 3
Area 2
Virtual links
• OSPF requires regular areas to be connected to the
backbone (Area-0)
– Inter-area routes propagated through the backbone
Area 1
OSPF Network Types
• Point-to-point
– Can ONLY have one neighbor
connected on the link
– LSUs sent to ”all OSPF routers”
multicast
• 224.0.0.5/FF02::5
• Broadcast (multi-access)
– Could have more than one
neighbor connected on the link
• Ethernet links
20
Broadcast NW issues
• Number of adjacencies
– # of Adj = n(n-1)/2;
21
DR/BDR
• Hence, OSPF elects a Designated and Backup
Designated router for broadcast networks
– Adjacencies only formed with DR and BDR
– DR floods to others
• 224.0.0.5/FF02::5
DR BDR
22
DR/BDR Election
• Uses the Hello protocol (Rtr Priority)
– highest OSPF interface priority – DR
• Next highest priority – BDR
– Configurable: IOS:
(config-if)#ip/ipv6 ospf priority <0-255>
Junos:
set protocols ospf/3 area <area-id> interface <id> priority <0-255>
– Recommended:
• configure higher priority for routers meant to be DR and BDR!
23
LSA Types
• LSA Header
LS age Options LS Type Type Description
Link State ID 1 Router LSA
Advertising Router 2 Network LSA
LS Sequence# 3 Summary LSA (ABR)
24
LSA Types
• Type-1 (Router LSA)
– router’s connected (active) links/interfaces and metrics
– flooded within the area (does not cross ABR)
– Identified by router ID of originating router
25
LSA Types
• Type-3 (Summary LSA - ABR)
– Inter-area routes
• Allows condensation at the are borders
26
LSA Types
Area0
Type 1
Backbone
Area10
Area20
27
LSA Types
• Type-4 (Summary LSA - ASBR)
– To identify the ASBR
• Route/path to the ASBR, to forward traffic destined for nws outside the
domain
28
LSA Types
• Type-5 (AS-external LSA)
– To advertise external routes into OSPF
• Destinations outside the domain
– Originated by the ASBR
• Generates a Type-5 for each external route
– Floods to the area it belongs
• Propagated unaltered to other areas via backbone by ABR of the area
– Identified by the external subnet carried in the LSA
29
LSA Types
Non-OSPF
Area0
Type5
Backbone
Type4
Area10
Area20
30
LSA Types
• Opaque LSAs
– To advertise optional router capabilities
• Protocol extensibility
• RFC5250
31
Best path compute
• Intra-area routes
– Lowest cost to the each nw within the area
• Inter-area routes
– Type3 (summary LSA-ABR) includes cost to each network
– Best path = lowest (cost to ABR + cost in Type3 LSA)
– If set (1), Type-2 ext metric (E2): same throughout the domain
(only one ASBR)
• Seed metric
32
OSPFv3 – RFC5340
• To carry IPv6 in OSPF
– Router ID, Area ID and link state ID still 32-bit
33
OSPFv3 – New LSAs
• Type-8 (Link LSA)
– Advertise local router’s link-local to other routers on the link,
and list of v6 prefixes associated with link
– Not flooded beyond the link (link-scope)
– Link state ID is the interface ID on the link
34
OSPFv3 – Renamed LSAs
• Type-3 (Inter-Area-Prefix LSA)
– Equivalent to Type-3 summary LSA in OSPFv2
• Describes routes to v6 prefixes within an area
– Originated by ABR
• Generates a Type-3 for each IPv6 prefix
35
Passive interface
• When OSPF is configured/enabled on an interface
(or for a subnet)
– router will try to discover neighbors on that interface/within
the subnet
– We can disable sending OSPF packets on those interfaces
where we know there will be no neighbors
• While still advertising the network in OSPF
IOS:
IOS:
ipv6 router ospf <process-id>
ipv6 router ospf <process-id>
router ospf <process-id>
router ospf <process-id>
passive-interface default
passive-interface <interface-id>
no passive-interface <interface-id>
Junos:
set protocols ospf/3 area <area-id> interface <int-id> passive
36
37