CCIE RS Quick Review Kit Ver2 Vol1 PDF
CCIE RS Quick Review Kit Ver2 Vol1 PDF
CCIE RS Quick Review Kit Ver2 Vol1 PDF
ver. 20111227
Copyright information
CCIE Routing and Switching Quick Review Kit ver.2 vol.1
By Krzysztof Zaski
CCIE R&S #24081, CCVP
http://www.inetcon.org
[email protected]
ver. 20111227
This Booklet is NOT sponsored by, endorsed by or affiliated with Cisco Systems, Inc.
Cisco, Cisco Systems, CCIE, CCVP, CCIP, CCNP, CCNA, the Cisco Systems logo, the CCVP logo, the CCIE logo are trademarks or registered trademarks of Cisco
Systems, Inc. in the United States and certain other countries.
All terms mentioned in this book, known to be trademarks or service marks belong to their appropriate right owners.
This Booklet is designed to help CCIE candidates to prepare themselves for the CCIE written and/or the lab exam. However, this is not a complete study
reference. It is just a series of the authors personal notes, written down during his pre-lab, and further studies, in a form of mind maps, based mainly on
CISCO Documentation for IOS 12.4T. The main goal of this material is to provide quick and easy-to-skim method of refreshing ones existing knowledge. All
effort has been made to make this Booklet as precise and correct as possible, but no warranty is implied. CCIE candidates are strongly encouradged to
prepare themselves using other comprehensive study materials like Cisco Documentation (www.cisco.com/web/psa/products/index.html), Cisco Press books
(www.ciscopress.com), and other well-known vendors products, before going through this Booklet. The autor of this Booklet takes no responsibility, nor
liablity to any person or entity with respect to loss of any information or failed tests or exams arising from the information contained in this Booklet.
This Booklet is available for free, and can be freely distributed in the form as is. Selling this Booklet in any printed or electroic form i prohibited. For the most
recent version of this document, please visit http://www.inetcon.org
Did you enjoy this booklet? Did it help you in achieveing your goal? You can share your gratitude :-) here: http://amzn.com/w/28VI9LZ9NEJF1
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 3 of 40
Table of Contents
Volume I
Volume II
Volume III
Data-link technologies
Frame Relay
5
FR Features
6
PPP
7
PPPoE
8
Routing
Quality-of-Service
IPv6
Security
Multicast
MPLS
Switching
VLAN
VTP, VTPv3
PVST+
RSTP
MST
Port Channel
L2 Convergence
STP Port Protection
SPAN
Macro
Bridging
35x0 features
Ethernet frames
9
10
11
12
13
14
14
15
16
16
16
17
17
IP Services
IPv4
ICMP
UDP
TCP
Fragmentation/MTU
Static routing
Distance
Default route
Redistribution
Policy Based Routing
Route Map
Adv Obj Tracking
ODR
GRE
Backup interface
NTP
ARP
Neighbor discovery
WCCP
OER/PfR basics
OER/PfR measuring
OER/PfR learning
OER/PfR policy
OER/PfR control
Cisco HSRP
Cisco GLBP
VRRP
IDRP
DRP
NAT part 1
NAT part 2
Management part 1
Management part 2
Management part 3
DHCP
EEM
18
18
18
19
20
21
21
21
21
21
21
22
22
22
22
23
23
24
24
25
26
26
27
27
28
29
29
29
29
30
31
32
33
34
35
36
Page 4 of 40
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Header
FECN BECN
1
EA
DE
EA
BECN Backward Explicit Congestion Notification set toward sender in returning frames
LMI
InARP
Any DLCI announced by LMI, not associated with subintf are assumed to be bound to physical intf
(IF) frame-relay lmi-n391dte <count>
Full status (type 0) messages frequency (default every 6 cycles)
PVC status
Frame-Relay
Point-to-point
Back2Back
2) If DLCIs are to be
different on both sides
Non-Broadcast Multi-access (NBMA); many devices in shared subnet, but without broadcast
capability. One subnet (ex. /24) with many hosts connected with separate DLCIs.
DLCIs do not have to be manualy defined (interface-dlci), as all DLCIs go to physical intf by default.
Router A and B:
(IF) frame-relay interface-dlci 101
Router A:
(IF) frame-relay map ip <ip> 102 (encapsulate)
(IF) frame-relay interface-dlci 201 (expect)
Router B:
(IF) frame-relay map ip <ip> 201 (encapsulate)
(IF) frame-relay interface-dlci 102 (expect)
keepalive must be enabled on both sides
Physical
DLCI
2
C/R
InARP flows only across VC, it is not forwarder by routers. IP is required on intf to send InARP
104
Status Enquiry is sent from DTE to FR Switch once interface comes up. Switch responds with Status describing PVCs
P2P interfaces ignore InARP messages as they only have one DLCI so they know L2 mapping
Se0/0
10.0.0.1/24
InARP starts for every DLCI once LMI reports it with status ACTIVE (Here is my IP on this PVC, whats yours?)
physical
5
DLCI
Se0/0.1
/30
FECN Forward Explicit Congestion Notification set towards receiver. For unidirectional traffic BECN
cannot be set, so Q922 test frame can be generated by routers as reaction for FECN (FECN reflection)
Congestion
control
Encap.
In NBMA networks local-L2 => remote-L3 mapping is required for proper communication
between endpoints (local router must know how to construct L2 header to contact remote
IP). Since its NBMA, broadcast L2 address does not exists like for LAN (ff:ff:ff:ff:ff:ff)
L2-to-L3 mapping not required, as only one DLCI is allowed on p2p intf.
Ping to local interface travels to the other side of VC and comes back the
same way (to remote site first), so RTT is twice larger than pinging remote IP
Se0/0.1
10.0.0.2/24
Multipoint
3) Frame-relay switching
Interface
types
Router A:
(G) frame-relay switching
(IF) frame-relay intf-type dce
(IF) frame-relay interface-dlci 201
Router B:
(IF) frame-relay interface-dlci 201
FR Switching
(IF A) frame-relay route <incomming DLCI> interface <outgoing IF> <outgoing DLCI>
DLCI routing must be configured bi-directionaly, that is on both interfaces. Always configured on physical interface
(G) connect <name> serial <nr> <dlci> serial <nr> <dlci>
Alternate method of defining how to switch DLCIs
CBWFQ applied on physical interface to do per-VC shaping (match fr-dlci) does NOT work for switched DLCIs
When InARP is used, it can map DLCI-to-IP only from spokes to hub. InARP is not passed
through hub router, so for spokes to communicate separate static mapping is required
Spokes can talk to each other only via Hub. When static mapping is enabled on
spoke for hub and other spoke, only mapping for Hub needs broadcast keyword.
Enabling broadcast for every static mapping causes multiple packets to be sent to
remote destinations (they will be dropped, but bandwidth is wasted)
Hub-and-spoke
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Se0/0.1
point-to-point
Page 5 of 40
FR can send broadcast over PVCs. Its not one packet to all
destinations, but its replicated to all PVCs (pseudo-broadcast)
Managed independently of the normal interface queue
STP and BPDUs are not transmitted using the broadcast queue
When the serial interface is connected to the network, the AutoInstall process begins automatically
Router being configured over FR will send BOOTP request for IP address (DHCP in LAN, SLARP in HDLC)
AutoInstall using Frame Relay can be initiated over only the first serial interface on the router
Broadcast Queue
FR Autoinstall
FR
Features
If keepalive is rcvd within defined timers, success-event is logged. Otherwise, error-event is logged.
To bring up intf, 3 successes in a row must appear. To bring down, any 3 events within event-window
Event window
Intf goes up
X X X
Intf goes down
X
X X
End-to-end
Keepalive
(EEK)
Bridging
PPPoFR
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
interface serial0/0
frame-relay interface-dlci <dlci> ppp virtual-template <id>
interface virtual-template <id>
ip address <ip> <mask> | ip unnumbered loopback0
AutoInstall will attempt to download configuration files in the following order: network-confg,
cisconet.cfg, router-confg, router.cfg, ciscortr.cfg. The process will be repeated 3 times.
Can be used to emulate p2p link on multipoint interface or to enable LFI on FRF.8 links (FR to ATM interworking)
Staging (intermediate) router must have FR map configured. Defined IP will be assigned to remote router
fram-relay map ip <remote IP> <DLCI> broadcast (NBMA)
frame-relay interface-dlci <dlci> protocol ip <remote ip> (P2P)
Fragmentation
Page 6 of 40
Address
0xFF
Control
0x03
Protocol
1B
1B
2B
Payload
FCS
CHAP is a 3-way handshake authentication method based on challenge-response. No clear-text passwords are sent across the link
2B
Done upon initial link establishment and may be repeated any time after the link has been established
LCP to establish, configure, and test the data link connection mandatory phase
Features
CHAP
RTA:
(IF) ip address negotiated
RTB (option A):
(IF) peer default ip address <remote ip>
RTB (option B):
(G) ip adress-pool local
(G) ip local pool <name> <first IP> <last IP>
(IF) peer default ip address pool <name>
PPP
Connection initiated
PAP
Back2back LL
r1801
r3845
PHASE 1
01
ID
Random
r3845
PAP/CHAP Authentication
One way authentication. If two-way PAP authentication is required it has to be configured the oposite way
Client:
Server:
hostname R1
interface serial0/0
! Client sends username and password via PAP
ppp pap sent-username R1 password cisco
hostname R2
username R1 password cisco
interface serial0/0
! server requests client to authenticate with PAP
ppp authentication pap
HASH
PHASE 2
4 Client sends HASH with own hostname
r1801
ID
HASH
02
Two-way authentication, R2 requests R1 to auth using PAP, and R1 requests R2 to auth using CHAP
Client:
Server:
hostname R1
username R2 password cisco
hostname R2
username R1 password cisco
interface serial0/0
! Client sends username and password via PAP
ppp pap sent-username R1 password cisco
interface serial0/0
! server requests client to authenticate with PAP
ppp authentication pap
MD5
HASH
7
User HASH and Server HASH is compared
PHASE 3
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
03
ID
WLCOME
Page 7 of 40
There is a Discovery stage (Ethertype 0x8863) and a PPP Session stage (Ethertype 0x8864)
1. Virtual
template
The client broadcasts a PPPoE Active Discovery Initiation (PADI) packet. PADI (with PPPoE header)
MUST NOT exceed 1484 octets (leave sufficient room for relay agent to add a Relay-Session-Id TAG)
PADI transmit interval is doubled for every successive PADI that does not evoke response, until max is reached
Concentrator replies with PPPoE Active Discovery Offer (PADO) packet to the client containing one
AC-Name TAG with Concentrator's name, a Service-Name TAG identical to the one in the PADI, and
any number of other Service-Name TAGs indicating other services that the Access Concentrator offers.
Discovery
2. Broadband
Group
Host chooses one reply (based on concentrator name or on services offered). The host then
sends PPPoE Active Discovery Request (PADR) packet to the concentrator that it has chosen
Concentrator responds with PPPoE Active Discovery Session-confirmation (PADS) packet
with SESSION_ID generated. Virtual access interface is created that will negotiate PPP
3. Enable on
Interface
vpdn enable
vpdn-group <name>
request-dialin
protocol pppoe
Configure VPDN group legacy, prior 12.2(13)T
PPPoE
Client
Limits
The PPPoE Active Discovery Terminate (PADT) packet may be sent anytime after
a session is established to indicate that a PPPoE session has been terminated
Verify
Services
bba-group pppoe
service profile <name>
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 8 of 40
Switches must be in the same VTP domain. Default mode is Desirable on 3550 only. It is Auto on 3560
Normal range
1-1001
Routers do NOT understand DTP protocol. Trunk must be staticaly defined on switch port
Propagated by VTP
Messages sent every 30 sec (300sec timeout) to 01-00-0C-CC-CC-CC (ISL VLAN1, 802.1q Native)
If both switches support ISL and 802.1q then ISL has priority
(IF) switchport mode trunk always trunk, sends DTP to the other side
DTP
Reserved
1002 1005,
0, 4095
If DTP does not netogiate trunk, port becomes access assigned to VLAN (default 1)
Trunking
Types
By default VLAN1 is native on all trunks (untagged frames are assigned to native VLAN)
802.1q frame
8
Voice
VLAN
Preamble
46 1500 Bytes
Payload
FCS
16 bits
Payload
FCS
VLAN ID
12
The native VLAN of the IEEE 802.1Q trunks must not match any
native VLAN of the nontrunking (tunneling) port on the same switch
Private
VLANs
(Cat3560)
Use the vlan dot1q tag native global command to configure the edge switch, so
that all packets going out IEEE 802.1q trunk, including the native VLAN, are
tagged. VLAN1 is a default native VLAN, so by default this command is required.
QinQ
Tuneling
community VLAN
Can talk to Primary and to each other within a
community VLAN, but not to other community
VLANs. There can be many community VLANs
isolated VLAN
Can talk only to Primary. Only one isolated VLAN
(IF) switchport mode private-vlan host
Define L2 port as secondary VLAN
COS C
Tagged frames (Ethertype 0x8100) encapsulated within additional 4 byte 802.1q header (EtherType 0x88a8),
so system mtu 1504 must be added to all switches, otherwise some protocols may not work properly (OSPF)
STP runs only on primary VLAN. Community and isolated VLANs do not have STP instance
TPID=0x8100
All hosts can be in the same subnet. VTP transparent is required (unless VTP v.3 is used)
interface <if>
switchport mode private-vlan primary
switchport primary-vlan mapping <pri> <list>
Define L2 port as primary and assign secondary VLANs
Preamble
802.1p frame
When you enable DHCP snooping on primary VLAN, it is propagated to the secondary VLANs
vlan <id>
private-vlan primary
private-vlan association <list>
Define primary VLAN on every switch
Native (non-tagged) frames received from an ISL trunk port are dropped
Encapsulates in 26 bytes header and recalculated 4 bytes FCS
trailer (real encapsulation) total 30 bytes added to the frame
Extended range
1006 - 4094
Secondary
VMPS
Community VLAN 1
Community VLAN 2
Isolated VLAN
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 9 of 40
Server
By default, VTP operates in version 1. All switches must use the same version
Configuration revision is 32 bits, it is incremented by 1 on every change.
To reset revision number, change mode to transparent or domain name
Features
Modes
Client
Domain
VTP
If transparent is between clients and servers, you still need to manualy configure
VLANs on transparent, otherwise traffic for unknown VLANs will be dropped
Pruning
Messages
Verify
Security
If MST is used, after booting all VLANs are assigned to default IST
until VTP v.3 message arrives. Client stores VLANs in RAM only
Client
Supports whole range of VLANs (2 4095), so spanning-tree extended system-id MUST be set
Primary and secondary server is now defined. Servers store VLANs on RAM, and NVRAM.
VLANs can be configured only on primary server. Secondary is just for backing up configurations
Supports propagation of Private VLANs. Supports other databases, not only VLANs (MST mappings)
If switch is not in MST mode, but receives the MST mapping update from primary
server, it still stores it localy. It will be instantly used when MST is enabled
Provides protection from database override caused by adding new switch to the
network with higher revision only primary server can update other switches
Modes
Server
Features
Default role for VLAN instance is secondary Server. Other instances (MST) will be Transparent
Former primary server, after reload, will be reverted back to secondary server
(IF) no vtp
If disabled on interface, all instances (VLAN, MST) become disabled. Works only on trunk ports
VTPv3
Off
Transparent
Security
Secret keyword allows to configured hashed password directly (must be 32 hex numbers)
To promote secondary server to primary role, you will be asked for password if hidden option is used
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Verify
Pruning
Relay
Configure
Save
Primary server
Secondary server
No
Client
No
No
Transparent
Off
No
Page 10 of 40
Byte 2
Byte 1
Priority
Lowest Priority
(Priority+VLAN+MAC)
wins root election
Blocking (20sec) => Listening (15sec) => Learning (15 sec) => Forwarding
256
128
64
32
16
Based on IEEE 802.1D standard and includes Cisco proprietary extensions such as
BackboneFast, UplinkFast, and PortFast. PVST was supported only on ISL trunks
512
Priority 2 bytes
32768 (0x8000)
ID 6 bytes MAC
Timers &
Features
1. Elect the
Root bridge
Bridges are not interested in local timers, they use timers send by Root Hellos.
Each BPDU sent by root, contains the Age timer. Root sets age to zero, every other
switch adds 1 sec (transit delay), so BPDU shows how many hops away the root is
The max-age timer is reset on every BPDU receipt. This timer does not count down,
but the counter starts from Age timer, and when it reaches max-age, BPDU is aged
out. So, the further the switch, the less time is left for max-age. Ex. first switch from
the root has 20 sec, second switch has 19 sec to age out BPDU, and so on
Cost (total cost to the Root) added from interface on which BPDU was received.
Can be manipulated with BW, speed, and manualy set on interface per VLAN
Forwarders ID (Bridge ID of the switch that forwarded BPDU)
Forwarders port priority configured on interface out of which BPDU is sent
Forwarders port number outgoing interface
10Mb 100
100Mb 19
Switches receive BPDUs on all ports, even blocked ports. They store and relay only best BPDU
(from root). If superior is heard, previous is discarded, and new one is stored and relayed.
Cisco
PVST+
If 10 Hellos are missed (Maxage 20 sec) the switch thinks it is a root and starts sending own Hellos again
Any change resulted in port to be unblocked, forces that port to go through Listening and Learning (30 sec)
2. Determine
the Root Port
1. Port on which Hello was received with lowest Cost (after adding own cost)
(IF) spanning-tree vlan <id> cost <path-cost> (configured on root port)
1Gb 4
3-7Gb EC 2
8Gb EC 1
20Gb EC 1
2Gb EC 3
10Gb 2
If a switch receives new, different best Hello on blocking port, and it still hears superior Hello on
different port, it switches over the first port from blocking to DP and starts forwarding superior Hellos
Switch ignores worse BPDUs untill max-age timer expires, even if his own BPDU is to be the
best (in case current path to root is lost, and switch tries to declare itself as a root - only if there
are no other potential ports receiving superior BPDU from current root, so the port transitions to
listening and learning, otherwise, switch generates own BPDUs thinking it is a root)
4. Topology
change
3. Determine
Designated Ports
BPDUs forwarded with lowest advertised cost (without adding own cost) define DP
Switch with inferior BPDU stops forwarding them to the segment
If advertised costs are the same the tiebreaker is exactly the same as for Root Port
Switch sends TCN BPDU every hello time (localy defined, not from
root), on root port toward Root every until ACKed by upstream switch
Root
Superior
Hello
Inferior
Hello
D D
R B
Fe0/2
Fe0/3
Root
Fe0/1 R
Fe0/1
32768.AA.AA.AA.AA.AA.AA
Fe0/1
When root receives TCN, it sets TCA for next BPDUs so all switches are notified
Fe0/2
Fe0/2 B
32768.CC:CC:CC:CC:CC:CC
C
D
3
2
Inferior Hello
Fe0/3
32768.BB:BB:BB:BB:BB:BB
Blocking becomes DP
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 11 of 40
BPDU Frame
TCN BPDU
Type value: 128
Protocol ID (2B)
Protocol Version ID (1B)
BPDU ver.2 is used (unused fields are now used to define port role, port state, and proposal and agreement states - 802.1d used only two bits: TC and TCAck)
RSTP decouples the role and the state of port. No blocking and listening state (DISCARDING, LEARNING, FORWARDING)
Flags (1B)
All switches originate Hellos all the time (keepalive). Hellos are NOT relayed
Neighbor querying (proposal-agreement BPDU) like in backbonefast, but standarized. Convergence in less than 2 sec
Features
Maxage only 3 Hello misses (fast aging). Basicaly RSTP is not timer-based
802.1w is compatible with 802.1d. Port working as RTSP, when it comes up, starts a migration timer for 3 seconds. If port receives 802.1d BPDU,
it transitions to 802.1d. When legacy switch is removed, RSTP switch continues working as 802.1d. Manual restart is required on that port.
Root ID (8B)
RSTP is able to actively confirm that port can safely transit to forwarding state without
relying on any timers. Switch relies now on two variables: edge port and link type
Backup port Receives better BPDU from the same switch on the segment. Provides
redundant path to the same segment, and it does not guarantee a redundant path to root
point-to-point
Port types
RSTP
802.1w
Root
Full duplex port (only two switches on LAN segment) simple and fast sync process
Port roles
shared
Ports with Half Duplex (shared bus) requires arbitration, slow and
complicated sync process. Does not support RSTP and STP interoperation.
edge
R
Bridge ID (8B)
Port ID (2B)
Only link-up causes TC, as new path may be build. If link goes down, simple sync proces takes
place. Edge ports do not generate TCN, nor sync, regardless of their state change (up or down)
Topology change
If topology change is detected, switch sets a TC timer to twice the hello time and sets
the TC bit on all BPDUs sent out to its designated and root ports until the timer expires
If switch receives a TC BPDU, it clears the MAC addresses on that port and sets the TC bit on all BPDUs sent out its designated
and root ports (except the receiving one) until the TC timer expires (2x hello). Process contingues through whole domain
TCNs are never flooded to edge ports, as there are no switches there
Convergence
BPDU Flags
Topology Change (TC)
Proposal
If root port changes or better root information is received, the bridge sends a
proposal only out of all downstream DP (sets proposal bit in outgoing BPDU)
Downstream bridge blocks all non-designated ports and authorizes upstream brodge to put his port
into forwarding state. This is agreement, only if this switch does not have better root information
Sync
Sync stops when there is no more leafs, or Reject is received (downstream switch has better root information
Port Role
Proposals are ignored on blocked ports, unless inferior BPDU is received. If local root info is better, switch immediately
sends back proposal so inferior switch can quickly adapt. If local info is worse, new sync process begins.
00: Unknown
01: Alternate/Backup
10: Root
11: Designated
If designated discarding port does not receive agreement (downstream does not
understand RSTP or is blocking), port slowly transitions for forwarding like 802.1d
Learning
Forwarding
Agreement
2. Proposal
5. Agreement
1. Set all non-edge
ports to blocking
p2p link
Page 12 of 40
Up to 16 MST (64 RFC) instances (no platform-specific limit for number of VLANs max 4096)
there is always one instance 0 (zero) + 15 user-defined. Instances can be numbered from 1 to 4096
802.1s introduces Regions (like AS in BGP) switches in one common management. Switches belong to the same region if name, revision and vlans mappings
are the same. It is not recommended to have multiple regions. Place as many switches as you can inside one MST region. Migrate core and follow to access
VLAN-to-instance mapping is not propagated. Only digest with region name and revision number is sent
VLANs mapped to single MSTI must have the same topology (allowed VLANs on trunks). Avoid mapping
VLANs to IST(0), and never manually prune individual VLANs (belonging to the same MSTI) from trunk
Features
When the IST converges, the root of the IST becomes the CIST regional root
The IST and MST instances do not use the message-age and maximum-age information in the configuration
BPDU to compute the STP topology. Instead, they use the path cost to the root and a hop-count mechanism
Edge ports are designated by spanning-tree portfast
Each switch decrements hop-count by 1. If switch receives BPDU with hop-count = 0, then it declares itself as a root of new IST instance. MST
increases hop count of cascaded switches from 7 to 40 (20 is default) . It also uses 802.1t long cost mode to differentiate between GE, GEC, 10G.
The only instance that sends and receives BPDUs. All of the other STP instance
information is contained in M-records, which are encapsulated within MSTP BPDUs
IST (MSTI 0)
Internal Spanning Tree
MST Region replicates IST BPDUs within each VLAN to simulate PVST+ neighbor. First
implementation of pre-standard MISTP (Cisco proprietary MST) tunneled extra BPDUs across MST
It is recommended to have IST root inside MST. Successful MST and PVST+ interaction is possible if MST bridge is the root for all VLANs.
If MST is the root for CTS and other switch (PVST+) is the root for any of the VLANs, boundary port will become root-inconsistent
Represents MST region as CST virtual bridge to outside. By default, all VLANs are assigned to the IST
STP parameters related to BPDU transmission (hello time, etc) are configured only on the CST instance
but affect all MST instances. However, each MSTI can have own topology (root bridge, port costs)
MST
802.1s
Instances
MSTI Multiple Spanning Tree Instances (one or more) - RSTP
instances within a region. RSTP is enabled automatically by default
Each region selects own CIST regional root. It must be a boundary switch with lowest CIST external path cost
External BPDUs are tunneled (CIST metrics are passed unchanged) across the region and processed only by boundary switches.
When switch detects BPDU from different region it marks the port on which it was received as boundary port
Boundary ports exchange CIST information only. IST topology is hidden between regions
Configuration
IST
FE
802.1d
MSTIs
SW4
SW5
FE
FE
802.1d
FE
FE
SW10
802.1d
SW3
SW9
MSTIs
SW1
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
MSTIs
SW2
FE
IST
FE
FE
IST
FE
MST region 3
FE
MST region 1
SW7
FE
SW8
FE
Page 13 of 40
Root
Cisco PAgP
PAgP
on
off
auto
desirable
Port
Channel
802.1d
on
off
passive
active
Behavior
No dynamic negotiation. Forced.
PortChannel negotiation disabled
Wait for other side to initiate
Initiate negotiation
Alternate
root port
802.1d legacy feature used on access switch with multiple uplinks to core
Priority is automaticaly set to 49152 so the switch will not become
root. Port cost is set to 3000 so it will not transit any traffic
During switchover to new RP, for each connected MAC it
multicasts dummy frames with each MAC as SA forcing
other switches to update CAM. Other MACs are cleared
SW1
SW2
Uplinkfast
Tracks alternate root port (second best path) to immediately switch over
(G) spanning-tree uplinkfast [max-update-rate <rate>]
If rate is 0 then no multicast flooding takes place (150 default)
Immediately switches over to forwarding state. Avoid TCN generation for end hosts
BPDU guard should be enabled on that port. Portfast does not turn off STP on that port
(G) spanning-tree portfast default
Portfast
IEEE 802.3ad
LACP
Load balancing
Convergence
Backbonefast
RLQ
Root
SW1
RLQ
B
SW3
Inferior BPDU
SW2
All physical interfaces must have identical configuration. If any of speed, duplex,
trunking mode, allowed vlans is different, the port is not bound to etherchannel
LACP or PAgP check links consistency. If They are disabled, STP loop
can occure (Etherchannel on one side, single links on other side)
Features
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 14 of 40
BPDU guard
Etherchannel
guard
Root guard
BPDU filter
STP Port
Protection
Sends local port ID and remote (seen) port ID. Remote end compares with own state
If no BPDUs are received on a blocked port for a specific length of time (MaxAge 20 sec), Loop Guard
puts that port (per VLAN) into loop-inconsistent blocking state, rather than transitioning to forwarding state
Unlike loopguard, UDLD protects against wrong wiring, and is per-physical-port, not per-VLAN
Unlike UDLD, loopguard protects against STP software problems (bugs, etc)
Loop guard
Normal mode does nothing except syslog (on some platforms it may err-disable port on the side where misconfiguration detected)
Aggresive mode attempts to reconnect once a second 8 times before err-disabling both ends
If configured for the first time it is not enabled untill first Hello is heard from the other side
(G) udld {enable | aggressive}
Enable UDLD in normal (enable) or aggresive mode only on all fiber-optic interfaces
Can be enabled on non-designated ports only, which are mainly root and alternate ports. Cannot be
enabled on portfast and dynamic VLAN ports. Enabling on shared links is highly not recommended.
Automatic recovery when BPDU is again received
UDLD
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 15 of 40
You cannot monitor outgoing traffic on multiple ports. Only 2 SPAN sessions per switch
You can monitor incoming traffic on a series or range of ports and VLANs.
Receive (Rx) SPAN catch frames before any modification or processing is performed by the switch. Destination
port still receives a copy of the packet even if the actual incoming packet is dropped by ACL od QOS drop.
Transmit (Tx) SPAN catch frames after all modification and processing is performed by the switch. In the
case of output ACLs, if the SPAN source drops the packet, the SPAN destination would also drop the packet
SPAN
SPAN
You must create the RSPAN VLAN on all switches that will participate
in RSPAN. It cannot be any of reserved VLANs (including 1)
Transparent
The reflector port (Cat 3550 only) loops back untagged traffic to the
switch. It becomes unavailable. The port can be down (its ASIC is used)
Traffic is placed on the RSPAN VLAN and flooded to any trunk ports that carry the RSPAN VLAN
RSPAN
Protocol may be either routed or bridged on a given interface, but not both
CRB
bridge protocol A
Bridging
route protocol A
Routers do not support per-vlan STP, so Bridge Priority is always 32768 for every VLAN, which is
lower than any value on switches, which add VLAN id, so router will be a root for all VLANs by default
Integrated routing and bridging makes it possible to route a specific protocol between
routed interfaces and bridge groups, or route a specific protocol between bridge groups
The bridge-group virtual interface (BVI) is a normal routed interface that does not support
bridging, but does represent its corresponding bridge group to the routed interface
Interface
Range
IRB
Packets coming from a routed interface, but destined for a host in a bridged
domain, are routed to BVI and forwarded to the corresponding bridged interface
All routable traffic received on a bridged interface is routed to
other routed interfaces as if it is coming directly from BVI.
(G) bridge irb
Macro
BVI
Smartport
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 16 of 40
SVI
Flex Links are a pair of a Layer 2 interfaces where one interface is configured to act as a backup to the
other. Users can disable STP and still retain basic link redundancy. Its a sort of UplinkFast without STP
Preemption can be enabled so traffic goes back to primary link after it comes back up
A backup link does not have to be the same type
STP is automaticaly disabled on Flex Link ports
The MAC address-table move update feature allows the switch to provide rapid bidirectional
convergence when a primary link goes down and the standby link begins forwarding traffic
FlexLink
Autonegotiation
(IF) switchport backup interface <intf> preemption delay <sec> (default 35 sec)
35x0
Features
With fallback bridging, the switch bridges together two or more VLANs
or routed ports, connecting multiple VLANs within one bridge domain
Fallback bridging does not allow spanning trees from VLANs to collapse. Each VLAN has own SPT instance.
There is also separate SPT, called VLAN-bridge SPT, which runs on top of the bridge group to prevent loops
Fallback
bridging
MAC notification
802.3 MAC
Dst MAC
Src MAC
Len
6B
6B
2B
Org code
Type
(00)
1
3B
Payload
2B
0800
IP
Ethernet II
SSAP (AA)
DSAP (AA)
Ethernet frames
802.2 SNAP
Control (03)
802.2 LLC
CRC
38 1492
4B
Payload
MTU for Ethernet II is 1500, but for 802.3 it is 1492 (3B LLC, 5B SNAP)
0800
IP
Payload
Payload
Dst MAC
Src MAC
Type
6B
6B
2B
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
CRC
46 1500
4B
Page 17 of 40
Network (7 bits)
Class A
Hosts
0.0.0.0
127.255.255.255
Network (14 bits)
Class B
191.255.255.255
Network (21 bits)
0.0.0.0/8
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.0.0.0/24
192.0.2.0/24
192.88.99.0/24
192.168.0.0/16
198.18.0.0/15
198.51.100.0/24
203.0.113.0/24
224.0.0.0/4
240.0.0.0/4
255.255.255.255
Hosts
128.0.0.0
Class C
192.0.0.0
223.255.255.255
Multicast groups (28 bits)
Class D
224.0.0.0
0
239.255.255.255
Reserved experimental (27 bits)
Class E
7/8
240.0.0.0
Type (8)
Default network
Private network
Loopback
Link-Local
Private network
Reserved (IANA)
Test network
IPv6 to IPv4 relay
Private network
Network benchmark tests
Test network
Test network
Multicasts
Reserved
Broadcast
Record Route IP option stores max 9 hops. 20 bytes fixed IP header, 40 bytes left, 3 used for IP option
overhead own header, then 37 bytes available. Each IP address is 4 bytes, so 9 hops = 36 B is used.
Redirect contains in reserved 4 octets IP address of router to be used for sending packets to a destination network.
Redirects can be generated only by routers, not hosts. Also, routers do not use redirect messages, they use routing table
It sends UDP messages with dest port most likely not being used (above 30000). Intermediate
hosts send Time Exceeded, but when datagram reached end host, even if TTL is 1, it does
not generate Time Exceedd (as it is a final host), so Port Unreachable is generated
7/8
H Len (4)
15/16
23/24
TOS (8)
Hosts which receive datagram with TTL 0 or 1 must NOT forward it.
If TTl=0 they drop it and sent Time Exceeded ICMP message
31
Identifiction (16)
TTL (8)
12 Bytes
Features
Traceroute
Ver (4)
Checksum (16)
Error messages must include in their payload original IP header with all options and first 8 bytes of data following
IP header in original packet. IP header allows to interpret those 8 bytes od data. For TCP and UDP ports are
included in those 8 bytes, so for example unreachable can be generated stating which ports are unreachable
Code (8)
Error message is never send if another error message is received to avoid loops. Also, it is
never sent in reply to broadcast or multicast packets or other IP segments than first, as well
as packets with source IP not defining single host (loopback, broadcast, all zeros, etc)
ICMP
Supernet
Many major networks
combined into one prefix
ICMP
IGMP
IP
TCP
UDP
IPv6
RSVP
GRE
ESP
AH
EIGRP
OSPF
HSRPv2
PIM
VRRP
31
ICMP echo contains identifier which allows to distinguish between several processes sending ping message
from single host. Also sequence number is included, starting from 0 incrementing by 1 with every message sent.
CIDR Ex.
1
2
4
6
17
41
46
47
50
51
88
89
102
103
112
23/24
247.255.255.255
Protocol #
15/16
Common networks
Flags (3)
Protocol (8)
20 Bytes
Connectionless. No way to track lost datagrams. Upper layer must take care
Source IP (32)
Features
Destination IP (32)
Options (up to 40 Bytes)
UDP
Header Len: number of 32b/4B words default is 5, that is 5x4 bytes = 20 bytes. Max IP header is
60 bytes (15x4B words). Padding is used to make sure header always end on 32 bits boundary
IP options: could be: record route, timestamp, loose and strict source routing
Total length: entire datagram size, including header and data, in bytes. Max 65536 B
Header
IPv4
7/8
15/16
23/24
Flags: bit 0: Reserved, bit 1: Don't Fragment (DF), bit 2: More Fragments (MF)
31
8 Bytes
TTL: Each router decrements TTL by one. When it hits zero, the packet discarded
Header checksum: At each hop, the checksum of the header must be compared to the value of this field
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 18 of 40
7/8
15/16
23/24
31
Reserved (4)
Flags (8)
Connection
20 Bytes
Offset: TCP header length. The same rules apply as for IP header
Initial SNs for new sessions start with 1 and increments every 0.5 sec and at every new connection by 64000,
cycling to 0 after about 9,5h. The reason for this is that each connection starts with different initial numer
CWR Congestion Window Reduced flag is set by the sending host to indicate that it received
a TCP segment with the ECE flag set and had responded in congestion control mechanism
ECE Explicit Congestion Notification (ECN-Echo) not the same as ECN in IP header TOS field
URG indicates that the Urgent pointer field is significant
ACK Acknowledges data received. All packets after the initial SYN should have this flag set
Flags
1 bit each
TCP is a stream protocol, unlike UDP, where each write, performed by application, generates
separate UDP segment. TCP collects writes and may send them all in one segment as chunks
Header
MSS is a largest amount of data (without headers) that TCP is willing to send in a single segment.
MSS = MTU IP header TCP header. Should be small enough to avoid fragmentation
PSH Asks to immediately push the buffered data to the receiving application. Normally, TCP waits
for the buffer to exceed the MSS can be probematic (delay) for applications sending small data
MSS
Derived from local interface MTU minus TCP and IP headers. (Ex. 1460 for ethertnet). Sender
compares own MSS and local MTU, chooses lower one and sends this MSS to receiver
When destination IP is non-local or other side does not set MSS, then MSS is set to 536 (20B
IP and 20B TCP is added, so IP packet fits into min 576B required by RFC for host to accept)
Received MSS is always compared only to local MTU smaller value is used. If there
is smaller MTU somewhere on the path, fragmentation will occur. PMTUD should be
used to find lowest MTU on the path (tunneling on intermediate routers lowers MTU)
TCP
Options can be MSS, Timestamp, Selective ACK. It is exchanged only in first segments (SYN)
Buffer: 16k
Buffer: 8k
Eth
TR
MTU 1500
MTU 4462
MSS: 1460 B
TCP uses also congestion window (CWND). It is not communicated between peers. TCP sender calculates
CWND by its own - varies in size much more quickly than advertised window as it reacts to congestion
TCP sender always uses the lower of the two windows to determine how much data it can send before receiving ACK
MSS: 4422 B
3-way handshake sets CWND = 1 and Slow Start Threshold (SSTHRESH) = 65535
5) Host A compares received MSS 4422 with
local MTU (excluding headers, for sake of MSS
calculation) 1460. Uses lower value: 1460 B
Congestion
6) Payload: 1460 B
4) Slow start governs how fast CWND grows until it reaches value of SSTHRESH
5) After CWND > SSTHRESH congestion avoidance governs how fast CWND grows
CWND grows at an exponential rate during slow start
Receiver specifies the receive window with the amount of data it is willing to buffer. Sending
host can send only up to that amount of data before it waits for an acknowledgment
Windows is set in every segment, and is floating, depending on how fast process reads data from
incoming buffer. ACK can set window to 0, which means receivers process hasnt read data from buffer
yet. A while later ACK is sent with updating window. It looks like another ACK but its just Window Update
Congestion Avoidance and Slow Start are algorithms with different objectives. In practice they are implemented together
CWND
CWND
Sender does not have to fill whole receivers window. Receiver does not have to wait until whole window is filled
Before
congestion
Flow
Control
1 segment
Time
Time
CWND > SSthresh
Slow-start only
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Persist Timer is started after each window=0. Window Probe is sent after timer expires (no
Window Update was received) at 60 sec intervals until session is terminated or new windows
is advertised. To avoid sending small segments while buffer is being freed (silly window
syndrome), receiver does not advertise new window until half of available buffer is free
TCP usually does not send ACK at the same time data has been received. It waits (200ms) so maybe some
data can be send back (piggyback ACK). If there is data to be sent ACK is send immediately. The 200ms
timer goes off at fixed intervals, so ACK can wait from 1 to 200 msec, depending on when data was received
(G) service nagle
Nagle collect data and send them in one segment to avoid tinygrams.
It is not recommended for interactive applications (mouse movements).
Page 19 of 40
After determining MSS, host sends segments with DF set. If MTU is smaller on the path, ICMP
is returned with next-hop MTU. If MTU is not included in ICMP message, IP stack must perform
trial-and-error procedure to guess minimal MTU (may take few packets until MTU is guessed)
Upon receiving ICMP error, CWND is not changed, but slow-start is initiated. As path
can change, hosts try larger MTU (up to announced MSS) periodically every 10 min
PMTUD
Components
in IP header
Fragmentation
PMTUD may not work if firewalls are on the path, which usually filter unreachables
Issues
Allow (ACL)
unreachables
Signall MSS
IP
ID: 12345
Offset: 0
MF: 0
UDP: 8 B
20 B
Data:1473 B
1481 B
Total 1501 B
IP
ID: 12345
Offset: 0
IP
ID: 12345
Offset: 1480
20 B
UDP: 8 B
20 B
Clear DF bit
Fragmentation needed
Interface
IP MTU: 1500
MTU &
Fragm.
1) GRE tunnel IP MTU is 1476 (1500 24 bytes for GRE header), DF not set
Packet 1500 is received. TCP segment is 1480, which is larger than GRE MTU 1476. Fragmentation
takes place. 1st packet is 1456 (+20 IP), 2nd packet is 24 (+20 IP). Each packet is then encapsulated in
GRE: 1st packet is 1500 (including 24 GRE), 2nd packet is 68 (including 24 GRE). Tunnel destination
host removes GRE and forwards 2 independent IP packets to end station, which reassemble them.
Data:1472 B
1480 B
MF: 0
2) GRE tunnel IP MTU is 1476 (1500 24 bytes for GRE header), DF set
Router receives 1500 with DF. Packet is dropped, and ICMP is sent back with MTU
1476 (from GRE tunnel endpoint). Packet is encapsulated with new MTU and sent
Data:1 B
1B
3) GRE tunnel IP MTU is 1476 (1500 24 bytes for GRE header), DF set or not, some
smaller MTU between GRE endpoints, no tunnel PMTUD
Packet with 1476 is received. GRE is added, packet is sent as 1500. Intermediate link is 1400.
Packet is fragmented (GRE header DF is 0), original IP is only in first fragment. Tunnel endpoint
must reassembly those parts. Then GRE is removed and original packet is sent to end station
Tunnels
4) GRE tunnel IP MTU is 1476 (1500 24 bytes for GRE header), DF set, some smaller
MTU between GRE endpoints, tunnel PMTUD enabled
Packet with 1476 is received. GRE is added and sent. Intermediate link drops packet (DF set)
and sends ICMP (MTU 1400) to tunnel source (external IP header source). Router lowers
tunnel MTU to 1376 (1400 24 GRE). As packet was dropped, host retransmits it with 1476,
but this time router send ICMP to original host with new MTU 1376. Host uses new MTU
5) Pure IPSec tunnel mode, DF cleared
Packet 1500 is received. IPSec adds 52 bytes. Outgoing MTU is 1500 so packet is fragmented in a normal way
6) Pure IPSec tunnel mode, DF is set
IPSec always performs PMTUD. Encryption is always performed before fragmentation. Packet 1500 is
received, 52 bytes are added by IPSec. Outgoing MTU is 1500 so packet is dropped and ICMP is sent back
with MTU 1442 (1500 58, which is max IPSec header size). Now host sends 1442, IPsec adds 52, resulting
in 1496. Now packet is sent, but intermediate links is 1400. ICMP is sent to IPSec router with MTU 1400,
router lowers SA MTU to 1400. Now, when host re-sends packet with 1442, router drops and sends ICMP with
MTU 1342 (1500 58 max IPSec header). Host now sends 1342, 52 is added, and packet is sent all the way.
7) GRE + IPSec
IPSec is usually in transport mode to carry GRE between endpoints, and GRE itself is encrypted. In transport
mode we save 20 bytes. It is recommended to set ip mtu 1400 on GRE tunnels to avoid double fragmentation
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 20 of 40
Static route to p2p WAN interfaces can be always used, as there is always
only one receiver on the other end. Static route to LAN interface can be
used only if there is a router in that LAN segment, with ip proxy arp enabled
Static route to interface makes this network also connected, so they can be
advertised with network statements by some protocols. Only BGP and EIGRP are
able to pick up such networks. Static to Null0 acts the same, as Null0 is an interface
(OSPF) no discard route [{internal | external}]
(IF) ip summary-address eigrp <#> <net> <mask> 255
Distance
Static routing
Administrative Distance
Directly connected
0
Static to interface/NH
1
EIGRP Summary
5
eBGP
20
EIGRP Internal
90
IGRP
100
OSPF
110
ISIS
115
RIP
120
EGP
140
ODR
160
EIGRP external
170
iBGP
200
BGP local
200
Unknown (not valid)
255
Step 1: get all routes which are in routing table and belong
to redistributed protocol (show ip route <protocol>)
Step 2: get all connected routes which are covered by redistributed protocol with
network command (show ip route connected <addr> => redistributed by <protocol>)
Chain distribution on one router is NOT possible. For example when redistributing
EIGRP => RIP => OSPF, then EIGRP routes will be redistributed into RIP, but NOT
into OSPF. Separate redistribution of EIGRP to OSPF needs to be configured
Redistribution
Routes redistributed from one protocol (higher AD) into another protocol (lower
AD) will NOT be in the routing table on redistributing router as originated by the
second protocol, although AD is lower. Route to be redistributed must be in the
routing table, so it could cause endless reditribution loop
Default route
To propagate default-network with EIGRP, this network must be coming from EIGRP. If it
is defined as static, it must be either redistributed or advertised with network command
router <IGP-protocol>
distribute-list <acl> {in | out} <intf>
When using extended ACL in distribute-list in IGP, the source part is an update source
of the route, and destination is network to be matched (distributed)
access-list <acl> permit ip <source> <source mask> <network> <network mask>
RIP will automatically advertise 0.0.0.0 if gateway of last resort is set with defaul-network
OSPF does not understand default-network at all
Class A: ip prefix-list A permit 0.0.0.0/1 ge 8 le 32 <=> access-list 100 permit 0.0.0.0 127.255.255.255
Class B: ip prefix-list B permit 128.0.0.0/2 ge 16 le 32 <=> access-list 100 permit 128.0.0.0 63.255.255.255
Routing
features
part 1
Distribute-list
router <IGP-protocol>
distribute-list prefix <prefix1 name> gateway <prefix2 name> {in | out}
Filter prefixes in prefix1 list received from gateways listed in prefix2 list
Match
Classes
Class C: ip prefix-list C permit 192.0.0.0/3 ge 24 le 32 <=> access-list 100 permit 192.0.0.0 31.255.255.255
match ip address 10 20
Two the same types of matches in the same route-map entry define OR operation (any of them can match)
Route-map
Continue
If next RM entry (pointed by continue) also have continue clause but match does
not occur, second continue is not processed, and next RM entry is evaluated
PBR
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 21 of 40
ODR
(G) track <#> list {boolean {and | or} | threshold {weight | percentage}}
List of tracked objects can be either ANDed or ORed. Objects can also be negated
(G) track <#> stub-object
Create dummy object that can be tracked and manipulated by EEM
(G) track timer {interface | ip route | sla } | list | stub}{<sec> | msec <msec>}
Defines interval during which the tracking process polls the tracked object. The
default interval for interface polling is 1 sec, and for IP-route polling is 15 sec
track 1 interface serial0/0 line-protocol
track 2 interface serial0/1 line-protocol
track 12 list threshold weight
object 1 weight 5
object 2 weight 5
threshold weight up 10 down 0
Object is down if two interfaces are down
track 1 sla 1 reachability
delay down <sec> up <sec>
1. Track remote router with RTR
(G) ip route 192.0.0.192 255.255.255.255 null 0 track 1
2. Create bogus static routing, reacting to tracked RTR. Although
the route is pointed to null0, which is always available, the route
will be in the routing table only if status of tracked recource is UP
(G) ip prefix-list TST permit 1.1.1.1/32
3. Create prefix-list covering bogus route and assign it to route-map
Advanced
Object
Tracking
Backup
interface
Routing
features
part 2
Protocol number 47
(IF) tunnel route-via <if> {mandatory | prefered }
Tunnel route selection can be used, if there are multiple equal-cost paths to destination (only single
route for tunnel destination is selected randomly). Mandatory: if there is no route via specified interface,
tunnel goes down. Prefered: if there is no route via specified interface, tunnel takes next available path
Conditional
0/0 injection
GRE
router rip
default-information originate route-map TST
5. Originate a default route (RIP in this example) only if routemap result is true, meaning the remote router is reachable
Keepalive
IP
S: 20.0.0.2
D: 10.0.0.1
1
Lo0: 10.0.0.1
GRE
Proto=0
Non Stop Forwarding is a way to continue forwarding packets while control plane is recovering from failure
A
Graceful Restart is a way of rebuilding forwarding data in routing protocols when control plane has recovered
1) If NSF capable control place detects failure (neighbors down) it will not reset data plane, but will
mark forwarding information as stale. Any traffic will be switched based on last known information
2) Control plane must recover before neighbor hold time expires. When control plane gets up, it signals the
neighbor that it still forwards traffic, but would like to resync. This is GR message (protocol dependant)
NSF & GR
GRE
Proto=0
Success counter
5
incremented
IP
S: 20.0.0.2
D: 10.0.0.1
4
GRE header
IP
S: 10.0.0.1
D: 20.0.0.2
GRE
Proto=IP
GRE
Proto=0
Lo0: 20.0.0.2
3
B
`
Stripped
3) Control plane must recover before neighbor hold time expires. When control plane
gets up, it signals the neighbor that it still forwards traffic, but would like to resync
4) Neighbor then sends prefix updates. When done, end-of-table marker is sent
5) When end-of-table is seen, router recalculates topology and informs CEF, which removes stale entries
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 22 of 40
All communication uses UDP/123. Synchronization may take some time if clocks are
highly out of sync. It is recommended to set the time manualy to speed up convergence
The ntp clock-period is set automaticaly. It reflects constantly changing corelation factor.
Do NOT set it manualy. Do NOT include this command when copying config to other device.
Server
Features
Client
Modes
Symetric
active
(G) ntp peer <ip> [<ver>] [key <key>] [source <if>] [prefer]
Create a peer association if this router is willing to synchronize to
another device or allow another device to synchronize to itself
Timezone
Broadcast
NTP
Client
Control messages reading and writing internal NTP variables
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Authentication
Access
control
Server
Page 23 of 40
Features
clear arp-cache
Clears only dynamic entries
RARP only provides IP addresses to the hosts. Netmask and default gateway is not sent
Reverse
ARP
RARP requests an IP address instead of a MAC address. RARP often is used by diskless
workstations because this type of device has no way to store IP addresses to use when they boot.
Proxy ARP replies to queries sent to IP addresses, for which
router has an entry in routing table (static or dynamic)
(IF) no ip proxy-arp
(G) ip arp proxy disable
Proxy ARP is enabled by default. It can be disabled globaly or per interface.
Proxy
ARP
(IF) ip local-proxy-arp
Port replies to ARP requests on the local segment to allow communication between protected ports.
Gratuitous
ARP
ARP
Local Area
Mobility (LAM)
(IF) ip gratuitous-arp
Disabled by default. A host might occasionally issue an ARP Request with
its own IPv4 address as the target address to check duplicate addresses. It
is also used to update other hosts with new MAC (ex. HSRP switchover)
Secure
ARP
Inverse
ARP
Used to define L2-L3 mappings for Frame Relay DLCIs more in FR section
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 24 of 40
802.1AB Link Layer Discovery Protocol runs on L2 like CDP. Composed of TLVs. Mandatory TLVs:
Port description, System name, System description, System capabilities, management address
LLDP-MED (Media Endpoint Devices) extension to LLDP to discover devices
like IP Phones (describes VLAN, QoS (network policy), Power, Inventory SN
CDP runs on any media that supports the subnetwork access protocol (SNAP).
CDP v2 contains 3 additional TLVs VTP domain, native vlan and interface duplex
(G) cdp timer <sec>
CDP messages advertisement interval (default 60 sec)
LLDP
Timers
CDP
Verify
Neighbor
Discovery
Verify
Features
In WCCPv2 (default) there can be more than one router serving Content Engine cluster
WCCPv2 supports MD5 authentication and load distribution
When WCCP forwards traffic via GRE, the redirected packets are encapsulated within a GRE header, and a WCCP
redirect header. When WCCP forwards traffic using L2 (Cache Engine is on the same segment as the router), the
original MAC header of the IP packet is overwritten and replaced with the MAC header for the WCCP client.
WCCP redirect modes
WCCP
redirect in
redirect out
ingress intf
egress intf
ingress intf
egress intf
Configuration
exclude in
L2/GRE
L2/GRE
WCCP-enabled
Server
L2/GRE
L2/GRE
WCCP-enabled
Server
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 25 of 40
The list of traffic classes entries is calles a Monitored Traffic Class (MTC) list. The
entries in the MTC list can be profiled either by automatically learning the traffic or by
manually configuring the traffic classes (both methods can be used at the same time)
OER monitors traffic class performance and selects the best entrance or exit for traffic class. Adaptive
routing adjustments are based on RTT, jitter, packet loss, MOS, path availability, traffic load and cost policy
Minimum CPU impact. Utilizes lots of memory (based on prefixes). MC is the most impacted.
Features
Next hops on each border router cannot be from the same subnet (exchange points)
The preferred route can be an injected BGP route or an injected static route
PfR is a successor of OER. OER provided route control on per destination prefix basis.
PfR expands capabilities that facilitate intelligent route control on a per application basis
OER measures the performance of traffic classes using active and passive
monitoring techniques but it also measures, by default, the utilization of links
Master controller and Border Router can be enabled on the same router
Measure (BR)
Active monitoring generates synthetic traffic to emulate the traffic class that is being monitored
Passive monitoring measures metrics of the traffic flow traversing the device in the data path
Monitors the network and maintains a central policy database with statistics. Verifies that
monitored prefix has a parent route with valid next hop before it asks BR to alter routing
By default all traffic classes are passively monitored using integrated NetFlow functionality and
out-of-policy traffic classes are actively monitored using IP SLA functionality (learned probe)
Features
If multiple exists exist including existing one, use existing one, otherwise randomly pick exit
OER compares the results with a set of configured low and high thresholds for each metric
MC will not become active if there are no BRs or only one exit point exists
Phases
Wheel
Master
Controller
Every rule has three attributes: scope (traffic class), action (insert a
route), and condition that triggers the rule (acceptable thresholds)
Routing can be manipulated with artificialy injected more-specific routes. Measured prefixes
parent route (the same or wider prefix) with a valid next hop must exist for prefix to be injected
Config
logging
Enables syslog messages for a master controller (notice level)
Enforce (BR)
keepalive <sec>
Keepalive between MC and BR. Default is 60 sec.
MC/BR1
MC/BR
SOHO
In control mode commands are sent back to the border routers to alter
routing in the OER managed network to implement the policy decisions
OER/PfR
Basics
OER initiates route changes when one of the following occurs: traffic class goes OOP, exit link
goes OOP or periodic timer expires and the select exit mode is configured as select best mode
Verify (MC)
BR1
After the controls are introduced, OER will verify that the optimized traffic
is flowing through the preferred exit or entrance links at the network edge
MC
BR2
Small branch
Local interfaces used for communication beween MC and BRs. loopback interface
should be configured if MC and BR are on the same router. Configured only on BR
BR2
Interfaces
HQ/DC
Features
Border
Router
MC
Inernal/
Local
BR1
External
External
port <port>
Port used between MC and BR
local <intf>
Identifies source for communication with an OER MC
Authentication
Inernal/
Local
Verify
Config
Page 26 of 40
Delay only for TCP flows (RTT between sending TCP segment and receipt of ACK)
Learned probes (ICMP) are automatically generated when a traffic class is learned using the NetFlow
longest match
assignment
To test the reachability of the specified target, OER performs a route lookup in
the BGP or static routing tables for the specified target and external interface
Passive
probe
Active Probe
Forced target
assignment
OE/PfR
Measuring
Mixed modes
oer master
active-probe {echo <ip> | tcp-conn <ip> target-port <#> | udp-echo <ip> target-port <#>}
A probe target is assigned to traffic class with the longest matching prefix in MTC list
oer border
active-probe address source interface <if>
By default active probes are sourced from an OER managed external interfaces
show oer master active-probes [appl | forced]
Link
Utilization
(MC) learn
Enable automatic prefix learning on MC (OER Top Talker and Top Delay)
delay
Enables prefix based on the highest delay time. Top Delay prefixes
are sorted from the highest to lowest delay time and sent to MC
throughput
Enable learning of top prefixes based on the highest outbound throughput
monitor-period <minutes>
Time period that MC learns traffic flows. Default 5 min
periodic-interval <minutes>
Time interval between prefix learning periods. Default 120 min
prefixes <number>
Number of prefixes (100) that MC will learn during monitoring period
expire after {session <number> | time <minutes>}
Prefixes in central DB can expire either after specified time or number of monitoring periods
aggregation-type {bgp | non-bgp | prefix-length <bits>}
Traffic flows are aggregated using a /24 prefix by default
bgp aggregation based on entries in the BGP table (mathcing prefeix for a flow is used as aggregation)
non-bgp aggregation based on static routes (BGP is ignored)
prefix-length - aggregation based on the specified prefix length
inside bgp
Enable automatic prefix learning of the inside prefixes
Automatic
learning
(learn)
Manual
learning
OER/PfR
Learning
protocol {<#> | tcp | udp} [port <#> | gt <#> | lt <#> | range <lower> <upper>] [dst | src]
Automatic learning based on a protocol or port number (application learning). Aggregate only flows
matching specified criteria. There can be multiple protocol entries for automatic application learning.
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 27 of 40
The relative host % is based on comparison of short-term (5-minute) and long-term (60-minute) measurements:
% = ((short-term % - long-term %) / long-term %) * 100
Monitor
Route
Reachability
Modes
Traffic Class
Performance
Policies
oer master
unreachable {relative <%> | threshold <max>}
set unreachable {relative <%> | threshold <max>}
Relative delay is based on a comparison of short-term and long-term measurements
Delay
Select-Exit
If OER does not find an in-policy exit when in good mode, OER transitions the traffic class
entry to an uncontrolled state. If best mode is used, then the best OOP exit is used.
Packet Loss
Used to adjust the transition period that the MC holds an out-of-policy traffic class entry.
MC waits for the transition period before making an attempt to find an in-policy exit
backoff <min> <max> [<step>]
set backoff <min> <max> [<step>]
Timers are in seconds. Define minimum transition period, maximum time OER holds an
out-of-policy traffic class entry when there are no links that meet the policy requirements of
the traffic class entry. The step argument allows you to optionally configure OER to add
time each time the minimum timer expires until the maximum time limit has been reached
OER/PfR
Policy
Backoff
periodic <sec>
set periodic <sec>
The mode select-exit command is used to determine if OER selects
the first in-policy exit or the best available exit when this timer expires
MOS
Policies may conflict, one exit point may provide best delay while the other has lowest link utilization
Policy with the lowest value is selected as the highest priority policy
By default OER assigns the highest priority to delay policies, then to utilization policies
Used to configure the traffic class entry route dampening timer to set the minimum
period of time that a new exit must be used before an alternate exit can be selected
holddown <sec>
OER does not implement route changes while a traffic class entry is in the holddown state
Jitter
Priority
Resolution
Holddown
Timers
Variance configures the acceptable range (%) between the metrics measured for
different exits that allows treating the different exits as equivalent with respect to a
particular policy (acceptable deviation from the best metric among all network exits)
resolve {cost priority <value> | delay priority <value> variance <%> | loss priority <value>
variance <%> | range priority <value> | utilization priority <value> variance <%>}
Policy with the highest priority will be selected to determine the policy decision. Priority 1 is
highest, 10 is lowest. Each policy must be assigned a different priority number
Periodic
set resolve {cost priority <value> | delay priority <value> variance <%> | loss priority
<value> variance <%> | range priority <value> | utilization priority <value> variance <%>}
oer master
mode route control
OER, by default, operates in an observation mode. Enable route control
mode. In control mode MC implements changes based on policy parameters
All BGP injected routes have no-export community added so they do not leak outside AS
Enable
BGP
control
oer master
mode route metric bgp local-pref <pref>
Default preference is 5000
Static
Route
Injection
router <igp>
redistribute static [route-map <name>]
If an IGP is used and no iBGP is configured, static route redistribution
must be configured on border routers. Route map can be used to
match the tag of 5000 to redistribute only OER-sourced prefixes.
OER/PfR
Traffic Control
Entrance Link
Selection
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
After OER selects the best entrance for inside prefix, BGP prepend
community is attached to the inside prefix advertisements from the
other entrances that are not the OER-preferred entrances
oer master
border <ip>
interface <if> external
maximum utilization receive {absolute <kbps> | percent <%>}
Sets max inbound (receive) traffic utilization for the configured OER-managed link interface
Verify
iBGP
IP address for each eBGP peering session must be reachable from the border router
via a connected route. Since 12.4(9)T neighbor ebgp-multihop is supported
OER applies a local preference value of 5000 to injected routes by default
No-export community is automatically applied to injected routes
Page 28 of 40
Version 1
One Active router (with highest priority), one Standby router, remaining routers in a group are in
listen-state. Only Active and Standby routers generate messages. If standby router becomes
active, other router (currently listening, and with highest priority) becomes standby router.
Version 2
Features
States
Cisco
HSRP
Timers
MAC
When ARP is sent from PC to active router's real IP, router's BIA MAC is sent in reply
When ARP is sent from PC to standby router's real IP, router's BIA MAC is sent in reply
HSRP supports Proxy ARP. If request is received, active router responds with virtual MAC.
(IF) standby arp gratuitous [count <#>] [interval <sec>]
HSRP sends one gratuitous ARP packet when a group becomes active, and then another packet after two and four seconds
Authentication
When tracking is used, the state change is reflected immediately, regardless of hello and hold timers
Decremented priority for multiple interfaces is cumulative only if each intf is configured with priority value (different than
10). If no priority is defined only single total decrement by 10 is used, regardless of number interfaces in down state
Load-balancing possible with different groups on the same interface. Some hosts
use one default GW, other hosts use different GW (within the same segment)
Router B:
Router A:
interface fastethernet0/0
interface fastethernet0/0
ip address 10.0.0.2/24
ip address 10.0.0.1/24
standby 1 ip 10.0.0.3
standby 1 ip 10.0.0.3
standby 1 prioriy 95
standby 1 priority 105
standby 2 ip 10.0.0.254
standby 2 ip 10.0.0.254
standby 2 priority 105
standby 2 priority 95
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Tracking
Semi-Load
balancing
Page 29 of 40
Timers
Up to 4 primary forwarders in a group. They have MAC addresses assigned by AVG in a sequence.
Other routers in a group are secondary forwarders in listening state they learn virtual MACs via Hello
(IF) glbp priority <1-255>
Higher priority is better (default 100). If priority is the ame, higher IP address wins
Features
Authentication
AVF2
Cisco
GLBP
L2
True Load
balancing
DRP
Features
ip drp server
VRRP
Other
FHRP
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Timers
IRDP
Server
Client
Page 30 of 40
Private
10.0.0.1
Public
193.0.0.193
NAT
inside outside
Outside Local (OL)
10.1.1.1
Private
10.0.0.1
Public
193.0.0.193
NAT
Src: 10.0.01
Dst: 10.0.0.1
Dst: 10.1.1.1
Src: 10.1.1.1
Inside local how inside address is seen localy (by inside hosts)
Outside-to-Inside
If IPSec then check input access list
decryption
input access list
input rate limits
input accounting
redirect to web cache
NAT outside to inside
policy routing
routing
crypto (mark for encryption)
output access list
inspect (CBAC)
TCP intercept
encryption
queueing
Inside global how inside address is seen globaly (by outside hosts)
Outside local how outside address is seen localy (by inside hosts)
PAT
Outside global how outside address is seen globaly (by outside hosts)
Not supported: Routing table updates, DNS zone transfers, BOOTP, SNMP
Each NAT entry uses approximately 160 bytes of memory, so 65535 entries
would consume more than 10 MB of memory and large amounts of CPU power
Dynamic
(IF) ip nat pool <name> <start> <end> {netmask <mask> | prefix-length <prefix>} [type match-host]
Host portion of the IG address will match the host portion of the IL address if match-host is used. The
netmask acts as a sanity check, ensuring that such addresses as 204.15.87.255 are not mapped
(G) ip nat inside source list <acl> pool <name>
Translate dynamicaly source addresses of inside hosts
Features
If a fragment arrives before the first fragment, the NAT holds the fragment until the first fragment arrives
PORT and PASV commands carry IP addresses in ASCII form
NAT
part 1
When the address is translated, the message size can change. If the size
message remains the same, the Cisco NAT recalculates only the TCP checksum
If the translation results in a smaller message, the NAT pads the message
with ACSII zeros to make it the same size as the original message
FTP Pasive
TCP SEQ and ACK numbers are based directly on the length of the
TCP segments. NAT tracks changes in SEQ and ACK numbers. It
takes place if translated message is larger than original one
(G) ip nat inside source list <acl> pool <name> mapping <mapping id>
With
HSRP
Stateful
Without
HSRP
Router tracks fragments and delays them (holds) until all fragments are received or reassembly timeout
expires (then incomplete packet is dropped). It is virtual reassembly, as packet is not put back into
one, but only stored localy for NAT processing, after which, all fragments are sent to destination
Static
Virtual
reassembly
(G) ip nat inside source static tcp <IL> <port> <IG> <port> [no-alias]
By default IG address is added to local IP aliases (show ip alias), so the router can terminate
traffic (other than NATed) on itself, using this IP. If no-alias keyword is used, IG address is
not added to aliases. Router will not terminate the traffic, but it will respond to ARP requests.
(G) ip nat inside source static <IL> <IG> redundancy <name>
Redundancy with HRP. Active router is performing NAT translation
Verify
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
R2:
ip nat stateful id <id>
backup <R2 IP>
peer <R1 IP>
mapping-id <id>
Page 31 of 40
If inside host opens route-map (only) based dynamic translation, outside host can be
also able to initiate connection to inside host (bi-directional traffic initiation is allowed
for specific one-to-one mapping, which is created in addition to extendable mapping)
ip nat inside source route-map ISP2_MAP pool ISP2 reversible
Multihoming
to 2 ISPs
icmp-timeout: 60 sec
udp-timeout: 300 sec
Timeouts
finrst-timeout: 60 sec
max-entries:
In NAT TCP load balancing, non-TCP packets pass through the NAT untranslated
Load
balancing
2. Associate global IP (single IPs), by which local servers are seen from outside
ip nat inside destination list <acl> pool <name>
access-list <acl> permit <global IP>
ISP 1
NAT
Serial2/1
200.200.200.0/24
NAT
ISP 2
part 2
Overlaping
networks
.1
NAT on
a stick
DNS Query:hostB.com
SRC:10.0.0.1 ->NAT-> 192.168.10.100
DST:192.168.10.10
.2
hostB
.1
192.168.10.0/24
B
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
.1
Network B
10.0.0.0/24
GW
If DNS is not used then static translation has to be used (ip nat outside source static), but it is more difficult to manage
interface Loopback0
ip address 10.1.1.1 255.255.255.252
ip nat outside
Lo0
outside
Fe0/0
inside
DNS can be used to allow overlaping networks to communicate. Returning reply from DNS
server is translated (DNS payload information) with ip nat outside source command
DNS Server:
192.168.10.10
Network A
10.0.0.0/24
10.0.0.0/24
Serial2/0
100.100.100.1/24
hostA
Page 32 of 40
DISCOVER
Protocol: UDP Src port:68 Dst port: 67
SRC IP: 0.0.0.0
DST IP: 255.255.255.255
SRC MAC: Host MAC address
DST MAC: FF:FF:FF:FF:FF:FF
Oper. Code
HW Len
Hop count
Transaction ID (32b)
Seconds (16b)
Flags (16b)
OFFER
Protocol: UDP Src port:67 Dst port: 68
SRC IP: DHCP server IP
DST IP: 255.255.255.255
SRC MAC: DHCP server MAC address
DST MAC: Host MAC address
Client
HW Type
REQUEST
Protocol: UDP Src port:68 Dst port: 67
SRC IP: 0.0.0.0
DST IP: 255.255.255.255
SRC MAC: Host MAC address
DST MAC: FF:FF:FF:FF:FF:FF
Server ID is set to selected DHCP server
ACK/NACK
Protocol: UDP Src port:67 Dst port: 68
SRC IP: DHCP server IP
DST IP: 255.255.255.255
SRC MAC: DHCP server MAC address
DST MAC: Host MAC address
Relay
If a client is in local network giaddr in HDCP DISCOVER message is set to 0 (zero), and a pool is choosen from interface
on which the message was received. If ip helper address is used, giaddr is set to forwarding router interfaces IP, and a
pool is choosed from this particular IP regardless of interface on which unicasted request was received..
(G) ip dhcp smart-relay
Relay agent attempts to forward the primary address as the gateway address three times.
If no response is received then secondary addresses on relay agtents interface are used
Client has fixed UDP/68 port as reply is broadcasted to the segment and if random port was
used other hosts would receive unknown packets. Here, they know it is a BOOTP reply.
Server responding to clients Discover and Request messages also uses broadcast
to inform other possible DHCP server on a LAN, that the request has been served
Address is assigned with lease time. Client can extend lease time dynamically sending DHCPREQUEST,
usualu at 50% of time. If server sends DKCPACK, lease is extended. If server sends DHCPNACK, client
restarts the full lease. If no response is received, client uses an address until lease expires
Features
Transaction ID (random) field is used to distinguish different queries. Seconds field can be used by
secondary server not to respond until this time expires and reply is not heard from primary server
Proxy
When server replies, it places static arp entry in local cache for a clients MAC and
assigned IP, so ARP request does not have to be generated, otherwise client could
not respond to that ARP request as it doesnt know own IP yet (chicken and egg)
R2 PE:
interface <if>
encapsulation ppp
ip address <ip> <mask>
peer default ip address <peer-ip>
ppp ipcp mask <mask>
ppp ipcp dns <dns1> <dns2>
no peer neighbor-route
Server
On-demand
pool
ip address-pool dhcp-proxy-client
ip dhcp-server <ip>
DHCP
R1 CPE:
interface <if>
encapsulation ppp
ip address negotiated
ppp ipcp netmask request
ppp ipcp dns request
interface <if>
ip address <ip> <mask>
encapsulation ppp
peer default ip address dhcp
Client
Page 33 of 40
Accounting
IP Event
Dampening
MGMT
part 1
Core dump /
crashinfo
Suppress
Reuse
t
Reuse: When penalty decreases below this value, route is unsuppressed (default 1000)
Penalty
KRON
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
TCLSH
foreach VAR {
10.0.0.1
10.0.0.2
} puts [exec ping $VAR]
Page 34 of 40
The RMON engine on a router polls the SNMP MIB variables locally, no need to waste resources on SNMP queries
When the value of the MIB variable crosses a raising threshold RMON creates a log entry and sends an
SNMP trap. No more events are generated for that threshold until the opposite falling threshold is crossed
Misc
Services
(G) rmon alarm <number> <MIB OID> <interval> {delta | absolute} rising-threshold
<value> [<event-number>] falling-threshold <value> [<event-number>] [owner <string>]
The MIB OID argument must be in the form entry.integer.instance
RMON
(IF) no ip unreachables
By default enabled. Affects all types of ICMP unreachable messages (traceroute, etc)
(IF) rmon collection history <index> [buckets <number>] [interval <seconds>] [owner <name>]
Enable RMON history gathering on an interface
(IF) no ip redirects
By default enabled. Enable sending of ICMP redirect messages if routing for
destination points through the same interface on which packet was received
(G) rmon event <number> [log] [trap <community>] [description <string>] [owner <string>]
Add an event (in RMON event table) that is associated with an RMON event number
(G) service timestamps {debug | log} {uptime | datetime [localtime | show-timezone | msec | year}
Define timestamp for log and debud messages to either device uptime or real time (with timezon, miliseconds, etc)
debug condition <confition>
Limit debugging output to specific condition. It is debug command
independent works for all debugs, as long as condition is met
MGMT
part 2
ip dns server
ip dns primary <domain> soa <ns> <email> <timers >
ip host <domain> ns <ip>
ip host <domain> mx <priority> <ip>
CPU threshold
Authoritative
server
ip domain round-robin
ip name-server <ip>
ip dns server
Router acts as server, but forwards queries to authoritative server
(G) ip domain lookup
Enable name lookup (enabled by default)
DNS
Caching
server
ip name-server <ip>
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Export IP packets that are received on multiple, simultaneous WAN or LAN interfaces. Its like SPAN on switches
IP Traffic
Export
(G) process cpu threshold type {total | process | interrupt} rising <%> interval
<sec> [falling <%> interval <sec>]
Interval defines duration of the CPU threshold violation that must be met to trigger a
CPU thresholding notification. If falling threshold is not set it is the same as rising
Spoofing
Page 35 of 40
The RMON engine on a router polls the SNMP MIB variables locally, no need to waste resources on SNMP queries
When the value of the MIB variable crosses a raising threshold RMON creates a log entry and sends an
SNMP trap. No more events are generated for that threshold until the opposite falling threshold is crossed
timeout <msec>
Amount of time IPSLA operation waits for a response. This value should be based on RTT
frequency <sec>
Define a rate at which a IPSLA operation repeats
threshold <msec>
Define threshold for calculating statistics (only). The value specified for this
command must not exceed the value specified for the timeout command.
RMON
(G) rmon alarm <number> <MIB OID> <interval> {delta | absolute} rising-threshold
<value> [<event-number>] falling-threshold <value> [<event-number>] [owner <string>]
The MIB OID argument must be in the form entry.integer.instance
(IF) rmon collection history <index> [buckets <number>] [interval <seconds>] [owner <name>]
Enable RMON history gathering on an interface
IP SLA
(G) rmon event <number> [log] [trap <community>] [description <string>] [owner <string>]
Add an event (in RMON event table) that is associated with an RMON event number
request-data-size
tos
<bytes>
Set
Define
the protocol
TOS value
data(whole
size in8-bit
the payload
field). Default
(padding)
is 0
MGMT
part 3
(G) snmp-server group <name> v3 {auth | noauth | priv} [{read | write | notify} <view>] [access <acl>]
Define SNMP group policy for accessing specific MIBs (view). Auth (authNoPriv), noauth (noAuthNoPriv),
and priv (authPriv) define if messages are authenticated and/or encrypted (privacy)
(G) snmp-server user <name> <group> v3 [encrypted] [auth {sha | md5}]
<password> [priv {des | 3des | aes} <password>]] [access <acl>]
Define user, assigned to specific group. Define authentication and encryption methods. If
encrypted is used, all passwords must be provided in encrypted form, not plain-text
RFC does not allow storing SNMPv3 users/passwords in accessible configurations, so they are not
shown in running config (stored in private NVRAM area). Users are not backed up with running-config,
so you must store this information in some repository in case you need to restore configuration
show snmp group
show snmp user
SNMPv3
SNMPv2
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 36 of 40
archive
log config
hidekeys (hide passwords, communities. etc when they are sent to syslog)
logging enable
notify syslog (send executed commands to syslog)
(G) logging on
Enable logging (enabled by default) to destinations other than console. If logging is disabled,
no messages will be sent to buffer or syslog. Messages will be sent only to console
Logging
config
changes
path
You can use $t for current time and $h for hostname
maximum <#>
Maximum configs to be archived (max 14)
time-period <min>
Snapshot config regulary every # of min
(G) archive
Archiving
write-memory
Snapshot config when write memory (or copy run start) is executed
Logging
archive config
Backup configuration on request
Log &
Archive
Syslog messages are sent using UDP/514 (some servers and IOSes support TCP)
Every message contains: Facility, Severity, Hostname, Timestamp, Message
If timezone is sent then syslog message is marked with * (asterisk)
configure confirm
Confirm configuration changes. It is used only if the revert trigger is used
(G) logging host <ip> [transport {udp | tcp} port <port>] [session-id
{hostname | ipv4 | ipv6 | string <string>}] [discriminator <name>]
Logging to remote syslog server. All messages can be tagged with hostname,
IP address or custom string. Filtering can be applied with discriminator
(G) logging trap <severity>
Specify severity level for logging to all hosts
ACL &
Syslog &
EEM
corelation
Syslog
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 37 of 40
Banners
SSH does not show motd and login banners befor login prompt. They are shown after user is logged in.
Dynamic tokens: $(hostname), $(domain), $(line)
VTY &
CON
lines
Telnet
Device
Access
Keys
HTTP
Server
SSH
(LINE) lockable
Session can be locked by a used. To unlock, password is
required (password is defined when lock command is executed)
Client
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 38 of 40
Original version 1 is the default. Most common version is 5. Aggregation is possible in version 8 (11 schemas).
All versions until 9 had fixed format, not compatible with each other. Flexible NetFlow is version 9
Traditional NetFlow exports 7 key fields: Source IP, Destination IP, Source Port, Destination
Port, L3 Protocol, TOS Byte (DSCP), Input interface. Provides packet and byte count
Features
ip flow-top-talkers
top <#>
sort by {packets | bytes}
match ...
Version 5
Version 9 defines exporting process with new aggregations. Flexible Netflow is an extension
Flexible NetFlow uses two structures: Template FlowSet and Data
FlowSet. Template is composed of Type and Length, sent periodicaly
(G) ip flow-export template options export-stats
Enable sending export statistics (total flows and packets exported) as options data
(G) ip flow-export template [options] timeout-rate <#>
Templates and options sent every # of minutes
NetFlow
1) Configure Template
(G) flow record <name>
2) Configure Exporter
(G) flow exporter <name>
Version 8
Version 9
Flexible
NetFlow
destination <ip>
exporter <name>
record <name>
cache entries <#>
cache timeout {active | inactive | update} <sec>
cache type {normal | immediate | permanent}
Normal cache is like ttraditional, with active and inactive timers.
Immediate accounts for single packet, good for real-time or DDoS
detection may result in large amount of data exported. Permanent
does not expire flows from cache. Entire cache is periodicaly
exported. When cache is full, new flows will not be monitored
3) Configure Monitor
(G) flow monitor <name>
4) Configure interface
(IF) ip flow monitor <name> {input | output}
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 39 of 40
Each ED has own set of variables, which are set when event is triggered. Variable
names starting with underscore (_) are reserved for Cisco global variables
Features
event none
Define empty event, so applet can be started from CLI (for testing: event manager run <policy>)
event syslog pattern <regexp> occurs <#>
Triggers when matches systlog messages with regular expression
event snmp oid <numerical oid> get-type exact entry-op ge entry-val <val> pool-interval <sec>
Triggers when SNMP OID crosses defined threshold
event interface name <if> parameter receive_throttle entry-op ge entry-val <val> entry-val-is-increment true pool-intervale <sec>
Triggers when interface counters cross threshold. Supports 22 counters (input error, interface reset, transmit rate, etc)
EEM Policy
Event
Detectors
4) Define actions
action <seq> cli command
Define actions (ex. CLI commands show or configuration)
EEM
1) Register user directories
(G) event manager directory user policy <path>
(G) event manager directory user library <path>
Path can be local directory on Flash disk
TCL Policy
5) Register policy
(G) event manager policy <TCL script name> type user
Other
actions
Multi Event
Correlation
Verify
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.
Page 40 of 40