CCIE SP Notes For Written
CCIE SP Notes For Written
These should not be treated as a teaching guide, but just a simple guide with interesting
information that might be useful to others besides me. In the majority of the posts, the
included information refers to the lab exam software versions, but there are quite a few of
notes and configuration examples that refer to newer versions. Hopefully the information is
correct at its majority, but if you encounter anything that seems wrong, please don’t hesitate
to write a comment under the relevant NTS page.
I have used various colors, either on the text or on the background, to aid focusing where
needed. IOS and IOS-XR have a distinct background color, so it's easier to find the one
you're looking for (i tried to put a lot of information about IOS-XR too, since it plays an
important role in the exam). Things that i consider tricky or important are colored in yellow
background. Cli commands and important cli outputs are colored in blue, while green
and red are used to differentiate between correct and wrong/error/warning wherever
possible.
You can always find the latest version of this file under NTS.
History
Version
Comments
V1.0 Initial version
V1.1
Intro & About me added
What is my advice to everyone thinking of trying the current CCIE SP lab? Learn the core
technologies (IGPs, MP-BGP, MPLS/TE, Multicast, IPv6) inside-out, combine and test them
in all possible scenarios (one above the other, one combined with the other, multiple
combinations above or below other technologies, etc.) and then focus on configuration speed.
Think fast, act faster. When you become a master on that, spend some time on every other
topic too. And don't risk any challenges, unless you're crazy like me!
(from which ~1,5 hours on avg were spent daily on this blog)
Personally i believe that for someone with a good experience in networking, with
deep understanding of the technologies and with the willingness to devote some hours
of his/her daily schedule to studying and practicing, while at the same time being
honest with his/her readiness, it’s absolutely doable to pass any CCIE lab in just a few
months, as long as he/she improves his/her time management skills to compensate for
the strict lab timings.
--
Tassos
CCIE #19858
354,5
Result
PASS
Table of Contents
UNI-ENI Vlans vs Private Vlans
............................................................................................................................. 4 Frame-
Relay.........................................................................................................................................................
.... 7 PPP/Serial/POS
...................................................................................................................................................... 14
RIP/RIPng.................................................................................................................................................
............. 22
EIGRP.......................................................................................................................................................
.............27
OSPFv2/OSPFv3......................................................................................................................................
.............. 38 IS-IS
..................................................................................................................................................................
.....54 BGP
..................................................................................................................................................................
...... 71 Advanced
BGP.......................................................................................................................................................8
5 VRF
..................................................................................................................................................................
.... 102
MPLS/LDP...............................................................................................................................................
............ 111 L3VPN Redistribution
......................................................................................................................................... 124 Inter-AS
MPLS L3VPN.......................................................................................................................................
135 CsC
..................................................................................................................................................................
..... 148
6PE/6VPE.................................................................................................................................................
............ 162
AToM/L2VPN/VPLS...............................................................................................................................
............176 RSVP/MPLS-TE
.................................................................................................................................................. 203
Advanced MPLS-
TE............................................................................................................................................ 229
Multicast ..................................................................................................................................................
............ 270 Advanced Multicast
............................................................................................................................................. 281
Multicast
VPN......................................................................................................................................................
293 BFD
..................................................................................................................................................................
.... 304 QoS
..................................................................................................................................................................
..... 309 Other
..................................................................................................................................................................
.. 313
Types
Isolated Vlans
Community Vlans Characteristics
IOS
IOS
vlan 150
uni-vlan community
Verification
IOS
Vlan Type
Private Vlans
Types
Primary Vlan
Secondary Vlans
o Isolated Vlans
o Community Vlans
Characteristics
Configuration
IOS
vlan 100
private-vlan primary
vlan 200
private-vlan isolated
!
vlan 300
private-vlan community
!
interface GigabitEthernet0/7
port-type nni
switchport private-vlan mapping 100 200,300 switchport
mode private-vlan promiscuous
!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
Verification
IOS
isolated
community
Gi0/7, Gi0/11
Gi0/7, Gi0/12
6
Frame-Relay
Multiprotocol Interconnect over Frame-Relay is defined in RFC 2427. PPP over Frame Relay
is defined in RFC 1973.
FECN/BECN
o If set to 1, it indicates that congestion was experienced in the direction opposite of the
frame transmission, so the source is informed of that congestion.
DE
If set to 1 by a DTE device, it indicates that the frame has lower importance than other
frames, so when the
networkbecomescongested,DCEdevicescandiscardthisframebeforediscardingother
framesthatdonot have the DE bit set.
LMI
LMI VC status messages provide communication and synchronization between Frame Relay
DTE and DCE devices, aka reporting on the status of PVCs.
It's enabled by default in all Frame-Relay interfaces and it's type (Cisco, ANSI, Q933a) is
automatically detected.
Use keepalives to track PVC status end-to-end if multiple frame-relay providers are in
between end-points.
IOS
class FR-MAPCLASS !
CRC
Frame Relay uses cyclic redundancy check (CRC) as an error-checking mechanism. No error
correction takes place.
7 NTS for CCIE SP Lab by chatasos
Frame-Relay Switching
Routers can be configured as Frame Relay switches (frames from a PVC arriving on an
incoming interface are switched to another PVC on an outgoing interface, so the incoming
DLCI in the arriving frames is replaced by an outgoing DLCI). It applies only to physical
interfaces.
IOS
frame-relay switching
!
interface Serial2/0
encapsulation frame-relay
clockrate 64000
frame-relay intf-type dce
frame-relay route 200 interface Serial2/1 201
!
interface Serial2/1
encapsulation frame-relay
clockrate 64000
frame-relay intf-type dce
frame-relay route 201 interface Serial2/0 200
"frame-relay
switching"mightalsoberequiredincaseofAToM.YoushouldgetAToMworking
withoutframe-relayswitching,butafteryoureloadtherouteryoumaygetamessage"Must
enable frame-relay switching to configure
DCE/NNI"whilethebootloaderisrunning.
"no keepalive"mustbeconfiguredinrealnetworks,GNS3canworkwithoutit.
Address Resolution
IPv4
o Inverse ARP
o Static mapping
IPv6 doesn't need a map for local ping to work (unlike IPv4).
Inverse ARP
Don't forget to always define one interface (the one providing the clock) of each link as DCE
and set the clock
rate.
8 NTS for CCIE SP Lab by chatasos
only directly connected devices can be resolved with inverse ARP (hub-n-spoke is
an issue)
if there is a static map for a protocol for a PVC, inverse ARP is disabled for that
PVC
dynamic mappings created by inverse ARP are overwritten by static mappings
use "clear frame-relay inarp" to clear the dynamic mappings
(sometimes shut/no-shut or a
map vs interface-dlci
Most IPv6 routing protocols use Link Local addresses for next hop and neighboring, so these
need to be mapped too, like the Global Unicast addresses.
When a multipoint subinterface is created on a physical interface, all the DLCIs are always
assigned to the physical interface, until they are specifically assigned to the subinterfaces.
Configurations (IOS)
interface Se0/0
encapsulation frame-relay
"frame-relay map"isneedifDLCIsaren'tprovidedbyaframe-relayswitch.
9 NTS for CCIE SP Lab by chatasos
interface Se0/0
encapsulation frame-relay
Configuration Examples
IOS
interface POS2/0
encapsulation frame-relay
!
interface POS2/0.1 point-to-point
frame-relay interface-dlci 22
IOS-XR
interface POS2/0
encapsulation frame-relay
!
interface POS2/0.1 point-to-point
IOS
interface POS2/0
encapsulation frame-relay
IOS-XR
not supported
11 NTS for CCIE SP Lab by chatasos
Use this when you have frame-relay and you require authentication or other PPP specific
characteristics.
encapsulation frame-relay
clock rate 64000
frame-relay interface-dlci 100 ppp Virtual-Template1 frame-
relay intf-type dce
!
interface Virtual-Template1
encapsulation frame-relay
interface Virtual-Template2
ip address 1.1.1.2 255.255.255.0
Under the virtual-template you can configure whatever parameters are applicable to ppp in
general.
You might have issues with POS interfaces and PPPoFR in GNS3. Try to use Serial
interfaces instead.
Multilink Frame-Relay
R1 (IOS)
interface Serial2/0
interface MFR1
ip address 12.12.12.2 255.255.255.0 frame-relay map ip
12.12.12.8 100 broadcast frame-relay intf-type dce
R2 (IOS)
interface Serial0/0
interface MFR1
ip address 12.12.12.8 255.255.255.0 frame-relay map ip
12.12.12.2 100 broadcast
12 NTS for CCIE SP Lab by chatasos
IOS
BID = MFR1
Bundle links:
Frame-relay configuration is the usual one. You can also use MFR subinterfaces.
Hints
If you need somehow to differentiate traffic in a Serial/POS interfaces, then using frame-relay
encapsulation on it, you can define subinterfaces based on DLCIs. Another (maybe more
complex) solution would be to use multiple ppp virtual-templates.
13 NTS for CCIE SP Lab by chatasos
PPP/Serial/POS
PPP (Point-to-Point Protocol) is defined in RFC 1661. PPPoE (PPP over Ethernet) is
described in RFC 2516.
Serial
PPP
router).
Multilink PPP
R1 (IOS)
interface Serial2/0
encapsulation ppp
ppp multilink
ppp multilink group 1 clock rate 64000
!
interface Multilink1
R2 (IOS)
interface Serial0/0
encapsulation ppp
ppp multilink
255.255.255.0
255.255.255.0
14
SGBP is used between routers to coordinate them for multilink ppp termination.
R4 (IOS)
sgbp group SGBP-GRP
sgbp member R5 5.5.5.5
sgbp source-ip 4.4.4.4
!
username SGBP-GRP password 0 SGBP-PASS !
multilink virtual-template 1
!
interface Virtual-Template1
R5 (IOS)
sgbp group SGBP-GRP
sgbp member R4 4.4.4.4
sgbp source-ip 5.5.5.5
username SGBP-GRP password 0 SGBP-PASS !
multilink virtual-template 1
!
interface Virtual-Template1
IOS
R4#sh sgbp
Group Name: SGBP-GRP Ref: 0xDE80000
Seed bid: default, 50, default seed bid setting
PPPoE
IOS
PPPoE server
interface Virtual-Template1
mtu 1492
interface X
PPPoE client
interface X
pppoe enable
pppoe-client dial-pool-number 1
!
interface Dialer1
mtu 1492
ip address 10.10.10.2 255.255.255.0 encapsulation ppp
dialer pool 1
Youmustdefine"encapsulation ppp"underthedialer,otherwisethepppcallwon'thappen.
Not all routers support the PPPoE functionality.
PPPoE server/client is not supported on IOS-XR of C12k.
PPP Authentication
IOS
Server
encapsulation ppp
Client
If you don't define a chap hostname, then the router's name is used as the username.
In the following example the first router authenticates the second using CHAP (encrypted),
while the second router authenticates the first using PAP (cleartext).
IOS
encapsulation ppp
encapsulation ppp
POS Configuration
You will find most configurations parameters under the following command:
IOS
R1(config-if)#pos ?
ais-shut
delay
flag
framing
report
scramble-atm
threshold
Send LAIS when shutdown Delay POS alarm triggers Specify byte
value specify framing
IOS
LOF =
LINE
AIS =
PATH
0 LOS=0 0 RDI=0
BIP(B1) =0
FEBE=0 BIP(B2) =0
Framing: SONET
APS
COAPS = 0 PSBF = 0
State: PSBF_state = False Rx(K1/K2): 00/00 Tx(K1/K2): 00/00
S1S0 = 00, C2 = 00
Remote aps status (none); Reflected local aps status (none)
CLOCK RECOVERY
RDOOL = 0
0 RDI=0 0 UNEQ=1
AIS =
PLM =
LOP = 0 NEWPTR = 0
Tx(K1/K2): /
18
Keepalives
The keepalive command applies to serial interfaces using HDLC or PPP encapsulation. It
does not apply to serial interfaces using Frame Relay encapsulation.
Keepalives are independent between the two peers. One peer end can have keepalives
enabled; the other end can have them disabled. Even if keepalives are disabled locally, LCP
still responds with ECHOREP packets to the ECHOREQ packets it receives.
CRC
The cyclic redundancy check (CRC) on a serial interface defaults to a length of 16 bits. You
can change it to 32 bits.
IOS
interface POS2/0
crc 32
IOS
POS Channel
POS channel link bundling provides load-balancing across all active links in a bundle.
IOS
interface pos-channel 1
ip address 30.30.30.1 255.255.255.0
!
interface pos2/0
channel-group 1 !
APS
The APS feature provides redundancy and allows for a switchover of POS circuits in the
event of circuit failure.
You configure a pair of SONET/SDH lines for line redundancy. When the Working (W)
interface fails, the Protect (P) interface quickly assumes the traffic load (usual swichover time
is 50 ms)
Most configuration options are found under the "aps" command:
IOS
lockout
manual
protect reflector revert signalling timers unidirectional
working
?
Authentication string
Force channel
Group association
Lockout protection channel
Manually switch channel
Protect specified circuit
Configure for reflector mode APS Specify revert operation and
interval Specify SONET/SDH K1K2 signalling
APS timers
Configure for unidirectional mode Working channel number
20
Configuration
IOS
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface POS2/0
!
interface POS3/0
ip address 20.20.20.1 aps group 10
aps protect 1 1.1.1.1 aps revert 1
255.255.255.0
255.255.255.0
You need the configure a similar setup on the peer router too.
You can have the Working and Protect interfaces on different routers and they will
communicate each other using PGP (Protect Group Protocol), which runs over UDP.
IOS
R1#sh aps
POS3/0 APS Group 10: protect channel 0 (Inactive)
No Request (Null)
Remote APS configuration: (null)
You need an ADM between the routers for the K1/K2 signals to work.
21 NTS for CCIE SP Lab by chatasos
RIP/RIPng
RIPv1 (Routing Information Protocol v1) is defined in RFC 1058. RIPv2 is defined in RFC
2453.
RIPng (RIP for IPv6) is defined in RFC 2080.
If the advertised prefix is part of a directly connected network, the subnet mask of that
connected interface is used as the subnet mask of the prefix. Otherwise, major classes A/B/C
are used accordingly.
Use secondary ip addresses on intermediate links to fix the discontinuous class issues in RIP
v1.
RIP v2
classless routing
next-hop included in updates
authentication
external route tags
multicast updates (to 224.0.0.9)
send v1 updates
listen to v1/v2 updates Passive interface
InIOS,youcanuse"ip rip
triggered"underserialinterfaces(onbothneighbors)tominimizethe number of updates.
Unicast updates
IOS
IOS-XR
Usethecommand"no validate-update-
source"undertheRIPprocessifyouwanttoenable exchange of routes between neighbors with
different networks.
Configuration
IOS
IOS-XR
IOS-XR has v2 enabled by default. You need the change the send/receive version under the
interface if v1 is required.
Route Summarization
IOS
interface Serial2/0
ip summary-address rip x.x.x.x y.y.y.y
IOS-XR
not supported
Route Filtering
Authentication
Two methods:
clear text
MD5
IOS
interface X
ip rip authentication mode md5
ip rip authentication key-chain KEYCHAIN
!
key chain KEYCHAIN
key 1
key-string TESTPASS
IOS-XR
router rip
interface TenGigE0/0/0/0
authentication keychain KEYCHAIN mode md5
!
key chain KEYCHAIN
key 1
key-string TESTPASS
24 NTS for CCIE SP Lab by chatasos
PE-CE
CE
IOS
router rip
IOS-XR
PE
IOS
router rip
address-family ipv4 vrf VPN
exit-address-family
IOS-XR
router rip
vrf VPN
interface X
!
no auto-summary
In IOS, if RIP v2 is to be used, then it must be defined under the ipv4 vrf address-family on
the PE.
RIPng (IPv6)
IOS
interface X
ipv6 rip RIPNG enable
!
ipv6 router rip RIPNG
IOS-XR
not supported
Defining the RIPng process is not required in IOS; it gets automatically created once you
enable it under an interface. Removing the RIPng process will also remove all other
configuration from interfaces.
Since you can have multiple RIPng processes, you must use a different UPD port for every
RIPng process to
differentiate the incoming updates.
EIGRP
EIGRP (Enhanced Interior Gateway Routing Protocol) is described in draft-savage-eigrp.
bandwidth
o minimum bandwidth (kbps) => 10^7 / bandwidth
delay
o total route delay (tens of microseconds) => delay/10
reliability
o likelihood of successful packet transmission (0-255)
load
o effective load of the route (0-255)
mtu
o minimum MTU size (bytes)
All metrics are calculated from the outgoing interface towards the destination.
metric = [K1 * bandwidth + (K2 * bandwidth) / (256 - load) + K3 * delay] * [K5 / (reliability
+ K4)]
Default
K1=K3=1
K2=K4=K5=0
Bandwidth and Delay are the ones used by default. metric = (10^7/bandwidth +
delay/10) x 256 Example
IOS
router eigrp 1
metric weights 0 1 0 1 0 0
IOS-XR
metric weights 0 1 0 1 0 0
Route Selection
The lowest calculated metric from a router to a destination is called the feasible
distance (FD) of that destination
If a neighbor's advertised distance to a destination is lower than router's FD, then
that neighbor becomes a feasible successor (FS) to the specific destination
Every destination for which there is at least one FS, will be installed in the router's
EIGRP topology
For every destination in the router's EIGRP topology, the route with the lowest
metric will be installed
in the RIB
The neighbor advertising that route will be successor for that destination
Load Balancing
By default traffic to equal cost paths (up to 4) is load balanced. Unequal-Cost Load
Balancing
You can use a variance as a multiplier to determine which routes are feasible for
unequal-cost load balancing, according to the following condition:
Routes that follow the above rule are installed into RIB as long as maximum-paths
(default=4) is not exceeded.
Traffic Sharing
balanced (default)
minimum
o traffic is distributed equally across all paths that have a cost equal to the minimum cost
path
28
In general:
variance
o affects what non-lowest cost routes are installed into RIB
traffic-share
o affects how traffic is distributed across best routes
IOS
router eigrp 1
traffic-share min across-interfaces variance x
IOS-XR
variance x
Traffic-share is not supported in IOS-XR.
Stub Routing
Arouterthatisconfiguredasastubwiththe"eigrp
stub"commandcannotbeusedastransitandshares connected and summary routing information
with all neighbor routers by default. Generally, the following can be permitted/denied
explicitly :
connected
static
summary
redistributed
leak-map
receive-only
Stub routing also minimizes the exchange of queries.
Route Summarization
IOS
interface X
ip summary-address eigrp 100 x.x.x.x y.y.y.y
In order to use only one path for traffic forwarding, but install more different-cost paths into
RIB (for faster
IOS-XR
Split-horizon
Configuration
IOS
router eigrp 1
IOS-XR
router eigrp 1
!
address-family ipv6
interface X
information originated. With non-broadcast networks (such as Frame Relay multipoint), you
may want to
Authentication
IOS
interface X
ip authentication mode eigrp 1 md5
ip authentication key-chain eigrp 1 KEYCHAIN
!
key chain KEYCHAIN
key 1
key-string TESTPASS
IOS-XR
router eigrp 1
key-string TESTPASS
send-lifetime 1:00:00 february 01 2014 infinite accept-
lifetime 1:00:00 february 01 2014 infinite
PE-CE
R1 (CE)
IOS
router eigrp 1
network 1.1.1.0 0.0.0.255
IOS-XR
router eigrp 1
R2 (PE)
IOS
IOS-XR
address-family ipv4
autonomous-system 1 interface X
Somesoftwarereleasesrequirethemanualadditionof"no auto-
summary"undertheEIGRPprocess. Try to remove the whole EIGRP config and then reapply
it if this is the case.
EIGRP adjacency might not get established in IOS devices if you initially forget to add the
autonomous-
system number and add it later.
For IPv6 VRFs you have to use the named configuration on IOS (see below).
Verification
IOS
H Address Seq
Num
0 10.1.2.2
4
Interface
Fa0/0
RTO Q Cnt
5000 0
RTO Q Cnt
324 0
H Address Seq
Num
0 10.1.2.1
4
Interface
Fa1/0
32
IOS-XR
GSR#sh eigrp vrf VNP neighbors
Sun Jan 12 19:23:12.845 UTC
IPv4-EIGRP neighbors for AS(1) vrf VPN
H Address Seq
Num
0 10.1.0.10
4
IOS
Interface
Gi0/1/0/1.1019
13 00:01:10
8 200 0
IOS-XR
EIGRP route attributes are transferred as extended communities, EIGRP metric is transferred
as BGP MED.
IOS
best
Extended Community: RT:100:1 Cost:pre-bestpath:128:156160
0x8806:0:0
Named vs AS
Named (new)
o supports VRFs under IPv4 and IPv6
o supports IPv6 VRF-Lite
o interface configuration goes under the af-interface under the address-family
AS (old)
o o
IOS
interface POS2/0
ip address 10.10.10.1 255.255.255.0 ipv6 address
2001:20:20:20::1/64 ipv6 eigrp 2
exit-af-interface !
network 10.10.10.0
exit-address-family
!
address-family ipv6 !
0.0.0.255
unicast autonomous-system 2
af-interface POS2/0
authentication mode md5 authentication key-chain KEYCHAIN
exit-af-interface
! exit-address-family
AS Configuration (old)
IOS
interface POS2/0
ip address 10.10.10.2 255.255.255.0
ip hello-interval eigrp 1 20
ip hold-time eigrp 1 60
ipv6 address 2001:20:20:20::2/64
ipv6 eigrp 2
ipv6 authentication mode eigrp 2 md5
ipv6 authentication key-chain eigrp 2 KEYCHAIN
router eigrp 1
network 10.10.10.0 0.0.0.255
IOS
H Address Seq
Num
0 10.10.10.2
30
Interface
PO2/0
Hold Uptime
(sec)
45 00:56:05
Hold Uptime
(sec)
43 00:56:23
SRTT RTO Q
(ms) Cnt
46 276 0
SRTT RTO Q
(ms) Cnt
42 252 0
Multicast
Flow Timer
H Address Seq
Num
0 10.10.10.1
29
Interface
PO2/0
Pending
Interface Peers Un/Reliable SRTT Routes
PO2/0 1 0/0 1601 7969 0
Pacing Time
Un/Reliable
0/1
Hello-interval is 5, Hold-time is 15
Split-horizon is enabled
Next xmit serial <none>
Un/reliable mcasts: 0/0 Un/reliable ucasts: 4/8
Mcast exceptions: 0 CR packets: 0 ACKs suppressed: 0
Retransmissions sent: 3 Out-of-sequence rcvd: 2 Topology-ids
on interface - 0
Pacing Time
Un/Reliable
0/1
Multicast
Flow Timer
Hello-interval is 5, Hold-time is 15
Split-horizon is enabled
Next xmit serial <none>
Un/reliable mcasts: 0/0 Un/reliable ucasts: 3/6
Mcast exceptions: 0 CR packets: 0 ACKs suppressed: 0
OSPFv2/OSPFv3
OSPFv2 (Open Shortest Path First v2) is defined in RFC 2328. OSPFv3 is defined in RFC
5340.
OSPFv2 as PE/CE protocol is defined in RFC 4577.
Adjacencies
Adjacency can be formed between different networks if "ip unnumbered" is used on both
sides.
If multiple "network" commands are used, the most specific wins. The following must
match for adjacency to be successful:
area
hello/dead timers
mtu
network type
stub
authentication
no DR/BDR
o point-to-point(default on serial/pos, multicast hellos) o point-to-multipoint (multicast
hellos)
o point-to-multipoint non-broadcast (unicast hellos)
to tune the convergence time. Fast hellos (1 sec) are also possible using the "minimal"
keyword.
38 NTS for CCIE SP Lab by chatasos
chatasos (ccie-in-2-months.blogspot.com) – Notes: The Series (NTS) for CCIE SP Lab
By default the loopback interface is advertised as a /32 (stub). Use network-type point-to-
point under the
Path Selection
O - OSPF (intra-area)
IA - OSPF inter area
E1 - OSPF external type 1
E2 - OSPF external type 2
N1 - OSPF NSSA external type 1 N2 - OSPF NSSA external type 2
Distance and metric are evaluated as a second step, between routes of same type.
LSAs
Router-LSAs
Network-LSAs
Inter-Area-Prefix-LSAs
Link-LSAs
Intra-Area-Prefix-LSAs
Router-LSAs
Network-LSAs
Inter-Area-Prefix-LSAs
Link-LSAs
Intra-Area-Prefix-LSAs
NSSA-LSAs
Router-LSAs
Network-LSAs
Summary-LSAs
Router-LSAs
Network-LSAs
Summary-LSAs
NSSA-LSAs
NSSA
The NSSA ASBR redistributes routes into OSPF and originates the Type-7 LSAs.
Type-7 LSAs are only flooded within the originating NSSA area.
Type-7 LSAs have a propagate (P) bit that, when set, tells an NSSA ABR to translate
a Type-7 LSA into a Type-5 LSA.
The NSSA ABR translates Type-7 LSAs into Type-5 LSAs and floods them into area
0.
If there are multiple NSSA ABRs, the router with the highest Router ID is elected as
the translator.
The NSSA ASBR and the NSSA ABR can be the same router.
Preference between two Type-7 LSAs is determined by the following tie breaker
rules:
An LSA with the P-bit set is preferred over one with the P-bit clear
If the P-bit settings are the same, the LSA with the higher router ID is preferred
Links
LSDB optimization
You can decrease the LSA DB size by doing one or more of the following:
LSA flood-reduction
OSPF requires every LSA to be refreshed by default every 1800 seconds (30 mins) or
else the LSA will expire when it reaches 3600 seconds (1 hour).
40 NTS for CCIE SP Lab by chatasos
When flood-reduction is enabled on a router (towards a neighbor), then this router will flood
its self- originated LSAs with the DoNotAge (DNA) bit set, so they do not have to be re-
flooded every 30 mins. Of course any change in the contents of the LSA will cause the new
LSA to be re-flooded (again with the DoNotAge bit set).
IOS
interface X
IOS-XR
router ospf X
flood-reduction enable
area 0
flood-reduction enable
interface X
flood-reduction enable
In IOS-XR, flood-reduction can be configured under the ospf process, under a specific area
and under a specific interface.
Route Filtering
distribute-list
o in: filter the routes from entering the RIB
o out: filter the redistributed routes (E1/E2) entering OSPF on an ASBR
stub area
o o o o
LSA-3
LSA Searching
Depending on what type of LSAs you're searching for, you can use the following commands
to do so:
IOS
IOS-XR
sh ospf database router | i Link State ID Link State ID:
x.x.x.x
| i Link State ID
(address of Designated Router)
Searching for IPv6 is a little bit different, because the IPv6 prefix information is stored in
another attribute.
42 NTS for CCIE SP Lab by chatasos
Summarization
o area x range
o at ASBR
o summary-address 20.20.20.0 255.255.255.0 (IOS) o summary-prefix
20.20.20.0/24 (IOS-XR)
OSPFv3
Multicast addresses have become FF02::x from 224.0.0.x (where x=5 for all OSPF routers, or
x=6 for all DR
routers).
OSPFv3 runs per-link instead of per-subnet.
You cannot automatically detect OSPFv3 neighbors when using NBMA interfaces. You must
manually
All manually configured neighbors in OSPFv3 must be identified by their link-local IPv6
address.
On all OSPFv3 interfaces except virtual links, OSPFv3 packets are sent using the interface's
associated link- local unicast address as the source address.
On virtual links, a global scope IPv6 address must be used as the source address for OSPFv3
packets.
Link-LSAs (Type-8) include the prefixes which are configured on links and are flooded only
on local-link scope. Link-local addresses appear only in Link-LSAs.
For Stub areas, the Inter-area Prefix LSA can only be a default route. For NSSA areas, the
AS-External LSA can also be a default route.
If there is no IPv4 address assigned to any interface, then you must manually configure an
IPv4-formatted
IOS
!
interface Ethernet1/0
IOS-XR
router ospfv3 1
router-id 2.2.0.8 address-family ipv6 unicast area 0
A use for running multiple OSPFv3 instances is to have a single link belong to two or more
OSPFv3 areas. Also on a LAN you can have multiple adjacencies between different routers,
each one on a separate OSPFv3 process/instance.
OSPFv2 Authentication
Null(Type0) -default
Plain-text (Type 1)
MD5 (Type 2)
In IOS, you can configure the authentication type under the ospf process or under the
interface.
IOS
router ospf 1
area 0 authentication
!
interface X
ip ospf authentication
ip ospf authentication-key xxx
IOS
router ospf 1
area 0 authentication message-digest
!
interface X
In IOS-XR, you can configure the authentication type/key under the ospf process, under the
area or under the interface.
IOS-XR
IOS-XR
router ospf 1
area 0
authentication message-digest message-digest-key 2 md5 xxx
interface X authentication message-digest
You can always use various combination of enabling authentication for a specific area (under
the ospf process) or for a specific adjacency (under the interface).
OSPFv3 Authentication
You can configure an authentication (AH) or encryption (ESP) policy, either on an interface
or for an OSPFv3 area/process.
IPSec AH
Authentication
o MD5 o SHA1
IPSec ESP
Encryption
o 3DES
o AES (128,192,256 bits)
45
o DES
o NULL Authentication
o MD5 o SHA1
To use the IPsec AH (for authentication), you must use commands with the
"authentication" keyword. To use the IPsec ESP (for authentication & confidentiality),
you must use commands with the
"encryption" keyword.
ESP may use encryption and authentication or only authentication (when encryption=null),
but is not
recommended.
IOS
!
interface X
IOS-XR
router ospfv3 1
authentication ipsec spi 256 md5 password xxx encryption ipsec
spi 256 esp 3des password xxx
!
area 0
Links
Options Bits
V6 bit: It should be set, unless the router will not participate in IPv6 topology
calculation and IPv6 transit routing. If this bit is clear, the router/link should be
excluded from any IPv6 routing calculations.
R bit: It should be set, unless the router will not participate in any transit routing. It
allows the router to participate in the unicast topology, but does not allow transit
traffic.
E bit: It should be set if the interface attaches to a regular area (i.e., not a stub or
NSSA area).
N bit: It should be set if the interface attaches to an NSSA area.
DC bit: This bit describes the router's handling of demand circuits. It should be set
in Hellos/DBDs if
the router wishes to suppress the sending of future Hellos over the interface. It should
be set in LSAs, if the router can correctly process the DoNotAge bit when it appears
in the LS age field of LSAs.
NU bit: The "No Unicast" capability bit. If set, the prefix should be excluded from
IPv6 unicast calculations. If not set, it should be included.
LA bit: The "Local Address" capability bit. If set, the prefix is actually an IPv6
interface address of the Advertising Router.
P bit: The "Propagate" bit. Set on NSSA area prefixes that should be readvertised
by the translating NSSA area border.
virtual-link
o connects two areas 0 or extends area 0 across a transit area
o uses a transit area in order to connect areas 0 or extend area 0
o used in normal environments with multiple areas 0 or area 0 extension o configured
betweens two ABRs under the OSPF process
sham-link
o connects two areas X (including 0)
o uses the MPLS core in order to connect the areas
o used in MPLS VPN environments with backdoor links
o configured betweens two PEs/ABRs under the OSPF vrf process
Virtual-Link
All areas in an OSPF autonomous system must be connected to area 0. When this is not
possible in terms of direct connectivity, then a virtual-link can be used in order to connect the
non-backbone areas to area 0, as long as there is a common area between them.
DN bit: The "Down" bit. This bit controls an inter-area-prefix-LSAs or AS-external-LSAs re-
For virtual-links in OSPFv3 you have to use the remote neighbor's router-id (IPv4 format).
ABR #1
IOS
router ospf 1
area 1 virtual-link 2.2.2.2
IOS-XR
router ospf 1
area 1
virtual-link 2.2.2.2 ABR #2
IOS
router ospf 1
area 1 virtual-link 3.3.3.3
IOS-XR
router ospf 1
area 1
If a common area does not exist between the ABRs, then an additional area can be created to
become the
transit area.
The transit area through which the virtual link is configured, must have full routing
information, so it cannot
be any type of stub area. If this is the case, a GRE tunnel can be used to connect the two areas
0.
48 NTS for CCIE SP Lab by chatasos
The Sham Link Endpoint Address is an address in the VPN's address space, not the SP's
address space.
The sham link is an unnumbered point-to-point intra-area link and is advertised as a type 1
LSA.
Sham links are treated as OSPF Demand Circuits. This means that LSAs will be flooded over
them, but periodic refresh traffic will be avoided. Normal flooding is done over the backdoor
link, but if that fails, flooding will occur over the sham-link (because LSA synchronization
between sites must continue).
Configuration Steps
Create a /32 loopback that belongs to the relevant VRF on both PEs
Advertise the above /32 into BGP VPNv4 on both PEs
Don't advertise the above /32 into the OSPF vrf process on both PEs
Create a sham-link between the above /32 of the PEs under the OSPF vrf process
PE1
IOS
interface Loopback1
vrf forwarding VPN
ip address 1.1.1.1 255.255.255.255
!
router ospf 100 vrf VPN
IOS-XR
interface Loopback1
vrf VPN
ipv4 address 1.1.1.1/32
!
router ospf 100
IOS
interface Loopback1
vrf forwarding VPN
ip address 2.2.2.2 255.255.255.255
It must not be advertised inside customer's OSPF, because when there is no BGP VPNv4
route to
the Sham Link Endpoint Address, that address must become unreachable, so that the sham
link comes down.
49 NTS for CCIE SP Lab by chatasos
IOS-XR
interface Loopback1
vrf VPN
ipv4 address 2.2.2.2/32
!
router ospf 100
IOS
oob-resync timeout 40
Neighbor ID
Interface
...
10.10.10.2
OSPF_SL0
...
Pri State
0 FULL/
Dead Time - -
Address
2.2.2.2
IOS-XR
The OSPF Sham Link endpoint address must not be used as the endpoint address of an OSPF
Virtual Link.
OSPF Multi-Area
link in all those areas and get preference over inter-area links.
It exists as a logical construct over an existing primary interface for OSPF; however, the
neighbor state on the
IOS
IOS-XR
router ospf 1
area 0
multi-area-interface GigabitEthernet0/2/1/2
The multi-area interface inherits the interface characteristics from its primary interface, but
some interface
characteristics can be configured under the multi-area interface configuration. It also inherits
the BFD characteristics from its primary interface.
OSPF Multiple-instance
Both IOS and IOS-XR allows you to run multiple OSPFv3 instances. Peer routers need to use
the same instance-id for ospfv3 communication to happen.
Also, OSPFv3 can support multiple address-families using a different instance per address-
family.
52 NTS for CCIE SP Lab by chatasos
Unlike OSPFv3 where the Instance ID can be used for multiple purposes, such as putting the
same interface in multiple areas, the OSPFv2 Instance ID is reserved for identifying protocol
instances.
Although the relevant RFC defines the mechanism to differentiate packets for different
instances sent and received on the same interface, Cisco's current IOS implementation allows
you to have multiple OSPFv2 processes (not instances) using only different interfaces. Some
of these processes can be VRF ones.
Links
IS-IS
IS-IS(IntermediateSystemtoIntermediateSystem)isdefinedinISO10589andin
RFC1142andRFC 1195.
IS-IS Multi-Instance is defined in RFC 6822.
LAN Hello
Serial (Point-to-Point) Hello
Link State PDU (LSP)
Complete Sequence Number PDU (CSNP)
Partial Sequence Number PDU (PSNP)
bythe DIS in order for all routers connected to the LAN to synchronize their
databases by routers on a point-to-point network while setting up their adjacency
ISIS Hellos
Point-to-Point
o Serial IIH are exchanged
Multiacces/Broadcast
o L2 LAN IIH are exchanged
If you get error messages like "%CLNS-3-BADPACKET: ISIS: P2P hello, bad circuit type
0" on point-to- point (Serial/POS) interfaces on GNS3, then just ignore them.
The default hello interval is 10 seconds for non-DIS interfaces, and 3.333 seconds for DIS
interfaces.
On point-to-point links where a single Hello is used, a single hello timer must be used for
both L1 and L2 adjacencies.
54 NTS for CCIE SP Lab by chatasos
Thefastestneighbordowndetectionwithhellotimerstuningis1sec,if"isis hello-interval
minimal" is used. For faster detection use BFD.
AllhellosarepaddedtothefullinterfaceMTUbydefault.Youcandisablethisbehaviorwith"no
isis hello
padding"(althoughCiscoroutersalwayssendthefirstfivehellospadded),ifyouarehavingtime-
sensitive application traffic that travels across low-bandwidth interfaces or you want to
minimize interface buffer resources when frequent hellos are configured.
ISIS vs CLNS
o adjacencies o hellos
o PDUs
o interfaces o metrics
Use"sh isis"commandstoview
o neighbors
o LSPs
o topologies o SPF logs o routes
NET
0000.0000.2222
In order to ease with area migration, multiple Area-IDs can be configured on each router
(System-ID must be kept the same).
IOS
router isis
max-area-addresses 5
net 49.0001.0000.0000.0002.00 net 49.0002.0000.0000.0002.00
net 49.0003.0000.0000.0002.00 net 49.0004.0000.0000.0002.00
net 49.0005.0000.0000.0002.00
Dynamic hostname exchange is by default enabled, but you can disable it if required.
IOS
router isis
no hostname dynamic
IOS-XR
router isis 1
before...
IOS
R1 L2 Fa1/0 R2.03
after...
IOS
IP Address
10.1.2.1
IP Address
10.1.2.1
23
56
2 0000.0000.0001 * 0000.0000.0002
Configuration
IOS
!
interface X
ip router isis
IOS-XR
router isis X
is-type level-2-only
net 49.0001.0000.0000.1111.00 interface Loopback0
passive
! interface X
circuit-type level-2-only
Althoughit'snotrequiredtouseanIS-ISprocess/instancenumber("router isis
x")inIOS,it'sbetterto use one as a reference in next tasks. IOS-XR requires a process ID.
Multi-area IS-IS
You can have multiple L1 area processes per router, but only one L2 area process. Interfaces
can belong to only one process.
That way you can also have connectivity between different L1 areas that are connected to the
same L1/L2 router.
IOS
router isis 1
net 49.0001.0000.0000.0003.00 !
router isis 11
net 49.0011.0000.0000.0003.00
is-type level-1 !
ip router isis 11
You might hit a bug in some releases with the following message appearing when trying to
activate the L1 process under an interface.
routers)
o L1 route for the default route originating from L1/L2 routers
When using multiple Area-IDs under the same IS-IS process of a L1/L2 router, then L1
routes from one L1
Use route-leaking in L1/L2 routers in order to change the above. Route-leaking can be
accomplished either with distribute-list or with a route-map in IOS.
IOS
router isis
redistribute isis ip level-2 into level-1 distribute-list 100
!
address-family ipv6
IPv4 distribute-list used in route-leaking should have the above "awkward" format in order to
allow only 1.1.1.1/32 to be leaked.
IOS-XR
When doing route-leaking in IOS, you must define the ISIS process/instance right after the
"redistribute
isis" command, although you might not see it in the actual configuration.
When a L1/L2 router advertises a route from L2 to L1, it sets the U/D bit, so any other L1/L2
router that
receives this L1 LSP with the U/D bit set can ignore it and not advertise it any further.
It's good practice to also enable wide metrics when doing route-leaking in order to get
"correct" metrics for
Links
IOS
router isis X
set-attached-bit route-map NODEF-ROUTEMAP
!
route-map NODEF-ROUTEMAP permit 10
Use a non-existent CLNS area if you want to avoid setting the ATT-bit.
IOS-XR
CRS(config-isis-af)#attached-bit receive ?
ignore Ignore the attached bit in received LSPs
CRS(config-isis-af)#attached-bit send ?
always-set Always set the attached bit in our LSP never-set
Never set the attached bit our LSP
You can also advertise a default route from a L2 router into a L1 router, by using the
following configuration:
IOS
router isis X
default-information originate route-map DEF-ROUTE-ROUTEMAP
!
route-map DEF-ROUTE-ROUTEMAP permit 10
The default route will be advertised to the L1 router, so you end up with 2 default routes (the
second one is created automatically from the LSP that has the ATT bit set, but has lower
preference).
IOS
0.0.0.0/0
[115/L1/10] via 10.0.220.20(FastEthernet0/0.220), from
10.0.220.20, tag
0, LSP[12/12]
[115/L1/10] via 10.0.220.20(FastEthernet0/0.220), from
10.0.220.20, tag
0, LSP[0/28]
Remember to filter it from other L1/L2 adjacencies (if such a need arises).
IOS-XR
router isis X
address-family ipv4 unicast
DR/DIS
LSPID "router.XX-00" (with next-to-last octet being non-zero) is being sent by a DIS, while
LSPID "router.00-00" is being sent by everyone.
IOS
LSPID
ATT/P/OL
R2.00-00
R2.01-00
R8.00-00
R8.09-00
R9.00-00
* *
0xE041 1184
0xFA3B 380
0x4F55 1177
0x5E58 1177
0x7C35 806
0/0/0
0/0/0
0/0/0
0/0/0
0/0/0
IOS
Tag null:
System Id
R7
R7.04
R8
R8.01
R9
R9.03
Type Interface
L1 Et0/2
L1 Et0/1
L1 Et0/0
IP Address
2.2.27.7
2.2.28.8
2.2.29.9
UP 7 UP 9
"sh isis
rib"inIOSwillacceptonlyanetworkprefixasinput,butitwillreturnallroutesforthe
classful network. Always use a network mask to get the output for a specific route.
Overload-bit
The overload bit is included in an LSP of the router and if it is set, it notifies routers in
the area that the router is not available for transit traffic. It may be configured and
cleared independently for IPv4 and IPv6 topologies.
IOS
router isis
set-overload-bit
62 NTS for CCIE SP Lab by chatasos
IOS-XR
set-overload-bit
When used in combination with "wait-for-bgp", then if BGP sessions come up and BGP
keepalives are
not received from all the BGP neighbors, IS-IS will disable the overload bit after 10 minutes
by default. The IS-IS overload bit avoidance when activated, allows TE LSPs to continue
working, although the router
IOS
IOS-XR
<cr>
Metrics
their
IOS-XR
SPF
GSR(config-isis-if-af)#metric ?
<1-16777214> Default metric:
maximum Maximum wide metric. All routers will exclude this
link
from the
ir SPF
MPLS-TE
prefix tags
multi-topology
need for metric > 63
IOS
router isis
metric-style wide
IOS-XR
metric-style wide
!
address-family ipv6 unicast
metric-style wide
If two connected routers have different metric styles, an adjacency will be formed
between them and
LSPswillbeexchanged,butrouteswillnotbeinstalled.Youcanuse"debug isis rib
local"to verify if routes are being generated for use by the RIB.
The maximum metric that can be assigned to an IS-IS route is 1023 (without wide
metrics enabled).
IS-IS Authentication
o adjacency formed but no L2 LSPs exchanged if wrong authentication per area (old style)
64
o for Level-1/Level-2
o clear text (type-1)
o no adjacency formed if wrong authentication
o o o o o o
Prefer to use
adjacency formed but no LSPs exchanged if wrong authentication the new way of
authentication, when not told otherwise.
IOS
interface FastEthernet0/0
isis authentication mode md5
isis authentication key-chain KEYCHAIN
!
key chain KEYCHAIN
key 1
key-string TESTPASS
IOS-XR
router isis 26
interface X
Theonlywaytoverifyauthenticationincurrentreleasesisbyusingdebugcommands("debug
isis update-packets"and"debug isis authentication information").
65 NTS for CCIE SP Lab by chatasos
IOS
IOS-XR
IS-IS Topologies
IOS
o default is single-topology
o default is multi-topology
o configure "single-topology" under ipv6 address-family to change o
Both IPv4 IS-IS and IPv6 IS-IS routing protocols must share a common network
topology
Any interface configured for IPv4 IS-IS must also be configured for IPv6 IS-IS,
and vice versa
Allrouters in the IS-IS area (for Level 1 routing) or the domain (for Level 2
routing) must support an
identical set of address families (IPv4 only, IPv6 only, or both IPv4 and IPv6) on all
interfaces
Links
ISIS as PE-CE
PE
IOS
router isis X
vrf VPN
net 49.0001.0000.0000.0001.00
!
interface FastEthernet0/0
IOS-XR
not supported
66 NTS for CCIE SP Lab by chatasos
chatasos (ccie-in-2-months.blogspot.com) – Notes: The Series (NTS) for CCIE SP Lab
CE
IOS
router isis X
net 49.0001.0000.0000.0002.00
IOS-XR
router isis X
net 49.0001.0000.0000.0002.00
IS-IS for IPv6 is not supported as a PE-CE protocol in IOS. IOS-XR doesn't support IS-IS as
a PE-CE protocol at the role of PE.
Multi-Instance
IOS-XR
router isis 1
is-type level-2
net 47.0002.0000.0000.0008.00 address-family ipv4 unicast
metric-style wide !
router isis 2
is-type level-2
net 49.0002.0000.0000.0008.00 address-family ipv4 unicast
metric-style wide !
!
interface GigabitEthernet0/2/1/0
MPLS can run on multiple IS-IS processes as long as the processes run on different sets of
interfaces. Each interface may be associated with only a single IS-IS instance.
Because RIB treats each of the IS-IS instances as equal routing clients, you must be careful
when redistributing routes between IS-IS instances.
multi-instance vs multi-area
multi-instance
o supported in IOS-XR
o multiple L2 areas
o multiple L1 areas
o redistribution allowed between different processes o multiple IPv6 processes allowed
o use when: run multiple IS-IS processes
multi-area
o supported in IOS
BFD
tunning of hellos
ip event dampening
point-to-point adjacencies
tuning of SPF/PRC/LSP timers
tag specific prefixes and give them high priority
Timers
The RIB does not know to prefer Level 1 routes over Level 2 routes from different instances,
so if you are
running Level 1 and Level 2 instances, you must enforce the preference by configuring
different
per process/instance
68
secondstherouterwillwaitbeforerefreshing(re-creatingandre-flooding)itsown LSPs
recommended:65535sec
o o o
LSP interval
millisecondsbetweenalltheretransmittedLSPsonpoint-to-pointlinks
secondsbetweentwoconsecutivePRCs(triggeredwhenchangesthatdonotaffectthe
recommended:5,1,20
per interface
The value set for the lsp-refresh-interval should be less than the value of the max-lsp-lifetime
command.
Usually the software will automatically reduce the LSP refresh interval to prevent the LSPs
from timing out.
iSFP can be used to limit the SPF recalculations to specific portions of the topology.
IOS
router isis
advertise passive-only
!
interface X
IOS-XR
advertise passive-only
!
interface X
suppressed
IOS
router isis
summary-address 11.11.11.0 255.255.255.0 address-family ipv6
summary-prefix 11:11:11::/64
IOS-XR
router isis 1
address-family ipv4 unicast
summary-prefix 11.11.11.0/24 !
address-family ipv6 unicast summary-prefix 11:11:11::/64
You can also define the level into which you want to advertise the summary.
BGP
BGP (Border Gateway Protocol) is defined in RFC 4271.
Uses TCP port 179.
The router with the highest router-id is used as the TCP client.
1
Prefix Length Longest match Always checked
Checked if "set
Lowest Cost extcommunity cost
Community pre- bestpath" is
2 Cost Number 21474836
configured. Skipped if "bgp
Community Lowest Cost 47
bestpath cost-
Community
community ignore" is
ID
configured.
Local to the router. Local
originated prefixes have
3 Highest
WEIGHT weight 32768 by default.
Weight
Only for Cisco; not
recommended for general use.
32768
Everything announced
5 Prefer local- through network/aggregate
sourced routes commands or redistribution is
considered as local- sourced.
Ignored if "bgp
bestpath as-
6 Shortest as-path inbound outbound
path ignore"is
AS-PATH
configured.
MED
bgp deterministic-med
o compare MED when choosing routes advertised by different neighbors in the same
autonomous system
o routes from the same autonomous system are grouped together and the best entries of each
group are compared
bgp always-compare-med
Common Comparisons
Prefix Length
Highest Local Preference
Shortest as-path
Lowest Multi-Exit Discriminator (MED)
Prefer eBGP over iBGP
Lowest IGP metric to the BGP next hop
Lowest BGP router-id
origin
The origin attribute indicates how BGP learned about a particular route.
i (IGP)
o interior to the originating AS (i.e. when the network configuration command is used to
inject
o unknown or learned via some other way (i.e. redistributed into BGP, or from eBGP)
Address Families
AFIs
1 (IPv4)
2 (IPv6)
25 (L2VPN)
SAFIs
1 (Unicast)
2 (Multicast)
4 (NLRI with MPLS labels)
65 (VPLS)
128 (VPN with MPLS labels (VRFs))
73 NTS for CCIE SP Lab by chatasos
Configuration
IOS
router bgp 2
no synchronization
bgp log-neighbor-changes
network 5.5.5.5 mask 255.255.255.255 neighbor 20.4.5.4 remote-
as 1
no auto-summary
IOS-XR
router bgp 1
bgp log neighbor changes detail address-family ipv4 unicast
network 4.4.4.4/32 !
neighbor 20.4.5.5
remote-as 2
address-family ipv4 unicast
BGPisdesignedtorefuseasessionwithitselfbecauseoftherouter-idcheck.Youcanusea per-vrf
assignment of BGP router-id in order to have a VRF-to-VRF peering on the same router.
In IOS-XR, every eBGP session requires an explicit route-policy in order to allow
incoming/outgoing updates.
It's good practice to create one named PASS-RPL with default action "pass" and use it when
first activating each eBGP session. Afterwards you can create the required route-policy and
use that instead.
Youcanusethe"network x.x.x.x
backdoor"commandinordertochangetheadmindistanceofan eBGP route (default 20) to that
of iBGP (200), so that the equivalent IGP route can be preferred.
Route Aggregation
o summary-only o suppress-map
inject-map
74 NTS for CCIE SP Lab by chatasos
In IOS-XR, if there is no loopback configured with an ipv4 address, the BGP session won't
come up, until you
When told to advertise a prefix into BGP, prefer to use the "network" statement, unless told
to do otherwise.
A more specific prefix must exist in the BGP table before doing aggregation.
Communities
Standard
o ip community-list 1 permit 100:10
Expanded Standard
Extended
Expanded Extended
In IOS, all communities are not sent by default to iBGP or eBGP sessions.
In IOS-XR, all communities are sent by default on iBGP sessions, but not on eBGP
sessions.
Well-known communities
internet
no-export (don't advertise to eBGP neighbor)
local-as (don't advertise to other confederation sub-AS)
no-advertise(don't advertise to any neighbor)
75 NTS for CCIE SP Lab by chatasos
Delete communities
IOS
!
route-map DELCOMM2-ROUTEMAP permit 10
!
route-map DELCOM3-ROUTEMAP permit 10
IOS-XR
route-policy DELCOM1-RPL
end-policy
!
route-policy DELCOM3-RPL
end-policy
Links
Synchronization
A BGP router with synchronization enabled does not install iBGP learned routes into
its routing table and propagate them to an eBGP peer, if it is not able to validate those
routes in its IGP first. It's used to ensure that there are no black holes inside the AS
caused by intermediate routers that do not run BGP.
It'sdisabledbydefault("no
synchronization"),becausenowadaysmostnetworksruniBGPorMPLS.
Route Reflectors
Originator ID
o the Router ID of the originator of the route
o if the update comes back to the originator (so the local Router-ID is the same as the
Originator-
Cluster List
o a list of Cluster IDs that an update has passed through
o when an RR reflects a route from a client to a non-client, the local Cluster ID is appended
to
By default Cluster-ID = RR Router-ID. In case of two RRs, two different Cluster-IDs will be
used. This increases memory utilization, because the same route is stored multiple times, each
one with a different Cluster-ID.
You can use a common Cluster-ID in redundant RRs (in order to decrease memory
utilisation, although rarely needed), only when you're sure that connectivity for RR clients
won't break if the RR client looses one of its RR connections.
IOS
router bgp 100
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback 0 neighbor 2.2.2.2
route-reflector-client
IOS-XR
remote-as 100
update-source Loopback0 address-family ipv4 unicast
route-reflector-client
Links
Confederations
The AS is split into smaller autonomous systems in order to reduce the number of iBGP
sessions.
It's common practice to use the private AS range (64512 – 65535) to denote a sub-
autonomous system. These internal ASNs are hidden and only a single external ASN is
announced to eBGP neighbors. BGP confederations modify iBGP as-path processing
When sending:
updates to iBGP neighbors
o the intra-confederation ASNs are removed and the external ASN is prepended to the as-
path
IOS
IOS-XR
INTERNAL-ASN-200
INTERNAL-ASN-300 !
peers
!
neighbor 3.3.3.3
remote-as INTERNAL-ASN-300
bgp confederation
!
neighbor 2.2.2.2
!
neighbor 9.9.9.9
remote-as EXTERNAL-ASN-9
EXTERNAL-ASNs define the ASNs used for eBGP sessions between different ASNs.
INTERNAL-ASNs define the ASNs used for eBGP sessions between different sub-ASNs of
the same ASN. Example
IOS
IOS-XR
65200
65300 !
remote-as 65200 !
!
neighbor 9.9.9.9
remote-as 9
Links
Next-Hop
You can't use the next-hop-self for setting the next-hop in reflected iBGP routes. Instead use
an outbound route map.
. Keepalive timers are then based on that holdtime value. It's not recommended to have less
than 3 secs as a holdtime.
The fastest convergence on a BGP session that can be achieved by changing the
keepalive/holdtime timers is 3 sec.
In order to protect the control-plane, you can put a limit on the lowest holdtime number
accepted by using the "min-holdtime" command. If the neighbor doesn't comply, then the
BGP session is rejected.
In order to minimize neighbor configuration regarding the BGP session parameters you can
use the following:
peer groups (IOS)
!
neighbor 1.1.1.1 peer-group PEER-GROUP
!
address-family vpnv4
by both neighbors
80 NTS for CCIE SP Lab by chatasos
!
neighbor 1.1.1.1
remote-as 100
update-source Loopback0 !
neighbor 1.1.1.1
IOS
IOS-XR
IOS
TTL|Session
eBGP Multihop
It allows a neighbor connection between two external peers that do not have direct
connection. You should also configure an IGP or static routing to allow the neighbors without
direct connection to reach each other.
IOS
When configured for an eBGP neighbor, the router accepts only IP packets with a TTL count
that is greater or equal to maximum TTL value (255) minus the hop count that is configured
locally for the relevant eBGP session. If the TTL value in the IP packet is less than the
maximum TTL value (255) minus the hops configured value, the incoming packet is silently
discarded.
Supports both directly connected neighbor sessions and multihop eBGP neighbor sessions
IOS-XR
When configured for a directly adjacent eBGP neighbor, the router accepts only IP packets
with a TTL count that is equal to the maximum TTL value (255). If the TTL value in the IP
pakcet is less than the maximum TTL value (255), the incoming packet is silently discarded.
o R2 accepts packets with TTL < 255-Y R2 sends packets to R1 with TTL=255
o R1 replies back
o R1 accepts packets with any TTL
General Rule
R2:ttl-security hops Y
o R2 accepts packets with TTL < 255-Y R2 sends packets to R1 with TTL=255
o R1 replies back
o R2 accepts packets with any TTL
If ebgp-multihop is set to 255 or ttl-security is set to 254 (aka when at least one of these
parameters is set to its max), then the eBGP session can be established, as long as their
packets can reach each other.
o R2 accepts packets with TTL < 255-Y R2 sends packets to R1 with TTL=255
o R1 replies back
o R1 accepts packets with TTL < 255-X
If both routers use ttl-security, then the eBGP session can be established regardless of the hop
values used, as long as their packets can reach each other.
R1:ebgp-multihop X R2:ebgp-multihop Y
o R2 accepts packets with any TTL R2 sends packets to R1 with TTL=Y
o R1 replies back
o R1 accepts packets with any TTL
If both routers use ebgp-multihop, then the eBGP session can be established regardless of the
hop values used, as long as their packets can reach each other.
If loopback interfaces are used to connect single-hop eBGP peers, you can configure the
"neighbor disable-connected-check" command before you can establish the
eBGP peering session.
83 NTS for CCIE SP Lab by chatasos
PMTUD
IOS
If you have BGP PMTUD enabled (by default in most releases), BGP packets will be sent
with DF bit set.
You can disable BGP PMTUD (either for all neighbors or for a specific neighbor) with the
following commands.
IOS
tcp path-mtu-discovery
Links
Advanced BGP
BGP (Border Gateway Protocol) is defined in RFC 4271. MP-BGP (Multi-Protocol BGP) is
defined in RFC 4760. Labeled BGP (BGP+Label) is defined in RFC 3107.
enforce-first-as
When enabled, updates received from an eBGP peer that does not list its ASN at the
beginning of the as-path in the incoming update are denied (in order to prevent spoofing).
IOS
no bgp enforce-first-as
IOS-XR
supported).
IOS
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
i -
x best-
is 5.5.5.5
history, *
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
s suppressed, d damped, h
r RIB-failure, S Stale, m
i - IGP, e - EGP, ? - incomplete
Next Hop
0.0.0.0 0 32768 i
20.4.5.5
Next Hop
20.4.5.4
0.0.0.0
Use the "no-prepend" option to avoid prepending the new local-as in the incoming
updates.
multipath,
IOS
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
i -
x best-
Next Hop
0.0.0.0
20.4.5.5
0 0
32768 i
0 2 i
86
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
i -
x best-
Next Hop
20.4.5.4
0.0.0.0
Usethe"no-prepend replace-
as"optiontoavoidprependingtherealASNintheoutgoingupdates.
IOS
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
i -
x best-
is 5.5.5.5
history, *
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
s suppressed, d damped, h
r RIB-failure, S Stale, m
i - IGP, e - EGP, ? - incomplete
i -
x best-
Next Hop
0.0.0.0 0 32768 i
20.4.5.5
Next Hop
20.4.5.4
0.0.0.0
0 32768 i
multipath,
IOS
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
i -
x best-
is 5.5.5.5
history, *
Status codes:
internal,
external
Origin codes:
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
or
i -
x best-
ID is 4.4.4.4
h history, * valid, > best,
m multipath, b backup-path,
i -
x best-
Next Hop
0.0.0.0 0 32768 i
20.4.5.5
Next Hop
20.4.5.4
0.0.0.0
r RIB-failure, S Stale,
multipath,
0 0
0 11 i 32768 i
88
Network
*> 4.4.4.4/32
*> 5.5.5.5/32
Next Hop
0.0.0.0
20.4.5.5
0 0 2 i
*> 4.4.4.4/32
*> 5.5.5.5/32
PE-CE Routing
external
Origin codes: i - IGP, e - EGP, ? - incomplete
i -
x best-
external
Network
Next Hop
20.4.5.4
0.0.0.0
0 32768 i
In order to allow VPN sites with the same ASN talk to each other, you can use one of the
following:
"neighbor CE as-override"inthePE
o PE replaces the common CE ASN with its own
eBGP sessions in IOS-XR require an in/out PASS routing policy under the appropriate
address-family. Alternativelyinsomecasesyoucanuse"bgp unsafe-ebgp-
policy"inordertobypassthis.
IOS-XR
vrf VPN
address-family ipv4 unicast
rd 100:1
bgp unsafe-ebgp-policy
neighbor 2.2.2.2
remote-as 200 address-family ipv4 unicast
as-override
Labeled BGP
It's a BGP capability (negotiated between neighbors during session setup) that allows you to
exchange labels together with IPv4/IPv6 unicast prefixes. It's used in Inter-AS, CsC, 6PE
scenarios, and when LDP+IGP or RSVP-TE are not available for label distribution.
Configuration
IOS
IOS-XR
allocate-label all
neighbor 1.1.1.1
You can also filter the prefixes for which to allocate labels.
Verification
L3VPN
n router
o Follow the Transport top label swaps until there is a "Pop Label" for next router
n+1 router
o
Find the local VPN label for the prefix If VPN label is "no label", then
routeristheendPE
?
If VPN label doesn't exist, then
"send-community
extended"isusuallyautomaticallyenabledwhenactivatinganeighborunderthe BGP VPNv4
address-family. Since RT is an extended community, without this command VPNv4 routes
won't be advertised in BGP.
In order to see the VPN label to be used by the PEs, you just need to check the relevant BGP
route.
In order to see the IGP/Transport label to be used by the PEs and Ps, you just need to find the
label for the route's next-hop. Remember to add the "detail" keyword in order to see the
whole label stack (due to possible route recursion).
Local
Label
27
Outgoing Label
26
Prefix
or Tunnel Id
5.5.5.5/32
Bytes Label
Switched
0
Outgoing Next Hop interface
Fa0/0.23 20.2.3.3
In order to see the whole label stack (which includes both the VPN and the IGP label), you
can check the relevant CEF entry (inside the VRF) on the PEs.
If you want to follow a Intra-AS L3VPN path (assuming control-plane has been setup
correctly), then you can execute the following algorithm:
?
91
If the route is learned from IGP, the Transport label must be allocated through LDP/RSVP-
TE. If the route is learned from BGP, the Transport label must be allocated through BGP.
If MPLS is not available in a network, you can use GRE (or other types of encapsulation) to
"automatically" build dynamic tunnels in order to provide L3VPN services.
The BGP nexthop is used for tunnel endpoint discovery, but instead of adding a transport
label, VPN traffic is encapsulated into GRE (having as source a local interface and as
destination the neighbor PE).
The L3VPN BGP configuration (regarding VRFs and VPNv4) remains the same as in MPLS
L3VPN. Configuration Steps
IOS
!
interface Tunnel 1
!
ip route vrf L3VPN-VRF 0.0.0.0 0.0.0.0 Tunnel1 !
router bgp 1
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended neighbor 2.2.2.2
route-map L3VPN-ROUTEMAP in
exit-address-family !
exit-address-family !
In latest releases you can also use multipoint L2TPv3 tunnels instead of the default mGRE
ones.
You can also define l3vpn encapsulation profiles for fully automatic tunnel provisioning.
IOS
!
router bgp 1
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended neighbor 2.2.2.2
route-map L3VPN-ROUTEMAP in
exit-address-family !
Link Bandwidth
It is used with BGP multipath to configure load balancing over links with unequal bandwidth.
When enabled, routes learned from directly connected external neighbors are propagated
through the iBGP network with the bandwidth of the source external link stored in an
extended community.
The link bandwidth extended community attribute is used as a traffic sharing value relative to
other paths while forwarding traffic.
Two or more paths are designated as equal for load balancing if weight, local-preference, as-
path length, MED and IGP costs are the same.
BGP can originate the link bandwidth community only for directly connected links to eBGP
neighbors.
93 NTS for CCIE SP Lab by chatasos
Configuration Steps
"dmzlink-bw" must be enabled on all BGP routers that need to process the link
bandwidth community
"dmzlink-bw" must be enabled on all eBGP neighborships from where the
bandwidth will be acquired
"send-community
extended"mustbeenabledonalliBGPpeeringswherethelinkbandwidth community
must be propagated to
multipath must be enabled where more than one path is expected
bgp dmzlink-bw
bgp dmzlink-bw
!
interface FastEthernet0/0.36
bandwidth 36000
bgp dmzlink-bw
Loopback0
Loopback0
Loopback0
maximum-paths ibgp 4 !
!
interface FastEthernet0/0.46
bandwidth 46000
IOS
R2#sh bgp
BGP table version is 5, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, >
best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
Origin codes: i - IGP, e - EGP, ? - incomplete
external
Network
Next Hop
4.4.4.4
3.3.3.3
*mi19.19.19.19/32 *>i
2
3.3.3.3 (metric 5) from 3.3.3.3 (3.3.3.3)
Although BGP multipath is enabled, the BGP selection algorithm still chooses one path as the
best (based on
the standard BGP selection criteria), but both paths are tagged with the "multipath" keyword
and appear in the
Known via "bgp 1", distance 200, metric 2 Tag 2, type internal
Last update from 3.3.3.3 00:04:36 ago Routing Descriptor
Blocks:
Dividethebandwidthentry(Kbps)by8tofindouttheDMZ-LinkBw(KBps)inthe"sh bgp"output.
IOS-XR
router bgp 2
address-family ipv4 unicast
maximum-paths ibgp 4
maximum-paths ebgp 4 !
neighbor 6.6.6.6
dmz-link-bandwidth
The above (old-style) configuration is not recommended. In later IOS-XR releases (>4.3.2)
you can set the bandwidth extcommunity in a route-policy towards the iBGP neighbor in
order to achieve the same thing.
Links
IETF - draft-ietf-idr-link-bandwidth
RT Constrain (RTC)
The default behavior is for the PEs to filter out the unwanted RTs, after they receive the
prefixes from the RR. After enabling this feature on the PE and the RR, the PE informs the
RR what RTs it actually needs and the RR sends only those.
IOS
IOS-XR
Links
Fast Convergence
Different RD per PE
BGP Multipath
BGP Best-external
BGP PIC
Two RRs (one for primary, one for secondary) Multipath
97 NTS for CCIE SP Lab by chatasos
It allows installation of multiple BGP paths to the same destination into the IP routing table.
These paths are installed in the table together with the best path for load sharing. BGP
Multipath does not affect best-path selection. For example, a router still designates one of the
paths as the best path, according to the algorithm, and advertises this best path to its
neighbors.
eBGP multipath
o maximum-paths
In IOS-XR, you can also use the "selective" keyword in order to restrict multipath to
specific neighbors (the ones with "multipath" configured).
Best-External Path
When configured, enables the advertisement of the best-external path to iBGP/RR peers, if
the locally selected best-path is from an internal peer. That way routers internal to the AS
have knowledge of more exit paths from the AS.
IOS
bgp advertise-best-external
IOS-XR
advertise best-external
o maximum-paths
eiBGP multipath (under ipv4 vrf address-family)
98 NTS for CCIE SP Lab by chatasos
Core/Edge
IOS
IOS-XR (3.9)
Links
IETF - draft-ietf-idr-best-external
QPPB (QoS Policy Propagation via BGP)
It allows you to match BGP routes based on attributes (i.e. community, as-path), mark these
with ip prec or qos-group (or other attributes depending on software version) and then mark
appropriately the relevant source/destination packets matching the above routes. Further
actions (i.e. policing, queuing) can be performed on the marked packets afterwards.
IOS
match community 1
set ip precedence 2
!
!
router bgp 100
99 NTS for CCIE SP Lab by chatasos
table-map QPPB-ROUTEMAP !
IOS-XR
route-policy QPPB-ROUTEPOLICY
if community matches-any (100:1) then
set qos-group 2
endif
endif
end-policy
!
router bgp 100
!
interface GigabitEthernet0/0/0/0
It allows you to quickly "block" various attacks on your edge routers, by advertising a null
route from a single router to all edge routers.
Configuration Steps
configure null static route with dummy next-hop on your edge routers
configure route-map that matches a tag and sets a dummy next-hop (plus whatever
else) on your rtbh
router
configure redistribution of static routes into BGP using the above route-map on
your rtbh router
in case of attack, configure a null static route with the appropriate tag for the
destination on the rtbh
router
i.e. for destination-based RTBH:
edge (IOS)
ip route 192.168.1.1 255.255.255.255 Null0
!
route-map RTBH-ROUTEMAP
match tag 99
set ip next-hop 192.168.1.1
set community no-export no-advertise additive
If you combine loose uRPF + RTBH, you can use it for blocking source ips too.
101 NTS for CCIE SP Lab by chatasos
VRF
VRF Basic Configuration
IOS
ip vrf VPN-A
rd 100:1
route-target export 100:1 route-target import 100:1
!
route-target export
route-target import
route-target export
route-target import
exit-address-family
IOS-XR
100:2 100:2
100:2 100:2
vrf VPN-C
address-family ipv4 unicast
import route-target
100:3
export route-target
100:3
address-family ipv6 unicast
import route-target
100:3
export route-target
100:3 !
rd 100:3
You can have different import/export RTs per address family. If you have common ones, then
you can define them directly under the vrf definition.
Prefertousethe"vrf definition"commandtoconfigureVRFs.Alwaysincludeanaddress-
family,
IOS-XR
rd auto
If you don't define any export RTs for a VRF on the local PE, then the prefixes will by
default get dropped when they are transferred to the remote PE.
routing table and you want to have the static route inside the VRF but pointing to the global
routing table.
IOS
IOS
You can use an export map in order to set different export RTs per prefix.
IOS
IOS-XR
vrf VPN-A
address-family ipv4 unicast
route-policy R1-RPOLICY
if destination in (1.1.1.1/32) then
end-policy
In the IOS-XR route-policy you must use destination in order to match the required prefix.
Also you can use parenthesis whenever you need to group parameters, like the multiple RTs.
If you initially have no export RTs and later decide to add some through an export map, then
you must reset the VPNv4 BGP sessions in order to have the BGP routes get the new RTs
immediately.
You have the option of importing various global routes into a specific VRF, while at the same
time limiting the number of them.
IOS
100:1 100:1
address-family ipv4
import ipv4 unicast 5 map GLOBAL-TABLE-ROUTEMAP
exit-address-family !
!
ip prefix-list PREFIX-LIST seq 5 permit 4.4.4.4/32
IOS
external
*> 1.1.1.1/32
*> 4.4.4.4/32
*> 10.1.2.0/24 *>i10.19.20.0/24 *>i20.20.20.20/32
32768 i
32768 i
32768 i
100 0i 100 0i
The global route to be imported must exist in the global BGP table (existence in RIB doesn't
matter).
No RTs or other attributes will be assigned to the imported prefixes. Use the route-map set
commands to configure those.
In latest IOS releases (>15.x) you have to option of doing the opposite too, export prefixes
from a VRF into the global BGP table.
Thecommands"import/export
map"(whicharedifferentfromtheabove)areusedtofiltertheVRF <=>MP-
BGPprefixes,whilethecommands"import/export ipv4 unicast"areusedtoleakroutes
between the VRF and the global BGP table.
there is no match found, then the prefix is discarded (in order to keep the BGP table small).
Route-Reflectors have this filter disabled by default, because they need all the prefixes to
accommodate all
possible PEs. In order to disable it manually on other routers, you can use the following
commands.
105 NTS for CCIE SP Lab by chatasos
IOS
IOS-XR
IOS-XR supports also the selective filtering of RTs by using a policy that matches specific
RTs.
IOS-XR
route-policy RT-POLICY
if extcommunity rt matches-any (100:1, 100:2) then
pass else
drop endif
Multi-VRF (VRF-Lite)
It allows a logical separation of a CE router into multiple VRFs, without the need for
MPLS/MP-BGP. Using MPLS Multi-VRF you can extend the LSPs to the CE and all routing
domains that the CE supports.
Usually, a router with Multi-VRF is shared by several customers and each customer has their
own routing table.
Characteristics
Special care must be taken in case of using OSPF as PE-CE protocol, because due to setting
the DN bit by
default on specific routes advertised from PE to CE, these routes wouldn't be installed in the
Multi-VRF CE's
routing table.
Always prefer to use BGP as PE-CE, due to its simpler configuration and better filtering.
matchanipaccess-list
o VRF Selection Based on Source IP Address (IOS)
matchthesourceipaddress o VRF-Autoclassify (IOS)
matchthedirectlyconnectedprefix
o ACL Based Forwarding with VRF Next-Hop (IOS-XR)
matchanipaccess-list
Classic Method
IOS
interface X
ip vrf forwarding VPN-A
!
interface X
IOS-XR
interface X
vrf VPN-C
interface X
ip vrf receive VPN-A
ip vrf receive VPN-B
ip vrf receive VPN-C
ip address 1.1.1.1 255.255.255.0
ip policy route-map VRF-SELECTION-PBR
!
route-map VRF-SELECTION-PBR
!
route-map VRF-SELECTION-PBR
permit 10
permit 20
permit 30
Limitations
multicast is not usually supported by PBR
IOS
vrf selection source 1.1.1.0 255.255.255.0 vrf VPN-A vrf
selection source 2.2.2.0 255.255.255.0 vrf VPN-B !
int X