CCIE RS Quick Review Kit Ver2 Vol1 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40
At a glance
Powered by AI
The document discusses various Cisco networking technologies and concepts including routing, switching, protocols, management techniques and more.

Some of the main features discussed include Frame Relay, PPP, VLANs, STP, routing protocols, IPv6, MPLS, QoS and security.

Protocols covered include Frame Relay, PPP, VLANs, STP, OSPF, BGP, IPv4, IPv6, NAT, DHCP, NTP and more.

CCIE

Routing and Swithing


Quick Review Kit
Ver.2 / Vol. 1

By: Krzysztof Zaski


CCIE R&S #24081

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

(G) global command


(IF) interface command
(RM) route-map command
(CM) class-map command
(PM) policy-map command

By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.

(IF) encapsulation frame-relay [ietf]


Default encapsulation is CISCO. When connecting Cisco devices with non-Cisco devices,
you must use IETF. Cisco device will automaticaly understand both incoming
encapsulations: cisco and ietf. The difference is in FR header following LAPF header (format
differences and NLPID values indicating type of payload only used by endpoint devices)
(IF) frame-relay map dlci ... [ietf]
(IF) frame-relay interface-dlci <#> [ietf]
Encapsulation can be set per VC, if some go to Cisco and some for non-cisco device

LAPF header Link Access Procedure for Frame-Relay

Header

FECN BECN

1
EA

DE

EA

BECN Backward Explicit Congestion Notification set toward sender in returning frames

Type-0 Complete information about VCs, every 6th message


q933a: ITU Anex A, Available DLCIs 16-991 (LMI DLCI: 0)

LMI
InARP

(IF) no frame-relay inverse-arp


Disable dynamic learning of L2-to-L3 mapping. If subinterfaces are
used, it must be configured on subinterfaces, not physical interface

(IF) frame-relay lmi-type <type>

ansi: Anex D, Available DLCIs 16-991 (LMI DLCI: 1023)

LMI can be autosensed

cisco: Available DLCIs 16-1007 (LMI DLCI: 0)

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)

(IF) no frame-relay inverse-arp ip <dlci>


Not only stops sending mapping on that DLCI, but also ignores

show frame-relay pvc

show frame-relay map


clear frame-relay inarp
In some cases mappings do not get cleared, reload is required

PVC status

ACTIVE PVC is working fine on both ends


INACTIVE other end of PVC is experiencing a problem
DELETED DLCI is configured localy, but its not received via LMI (misconfigured on local FR switch)

Frame-Relay

STATIC LMI is disabled, mappings are staticaly configured


Disable LMI (no keepalive). PVCs will be shown as STATIC

Broadcast capability is automaticaly enabled

1) The same DLCI on both sides

interface serial0/0.1 point-to-point


frame-relay interface-dlci <#>
Only ONE DLCI can be assigned to p2p
interface. Adding next one will not overwrite
existing one, but error message will be displayed

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

The same behavior


(compatible)

Can cause problems with split-horizon (many DLCIs, but one


interface, so updates are not propagated between spokes)
multipoint subintf
101

DLCI

2
C/R

Type-1 keepalive (10 sec). 3 misses and LMI is down

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

(IF) keepalive <sec>


Enables LMI. By default enabled

InARP starts for every DLCI once LMI reports it with status ACTIVE (Here is my IP on this PVC, whats yours?)

physical

5
DLCI

DE Discard Eligible frame may be dropped by the FR switch if DE is set to 1


(during overbooked congestion inside FR network, all frames can be dropped, even
with DE=0, but DE=1 is dropped first). Intelligent QoS is required on router interfaces to
make sure important traffic fits contracted CIR. DE is set for every packet above CIR

LMI triggers InARP. If LMI is disabled, InARP will not work

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.

EA Extended address up to 2 additional bytes of header

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

(IF) frame-relay map ip <remote-ip> <dlci> [broadcast]


Static mapping is required if InARP is not enabled or between spokes. You may also
need mapping for local IP to be able to ping it. Static mapping overrides dynamic

DLCI 10 bits (0-1023) identifier local to each interface

Se0/0.1
10.0.0.2/24

interface serial0/0.1 multipoint


frame-relay interface-dlci <id>
There can be many DLCIs assigned to multipoint subinterface (it acts like physical interface)

Multipoint

Inverse-arp is enabled only on DLCIs assigned to multipoint interface with IP


address configured. DLCIs left on physical interface do not run inverse-arp

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

(G) frame-relay switching


Frame Relay switching must be globaly enabled to route PVCs between interfaces
(IF) frame-relay intf-type dce
Routing is not allowed between two DTE interfaces, at least one must be DCE

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.

frame-relay intf-type dce


frame-relay route 101 interface Serial0/1 104
Se0/0
101
102

Se0/0.1
point-to-point

frame-relay route 104 interface Serial0/0 101


Se0/1
104

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)

(IF) frame-relay broadcast-queue <size> <Bps> <packet-rate>


The broadcast queue has priority when transmitting at a rate below the configured
maximum, so it has a guaranteed minimum bandwidth. Two rate limits are to avoid
flooding the interface with broadcasts. Limiting starts when whichever rate hits first.
The byte rate should be less than (1) N/4 times the minimum remote
access rate, where N is the number of DLCIs to which the broadcast
must be replicated, and (2) 1/4 the local access rate (B/s)
Queue size should be set, so that one complete routing update from each protocol
and for each DLCI can be stored. As a general rule, start with 20 packets per DLCI
The defaults for the serial interfaces are: size of 64 packets, 256kbps, and 36pps

AutoInstall using Frame Relay can be initiated over only the first serial interface on the router

Broadcast Queue

FR Autoinstall

Helper-address on staging router is required if configured router needs to upload config


via TFTP. Router with TFTP server should have directed-broadcast enabled on Ethernet

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

map-class frame-relay <name>


frame-relay end-to-end keepalive mode {reply | request | bidir}
frame-relay end-to-end keepalive timer {recv | send} <sec>
frame-relay end-to-end keepalive event-window {recv | send} <#>
frame-relay end-to-end keepalive error-threshold {recv | send} <#>
frame-relay end-to-end keepalive success-events {recv | send} <#>

End-to-end
Keepalive
(EEK)

Bridging

Fragment size = delay * BW


Must be added on both sides, as 2
bytes fragmentation header is added
frame-relay fragment <#>
IOS automaticaly creates dual FIFO

PPPoFR

Legacy requires shaping


with dual FIFO for interleaving

Fragmentation configured directly on


interface with no FRTS (>12.2.13T)

By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.

bridge <id> protocol ieee


interface <intf>
bridge-group <id>
frame-relay map bridge <dlci> broadcast
Static mapping is required on multipoint interfaces

interface serial0/0
frame-relay interface-dlci <dlci> ppp virtual-template <id>
interface virtual-template <id>
ip address <ip> <mask> | ip unnumbered loopback0

show frame-relay fragment

MLPPP required for FRF.8 FR-to-ATM interworking

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)

show frame-relay end-to-end keepalive [interface <if> <dlci>]

map-class frame-relay <name>


frame-relay fragment-size <#>

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

interface multilink <ML-id>


ppp multilink
ppp multilink group <ML-id>

interface virtual-template <VT-id>


ppp multilink group <ML-id>

Virtual-access interface is created (cloned) after virtual-template is bound to DLCI. As this


interface is p2p then no L2-to-L3 mapping is required even if used on physical multipoint interface
Remote peers /32 IP is shown in routing table as connected (PPP behavior)
On multipoint interface each DLCI must be assigned to the same virtual-template interface because all
endpoints must be in the same subnet. Separate virtual-access interface will be created for each DLCI

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

(IF) ppp authentication chap


Router with this command requests the otreh side to authenticate with CHAP

NCP for establishing and configuring different network


layer protocols (IPCP, CDPCP) mandatory phase

(IF) ppp chap hostname <name>


Send alternate hostname as a challenge. By default, real hostname is sent as username

Authentication (PAP/CHAP) optional phase. Authentocation method


is negotiated during LCP, but authentication itself is after LCP
(G) no peer neighbor route
Peers IP addresses are send in IPCP negotiation and they show up as /32 connected networks
in addition to /30 subnets. Host routes received from peer can be discarded with this command.

(IF) ppp chap password <pass>


This password is used if global username is not configured

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>

(IF) ppp direction {callin | callout}


Forces a call direction. Used when a router is confused as to whether the call is incoming or outgoing (when connected back-to-back)
(IF) ppp chap refuse [callin]
All attempts by the peer to force authentication with CHAP are refused. The callin option
specifies that the router refuses CHAP but still requires the peer to answer CHAP challenges

Address IP can be sent


to peer (like DHCP).
Such address is always
seen as /32 host route

PPP

(IF) ppp chap wait


The router will not authenticate to a peer that requests CHAP authentication until the peer has authenticated itself to the router

CHAP will fail if hostnames are the same on both sides

CHAP Unidirectional 3-way challenge

PAP (Password Authentication Protocol) is a 2-way authentication method, sending


clear-text login and password (request-response). Can be uni- or b-directional

Connection initiated

(IF) ppp authentication pap


Router with this command requests other side to authenticate with PAP
(IF) ppp pap sent-username <username> password <password>
Send hostname and a password in response to PAP request
(IF) ppp pap wait
The router will not authenticate to a peer that requests PAP authentication until the peer
has authenticated itself to the router (bi-directional authentication configuration required)

CHAP auth requested

username r3845 password 1234


interface serial0/0
encapsulation ppp

PAP

(IF) ppp pap refuse [callin]


All attempts by the peer to force authentication with PAP are refused. The callin option
specifies that the router refuses PAP but still requires the peer to authenticate itself with PAP

Back2back LL

r1801

r3845

username r1801 password 1234


interface serial0/0
encapsulation ppp
ppp authentication chap

PHASE 1
01

ID

Random

r3845

Server sends random challenge with own hostname

2 Username is looked up to get password

username r3845 password 1234

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

Random number sent by Server, MD5


3 local password and ID are run
through MD5 to get the HASH

5 Username is looked up to get password


username r1801 password 1234

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

! Client requests server to authen. with CHAP


ppp authentication chap

! server sends CHAP response using user R1

MD5

Random number generated by the


Server, local password and ID are
run through MD5 to get the HASH

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

8 Server sends ACCEPT (03) or REJECT (04)

Page 7 of 40

There is a Discovery stage (Ethertype 0x8863) and a PPP Session stage (Ethertype 0x8864)

interface virtual-template <number>


ip unnumbered <ethernet>

1. Virtual
template

When discovery completes, both peers know PPPoE SESSION_ID


and peers MAC which together define the PPPoE session uniquely

(IF) peer default ip address dhcp-pool <name>


Assign IP address to a client from local DHCP pool

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

(IF) protocol pppoe [group <name>]


Assign PPPoE profile to VLAN subinterface (encapsulation dot1q <vlan>).
Interface will use global PPPoE profile if group is not specified
(IF) vlan-id dot1q <vlan-id> or vlan-range dot1q <start> <end>
pppoe enable [group <group-name>]
Enables PPPoE sessions over a specific VLAN or a range of VLANs on physical ethernet interface

vpdn enable
vpdn-group <name>
request-dialin
protocol pppoe
Configure VPDN group legacy, prior 12.2(13)T

PPPoE

(IF) pppoe max-sessions <#> [threshold-sessions <#>]


Specify maximum number of PPPoE sessions that will be permitted on Ethernet interface.
Threshold defines when SNMP trap is sent. Max sessions depend on the platform.
(BBA) sessions per-mac limit <per-mac-limit>
Specifies the maximum number (default 100) of sessions per MAC address for each PPPoE port that uses the group

Client

(G) dialer-list <dialer-group> protocol ip {permit | list <acl>}


Defines which traffic brings up dialer interface

Limits

(IF) pppoe-client dial-pool-number <number> [dial-on-demand] [service-name <name>]


Specifiy the dialer interface to use for cloning. A dial-on-demand keyword enables DDR
functionality (idle-timeout can be configured on dialer intf). Specific service can be requesed
from BRAS. Service parameters are defined in RADIUS server

(BBA) sessions max limit <pppoe-session-limit> [threshold-sessions <#>]


Specifies maximum number of PPPoE sessions that can be terminated on this router
from all interfaces. This command can be used only in a global PPPoE profile
(BBA) sessions per-vlan limit <per-vlan-limit>
Specifies maximum number (default 100) of PPPoE sessions for each VLAN
(G) snmp-server enable traps pppoe
If tresholds are used, SNMP traps for PPPoE must be enabled

If authentication is required, it is configured just like for ppp

subscriber profile <name> [refresh <min>]


pppoe service <name>
Multiple services can be assigned to one profile. PPPoE server will advertise the
service names to each PPPoE client that uses the configured PPPoE profile. Cached
PPPoE configuration can be timed you after defined amount of time (minutes)
(G) aaa new-model
(G) aaa authorization network default group radius
A subscriber profile can be configured locally on the router or remotely on a AAA server

(BBA) virtual-template <number>


Specifies the virtual template interface to use to clone Virtual Access Interfaces

(IF) pppoe enable [group <name>]


Assign PPPoE profile to an Ethernet interface. Interface will use global PPPoE profile if group is not specified

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

interface dialer <number>


encapsulation ppp
ip mtu <mtu> ! recommended 1492 for 8 byte PPPoE header
ip address negotiated
dialer pool <number>
dialer-group <group-number>

(G) bba-group pppoe {<name> | global}


Create BBA group to be used to establish PPPoE sessions. If global group is
created it is used by all ports with PPPoE enabled where group is not specified.

show interfaces virtual-access <number >


clear interfaces virtual-access <number >

Verify

show pppoe session [all]


show pppoe summary
clear pppoe {all | interface <if> [vlan <vlan>] | rmac}

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

Can be configured in Server and Transparent modes

Switches must be in the same VTP domain. Default mode is Desirable on 3550 only. It is Auto on 3560

Normal range
1-1001

VLAN1 cannot be deleted, and its name (default) cannot be changed

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

Supported only in Transparent and VTP v3 modes. Not


propagated by VTP v1 and v2, but propagated by v3
Not supported in VLAN database configuration mode (vlan database)
(G) vlan internal allocation policy {ascending | descending}
Each routed port on a Catalyst 3550 switch creates an internal VLAN for its
use. These internal VLANs use extended-range VLAN numbers, and such
internal VLAN ID cannot be used for an extended-range VLAN. Internal VLAN
IDs are in the lower part of the extended range (show vlan internal usage)

(IF) switchport mode trunk always trunk, sends DTP to the other side
DTP

(IF) switchport mode dynamic auto replies to negotiation DTP messages


(IF) switchport nonegotiate
Disable sending of DTP messages. Can be used only if static trunking is configured

Reserved
1002 1005,
0, 4095

Extended VLANs cannot be pruned

If DTP does not netogiate trunk, port becomes access assigned to VLAN (default 1)

Trunking

show interface [<if>] trunk

Types
By default VLAN1 is native on all trunks (untagged frames are assigned to native VLAN)

Cisco proprietary protocol supporting up to 1024 VLANs - depreciated

Not supported on ISL trunks all frames are tagged


(G) vlan dot1q tag native
Emulates ISL behaviour on 802.1q trunks for tagging native VLAN (required for QinQ)
(IF) encapsulation dot1q <vlan-id> native
By default, native VLAN is terminated on physical router interface.
It can be processed by a subinterface i native keyword is used

SA is MAC of device doing trunking; DA is 0100.0c00.0000


ISL
Native

VLAN number is communicated to phone via CDPv2 (required for IPPhones)

IEEE standard for tagging frames on a trunk. Supports up to 4096 VLANs


Inserts 4 byte tag after SA and recalculates original FCS. Does not tag frames on the native VLAN
802.1q

802.1q frame

8
Voice

VLAN

Preamble

(VLAN) private-vlan isolated


Define VLAN as isolated

46 1500 Bytes

Payload

FCS

Dst MAC Src MAC 802.1q T

16 bits

Payload

FCS

primary (promiscuous) VLAN


All devices can access it. Isolated
and community VLANs must be
associated with primary VLAN

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

Supports CDP, STP, MSTP, VTP, PAgP, LACP, and UDLD


(IF) switchport mode dot1q-tunnel
(IF) switchport access vlan <id>
Outer VLAN for tunneled traffic

show vlan private-vlan

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

(IF) l2protocol-tunnel [cdp | stp | vtp]


By default CDP, STP and VTP are not enabled on tunneled interfaces
(IF) l2protocol-tunnel point-to-point [pagp | lacp | udld]
Tunnel etherchannel frames. Each pair of remote ports must be in different access VLAN

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

(VLAN) private-vlan community


Define VLAN as community

Dst MAC Src MAC T

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

Canonical Format Indicator (CFI) is used only for TokenRing frames


TPID is in the same place as previous EtherType (T) field,
indicating the frame is tagged. Real EtherType follows 802.1q tag

(IF) switchport voice vlan dot1p


VLAN 0 is used to carry voice traffic
Switch treats frames with 802.1q tag set to zero as it was
an access port, but honors 802.1p COS field for prioritizing
voice traffic. Traffic is then assigned back to native VLAN

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

(IF) switchport trunk native vlan <id>


Native VLAN, even though it is not tagged, it MUST be allowed
with switchport trunk allowed vlan command if it is used
(IF) switchport voice vlan <id>
If port is configured as access, the switch will
automaticaly convert it internaly into a trunk

(IF) switchport mode access always access, DTP is disabled


(IF) switchport mode dynamic desirable sends negotiation DTP messages

Extended range
1006 - 4094

(IF) l2protocol-tunnel cos <value>


COS applied to all tunneled traffic. If not defined, default is COS 5. Inner COS is preserved

Secondary

(IF) switchport access vlan dynamic


Switch (client) starts talking to server using VLAN Query Protocol (VQP)

(IF) switchport private-vlan host-association <pri> <sec>


Assign L2 port to community or isolated VLAN
Promiscuous port (primary VLAN)

When server configured in secure mode the port is shutdown if MAC-to-VLAN


mapping is not in database. In open mode, access is denied but port stays up

VMPS

3560 can be a client and a server. 3550 can be a client only


(G) vmps server <ip> [primary]

Community VLAN 1

Community VLAN 2

Isolated VLAN

(G) vmps reconfirm <sec> - default refresh is every 60 min


(G) vmps retry <#> - default 3 times
show vmps

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

Can add, delete and modify VLANs. Propagates changes


through domain. Accepts messages from the same domain

Works only over trunk ports. Uses MAC: 01:00:0C:CC:CC:CC and


LLC SNAP SSNAP:AA, DSNAP:AA. SNAP header type: 2003

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

Does not propagate info untill domain is configured


Information is stored only in vlan.dat file on flash:
(G) vtp mode server

Features

Supports only basic VLANs (2-1001)

(G) vtp interface loopback1 [only]


If only keyword is used, the interface is mandatory (it must exist). Do not use
abbreviations, full interface name must be used (However Lo1 will work, but L1 not)

Modes

(G) vtp mode client


Can add, delete and modify VLANs. Does NOT propagate anything, nor accepts any VTP
messages. Required is extended VLANs need to be configured, as well as Private VLANs

(G) vtp domain <name>


Initialy a switch is in VTP no-management-domain (NULL) state until it receives an
advertisement for a domain or domain is configured. Domain is 0-padded to 32 bytes
If no domain is configured, the first one heard is accepted, regardless of
the mode (server and client). If domain is configured on the client, it is also
flooded among switches, so client can update server with domain name

Accepts VTP messages within domain. No modifications allowed

Client

Can forward VTP messages only in VTP ver 2


Transparent

Domain

VTP

(G) vtp mode transparent

DTP sends VTP domain in negotiation messages. If domains are


different, trunk will not come up. Static trunk must be configured then

(G) vtp pruning


Enabling VTP pruning on a VTP server enables pruning for the entire domain

Summary advertisement - sent every 5 min, and on every change. Contains


domain name, revision, updater id (IP), timestamp, md5 digest and followers
(set if adv is due to change, it means Subset Advertisements will follow)
Subset advertisement - contains VLANs (status, vlan type, isl vlan id, mtu size, 802.10 index,
vlan name - padded to multiples of 4 bytes). VLANs are sent in ordered form (lower vlans first)

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

(IF) switchport trunk prunning vlan <list>


VTP pruning blocks unneeded, flooded traffic (unknown unicast, broadcast) within VLANs (on
trunk ports) that are included in the pruning-eligible list. Only VLANs 2-1001 are pruning eligible
(IF) switchport trunk allowed vlan <list>
Only listed VLANs are allowed to pass the trunk port, but all are announced via VTP on that port. It can be used as a
pruning mechanism on Transparent switches. When you remove VLAN 1 from a trunk port, the interface still continues to
send and receive management traffic (CDP, PAgP, LACP, DTP, VTP) within VLAN 1. STP still runs for pruned VLANs

Messages

Advertisement request - sent when switch is reset, domain has been


changed, or summary advertisement with higher revision was received

show interface prunning

show vtp status


show vtp password

Verify

show vtp counters

Security

(G) vtp password <pw>


Password can be revealed with command show vtp password

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

Domain is not learned from first announcement heard, (if it is set to


NULL on the switch). To configure v3, domain MUST be set manually
(G) vtp version 3
Ver.3 is compatible with Ver.2 on per-port basis, but NOT with ver.1. If switch
discovers v2 messages it will send BOTH v3 and v2 messages on that interface
as long as v2 is heard. However, v3 switch cannot be updated by v2 switch
Advertisements include primary server ID, so sanity check can be performed

vtp primary [vlan | stp]


Only one server in a whole domain can be promoted as primary server. There
can be two separate devices, each with different role (per instance: VLAN, MST)

(IF) no vtp
If disabled on interface, all instances (VLAN, MST) become disabled. Works only on trunk ports

VTPv3

Off

(G) vtp mode off [vlan | mst]


Disables VTP on all trunk interfaces. However, only specific instance (VLAN, MST) can be disabled
Acts like transparent mode, but DOES NOT relay any messages

Transparent

Just like v.2

vtp password <pw> [hidden | secret]


If hidden password is defined, it cannot be revealed with show command anymore (hash is displayed)

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

show vtp devices [conflict]


show vtp interface [<if>]

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

(G) vtp pruning


In VTP v.3 you have to enable pruning manually in every switch of the domain
Reserved and extended VLANs still cannot be pruned

Page 10 of 40

Byte 2

Byte 1

Priority

Extended System ID (VLAN ID)

32768 16384 8192 4096 2048 1024

(G) spanning-tree vlan <id> hello-time <sec>


BPDU generation (default is 2 sec). Skew detection sends syslog if switch
detects delay in BPDU arrival (non-root). Syslog is rate-limited 1msg/
60sec, unless delay is MaxAge/2 (10 sec), then shown immediately

Lowest Priority
(Priority+VLAN+MAC)
wins root election

spanning-tree vlan <id> forward-time <sec> (default is 15 sec)

Blocking (20sec) => Listening (15sec) => Learning (15 sec) => Forwarding

256

128

64

32

16

Thats why priority is in multiples of 4096

Based on IEEE 802.1D standard and includes Cisco proprietary extensions such as
BackboneFast, UplinkFast, and PortFast. PVST was supported only on ISL trunks

spanning-tree vlan <id> max-age <sec> (default is 20 sec)


Bridge waits 10 Hello misses before performing STP recalculation

512

Priority 2 bytes
32768 (0x8000)
ID 6 bytes MAC

4 bits configurable Priority (multiple of 4096)


12 bits System ID Extension VLAN ID. Allows
different Roots per VLAN (802.1t STP extension)

If superior (lowest) Hello is heard, own is ceased. Superior is forwarded


(G) spanning-tree vlan <id> priority <0-61440>

Timers &
Features

1. Elect the
Root bridge

(G) spanning-tree vlan <id> root {primary|secondary} [diameter <hop#>]


- primary: 24576 or 4096 less than existing one (macro listens to root BPDUs)
- secondary: 28672 (always no way to find current secondarys priority)
- diameter: causes changes to Hello, Forward delay and Maxage timers

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

Each switch forwards roots


Hello changing some fields

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

2. Lowest forwarders Bridge ID the one who sent BPDU to us

3-7Gb EC 2

3. Lowest forwarders port priority (default 128, in increments of 16)


(IF) spanning-tree vlan <id> port-priority <0-250> (configured on DP)

8Gb EC 1

4. Lowest forwarders port number

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)

Only one switch can forward traffic to the same segment

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

It's better than clearing MAC table, as there might be


hosts successfuly communicating with each other

Fe0/3
Root

Fe0/1 R

Fe0/1

All switches use Forward Delay Timeout (15 sec) to timeout


CAM (default is 300 sec) for period of MaxAge + ForwardDelay
(35 sec). Root sets TC in Hellos for the period of that time

32768.AA.AA.AA.AA.AA.AA

Fe0/1

When root receives TCN, it sets TCA for next BPDUs so all switches are notified

All switches need


to be informed
about the change
to timeout CAM

Fe0/2

Upstream switch ACKs with next BPDU, setting Topology Change


Ack (TCA) bit, and sends TC upward, until root is reached

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

(G) spanning-tree mode rapid-pvst

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)

BPDU Type (1B)

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

New port roles used


for fast convergence

point-to-point

(IF) spanning-tree link-type point-to-point


The p2p state can be manualy forced if HDX (half-duplex) is used

Port types

RSTP
802.1w

Root

Alternate port Receives better BPDU from the other switch


on one segment. Provides redundant path to the root

Full duplex port (only two switches on LAN segment) simple and fast sync process

Port roles

Root Path Cost (4B)

shared

Ports with Half Duplex (shared bus) requires arbitration, slow and
complicated sync process. Does not support RSTP and STP interoperation.

edge

Defined with spanning-tree portfast highly recommended

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

Message Age (2B)


Max Age (2B)

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

Hello Time (2B)

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

Forward Delay (2B)

Due to MAC flushing, excessive unknown unicast flooding takes place

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

Topology Change ACK

2. Proposal
5. Agreement
1. Set all non-edge
ports to blocking

3. Select new root port


D

p2p link

4. Set all non-edge ports to blocking

6. Transition designated port to forwarding state


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 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

CIST (common and internal spanning tree) collection of the


ISTs in each MST region, and the common spanning tree (CST)
that interconnects the MST regions and single spanning trees

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

(G) spanning-tree mode mst


Switch with lowest BID among all boundary switches in all regions is elected as CST root. It is also a CIST regional root within own region
spanning-tree mst configuration
name <name>
revision <number>
instance <id> vlan <range>
Must be defined on every switch. If VTPv3 is used, then mappings are propagated
SW6
MST region 2
(G) spanning-tree mst <instance-id> root {primary | secondary}
(G) spanning-tree mst max-hops <count>
FE

IST

FE

(G) spanning-tree mst <other STP parameters, timers>

802.1d

MSTIs

(IF) spanning-tree mst pre-standard


If 802.1s and pre-standard MISTP ports are connected

SW4

SW5
FE

CIST regional root


and CST root

FE

802.1d

CIST regional root

FE

Final IST topology

FE
SW10

IST topology is hidden


to other regions

802.1d

CIST regional root

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

Up to eight compatibly configured interfaces


In auto-negotiation mode it may take 15 sec to form EC. It takes
place before STP. Negotiation should be disabled for hosts (off)
(IF) channel-protocol pagp

Cisco PAgP

(IF) channel-group <1-64> mode {auto | desirable} [non-silent]


In silent mode etherchannel can be built even if PAgP packets are not received.
The silent setting is for connections to file servers or packet analyzers
(G) pagp learn-method {aggregation-port | physical-port}
How to learn the source address of incoming packets received from (aggr-port is default). If
phy-port is used, then frames are sent always on the same port where MAC was learned.
(IF) pagp port-priority <#>
The physical port with the highest priority (default is 128) that is operational and has
membership in the same EtherChannel is the one selected for PAgP transmission

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

(IF) spanning-tree portfast


(IF) switchport mode host

LACP protocol can run only on full-duplex ports


16 ports can be selected, but only max 8 is used. Rest is in hot-standby
Switch with lowest system priority makes decisions about
which ports participate in bundling (switch used port-priorities)

IEEE 802.3ad
LACP

(IF) channel-protocol lacp


(IF) channel-group <1-64> mode {passive | active}
(IF) lacp port-priority <#>
Priority decides which ports are used for EX, and which remain in standby.
Default 32768, lower is better. If priority is the sam, Port ID is used (lower better)
(G) lacp system-priority <#> (lower better)
The system priority is used in conjunction with the MAC to form the system identifier
show lacp sys-id

Load balancing

(G) port-channel load-balance {dst-ip | dst-mac |


src-dst-ip | src-dst-mac | src-ip | src-mac}
Set the load-distribution method among the ports.
Src-mac is default (XOR on rightmost bits of MAC)
show etherchannel load-balance

802.1d legacy feature used for indirect link failure detection


explicit verification of inferior BPDUs. Recovery within 30 sec.
(G) spanning-tree backbonefast
All switches within a domain must be configured
If inferior BPDU is received on block port, switch SW2 sends proprietary
Root Link Query messages on root and alternate (blocked upstream) ports
containing SW2's root information and SW2 BID. If upstream switch has
the same root information as SW2 it forwards it to root ports. Root switch
confirms its still a root with positive answer flooding on all DP
If any switch has different information, immediate negative answer is sent, and
SW2 performs root election without waiting MaxAge (only Lisening and Learning).
In case of positive answer blocked port changes to Listening and Learning

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

(Po1) port-channel min-links <#>


By default, etherchannel is active as long as at least one link is active. STP
cost is not adjusted when links go down. You can make sure that data flow
chooses hi-bandwidth redundant path in case only few links are left.
show etherchannel {summary | detail | port-channel | protocol}
show interface etherchannel

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

Err-disable portfast port upon receiving BPDU


(G) spanning-tree portfast bpduguard default
Applied only to interfaces which are in portfast state

BPDU guard

Etherchannel
guard

(G) spanning-tree etherchannel guard misconfig


A misconfiguration can occur if local interfaces are configured in an EtherChannel, but the interfaces
on the other device are neither LACP, PAgP, nor ON. It is used to check consistency. If etherchannel
is not detected all bundling ports go into err-disable. This command uses spanning tree (BPDU
comes back on a port, meaning one of etherchannel ports on remote end is not in common channel)

(IF) spanning-tree bpduguard enable


show interfaces status err-disabled

Can be enabled on designated ports only. Opposite to loop guard

(G) spanning-tree portfast bpdufilter default


Applies only to interfaces in portfast state. Portfast state switches
to non-portfast upon receiving BPDU. Port is not blocked.
(IF) spanning-tree bpdufilter enable
Port does not send any BPDUs and drops all BPDUs received

Root guard
BPDU filter

When superior BPDU is received on a DP, the port becomes root-inconsistent.


Recovery after ForwardDelay sec of not receiving superior BPDU
Cannot be configured on backup ports when uplinkfast is configured
Applies to all the VLANs to which the interface belongs
(IF) spanning-tree guard root
show spanning-tree inconsistentports

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)

(G) udld message time <sec>


Default L2 probes sent every 15 sec to mac 01:00:0C:CC:CC:CC. Must be ACKed by remote end. Dead is 3x hello.

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

(G) spanning-tree loopguard default


(IF) spanning-tree guard loop

(IF) udld port [aggressive]


Enable UDLD in normal or aggressive mode on fiber-optic (override global mode) and twisted-pair link
udld reset reset err-disable state without shutting down port
show udld [{<if> | neighbors}]

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

(G) monitor session <#> filter vlan <vlan-ids>


Limit the SPAN source traffic to specified VLANs
(G) monitor session 1 source vlan <id> rx
VLAN can be only a source of traffic
(G) monitor session 1 source interface <if> [rx | tx | both]
(G) monitor session 1 destination interface <if>
Complies with the IEEE 802.1D standard
You cannot use RSPAN to monitor Layer 2 protocols (CDP, VTP, STP)

SPAN

You must create the RSPAN VLAN on all switches that will participate
in RSPAN. It cannot be any of reserved VLANs (including 1)

(G) bridge <bridge-group> protocol ieee


(IF) bridge-group <bridge-group>

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)

(G) bridge <bridge-group> address <mac-address> {forward | discard} [<intf>]


Filter frames with a specific source or destination MAC address

Traffic is placed on the RSPAN VLAN and flooded to any trunk ports that carry the RSPAN VLAN

RSPAN

(G) bridge <bridge-group> acquire


Forward frames according to dynamicaly learned MAC
addresses. If disabled, static mappings must be used.

No access ports are allowed to be configured in the RSPAN VLAN


vlan <id>
remote-span (on source switch only)
SW1: monitor session 1 source interface <if> [rx | tx | both]

Route given protocol among one group of interfaces and concurrently


bridge that protocol among a separate group of interfaces

SW1: monitor session 1 source vlan <id> rx

Protocol may be either routed or bridged on a given interface, but not both

SW1: monitor session 1 destination remote vlan <id> reflector-port <if>


SW2: monitor session 1 source remote vlan <id>

CRB

bridge protocol A

(G) bridge crb


(G) bridge <bridge-group> route <protocol>
When CRB is enabled, you must configure explicit bridge route command
for any protocol that is to be routed on the interfaces in a bridge group

SW2: monitor session 1 destination interface <if>

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

(G) define interface-range <name> <intf range>


(G) interface range macro <name>

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

macro name USER_PORT


switchport mode access
switchport access vlan $vlanID
spanning-tree portfast

(G) interface bvi <bridge-group>


(G) bridge <bridge-group> route <protocol>

BVI

bridge and route


protocol A

(G) bridge <bridge-group> bridge <protocol>

(IF) macro apply USER_PORT $vlanID 10

Smartport

After applying macro to interface, macro description <name> will


be added to indicate that configurations were applied from macro
show parser macro brief
Pre-defined macros

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

Switched Virtual Interface is an L3 interface acting as a potential GW for a VLAN


VLAN must exist in database, otherwise interface vlan <vlan ID> will be down

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

If switch is a real L3 then physical interfaces can be assigned IP address


(no switchport). Adding many SVIs does not male a switch an L3 switch
Routing between SVIs is not recommended, as it takes much longer to detect
a link failure (SVI uses autostate process, which delays routing convergence)
(G) sdm prefer {default | access | vlan | routing | dual-ipv4-and-ipv6}
If you use switch for rounting make sure you adjust SDM template (Switched
Database Manager). TCAM structure is then properly managed for L2/L3 entries

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

Works only if enabled on both sides

(IF) switchport backup interface <intf>


(IF) switchport backup interface <intf> preemption mode [forced | bandwidth | off]
forced active always preempts; bandwidth - intf with higher BW always acts as active

FlexLink
Autonegotiation

(IF) switchport backup interface <intf> preemption delay <sec> (default 35 sec)

If mismatch occurs, full-duplex side will face CRC errors (does


not expect colisions, so it treats them as malformed frames)

(IF) switchport backup interface <intf> mmu primary vlan <vlan-id>


If not defined, the lowest VLAN is used for MAC-address move updates

35x0
Features

(G) mac address-table move update transmit


Enable the access switch to send MAC address-table move updates to other switches
(G) mac address-table move update receive
Enable the switch to get and process the MAC address-table move updates

If mismatch occurs, half-duplex side will face late-colisions, as the other


side is able to transmit at any time, without listening to the medium

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

(G) snmp-server enable traps mac-notification


(G) mac address-table notification change
(G) mac address-table notification change [history-size <#>] [interval <sec>]
By default traps are sent every 1 sec. History size is 1.

If one side is manualy configured, speed will be negotiated, but


duplex not. By default, auto-port gets stuck in 100/half duplex

Fallback
bridging

MAC notification

(G) bridge <bridge-group> protocol vlan-bridge


(IF) bridge-group <bridge-group>
By default, switch forwards any frames it has dynamically learned. But, the switch only forward frames
whose MAC addresses are statically configured (static MAC for bridge, not for mac-address-table !!!).

(IF) snmp trap mac-notification {added | removed}

1) no bridge <group> acquire


2) bridge <group> address <mac> {forward | discard} [<interface>]

802.3 MAC

Dst MAC

Src MAC

Len

6B

6B

2B

Org code
Type
(00)
1

3B

Payload

2B
0800
IP

Type/Len ranges are different to make


Ethernet II and 802.3 frames distinguishable.
Frames with value 0-0x05DC (1500) are
802.3, and values above that make Ethernet II

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

/16 prefix length

! - OK. . - (dot) timeout, M - usualy fragmentation needed but DF set, U - unreachable

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

Total Len (16)

Identifiction (16)
TTL (8)

12 Bytes

For unreachable message first 32 bits in ICMP payload are unused


(all 0), they can be used to define MTU for PMTUD mechanism.

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

Ex. 192.168.32.0/21 (8x Class C)

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

Rest of header data (8B) depends on context

247.255.255.255

Natural network (/24)

Protocol #

15/16

Common networks

Flags (3)
Protocol (8)

Fragment offset (13)


Header checksum (16)

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)

Well fit for multimedia traffic due to small header size


Host is not required to receive datagram larger than 576 bytes. TCP divides data into
segments, so it is not a concern, but UDP protocols often limit their payload to 512 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

Identification: used for uniquely identifying fragments of an


original IP datagram when fragmentation is used

7/8

15/16

23/24

Flags: bit 0: Reserved, bit 1: Don't Fragment (DF), bit 2: More Fragments (MF)

Source port (16)

Destination port (16)

Fragment offset: defined in 8B blocks. Specifies the offset of a particular fragment


relative to the beginning of the original unfragmented IP datagram. The first fragment
has an offset of zero. This allows a maximum offset of (2^13 1) 8 = 65,528 bytes

UDP length (16)

UDP checksum (16)

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

Source port (16)

3-way handshake is required before data can be sent. Each side


sets own SN independently, and exchanges it with the other side

31

Closing connection is a 4-way. Any endpoint can send


FIN to signal EoT, it must be ACKed. Since TCP is a fullduplex, other side must also send FIN and wait for ACK

Destination port (16)


Sequence number (32)

Acknowledgement sequence number (32)


Offset (4)

Reserved (4)

Flags (8)

Connection

20 Bytes

Window Size (16)

TCP Checksum (16)

(G) ip tcp synwait-time <sec>


Timeout for establishing all TCP sessions from a router. Default is 30
sec. Can be used to speed up telnet timeout for non-responding hosts

Urgent pointer (16)


Options (max 40 bytes)

show tcp brief all [numeric]

Offset: TCP header length. The same rules apply as for IP header

show tcp tcb <#>


Show detailt TCP session information. Acquire TCP from show tcp brief all

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

(G) ip tcp mss <#>


Define MSS for TCP connections from and to a router.
Default is 1460 for local destination, or 536 for remote

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

(G) service tcp-keepalive {in | out}


Detect dead sessions (probe idle connections)

Flags
1 bit each

Common port numbers


echo
7/tcp/udp
discard
9/tcp/udp
daytime
13/tcp/udp
chargen
19/tcp/udp
bootps
67/udp
bootpc
68/udp
auth
113/tcp/udp
ntp
123/udp
netbios-ns
137/tcp/udp
netbios-dgm
138/tcp/udp
netbios-ssn
139/tcp/udp
snmp
161/udp
snmptrap
162/udp
bgp
179/tcp
syslog
514/udp
shell
514/tcp
rip
520/udp
ripng
521/udp

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

RST Reset the connection


SYN Exchange sequence numbers. Only the first packet sent from each end should have this flag set

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)

FIN No more data from sender, connection can be closed


(G) ip tcp window-size <bytes>
Window size: defines the number of bytes receiver is willing to accept before it sends ACK.
Initially set to number of bytes set as ACK SN sent in 3-way handshake. Default is 4128 B

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

(G) ip tcp selective-ack


TCP might not experience optimal performance if multiple packets are lost from one
window of data. Receiver returns selective ACK packets to sender, informing about data
that has been received. The sender can then resend only the missing data segments

Buffer: 8k
Eth

TR

MTU 1500

MTU 4462

MSS: 1460 B

(G) ip tcp timestamp


TCP time stamp improves round-trip time estimates

1) Host A compares buffer 16K to local MTU 1460


(MTU headers), and uses lower value: 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

2) Host B compares received MSS 1460 with


local MTU (excluding headers, for sake of MSS
calculation) 4422. Uses lower value: 1460 B
3) Payload: 1460 B

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

1) TCP sender fails to receive ACK in time (possible lost packet)


2) TCP sender sets CWND to the size of a single segment
3) Slow start threshold SSTHRESH is set to 50% of CWND value before lost segment

Congestion

4) Host B compares buffer 8K to local MTU 4422


(MTU headers), and uses lower value: 4422 B

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

Congestion avoidance allows CWND to grow slower at a linear rate

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

Slow-start and congestion avoidance

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

(G) ip tcp path-mtu-discovery [age-timer {<min> | infinite}]


Enable PMTUD. Default time is 10 min. It changes the default MSS to 1460 even for nonlocal nodes.
PMTUD is supported only for TCP traffic and is independent in both directions
If host supports PMTUD (in most cases it does), all packets have DF bit set
If host does not announce MSS, it is assumed 536 (for non-local destinations). It can be also saved on per-route basis

Maximum datagram length is 65k, but most links enforce lower


MTU. IP packets can be fragmented to alleviate MTU differences.

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)

When IP datagram is fragmented, it is not reassembled until it reaches final


host (or router in case of tunnel endpoint if tunneled traffic is fragmented)

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

Dropped fragments cause whole IP packet t be retransmitted


16 bit identifier identifies whole datagram. It is the same in all fragments.

PMTUD

Components

DF - used by PMTUD, 0:may fragment, 1:don't fragment

in IP header

MF - 0:last fragment, 1:more fragments


13 bits fragment offset (in Bytes). First fragment starts with 0

(G) ip icmp rate-limit unreachable [df] [<ms>] [log [<packets>] [<interval-ms>]]


ICMP fragmentation needed but DF set (3/4) messages are throttled one per 500 ms.
It can be set independently for DF messages and all other ICMP messages

Fragmentation

PMTUD may not work if firewalls are on the path, which usually filter unreachables

IP header (20 bytes) is added to each fragment. Original IP datagram


size can be determined only after last fragment is received
Fragmentation is problematic for receiver. Hosts dont have problems, as they have
resources for this. Router reserves maximum available buffer for fragmented packet,
as it has no idea how large the packet will be. This consumes scarce resources

Issues

Allow (ACL)
unreachables

permit icmp any any unreachable


permit icmp any any time-exceeded

Signall MSS

(IF) ip tcp adjust-mss <value>


Better solution than clearing DF to allow fragmentation, is to
signal MSS between endpoints. This is only for TCP traffic
Allow fragmentations by clearing DF bit with route map (should be usd as last resort)

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

route-map Clear-DF permit 10


match ...
set ip df 0

interface <inbound if>


ip policy route-map Clear-DF

(IF) tunnel path-mtu-discovery


External GRE IP header has DF always cleared, not coppied from original IP.
This command causes DF to be coppied from original packet to GRE IP header.
MF: 1

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

(G) ip route <net> <mask> <gw> <AD>


Floating static route is used to provide backup route in case primary
route disappears (primary must have lower AD than floating static)

distance <distance> <ip> <mask> <acl>


Defined within a routing protocol (any), but is not protocolspecific. The ip/mask defines advertising router (source),
and an acl defines which routes will get new distance

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

If AD is manipulated, and two protocols have the same AD,


the tie-breaker is the default, original AD for each protocol

Static routing

When networks are summarized in OSPF


and EIGRP, by default static summary
route is created. They can be disabled

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>)

(G) ip default-gateway <ip>


Used not only on switches, but also on routers with ip routing disabled. When router
is booting via TFTP, ip routing is not enabled yet, so this command may be needed.
(G) ip default-network <net>
Network must be in classful form and it must be in routing table. Makes that major network
a candidate default. If you specify a subnet network (which must be in routing table also),
IOS will automatically install major network as a static route with subnet network as a NH.
The command with major network must be issued again to mark it as candicate default

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

(G) ip route 0.0.0.0 0.0.0.0 <gw>


EIGRP and RIP can only propagate existing 0/0 via redistributing (for example, from static).
OSPF does not understand 0/0 via redistribution unless default-information originate is added

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

If a route is denied by ACL in permit statement it doesnt mean


route is not redistributed at all, its just not matched by this entry

Match
Classes

There is IMPLICIT DENY at the end of route-map

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

If no action or sequence number is specified when the route map is configured,


the route map will default to a permit and a sequence number of 10
match ip address 10
match ip tag 2222
Two different types of matches in the same route-map entry define AND operation (they all must match)

Policy Based Routing proceeds through route-map until match is found. If no


match is found or match is found in route-map deny statement, the packet not
dropped, but it is forwarded according to normal destination-based process

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)

(IF) ip policy route-map <name>


Affects incoming packets only

(IF) ip route-cache policy


By default, PBR is process-switched unless CEF is enabled. Fast-switching is
recommended if CEF is not enabled. It must be added before PBR is applied
(IF) ip route-cache same-interface
May be required if next-hop points to the same interface (ex. NBMA)
(RM) set ip next-hop <ip> verify-availability
Verify the availability of the next-hop address before attempting to forward the
packet. The router will search CDP table to verify that the next-hop address is listed

(RM) continue <seq>


Jump to specified seq or next seq if seq is not specified

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

metric: metric of the route (MED for BGP)

(RM) set ip next-hop <ip> track <id>


next hop can be also tracked with Advanced Object Tracking. There can be many
next hops defined in one route-map entry. If one fails, the next one is checked.
(G) ip local policy route-map <name>
for traffic originated by the router. It can be usefull to pass router-generated traffic through
ACL or CBAC. By default router-generated traffic does not pass any outbound ACLs.

If match clause exists, continue proceeds only if match is successful

route-type: OSPF or EIGRP route type (external, internal, type 1 or 2)


ip-address: ACL defining specific prefix(es)
ip-address prefix-list: specific prefix and length (bit netmask)
Match

ip next-hop: ACL defining routes next-hop (via in routing table)


ip route-source: ACL defining neighbor (from in routing table)
tag: route tag
length: packet length

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

(G) track <#> interface <if> {line-protocol | ip routing}


Interface IP routing will go down when line-protocol goes down
or interface loosed IP address (assigned by DHCP or IPCP)
(G) track <#> ip route <net>/<bits> {reachability | metric threshold}
Track IP route reachability (in routing table) or routes metric. Route metric values are
normalized to the range of 0 to 255, where 0 is connected and 255 is inaccessible. State is
up if the scaled metric for that route is less than or equal to the up threshold. Tracking uses
a per-protocol configurable resolution value to convert the real metric to the scaled metric

(G) router odr


Configured on hub only
Hub router can automatically discover stub networks. Stub routers use a
default route to the hub (also learned via ODR: 0* 0.0.0.0 [160/1] via ...)

(G) track resolution ip route {eigrp | isis | ospf | static} <resolution-value>


Define resolutions for routes tracked with threshold. EIGRP resolution 256 - 40000000.
ISIS resolution 1 - 1000. OSPF resolution 1 - 1562. Static resolution 1 to 100000

ODR carries only the network portion of the address,


without a mask. Information is carried by CDP TLVs

ODR

(G) track <#> ip sla <#> [state | reachability]


IP SLA tracking, in addition to up/down state, can set return codes

The metric (hop count) will never be more than 1


Hello 60sec, Invalid 180sec CDP timers are used. ODR
advertisements stop if any other routing protocol is enabled on stub

(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

(IF) backup interface <backup-intf>


The interface defined with this command can back up only one other interface. The backing
up interface goes into standby mode and cannot be used to carry any traffic until activated.

Backup
interface

Routing
features
part 2

(IF) backup delay {<enable-delay> | never} {<disable-delay> | never}


To immediately switchover to backup interface specify delay = 0

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

debug tunnel route-via

route-map TST permit 10


match ip address prefix-list TST
4. Assign tracked prefix to route-map

(IF) keepalive <sec> <retry count>


By default configured tunnel does not have the ability to bring down the line protocol of either tunnel
endpoint, if the far end is unreachable. If keepalive is enabled, NAT cannot be used for GRE packets

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

2 GRE header stripped


IP
GRE
S: 10.0.0.1
Proto=IP D: 20.0.0.2
IP
S: 20.0.0.2
D: 10.0.0.1

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

(G) ntp master [<stratum>]


If stratum is omited, 8 is used. Each hierarchical peer adds 1 to stratum.
Stratum means how many hops device is from authoritative time source

(G) no ntp (removes all NTP configurations)

(IF) ntp disable


Stop sending and responding to NTP messages on that interface

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

Internal server is created, running on 127.127.7.1. This IP must be


explicitly allowed by ntp access-group peer <acl>, if ACLs are used

Features

(G) ntp source <if>


Source of NTP messages

ntp server <ip> [<ver>] [key <key>] [source <if>] [prefer]


Client is only going to synchronize its clock to another, defined clock source

(G) ntp update-calendar


If device has a hardware clock it is updated by NTP (recommended)

Client

A client can act as a server, serving another clients (cascading queries)


Queries from client to server are sent every 60 seconds

show ntp {status | association}


(G) ntp max-associations <#>
Max peers and clients to be served (default is 100)

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

(G) clock timezone <name> <H offset> [<M offset>]


Set time zone. Offset can be positive or negative
(G) clock summer-time <TZ> recurring [<start week> <start day> <start month>
<start hh:mm> <end week> <end day> <send month> <end hh:mm> [<offset>]]
Set starting and ending time when summer time zone changes

(IF) ntp broadcast client


Configured on client. Client does not perform any polling, only listens to announcements

Timezone
Broadcast

NTP

(IF) ntp broadcast


Configured on server. Should be used when LAN has many clients (> 20)

(IF) ntp multicast client <ip>


Client receives NTP messages via multicast
Multicast

Client authenticates the server ONLY !!!

(IF) ntp multicast <ip> [key <key>] [ttl <#>]


Server sends NTP messages via multicast. Default group is 224.0.1.1 and TTL 16

(G) ntp authenticate


Enable authentication feature
(G) ntp authentication-key <id> md5 <password>
Define authentication key

Client
Control messages reading and writing internal NTP variables

(G) ntp trusted-key <id>


Device can synchronize to remote device only if key is trusted

(G) ntp authentication-key <id> md5 <password>


Server requires only key to be defined. Key ID and password must
match those requested by the client (client sends key ID with a request)

By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.

Request/Update messages actual time synchronization

Authentication
Access
control
Server

(G) ntp access-group {query-only | serve-only | serve | peer} <acl>


If multiple ACLs are used, requests are scanned in the following order:
peer accept and reply to clock updates and control messages
serve only reply to clock requests and control messages
serve-only reply only to clock requests
query-only reply only to control messages

Page 23 of 40

(IF) arp timeout <sec>


Expiration time for ARP entries (default 4 hours)
(G) arp <ip-address> <hardware-address> arpa [<interface>]
Define static ARP. Queries are not sent to that host, ant this entry never expires

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)

(IF) ip mobile arp access-group <acl>


Router starts to listen to ARPs from hosts which are not on the same subnet as defined on
interface. Then hosts IP is installed in routing table as /32. ACL defines for which IPs to listen to
router <protocol>
redistribute mobile metric 1
(IF) arp authorised
Disables dynamic ARP learning on an interface. Mapping of IP address to MAC
address for an interface can be installed only by the authorized subsystem
(DHCP) or static entries. Static ARP still overrides authorized ARP.

Secure
ARP

(IF) arp probe internal <sec> count <#>


Probing interval of authorized peers.
ip dhcp pool <name>
update arp
Used to secure ARP table entries and their corresponding DHCP leases
(only new ones, existing remain unsecured untill lease time expires)
The clear arp-cache will not remove secure arp entries, clear ip dhcp binding must be used

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

(G) cdp run


(IF) cdp enable
Enable CDP globaly and per-interface

(IF) lldp med-tlv-select {inventory-management | location | network-policy | power-management}


By default only standard LLDP messages are sent, untill LLDP-MED is heard from attached device. Then,
extended TLVs are send back to device. By default all available types of TLVs are send back. They can be filtered

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)

(G) cdp holdtime <sec>


Inform receiving device, how long CDP messages should be stored localy (default 180)

(G) lldp run


EnableLLDP globaly

LLDP

Timers

(G) no cdp advertise-v2


Disable V2 advertisements

CDP

(G/IF) no cdp log mismatch duplex


Duplex mismatches are displayed for all Ethernet interfaces by default
(G) cdp source-interface <if>
IP from this interface will be used to identify device (messages will be
originated from this intf). It should not be an IP unnumbered interface
show cdp {interface <if> | entry <id>}
show cdp neighbors

Verify

(IF) lldp {transmit | receive}


Enable/disable LLDP on onterface
(G) network-policy profile <#>
Network policy defines characteristics for attached
device. It is not supported on private vlan port

{voice | voice-signaling} [vlan {<vlan-id> | dot1p}


{cos <cos> | dscp <dscp>}] | none | untagged
vlan native vlan for voice traffic
dot1p use vlan0
none do not instruct the phone about vlan
untagged phone sends untagged traffic (default)
(IF) network-policy <#>
Apply policy to interface. Switchport voice vlan must be defined first
(IF) lldp med-tlv-select network-policy
Enable LLDP to send network-policy TLVs

Neighbor
Discovery

clear cdp table

(G) lldp holdtime <s>


How long attached device should hold policy information (default 120 sec)
Timers

(G) lldp timer <s>


Sending frequency (default 30 sec)
(G) lldp reinit <s>
Delay before initializing LLDP on interface (default 2 sec)
show lldp [{entry <id> | neighbors [detail] | interface <if>}]

Verify

show network-policy profile


clear lldp {table | counters}

WCCP works only with IPv4 networks. Uses UDP/2048


Up to 32 Content Engines for a router in WCCPv1. CE with lowest IP is elected as leading Content Engine
WCCPv1 supports only HTTP (port 80) traffic

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

(G) ip wccp web-cache (enable WCCP)

WCCP

(G) ip wccp web-cache group-address <multicast> password <pass>


(G) ip wccp web-cache redirect-list <acl> - for which clients redirection is enabled
(G) ip wccp web-cache group-list <acl> - which cache engines are allowed to participate

redirect in

redirect out

ingress intf

egress intf

ingress intf

egress intf

(IF) ip wccp web-cache redirect in select interface toward local LAN

Configuration

(IF) ip wccp web-cache redirect out select interface toward Internet)


(IF) ip wccp redirect exclude in
Exclude interface from redirecion (usualy interface where WCCP server is located redirect out mode)
(G) ip wccp mode {open | closed}
When closed mode is enabled, and a content engine is not available,
all traffic which would normaly be passed through it, is blocked
show ip wccp

exclude in
L2/GRE

L2/GRE

WCCP-enabled
Server

L2/GRE

L2/GRE

WCCP-enabled
Server

show wccp status

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)

Communication between MC and BR UDP/3949, TCP/3949


Traditional routing uses static metrics and destination-based prefix reachability. Network recovery is based on
neighbor and link failures. PfR enchances routing to select the best path based on measurements and policy
Learn (BR)

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.

BR profiles interesting traffic which has to be optimized by learning


flows that pass through a router. Non-interfesting traffic is ignored
BR sorts traffic based on delay and throughput and sends it to MC

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

PfR automatically configures (virtualy) IP SLA ICMP probes and NetFlow


configurations. No explicit NetFlow or IP SLAs configuration is required

OER can learn both outside and inside prefixes.

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)

Does not have to be in forwarding path, but must be reachable by BRs


Long-term stats are collected every 60 min. Short-term stats are collected every 5 min

Features

If multiple exists exist including existing one, use existing one, otherwise randomly pick exit

Support up to 10 border routers and up to 20 OER-managed external interfaces

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

Can be shutdown with shutdown command

Master
Controller

(G) oer master


Enable OER master controller. Below commands are defined in its context

policies define the criteria for determining an Oot-Of-Profile event.


Apply Policy
(MC)

Can be applied globaly, per traffic (learned automaticaly or defined


manualy) class and per external link (overwrites previous)
By default, OER runs in an observe mode during the profile, measure, and apply policy
phases (no changes to network are made untill OER is configured to controll the traffic)

border <ip> [key-chain <name>]


At least one BR must be configured. Key chain is required when adding
BR for the first time. Its optional when reconfiguring existing BR

Every rule has three attributes: scope (traffic class), action (insert a
route), and condition that triggers the rule (acceptable thresholds)

interface <if> {external | internal}


Define interfaces which are used on BR (must exist on BR)
port <port>
Dynamic port used for communication between
MC and BR. Must be the same on both sides

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)

If an IGP is deployed in your network, static route redistribution must be configured

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

Internal interfaces - used only for passive performance


monitoring with NetFlow. NetFlow configuration is not
required. Internal interfaces do not forward traffic
External interfaces - OER-managed exit links to forward traffic.
At least two for OER-managed domain, at leas one on each BR

Edge router with one or more exit links to an ISP or WAN


Enforces policy changes so it must be in the forwarding path
Reports prefix and exit link measurements to MC

Features

ip nat inside source list 1 interface virtual-template 1 overload oer


NAT awareness for SOHO. NAT session will remain in case of route change via second ISP

Border
Router

(G) oer border


Enable OER border router

master <ip> key-chain <name>


Define MC. Key chain is mandatory
By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.

MC
Inernal/
Local

BR1

External

External

key chain <name>


BR2
key <id>
key-string <text>
Authentication is required. MD5 key-chain must be configured between MC and BRs, even
if they are configured on the same router. Key-ID and key-sting must match on MC and BR
show oer {master | border}
show oer master traffic-class

port <port>
Port used between MC and BR

local <intf>
Identifies source for communication with an OER MC

Authentication

Inernal/
Local

Verify
Config

show oer master prefix <prefix> policy


show oer border passive learn
show ip cache verbose flow
show oer border passive cache {learned | prefix} [applications]

Page 26 of 40

Delay, Jitter, MOS are monitored using IP SLA probes


Loss counters are incremented if retransmission takes place (repeated sequence number in TCP segment)

Reachability tracks SYN without corresponding ACK

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

Throughput total number of packets sent (all types of traffic)


Reachability tracks SYN without corresponding ACK
oer master
mode monitor passive
Enable measuring performance globaly for all traffic flowing through device

longest match
assignment

oer-map <name> <seq>


set mode passive
Enable measuring performance metrics for particular prefixes
oer master
mode monitor both
Active and Passive enabled together (different than fast failover). Default mode.
oer master
mode monitor fast
fast failover - all exits are continuously probed using active monitoring and
passive monitoring. Probe frequency can be set to a lower frequency than for
other monitoring modes, to allow a faster failover capability. Failover within 3 sec.

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-map <name> <seq>


match ip address {access-list <name> | prefix-list <name>}
set active probe <type> <ip> [target-port <#>] [codec <name>]
set probe frequency <sec>
Default frequency is 60 sec.

ip sla monitor responder ...


IP SLA responder must be configured on remote device
oer master
mode monitor active [throughput]
Uses integrated IP SLA. Active throughput uses SLA and NetFlow at the same time

After external interface is configured for BR, OER automatically monitors


utilization of that link. BR reports link utilization to MC every 20 sec
oer master
border <ip>
interface <if> external
max-xmit-utilization [receive] {absolute <kbps> | percentage <%>}
Define
maximum utilization on a single OER managed exit link (default 75%)
oer master
max-range-utilization percent <max %>
max range receive percent <max %>
Set maximum utilization range for all OER-managed exit links. OER keeps the links within utilization
range, relative to each other. Ensures that the traffic load is distributed. If the range falls below
threshold OER will attempt to move some traffic to use the other exit link to even the traffic load

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

oer-map <name> <seq>


match ip address {access-list <name> | prefix-list <name> [inside]}
Only a single match clause (regardless of type) may be configured for
each sequence. All sequence entries are permit, no deny.

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-map <name> <seq>


match oer learn {delay | inside | throughput | list <acl>}
Match OER automaticaly learned prefix
oer master
policy-rules <map-name>
Associate OER map with MC configuration
OER will not control inside prefix unless there is exact match in BGP
RIB because OER does not advertise new prefix to the Internet

OER/PfR
Learning

Prefix-list ge is not used and le 32 is used to specify only inclusive prefix


Only named extended ACLs are supported

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

show oer master policy

mode monitor {active|passive|both}

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

Specified as relative percentage or the absolute maximum


number of unreachable hosts, based on flows per million (fpm)

mode route control


mode route metric

Route
Reachability

mode route observe

Modes

While the traffic class is in policy using the currently


assigned exit, OER does not search for an alternate exit link
mode select-exit {best | good}}
Select either the best available exit or the first in-policy exit
set mode select-exit {best | good}}

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

delay {relative <%> | threshold <max ms>}


set delay {relative <%> | threshold <max ms>}

Select-Exit

Relative loss is based on a comparison of short-term and


long-term measurements. Max is in packets per million

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

loss {relative <%> | threshold <max>}


set loss {relative <%> | threshold <max>}

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

set jitter threshold <max ms>

MOS

set mos {threshold <min> percent <%>}


MOS threshold are recorded in a five-minute period

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

BGP can inject route or modify local preference

set mode route control


MC expects Netflow update for a traffic class from the new link interface and ignores
Netflow updates from the previous path. If Netflow update does not appear after 120
sec, the MC moves traffic class into default state (it is then not under OER control)

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

Injected static routes exist only in the memory of the router


Split prefix is a more specific route which will be preferred over a less specific route
oer master
mode route metric static <tag value>
Default TAG 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

downgrade bgp community <community-number>


downgrade options for BGP advertisement for the configured OER-managed
entrance link interface. Community will be added to the BGP advertisement

show route-map dynamic

If iBGP peering is enabled on the border routers, the master controller


will inject iBGP routes into routing tables on the border routers

show ip access-list dynamic


debug oer border routes {bgp | static | piro [detail]}
show oer master traffic-class
show oer master prefix [detail | learned [delay | throughput] | <prefix>
[detail | policy | traceroute [<exit-id> | <border-ip> | current] [now]]]

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

Initial - not enabled yet, interface activated


Learn - virtual IP is not known yet, and has not seen messages from active router
Listen - router knows virtual IP, but is neither active, nor standby
Speak - actively participate in election (must have virtual IP configured)
Standby monitoring the active router, ready to take over
Active router acively responding to ARPs

Cisco proprietary. UDP/1985


(IF) standby version {1 | 2}
V2 has different frame format (TLV), incompatible with V1. Default is V1
Hello multicasted to 224.0.0.2
Virtual MAC: 0000.0C07.ACxx, where xx group #. Up to 255 groups per interface

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.

Hello multicasted to 224.0.0.102


Virtual MAC: 0000.0C9F.Fxxx, where xxx group #. Up to 4095 groups per
interface, but platform-dependant, per-interface recommended limits still apply

Version 2

(IF) standby priority <#>


Highest priority (0-255) wins (multicasted), default is 100

(IF) standby [<#>]


If group # is not defined, 0 is used

(IF) standby name <name>


The HSRP group name must be unique on the router. It is assigned automaticaly
(ex. Group name is "hsrp-Fa0/0-1), but can be defined to be more informative

Features

States

(IF) standby preempt [delay {minimum <sec> | reload <sec>}]


If local router has priority higher than the current active router, it should attempt to become
active router. No preemprion by default. If enabled, default delay is 0 immediate.
(IF) standby <#> follow <group-name>
HSRP group can become a redundancy client of another HSRP group. Client or slave groups
must be on the same physical interface as the master group. Recursive following is not possible

show standby [brief]


(G) standby redirects [{enable | disable}]
(IF) standby redirect [timers <adv> <hold>]
Real IP address of a router can be replaced with a virtual IP address in NH/GW field
of the ICMP redirect packet. Default advertisement is 60 sec, holddown is 180 sec.

(IF) standaby ip <ip> [secondary]


Secondary IP addresses/subnets can also run HSRP. There can be many secondary
entries for the same group. Primary and secondary IPs can be used together.

(IF) no standby redirect unknown


Allows redirects only between routers configured for HSRP for particular group. If NH
is a router for which real IP to virtual IP mapping is not defined, redirect is not ent.

At least one router must have IP address in HSRP group. Other


routers can learn via hello (Virtual IP is sent within HSRP messages)

(IF) standby bfd


(G) standby bfd all-interfaces
HSRP support for BFD is enabled by default
Duplicate address rather indicates STP problem, than HSRP problem. Duplicate Hello packet is
ignored, and does not affect HSRP operation. Duplicate messages are throttled at 30-sec intervals.

Cisco
HSRP

(IF) standby timers [msec] <hello> [msec] <hold>


Default Hello 3 sec. holdtime 10 sec. All routers in a group should use the
same timers. It msec is used, timers are not propagated inside hellos.
(IF) standby delay minimum <sec> reload <sec>
Minimum defines delay for HSRP initialization after an interface comes up.
Default is 1 sec, recommended 30 sec. Delay after reload is 5 sec, recommended
60 sec. The delay will be cancelled if an HSRP packet is received on an interface

(IF) standby use-bia [scope interface]


If router/switch has limitations for number of groups (MAC chip must support many programable MAC addresses), it can
be solved with "standby use-bia" command. Without the scope, use-bia applies to all subinterfaces on the major interface
Active router sources Hellos from configured real IP and virtual MAC. Standby
router sources Hellos from configured real IP and BIA MAC address.
When ARP is sent from PC to active router's virtual IP (default GW), virtual MAC is sent in reply

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

(IF) standby authentication md5 key-string <pw> [timeout <sec>]


Timeout defines how long OLD key will be valid. Timeout is valid only for
key-string, as key-chain can define own timeouts within key-chain context
(IF) standby authentication md5 key-chain <name>

(IF) standby 1 mac-address <MAC>


MAC address can be defined staticaly. When router becomes active, virtual IP
is moved to different MAC. The router sends gratutituous ARP to update hosts

standby send arp [<if> [<group-number>]]


Send single gratuitous ARP packet for each active group. ARP cahc is verified and re-built before sending gARP

Authentication

(IF) standby authentication text <pw>


Password is sent unencrypted in all HSRP messages

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

(IF) standby 1 track <interface> <decrement>


Only HSRP can track interface directly (physical state), without tracking objects
(G) track 13 interface serial0/1 line-protocol
(IF) standby 1 track 13 decrement 20

Page 29 of 40

Hello multicasted to 224.0.0.102 UDP/3222


(IF) glbp [<#>]
Max 1024 GLBP groups per physical interface. Default group is 0 (not shown in config)

(IF) glbp timers [msec] <hello> [msec] <hold>


Default Hello 3 sec. Holdtime 10 sec. Sub-second hello can be configured

Timers

AVG assigns unique MAC to each router: 0007.B400.xxyy, xx group #, yy router #


One primary AVG, one backup AVG, other members in a group sre in listening
state. If primary fails, one of AVF with highest priority/IP (backup AVG) is elected
to be primary AVG. Other routers in listening state can become primary AVF

(IF) glbp timers redirect <redirect> <timeout>


redirect during this time, AVG keeps redirecting hosts to that AVF
timeout after this time, AVF is removed from all gateways in a group

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

Authentication schema is the same as for HSRP


(IF) glbp authentication text <pw>

Features

Authentication

(IF) glbp client-cache maximum <#> [timeout <sec>]


AVG keeps client cache containing which AVF is assigned to which host. Max 2000 hosts. If max is
reached, oldest entries are removed. Timeout defined how long entries are kept in cache (without
ARP query from a client). Recommended timeout little longer that hots ARP cache timeout
If AVF fails, other AVF awainting in listening stae, becomes primary
AVF. The AVG starts two timers for failed AVF, redirect and timeout

L2 design issue with GLBP


STP
Root
AVF1

AVF2

(IF) glbp weighting track <id> [decrement <value>]


(IF) glbp weighting <max> [lower <lower>] [upper <upper>]
When two interfaces are tracked and both are down, the decrement
is cumulative. If weight drops below lower mark AVF stops
forwarding, when it reaches upper mark it re-enables forwarding

Cisco
GLBP

(IF) glbp preempt [delay minimum <sec>]


No AVG preemption by default. Delay can be defined before preemption takes place

L2

(IF) glbp authentication md5 key-chain <name>


(IF) glbp authentication md5 key-string <pw>

(IF) glbp ip [<ip> [secondary]]


IP has to be defined on AVG. GLBP can also run for secondary addresses

(IF) glbp load-balancing {host-dependent | weighted | round-robin}


Define load-balancing method. AVG by default responds to hosts ARP
with virtual MAC requests in round-robin fashion

True Load
balancing

(IF) glbp forwarder preempt [delay minimum <sec>]


Backup AVF can become active AVF if weighting drops below
low threshold for 30 sec. This feature is enabled by default

Host-dependent load balancing is required by SNAT. Not recommended


for small number of hosts. Given host is guaranteed to use the same MAC
In weighted mode each router advertises weighting and
assignements. Weighted load-balancing in ratio 2:1
RT1: glbp 1 weighting 20
RT2: glbp 1 weighting 10

show glbp [{brief | detail}]

Hello sent to 224.0.0.18 (own protocol number: 112)


Virtual MAC: 0000.3E00.01xx, xx group #. MAC address
cannot be changed manualy. Max 255 groups per interface
Semi-load balancing is possible with many groups and different default gateways set for hosts
It enables the Cisco Distributed Director product to query routers (DRP agent)
for BGP and IGP routing table metrics between distributed servers and clients
Distributed Director is a standalone product that uses DRP to transparently
redirect end user service requests to the topologically closest responsive server

(IF) vrrp [<#>] ip <ip> [secondary]


All members must be configured with the same primaty subnet,
otherwise routers will not become members (they will act independently)

DRP

Features

(IF) vrrp priority <1-254>


Higher is better. Default 100. If priority is the same, higher IP address wins

ip drp server

VRRP

ip drp access-group <acl> (limit source of DRP queries)

(IF) vrrp preempt [delay minimum <sec>]


Preemption enabled by default. Delay is 0 sec - immediate

ip drp authentication key-chain <key>

(IF) vrrp [<#>] shutdown


Disable VRRF for a cerain group without removing configuration
ICMP Router Discovery Protocol. Uses ICMP messages to advertise
candidate default gateway. By default messages are broadcasted
(IF) ip irdp address <ip> <preference>
Advertises IP address configured on interface as a gateway. Optionaly, different
IPs (many) can be advertised with different priorities (all defined IPs are advertised)

Other
FHRP

(IF) vrrp track <obj> [decrement <value>]


Uses IOS object tracking only
show vrrp [{interface | brief}]

(IF) vrrp timers advertise [msec] <sec>


Master advertises timers. Default Hello is 1 sec, Holdtime is 3 sec

Advertisements vary between minadvertinterval and maxadvertinterval


(IF) ip irdp
(IF) ip irdp multicast (enable mutlicasting to 224.0.0.1)
(IF) ip irdp holdtime <sec> (default is 30 min)
(IF) ip irdp maxadvertinterval <sec> (default is 450 sec)
(IF) ip irdp minadvertinterval <sec> (default is 600 sec)
(IF) ip irdp preference <#> (default is 0; higher is better)
(G) no ip routing
(G) ip gdp irdp

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

(IF) vrrp timers learn


Learn timers from master when acting as slave
Authentication schema is the same as for HSRP

Server
Client

(IF) vrrp authentication md5 key-string <pw> [timeout <sec>]


Authentication

(IF) vrrp authentication md5 key-chain <name>


(IF) vrrp authentication [text] <pw>

Page 30 of 40

Source address presentation


Inside-to-Outside
if IPSec then check input access list
decryption
input access list (again, if IPSec)
input rate limits
input accounting
redirect to web cache
policy routing
routing
NAT inside to outside
crypto (mark for encryption)
output access list
inspect (CBAC)
TCP intercept
encryption
queueing

Inside Local (IL)


10.0.0.1

Private
10.0.0.1

Inside Global (IG)


192.0.0.192

Public
193.0.0.193

NAT
inside outside
Outside Local (OL)
10.1.1.1

Private
10.0.0.1

Outside Global (OG)


192.0.0.193

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

Src: 192.0.0.192 Dst: 193.0.0.193


Dst: 192.0.0.192 Src: 193.0.0.193

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

(G) ip nat inside source list <acl> interface <if> overload


All inside sources are translated to single interface IP address. Up to 65535 IL addresses
could theoretically be mapped to a single IG address (based on the 16-bit port number)

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

(IF) ip nat {inside | outside} - Define interface role for NAT


If router does not have a route to destination, packet is unroutable, and does
not use NAT. This can be also a case when no ip classless is configured
If a translation entry already exists and matches traffic then it this entry
will be used, and neither access lists nor route map will be consulted

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

NAT keeps stateful information about fragments. If a first fragment is translated,


information is kept so that subsequent fragments are translated the same way.

When IG or OL addresses belong to directly attached interface, router created ip aliases, so it


can answer ARP requests. If there is no NAT entry for such address, and router runs specific
service, it can be attacked router answers to packets (ICMP or UDP) not realy destined for it

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

(G) ip nat inside source static <inside local> <inside global>


Static NAT (for 1:1 IP address) performs tranlsations in both directions. Packets initiated from
outside into inside are translated, but also packets initiated from inside to outside are translated.
(G) ip nat inside source static network <local net> <global net> /24
Network translation assignes last octed one-to-one
(G) ip nat inside source static tcp 192.168.1.1 21 192.1.1.3 21 extendable
(G) ip nat inside source static tcp 192.168.1.3 80 192.1.1.3 80 extendable
Statically mapping an IG address to more than one IL address is not allowed. To allow
service distribution extendable keyword must be used. This is only for incoming traffic from
outside. Outgoing traffic falls under dynamic NAT. If its not configured, traffic is dropped

ip nat stateful id <id>


redundancy <HSRP name>
mapping-id <id>
Mapping-id identifies translations and must be the same
on both routers. Stateful-id must be unique on each router
R1:
ip nat stateful id <id>
primary <R1 IP>
peer <R2 IP>
mapping-id <id>

show ip snat peer <ip> - show translations on peer router


show ip snat distributed verbose

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

(IF) ip virtual-reassembly [max-reassemblies <#>] [max-fragments <#>] [timeout <sec>] [drop-fragments]


max-reassembies defines max simultaneous packets to be tracked. Drops packets if max is reached
max-fragments max number of fragments for single packet (exceeding will be dropped)
timeout how long router will wait for all fragments before dropping whole incomplete packet
drop-fragments drop all fragments arriving on interface

show ip nat translation


show ip nat statistics

Verify

clear ip nat translation *


NAT translation failure
codes (debug ip nat)

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>

A = Inside to outside fails after routing


B = Outside to inside fails before routing
C = Outside to inside fails after routing
D = Helpered fails
L = Internally generated packet fails
E = Inside to outside fails after routing

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

timeout: 86400 sec

Multihoming
to 2 ISPs

icmp-timeout: 60 sec
udp-timeout: 300 sec

Timeouts

ip nat pool ISP1 100.100.100.10 100.100.100.50 prefix-length 24


ip nat inside source route-map ISP1_MAP pool ISP1

tcp-timeout: 86400 sec


dns-timeout: 60 sec
syn-timeout: 60 sec

ip nat pool ISP2 200.200.200.10 200.200.200.50 prefix-length 24


ip nat inside source route-map ISP2_MAP pool ISP2

finrst-timeout: 60 sec
max-entries:

route-map ISP1_MAP permit 10


match ip address 1
match interface Serial2/0 ! outgoing interface

In NAT TCP load balancing, non-TCP packets pass through the NAT untranslated

route-map ISP2_MAP permit 10


match ip address 1
match interface Serial2/1 ! outgoing interface

Load
balancing

access-list 1 permit 10.0.0.0 0.0.0.255

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

ip alias <global IP> <port>


It may be required to create an IP alias for global IP, so the router accepts traffic for that IP it extended
ACL is used with specific port numbers. The IP alias is not automaticaly created by the NAT

NAT
Serial2/1
200.200.200.0/24

NAT

ISP 2

part 2
Overlaping
networks

Hosts must point a default GW to NAT router, not internet gateway

.1

NAT on
a stick

DNS Query:hostB.com
SRC:10.0.0.1 ->NAT-> 192.168.10.100
DST:192.168.10.10

DNS Query:hostB.com -> 10.0.0.1


SRC:192.168.10.10
DST:192.168.10.100 ->NAT-> 10.0.0.1

access-list NAT permit ...

.2

route-map RM-NAT permit 10


match ip address NAT
set ip next-hop 10.1.1.2
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
ip nat inside
ip policy route-map RM-NAT

hostB

.1
192.168.10.0/24
B

ip route 0.0.0.0 0.0.0.0 192.168.1.1


hostB IN A
10.0.0.1

By Krzysztof Zaleski, CCIE #24081. This Booklet is available for free and can be freely distributed in a form as is. Selling is prohibited.

DNS Query:hostB.com -> 192.168.10.250


SRC:192.168.10.10
DST:192.168.10.100 ->NAT-> 10.0.0.1

SRC:10.0.0.1 (hostA) -> NAT -> 192.168.10.100


DST:192.168.10.250 -> NAT -> 10.0.0.1 (hostB)

.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

1. Define local servers IL addresses:


ip nat pool <name> <start> <end> prefix-length <bits> type rotary
or using more flexible way:
ip nat pool <name> prefix-length <bits> type rotary
address <start1> <end1>
address <start2> <end2>

hostA

ip nat pool AtoB-src 192.168.10.100 192.168.10.110 mask 255.255.255.0


ip nat pool AtoB-dst 192.168.10.200 192.168.10.210 mask 255.255.255.0
ip nat inside source list 1 pool AtoB-src
ip nat outside source list 1 pool AtoB-dst
access-list 1 permit 10.0.0.0 0.0.0.255

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)

Client IP Address (CIADDR) (32b)


Your IP Address (YIADDR) (32b)

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

Server IP Address (SIADDR) (32b)


Gateway IP Address (GIADDR) (32b)
Client HW Address (CHADDR) (16B)
Server name (SNAME) (64B)

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

Boot filename (128B)


Vendor-specific options (64B)
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

ip helper address <ip> [redundancy <HSRP name>]


Broadcast is changed to directed unicast with routers LAN interfaces IP address as a source. This
feature is used if DHCP server is not on the same segment as clients (broadcast is not propagated
through a router). If redundancy is used, only active router will forward queries to the server
service dhcp (enabled by default)

Relay

UDP/67 server; UDP/68 client; Payload is 300 bytes

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 a dialing client requests an IP address via IPCP, the


dialed router can request this IP on clients behalf from
remote DHCP server, acting as a proxy. The dialed router
uses own IP from PPP interface to set giaddr in the request

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

This feature is usefull when WAN links gets


all IP information dynamicaly assigned, and
DHCP options (DNS, domain, etc) need to
be passed to clients behind a router.

ip dhcp pool <name>


import all
origin ipcp

(G) ip dhcp exclude-address <start> <end>


Multiple lines defining which addresses in a network range will not be assigned to clients

Server

(G) no ip dhcp conflict-logging


Must be disabled if database agent is not configured (conflicts logging is possible if there is a place to store them)
ip dhcp pool PC1
host <ip> /24
hardware-address <MAC>
Host pools inherit entire configuration from the main pool (IP is matched against network in the pool). When creating per-host
pool, 01 must be added in the front of MAC defined as client-id (01 means ethernet media type). Ex. 0100.0c12.213e.23

(IF) ip dhcp client request ...


Request additional parameters (options)

(IF) ip address dhcp client-id <if>


Specify Client-ID to identify specific profile on DHCP server

(G) ip dhcp database flash:/bindings [timeout <sec>] [write-delay <sec>]


Configure database agent for storing bindings, and conflict logging

On-demand
pool

(IF) ip address dhcp


Assign IP address from DHCP

(IF) ip dhcp client lease <days> [<hours>]


Request specific lease time for an address

ip address-pool dhcp-proxy-client
ip dhcp-server <ip>

ip dhcp pool <name>


network <net> <mask>
dns-server <ip>
domain-name <name>
lease <days> [<hours>]
option <id> <type> <value> (additional options ex. 150 TFTP server, etc)
netbios-node-type <type> (h-node: Hybrid node recommended)

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

(G) ip dhcp ping {packets <#> | timeout <msec>}


DHCP server pings IP before it is leased

Client

(G) ip dhcp bootp ignore


Ignore BOOTP requests sent to this DHCP server
show ip dhcp pool
show ip dhcp binding

release dhcp <if>


Force interface to release and renew IP address
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 33 of 40

(IF) ip accounting output-packets


Only transit IP traffic is measured and only on an outbound basis
(IF) ip accounting access-violation
Access-violation requires ACL to be applied on the interface. It cannot me a named ACL.
Only process switched packets generate accurate statistics (fast switching or CEF do not)
(G) ip accounting-threshold <threshold>
The default value is 512 source/destination pairs. This default
results in a maximum of 12,928 bytes of memory usage
(IF) dampening [<half-life> <reuse> <suppress> <max> [restart]]
Reduce the effect of routing table instability. Mainly focused on IGP. Penatly is added (1000)
every time interface flaps. Primary interface configuration is applied to all subinterfaces by default.

Accounting

(IF) ip accounting precedence {input | output}


To display IPP accounting, use show interface precedence

Half-life: Time, after which a penalty is decreased by half (default 5sec)

IP Event
Dampening

(G) ip accounting-list <net> <mask>


Define hosts for which IP accounting information is kept

(G) ip accounting-transits <count>


Define number of transit records (default is 0) stored in IP accounting database. Transit entries are those that do
not match any of the filters specified by ip accounting-list. If no filters are defined, no transit entries are possible

(G) exception dump <ip>


Dump exception file to remote server

(G) exception protocol {ftp | tftp}


If you use TFTP to dump the core file to a server, the router will only dump the first 16 MB
of the core file. If FTP is used, ip ftp username and ip ftp password must be defined

Suppress: Suppress route when penalty is exceeded (default 2000)


Max: Maximum time a route can be suppressed (default 20 sec)
Restart: Penalty applied to interface when it comes
up for the first time after reload (default 2000)

MGMT
part 1
Core dump /
crashinfo

Suppress
Reuse
t

kron policy-list <policy-name>


cli <command>
Define policy with commands to be executed. You CANNOT use configuration commands, only global exec

(G) exception core-file <name>


Specify the name of the core dump file
(G) exception crashinfo file <device:filename>
Enable the creation of a diagnostic file at the time of unexpected system shutdown. The
file name can be up to 38 characters. The filename will be filename_yyyymmdd-hhmmss

Reuse: When penalty decreases below this value, route is unsuppressed (default 1000)

Penalty

(IF) ip accounting mac-address {input | output}


To display the MAC accounting information, use show interface mac

KRON

kron occurrence <name> {in | at} <time> {oneshot | recurring | system-startup}


policy-list <policy-name>
There can be many policies assigned to the same schedule
show kron schedule

(G) exception crashinfo buffersize <KB>


Change the size (default 32K) of the buffer used for crash info files
(G) exception crashinfo dump command <cli>
Specify output to be written to the crashinfo file
(G) exception crashinfo maximum files <#>
Define max number of crashinfo files. Old files are deleted
automatically. If set to 0, all crashinfo files are deleted.

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

(G) no service prompt config


No prompt in config mode
(G) service nagle
Buffer keystrokes and send them in one packet (useful for telnet)
(G) warm-reboot [count <#> | uptime <min>
When device is reloaded uncompresses IOS from DRAM is used, not compressed on Flash. Default count i5,
after which cold reboot is required. Default timeout is 5 min, after which next cold-reboot can be performed

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

copy running-config startup-config [all]


If all is used, all default values, which are not shown in running config, are stored in startup config
(G) ip options {drop | ignore}
Drop or ignore IP options packets that are sent to the router

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

show ip dns primary

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)

(G) snmp-server host <ip> traps <community> cpu


Sends CPU traps to the specified SNMP server
Client

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) ip domain lookup


(G) ip dns server
(G) ip dns spoofing [<ip>]
If upstream DNS server is up, router will proxy and forward queries. If upstream is down,
router will respond to all queries with pre-configured IP only if query is not for routers own
interface, if so, then it replies with interface IP on which query was received.

(G) process cpu statistics limit entry-percentage <%> [size <sec>]


Set the entry limit and size of CPU utilization statistics. Entry-percentage indicates the
percentage of CPU utilization that a process must use to become part of the history table.
Size is a duration of time (default 600 sec) which CPU statistics are stored in the history table
(G) snmp-server enable traps cpu [threshold]
Enables CPU thresholding violation traps

ip host <fqdn> <ip1> ... <ip6>

ip domain {timeout <sec> | retry <#>}

(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

ip traffic-export profile <profile-name>


interface <intf> (outgoing interface)
bidirectional (By default, only incoming traffic is exported)
mac-address <H.H.H> (destination host which will receive exported traffic)
incoming {access-list <acl>} | sample one-in-every <packet-#>}
outgoing {access-list <acl>} | sample one-in-every <packet-#>}
(IF) ip traffic-export apply <profile-name>

Page 35 of 40

(G) ip sla responder


Control message asks Responder to open specific UDP or
TCP port. After ACK is received, Sender sends a probe

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

(G) ip sla <id>


Enable IP SLA. After type is defined, you cannot change it

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

ip sla monitor schedule <#> [life <sec>] [start-time {pending |


now | <hh:mm> [<month> <day>]}] [ageout <sec>]
To stop a probe use no ip sla monitor schedule <#>.

MGMT
part 3

show ip sla statistics [<id>]

Community strings are passed as clear-text. ACLs and views


should be used to protect from unauthorised SNMP access
(G) snmp-server community <string> [<acl>] [{ro | rw}] [view <name>]
Define community to access MIBs. ACL can be define to limit source
hosts. View can be defined to limit MIBs available for querying
(G) snmp-server enable traps <list>
Define list of traps (globally for all hosts)
(G) snmp-server {location | contact} <string>
Define free text describing contact person, responsible for this device and location of this device

Extends security of SNMP with authentication and encryption


(G) snmp-server view <name> <MIBs> {included | excluded}

(G) snmp-server system-shutdown


Allow device reload with SNMP write command

(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

(G) snmp-server ifindex persist


(IF) snmp-server ifindex persist
Keep interfaces indexes (or single interface index) after reload, so management systems do not have to re-learn indexes

SNMPv3

(G) snmp-server host <ip> [version {1 | 2c | 3} <community>] [<trap list>]


Define host, trap version and list of traps whcih will be sent to remote management system

SNMPv2

(G) snmp-server ip dscp <dscp>


Define DSCP used for SNMP packets
(G) snmp-server trap-source <intf>
Define source interface for SNMP packets
(G) snmp-server tftp-server-list <acl>
Define ACL with hosts allowed to receive config via TFTP when backup is initiated via SNMP
(G) snmp-server view <name> <MIB list> {included | excluded}
Define list of accessible MIBs for specific view. It can be assigned to a community
(IF) no snmp trap link-status
Disable traps for link up/down (especialy for user interfaces)
show snmp mib ifmib ifindex
show snmp {community | host}
show snmp view

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

(G) logging console <level>


It affects not only console, but also all TTY lines. If logging to console is
disabled, logging to telnet session using terminal monitor will not work

show archive log config ...

(G) logging buffered <size> <level>


Messages are logges into local memory buffer. If max size is reached, old messages are overwritten (round-robin)

path
You can use $t for current time and $h for hostname

(G) logging monitor <level>


Define logging level for terminal lines. By default all messages are logged if terminal monitor is used

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

(G) logging count


Count all types of logging (per facility, message type, severity, etc) (show logging count)

archive config
Backup configuration on request

(G) logging rate-limit {<#> | console <#>} [except <severity>]


Default limit is 10 messages per sec.

show archive config differences <config1> <config2>


Displays differences in DIFF style
show archive config incremental-diffs <config>
Displays configuration made in IOS style

(G) logging userinfo


Generate log message when user enters privilege mode by executing enable or disable command. If
privilege is automaticaly assigned to user (by AAA server or via line configuration), message is not shown

(G) service sequence-numbers


Sequence numbers are added in the front of messages
Config
backup

(LINE) logging synchronous


Refresh existing exec line if log message overwrites it (automatic Ctrl-R)
(G) logging file flash:<path> <size> <level>
Logging to flash is available only on switches

configure revert {now | timer {<minutes> | idle <minutes>}}


Cancel timed rollback and trigger the rollback immediately (now) or
change (extend) timers. Configuration Archive functionality must be
enable first. Idle defines time for which to wait before rollback
configure replace <target-url> [nolock] [list] [force] [ignorecase] [revert
trigger [error] [timer <min>] | time <min>]
Overwrite running-config with stored config. Classical copy startup to running
merges both configs and overwrites only entries which can exist as single lines.
List displays command lines applied. The time defines after how many minutes
rollback will be performed if not confirmed. It is the same as revert trigger timer
configure terminal revert timer <min>
Configure from terminal and rollback after specified time if not confirmed. Rollback
to last active config, unlike in configure replace, where file can be specified

(IF) logging event {link-status | subif-link-status [ignore-bulk]


Log physical or subinterface interface status changes. If ignore-bulk
is used, subinterfaces do not generate logs if main interface is down

Log &
Archive

show logging [count]

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

(G) access-list <id> < > log <tag>


ACL entries can be marked with cookie (tag). Works for numbered and named ACLs.
Logged messages will have that tag appended in square brackets [ <tag> ]
event manager applet <name>
event syslog patter <tag>
action <id> <action>
EEM applet can be created to match that tag from ACL

ACL &
Syslog &
EEM
corelation

(G) logging facility <facility-type>


Default facility is Local7 (Local4 for FW). Syslog server can send logs to specific file based on facility

Syslog

(G) logging discriminator <name> [[facility] [mnemonics] [msg-body] {drops <string> |


includes <string>}] [severity {drops <sev> | includes <sev>}] [rate-limit <#>]
Create a syslog message discriminator. It can be used to define filering for messages. It can be
applied to syslog server to limit specific messages sent out. Console mesages CANNOT be filtered
(G) logging origin-id {hostname | ip | ipv6 | string <string>}
Origin identifier is added to the beginning of all syslog messages
(G) logging queue-limit [<size> | trap <size>]
Default size is platform-depandent. Usualy 100 messages
(G) logging source-interface <if>
By default, interface, through which message is sent is used as source IP
(G) snmp-server enable traps syslog
Send syslog messages as SNMP traps

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

(G) banner {motd | login | exec | incoming} % message %


The % is just a sample delimiter (% is very rarely used inside banner text, so it is good choise)
motd message of the day displayd as a very first banner
login banner shown just before login prompt, but after motd
exec shown after used is logged in
incoming when reverse-telnet is execured to a device

(LINE) session-timeout <min> [output]


Define idle timeout for outbound sessions (to other device)
(LINE) exec-timeout <min> [<sec>]
Define inactivity timeout for inbound session

Banners

(LINE) absolute-timeout <min>


Define absolute session timeout (for in and out traffic is output is used)

SSH does not show motd and login banners befor login prompt. They are shown after user is logged in.
Dynamic tokens: $(hostname), $(domain), $(line)

(LINE) refuse-message <text>


Message displayed to remote device when line is busy
(LINE) vacant-message <text>
Message displayed, when line is vacant (console)

(G) busy-message <hostname> <message>


Displayed if telnet to that host is performed, and host is not reachable

VTY &
CON
lines

(G) ip telnet hidden {addresses | hostnames}


Do not display IP address or hostname when telneting to
remote system. Both options can be defined separately
(G) service telnet-zero-idle
Router with idle session will advertise window=0 to remote device
which will stop processing buffered data untill session is resumed
(G) service hide-telnet-address
IP is not shown when its resolved while telneting to remote host. It is an alias
command for ip telnet hidden addresses <= this is what is shown in running config

(LINE) transport input {<list of protocols> | all}


Define available protocols which can be used to access VTY remotely (default is all)

Telnet

(LINE) transport prefered {<protocol> | none}


Default protocol used for outbound connection when only hostname is typed in exec prompt.
Default is telnet. If you use none, misspelled commands do not cause outbound telnet

(G) ip telnet tos <hex tos>


Define TOS value for telnet performed from the router. Default is 0xC0 (192) = CS6

Break signal when using telnet: Ctrl + ]


Break signal when using AUX: Ctrl + Shift + 6, then B

Device
Access

(G) hostname <name>


(G) ip domain-name <name>
Hostname (other than Router) and domain name is required to generate RSA key
(G) crypto key zeroize rsa
Delete the RSA key-pair. If new key is generated, old one is overwritten

Keys

(LINE) no {motd-banner | exec-banner}


Disable banners on specific lines (ex. console)
(LINE) logout-warning <sec>
Display message before logging user out (ex. timing out an idle console). Disabled by default

(G) ip http {port | secure-port} <port>


Define non-default ports for HTTP or HTTPS

(G) ip ssh {timeout <sec> | authentication-retries <#>}


Default session negotiation timeout is 120 sec. and 3 retries

(G) ip http authentication local


By default enable secret is used to access web pages. Local users must be defined with privilege 15
(G) ip http access-class <acl>
Define networks from which web server is accessible

HTTP

Server

(LINE) rotary <#>


(G) ip ssh port <port> rotary <#>
Connect the port with rotary group, which is associated with group of
lines. Then you can ssh to specific VTY lines using non-standard port

SSH

(G) ip http max-connections <#>


How manu consecutive sessions can be established
(G) ip http path <path>
Set base path for web server (ex. for accessing IOS or other files from flash)
(G) ip http secure-ciphersuit {3des-ede-cbc-sha | des-cbc-sha | rc4-128-md5 | rc4-128-sha}
Define security algorithms for accessing secure web server

ssh [-v {1 | 2}] -l <user>[:<#>] [<ip>]


By default local user will be used (the one which is currently logged in on a source device)
(G) ip ssh source-interface <intf>
Source interface for initiating ssh sessions

(LINE) lockable
Session can be locked by a used. To unlock, password is
required (password is defined when lock command is executed)

(G) ip http {server | secure-server}


Enable HTTP (80) or HTTPS (443) server

(G) crypto key generate rsa [modulus <bits>]


If RSA key pair is generated then it automatically enables SSH. To use SSHv2 the key must be at least 768 bits

(LINE) transport input ssh


Limit access to VTY lines only via SSH
(G) ip ssh version [1 | 2]
Both SSH ver 1 and 2 are enabled by default. If any version is defined, only this version is supported

(LINE) access-class <acl> {in | out} [vrf-also]


Define ACL for limiting source addresses. If you have VRFs, from which you administer, add vrf-also
(LINE) length <#>
Define number of lines displayed. If you set to 0 (zero), no pausing is used

(G) ip telnet quiet


Do not display any messages when telnet session is being established to remote system

(G) service linenumber


Display VTY line number when telneting to that device

(LINE) ip netmask-format {bit-count | decimal | hexadecimal}


Define netmask format for all show commands

Client

(G) ip scp server enable


Enables SCP server
(G) ip ssh dscp <dscp>
Define DSCP for SSH traffic initiated to or from the router

(G) ip http client {username <user> | password <password>}


Define username and password for accessing remote web pages (which require authentication)
(G) ip http client source-interface <intf>
Define source interface for HTTP and HTTPS traffic originated from router
show ip http server all

(G) ip ssh break-string <string>


Define Break control characters by prefixing them with ^V (Ctrl+V) or using the \xxx (hex) notation.
Reverse telnet can be accomplished using SSH. For example control-B character is ASCII 2 (\002)

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

(IF) ip flow {ingress | egress}


NetFlow will capture flows entering or leaving the router, but NOT to the router or
from the router itself only transiting traffic. Ingress flow is applied before rate
limiting and decryption, egress flow is applied after rate limiting and encryption

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

ip flow-export version 5 [origin-as | peer-as | bgp-nexthop]

show ip flow export


show ip cache [verbose] flow

ip flow-export destination <ip> <udp-port>

Features

ip flow-cache entries <#>


ip flow-export source <if>

ip flow-top-talkers
top <#>
sort by {packets | bytes}
match ...

Version 5

ip flow-cache timeout inactive <sec>


How long inactive flow will remain in cache before expiration (default 15 sec)
ip flow-cache timeout active <sec>
How long active flow will remain in cache before expiration (default 30 min)
(G) ip flow-capture {fragment-offset | icmp | ip-id | mac-addresses | packet-length | ttl | vlan-id | nbar}
Capture values from Layer 2 or additional Layer 3 fields

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

(G) ip flow-export interface-names


Sends both: ifIndex and ifName in option data record

NetFlow

(G) ip flow-export template [options] refresh-rate <#>


Templates and options sent every # of packets

Two parameters: match and collect define what


will be cought and included in the flow cache
transport udp <port>
export-protocol {netflow-v5 | netflow-v9}

1) Configure Template
(G) flow record <name>

2) Configure Exporter
(G) flow exporter <name>

Version 8

ip flow-aggregation cache <predefined-aggregation-type>


cache entries <#>
export destination <ip> <udp port>
mask destination minimum <bit mask>
mask source minimum <bit mask>
enabled
Version 8 aggregation cache. Flows are aggregated for entries in routing
table. All bytes and packets are summarized. Number of flows is alo exported.

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

Embeded Event Manager reacts to Event Detectors and


performs policy defined by TCL Script or EEM Applet
(G) event manager applet <name> authorization bypass
Allow applet to run without AAA authorization (useful for debugging)

show event manager detector all detailed


Show TCL variables for registering events, along with all available 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

1) Setup environment variable (optional)


(G) event manager environment <variable> <value>
Variables can be set with CLI (no $ is prepended to variable
name. They can be access by actions using $<name>

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)

2) Register applet policy


(G) event manager applet <name>
Event trigger and actions are defined within applets context
3) Define event trigger
event <ED> <ED specific parameters>
Define event ot set of events which trigger policy

EEM Policy

Event
Detectors

event timer cron cron-entry <cron time pattern>


event timer watchdog time <sec>
Triggers on watchdog, count down, cron or absolute timer
event snmp-notification oid <oid> oid-val <val> op eq src-ip-address <ip> direction incoming
Triggers when incomming or outgoing trap is intercepted
event cli pattern <regexp> sync {yes | no}
Triggers synchronous or asynchronous events when CLI matching defined pattern is executed. Synchronous
events hold CLI command and must return $_exit_status. If it is 1 then command is executed, if 0, command
is dropped. Asynchronous events are executed independently, allowing CLI command to proceed

4) Define actions
action <seq> cli command
Define actions (ex. CLI commands show or configuration)

event neighbor-discovery interface <if> cdp add


Triggers when CDP or LLDP message is detected.Interface can be .* (all). Specific messages can be checked:
action 1 if $_nd_cdp_platform eq Cisco IP Phone

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

event ipsla operation-id <#> reaction-type jitterAvg


Triggers when IPSLA test result crosses defined threshold:
action 1 if $_ipsla_measured_threshold_value > $_ipsla_threshold_rising

2) Write TCL policy offline and upload it (TFTP, FTP, etc)


copy tftp flash://eem
3) Enable auto update for TCL scripts (optional)
(G) event manager update user policy group *.tcl repository <network path>
4) Setup environment variable (optional)
(G) event manager environment <variable> <value>

action <id> set $_exit_status {0 | 1}


Retunt exit status after policy is executed

TCL Policy

action <id> puts {<string> | $_cli_result}


Displayes text on terminal screen

5) Register policy
(G) event manager policy <TCL script name> type user

action <id> syslog msg <text>


Send message to syslog engine
action 1 gets response
action 2 if $response eq yes goto 5
Interaction with user (must be run from CLI)

Other
actions

event tag <id> <ED> <ED parameters>


Define up to 6 events with unique tags
trigger occurs 1
corrrelate event <id1> or event <id2>
attribute tag <id1> occurs <#>
attribute tag <id2> occurs <#>
Correlation can be and and or

Multi Event
Correlation

show event manager environment


show event manager policy registered

Verify

action <id> foreach _var $_listvar


<manipulate $_var> ...
action <id> end
action <id> regexp <regexp> $_var
action <id> if $_regexp_result eq 1"
action <id>
action <id> else
action <id> continue
action <id> end
action <seq> mail server $_email_server to $_email_to from
$_email_from subject <subject> body $_cli_result
Send email with output from CLI commands (variable $_cli_result). Email
variables can be set with event manager environment option

show event manager directory user policy


show event manager history events

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

You might also like