Aide Memoire Cisco
Aide Memoire Cisco
Aide Memoire Cisco
Aide-Mémoire
CISCO TM
As a true believer in the Open Source spirit, I have chosen to publish this
booklet under a Creative Commons BY-SA license, allowing you to freely
share and remix its content, even for commercial purposes, under the sole
conditions to mention the paternity of this work and re-share it with the
same license.
I hope you will find it helpful and that it will allow you to spend less time
searching after forgotten syntaxes.
EVRARD Benjamin.
Contents Table
- Foreword
- Configuration Register
- Switching
- CDP, SmartPorts Macros, IP Configuration
- Config Backup, Time (NTP), Logging, L3 Routing on L2 Switch
- Access Ports
- Trunk Ports, VLANs & EtherChannels
- Spanning Tree
- First Hop Redundancy Protocols
- Monitoring (RSPAN, NetFlow & SNMP)
- Routing
- Basic Config (CLI Config, SSH, SDM, Boot, Interfaces)
- Logging & Debugging
- CDP, DHCP & NAT
- IP Access Lists, Route Maps, Prefix Lists, VLAN & ARP ACLs
- IP Routing
- Static Routes
- Policy-Based Routing (PBR) & IP SLA-Based Routing
- Routing Protocols Summary Table
- OSPF, EIGRP, BGP, RIP & Multicast
- MPLS
- LDP
- L3VPN
- L2VPN
- VPLS
- Traffic Engineering
- IPv6
- Static Routes
- RIP-NG - OSPFv3 - EIGRP-IPv6
- Transition Tools: GRE, MCE, Auto 6-to-4 & ISATAP Tunnels
- Redistribution
- TroubleShooting ToolKit
- VPN & Crypto
- IPSEc Crypto Maps
- IPSec GRE Crypto Tunnels
- DMVPN
- PPPoE
- PPTP
- PKI Server & Client
- RSA PSK
- DynDNS
- Router IP Traffic Export = RSPAN for Routers
- Quality of Service
- Cisco IOS Firewall
- Router Planes Protection
- Router Hardening Guide
- Authentication, Authorization and Accounting (AAA)
- Role-Based IOS Access
- VoIP Gateway & Call Manager Express
- SCCP
- Call Manager Express
- IP Phones
- SIP
- Call Manager Express
- IP Phones
- Dial-Peers
- H.323
- Dial-Peers
- Gateway
- Gatekeeper
- POTS
- Analog
- FXS & FXO
- Fax Handling
- Modem Handling
- Digital
- Dial-Plan
- Digit manipulation
- Call privileges
- MGCP
- DSP Resources for Conferencing & Transcoding
- CUBE (Cisco Unified Border Element = IP-to-IP Gateway)
- Phone Record Accounting (Call Detail Record)
- CUVA (Cisco Unified Video Advantage)
- Voice TroubleShooting
Configuration Register
Hex Bit Clear Set Default
Meaning
Value # 0 1 Bin Hex
0 0
Boot field : controls the boot sequence.
0x0000 1 0x0 - ROMMOM OS 1
See Table
-
2 0x1 - First IOS in Flash memory Boot Field 0
2
0x000F
0x2 - Boot System as configured in startup-config
3 0
0x0010 4 Bypass bootstrap loader (fast boot) disable enable 0
0x0020 5 Controls the console line speed See Table CLS 0
0x0040 6 Ignore the contents of NVRAM disable enable 0
0
0x0080 7 Original Equipment Manufacturer (OEM) Information display no display 0
0x0100 8 Allows Break key to switch to ROM monitor at anytime allow disable 1
0x0200 9 Use Secondary Bootstrap disable allow 0
0x0400 10 Controls the host portion of the IP broadcast address Ones Zeros 0
1
0x0800 11 Controls the console line speed See Table CLS 0
0x1000 12 Controls the console line speed See Table CLS 0
0x2000 13 Boot ROMs or BOOTFLASH if network boot fails no yes 1
0x4000 14 Controls the subnet portions of the IP broadcast address Ones Zeros 0
2
0x8000 15 Diagnostic mode display and Ignore NVRAM disable enable 0
! troubleshoot
show parser macro [brief]
show parser macro {name <macro-name> |description [interface <int-id>]}
show run interface <interface-id>
Backup
ip {ftp |http client} username <username>
ip {ftp |http client} password <password>
ip ftp source-interface <interface-id> loopback0
copy <source> <protocol>://[<user>:<password>@]<destination>
archive
path <protocol>://<destination> $h is replaced by device hostname
time-pediod <minutes> $t is replaced by current time
write-memory !enable triggered creation of backup when config is saved
Time Synchronisation
clock timezone <name> ±<Hours> [±<Minutes>] Set TimeZone
clock summer-time <name> recurring <DTG-begin> <DTG-end> Set Summer TimeZone
clock set <hh>:<mm>:<ss> <dd> <mmm> <yyyy>
clock calendar-valid defines the local clock as valid (REQUIRED on NTP root server)
ntp max-associations <value> maximum number of NTP peers & clients for this device
ntp source <interface-id>
ntp logging Severity Levels
0 - Emergencies
! troubleshoot 1 - Alerts
2 - Critical
show clock [detail] 3 - Errors
show ntp {status |association [detail]} 4 - Warnings
5 - Notifications
6 - Informational
Logging 7 - Debugging
Storm-Control
interface <interface-id>
storm-control action {shutdown |trap}
storm-control {broadcast |multicast |unicast} level <%>
show interfaces <interface-id> counters storm-control
show storm-control [<interface-id>] [broadcast |multicast |unicast]
Secure Access Ports
! Port-security
interface {<interface-id>| range <interface-range>}
switchport mode access
switchport nonegotiate disable DTP messages exchange (Dynamic Trunking Protocol)
switchport port-security
switchport port-security violation {protect | restrict | shutdown}
switchport port-security maximum <value> default 1
switchport port-security mac-address <mac-address>
switchport port-security mac-address sticky
switchport port-security aging time <mins>
switchport port-security aging type <type>
switchport protected !can only communicate with unprotected port
Is +/- a light version of Private-VLANs
spanning-tree bpduguard enable prevent exchange of BPDU packets
shutdown all unused ports should be disabled
! troubleshoot
show port-security [interface <interface-id>] [address]
clear port-security dynamic [address <mac-address> |interface <int-id>]
show ip dhcp snooping [binding |database | statistics]
show ip verify source [interface <interface-id>]
show ip source binding [<ip>] [<mac-addr>] [dhcp-snooping |static]
[interface <interface-id>] [vlan <vlan-id>]
show ip arp inspection
Configure VLANs
vlan <vlan-id> (0-1001 ; 1006-4094)
name <name>
no shutdown
show vlan [brief |id <vlan-id> |name <vlan-name> |summary]
show interfaces [<interface-id>] switchport
show vlan-switch on a router etherswitch module
Secure VLANs
! Disable Dynamic Trunking Protocol
interface <interface-id>
switchport nonegotiate
switchport mode {access |trunk}
switchport access vlan <vlan-id>
Best practice : Never use VLAN 1 for client and/or management traffic !
! Private VLAN
vtp mode transparent
vlan <pri-vlan>
private-vlan primary define primary vlan; associate with
private-vlan association [add |remove] <sec-vlan-list> secondary vlans
interface <interface-id> config for promiscuous host (ignores the p-vlan rules)
switchport mode private-vlan promiscuous
switchport private-vlan mapping <pri-vlan-id> <sec-vlan-list>
! troubleshoot
show vlan private-vlan [type]
Configure Trunking Ports Dot1Q = 802.1Q
interface <interface-id>
shutdown
switchport nonegotiate disables DTP ; use only if trunk forced on both ends
switchport mode {trunk |dynamic {auto |desirable} |access}
switchport trunk encapsulation {dot1q| isl| negotiate}
Switchport trunk native vlan <vlan-id>
switchport trunk allowed vlan {all| [add |except |remove] <vlan-list>}
mls qos trust cos !trunks ports should normally trust QoS markings
auto qos voip trust
ip dhcp snooping trust
ip arp instpection trust
no shutdown
! troubleshoot
show interface [<interface-id>] [trunk |switchport]
show dtp [interface <interface-id>]
! Common problems:
—> Native/Allowed VLAN Mismatch ; Encapsulation Mismatch ; DTP negotiation mismatch
Configure VTP
configure terminal
vtp mode {transparent|server*|client}
vtp domain <domain-name> !case-sensitive
vtp password <password> !case-sensitive
vtp pruning enable automatic vlan pruning to limit the extent of broadcasts
vtp version {1|2|3} default to 1; v3 not in IOS, only in CatOS
Configure EtherChannels
interface range <interface-range> Max 8 ports/channel
no ip address
channel-protocol {pagp* |lacp}
channel-group <channel-id> mode {auto |desirable} [non-silent] PAgP
channel-group <channel-id> mode {active |passive} LACP
channel-group <channel-id> mode on No Protocol
lacp port-priority <prio> LACP
<other config commands>
lacp system-priority <prio>
interface port-channel <channel-id>
ip address <ip> <mask>
port-channel load-balance {dst |src |src-dst}-{mac |ip |port}
! troubleshoot
show interface <interface-id> etherchannel
show etherchannel [<channel-id>]
[ brief | detail |load-balance | port | port-channel | summary |protocol]
show {pagp|lacp} neighbor
show lacp sys-id
! Remarks: 802.3ad = LACP
- All port must have same duplex/speed/vlan/trunk config and same etherchannel protocol
- L2/L3 port config must be done before activating the port-channel.
Configure Spanning Tree STP Multicast address : 01-80-c2-00-00-00
root path selection criteria to break any tie are (LOWER wins):
Root Bridge ID > Cost to Root > Sending Bridge ID > Sending Port ID
Bridge ID : Priority (x4096) + VlanID & Switch MAC Address
Port ID : Port Priority & Port Number
802.1d = Legacy Spanning-Tree; 802.1w = Rapid Spanning Tree
spanning-tree mode {mst |rapid-pvst |pvst} configure mode
spanning-tree vlan <vlan-number> root {primary |secondary} set root bridge
[diameter <diameter> [hello-time <secs>]]
spanning-tree vlan <vlan-id> priority <priority> set bridge priority
Priority defaults to 32768 ; lower MAC address breaks the tie.
/!\ Usually LOWER MAC address means OLDER equipment !!
—> NEVER let the default settings determine the ROOT switch !!
spanning-tree extend system-id
! tune Spanning-Tree convergence
spanning-tree portfast default enable portfast on all switchports
spanning-tree backbonefast /!\ should be enabled on ALL switches or NONE
Enables RLQ (Root Link Query) protocol, which is required by BackboneFast
spanning-tree uplinkfast [max-update-rate <packets/sec>]
!not allowed on root bridge, should be limited to leaf (access) switches
! set timers manually default timers are based on a diameter of 7
spanning-tree [vlan <vlan-id>] hello-time <secs> default: 02 secs
spanning-tree [vlan <vlan-id>] forward-time <secs> default: 15 secs
spanning-tree [vlan <vlan-id>] max-age <secs> default: 20 secs
! tune interface settings
interface <interface-id>
spanning-tree [vlan <vlan-id>] cost <cost> set port cost
spanning-tree [vlan <vlan-id>] port-priority {<0-255>} set port prio
[no] spanning-tree portfast [trunk] [dis-] enable portfast (edge port)
spanning-tree link-type point-to-point overrides a port type (RPVST+)
! troubleshoot
show spanning-tree [vlan <vlan-id>] {root |bridge}
show spanning-tree [vlan <vlan-id>] {detail |summary}
show spanning-tree interface <interface-id> [detail]
show spanning-tree blockedports
show spanning-tree {uplinkfast |backbonefast}
debug spanning-tree {events |pvst+ |switch state}
interface <interface-id>
spanning-tree bpdufilter {enable|disable}
! troubleshoot
show spanning-tree {inconsistentports |summary}
show spanning-tree interface <interface-id> [detail]
show udld <interface-id>
udld reset
RSTP States
State Comment
Bridge ID Discarding Incoming frames dropped except BPDUs
BID Priority MAC-Addr Learning Incoming frames dropped ; MAC addresses learned
Forwarding Frames are forwarded
EBID Prio VLAN MAC-Addr
bits 4 12 48 RSTP Port Roles
Type Comment
STP State RSTP Role RSTP State
Disarding
Disarding
Learning
Designated Pord Port on a network segment with best root path cost
Alternate Port Port with alternative, less desirable path to the root
Backup Port Port providing redudant connection to a network segment
STP Cost
Alternative
Link
Transition
Disabled
Backup
Root
Link Priority
PrtNb
Designated
Transition
Disabled
Root
monitor session <id> source remote vlan <vlan-id> [rx|tx|both] rspan vlan
monitor session <id> destin remote vlan <vlan-id> rspan vlan
[encaps replicate] [reflector-port <port-id>] uplink port to monitoring switch
show monitor
show vlan remote-span
! NetFlow Export
ip flow-export source <interface-id> ideally set to loopback0
ip flow-export version {1|5|9}
ip flow-export destination <ip> [<port>]
interface <interface-id>
ip flow {ingress |egress} activate flow export for the incoming/outgoing traffic
! SNMP Server
snmp-server community <string> [ro |rw] [<acl-id>]
snmp-server contact <contact-info>
snmp-server location <location>
snmp-server ifindex persist persistent interfaces index across reboots
snmp-server source-interface <interface-id> ideally set to loopback0
! SNMPv3
snmp-server view <view-name> system {included |excluded}
snmp-server view <view-name> interfaces included
snmp-server group <group-name> v3 {[no]auth |priv} read <view-name>
snmp-server user <username> <group-name> v3 [encrypted]
[auth {sha |md5} <auth-password>]
[priv {aes {128|192|256} |[3]des} <privacy-password>]
[access <acl-id>]
! SNMP Traps
snmp-server host <trap-server> version <ver> <string>
snmp-server enable traps [<traps>]
Router Configuration
Basic Router Config
hostname <hostname>
ip domain-name <dns-suffix>
ip default-gateway <ip>
ip name-server <pri dns ip>
ip name-server <sec dns ip>
ip domain-list <search-domain>
ip routing (enabled by default)
no ip domain-lookup
show interface
Access Configuration
service password-encryption
enable {secret |password} <password>
line console 0
login [local |radius]
password <password> login without options
privilege level <level> level range 0-15
transport preferred none
exec-timeout <mm> <ss> mm=0 —> disable timeout
logging synchronous
history <lines>
length <lines>
line vty 0 15
login [local |radius]
password <password> login without options
privilege level <level> level range 0-15
transport input {ssh |telnet |rlogin}
transport preferred none
session-timeout <mm>
logging synchronous
history <lines>
Serial PPP/HDLC
interface serial <slot/port>
description <description>
clock rate <bps> only if DCE
bandwidth <kbps> for routing protocol or QoS computations
encapsulation {ppp |hdlc |frame-relay [ietf |cisco]}
ppp authentication {chap |pap} requires accounts config / PPP only
ppp quality <n> PPP only
ppp multilink PPP only
compress {predictor |stac} PPP only
no shutdown
username <remote-hostname> password <matching-password>
show interfaces <interface-id>
show controllers serial <slot/port>
debug ppp {authentication |negotiation |compression |error}
Serial Frame-Relay
interface serial <slot/port>
ip address <ip> <mask> only if NO sub-if
encapsulation frame-relay [ietf |cisco] mandaroty
frame-relay lmi-type {ansi|q933a |cisco} mandaroty
frame-relay map <protocol> <protocol-address> <dlci>
[broadcast] [ietf | cisco]
keepalive sec
Boot Process
config-register 0x2102
boot system flash [<filename>]
boot system {rcp |tftp |ftp} [<filename>] [<server-ip>]
boot system rom
show {version |flash}
Password recovery
[Start with confreg 0x2142]
O /r 0x2142
config-register 0x2142
copy startup-config running-config
[Change passwd]
do copy running-config startup-config
config-register 0x2102
Severity Levels
0 - Emergencies
Logging/Debugging 1
2
-
-
Alerts
Critical
clock timezone <name> ±<Hours> [±<Minutes>] 3 - Errors
4 - Warnings
clock summer-time <name> recurring <DTG-begin> <DTG-end> 5 - Notifications
services timestamps debug datetime msec 6 - Informational
7 - Debugging
ntp server <ip> [prefer]
logging on activates logging to all destinations
logging console <severity>
logging buffered <buffer-size> <severity>
logging <log-server-ip>
logging trap <severity>
terminal monitor redirects console messages to local session
show logging history shows logging buffer
show processes
show running-config [full]
no debug all | undebug all |u all
IOS Console
! output filters / redirectors
| begin <regex> display only from the first match
| include <regex> only include matched lines
| exclude <regex> display all but matched lines
| section <regex> display only matched sections
| redirect <url> write output to url
| append <url> append output to url
| tee <url> both redirect & display locally
Redirectors use regular expression as match string.
Telnet/SSH Client
telnet {<hostname>|<ip>}
ssh -l <username> {<hostname>|<ip>} [<command>]
resume <session-id>
disconnect <session-id>
^ = BREAK char (CTRL+SHIFT+ {6|9})
^x interrupt remote session
show sessions
clear line <vty-id>
show users
show ssh
debug {telnet |ssh}
terminal ip netmask-format decimal
Configure CDP/LLDP
[no] {cdp |lldp} run
interface <interface-id>
[no] {cdp |lldp} enable
show {cdp |lldp}
show {cdp |lldp} neighbors [<interface-id>]
show {cdp |lldp} neighbors detail
show cdp entry {<name> |*}
show cdp interface [<interface-id>]
show cdp traffic
clear cdp {counters |table}
debug cdp {adjacency |events |ip |packets}
DHCP Server Config
service dhcp enabled by default
NAT Config
interface <public-int-id>
ip nat outside
interface <private-int-id>
ip nat inside
access-list <acl-id> permit <ip> [<wildcard>]
! STATIC NAT
ip nat inside source static <inside-loc-ip> <inside-glob-ip>
! DYNAMIC NAT
ip nat pool <pool-name> <first-ip> <last-ip> netmask <mask>
ip nat source list <acl-id> pool <pool-name> [overload]
! OVERLOAD NAT / PAT
ip nat inside source list <acl-id> interface <public-int-id> overload
ip nat translation max-entries <number> limits max concurrent translations
ip nat translation [<protocol>-] timeout <seconds> aging time of NAT entries
! troubleshoot
show ip nat {translations |statistics}
clear ip nat translation [*]
debug ip nat
Common problems:
Incorrect ACL reference Specific Application is NOT NAT aware
Incorrect Inside & Outside interface assignation Incorrect IP Address/range reference
Routing Loop occurs as result of NAT
High CPU utilization / high latency <—- excessive amount of NAT entries
IP ACLs Have a guideline, draw/write out the plan, apply it
Beware not to replace existing ACLS!!
reload in 5 safety net : reload the router if not cancelled after ACL activation
reload cancell cancell the reboot if the ACL has not locked you out
! standard ACL ONLY based on source IP address; closer to destination
ip access-list standard <acl-id> (1-99;1300-1999)
{permit|deny} {host <ip> |<ip> <wild>}
deny any ==> implicit at the end !!
interface <interface-id>
ip address 10.1.1.1 255.255.255.0
ip access-group <acl-id> in
interface <interface-id>
ip address <ip> <mask>
ip access-group <acl-in> in
ip access-group <acl-out> out
! time-based ACL
time-range <time-name>
periodic <days> <time>
ip access-list <acl-id> permit time-range <time-name>
! renumber access-list
ip access-list resequence <acl-id> <begin> <step>
! troubleshoot
sh ip interfaces [<interface-id>]
sh [ip] access-list <acl-id>
Route Maps
route-map <map-name> {permit|deny} <seq>
match
[ip address {<acl>|prefix-list <id>}] Protocol can be matched by ACL
[ip {next-hop|route-source} <acl>]
[interface <type> <id>] [tag <tag>]
[source-protocol <protocol>]
[route-type <type>] OSPF or IS-IS route type
[metric <metric> [{+|-} <deviation>]]
[policy-list <list>] [...]
[length <min> <max>]
[local-preference <value>]
set
[[default] ip next-hop <ip> [<ips>]] Policy Based Routing
[[default] interface <interface> [<interfaces>]] Policy Based Routing
[ip next-hop verify-availability <ip> <seq> track <tid>] PBR with SLA
[ip tos {0-15}] [ip precedence {0-7}] [ip dscp <dscp>] QoS
[tag <tag>] Route Tagging/Coloring
[metric-type <type>] OSPF
[metric [+|-] {0-4294967295}] OSPF, RIP, IS-IS
[metric <bw> <delay> <reliability> <load> <mtu>] EIGRP
! bgp attributes
[weight {0-65536}]
[local-preference {0-4294967295}]
[as-path {prepend <asn> |tag}]
[origin {egp <remote-as> |igp |incomplete}]
[nlri [unicast] [multicast]] Network Layer Reachability Information
! troubleshoot
show route-map <map-name>
Prefix-Lists
ip prefix-list <name> description <description>
ip prefix-list <name> [seq <#>]
{permit|deny} <network>/<mask> [le <#> [ge <#>]]
VLAN ACLs
vlan access-map <map-name> [<seq>] create access-map entry
match
[ip address <acl-id>]
[ipx address <acl-id>]
[mac address <acl-id>]
action {drop |forward [capture] |redirect <interface-id>}
ARP ACLs
arp access-list <acl-name> create access-map entry
permit ip host <ip> mac host <mac> [log] creates an IP-MAC address mapping
IP Routing
ip routing enables IP unicast routing
ip multicast-routing enables IP multicast routing
no ip source-route disables source-routing (against man in the middle attacks)
ip cef activates Cisco Express Forwarding (recommended)
ip classless
ip subnet-zero
ip route profile measures number & type of routing table update every 5 secs
interface <interface-id>
ip load-sharing {per-packet| per-destination} defaults to per-destination
clear ip route {<ip> |*}
show ip cef summary
show ip cef [<network> [<mask]] [detail| internal]
show ip cef exact-route <src-ip> <dst-ip>
show ip route [<ip> |summary |static |connected |<protocol><pid/asn>]
show ip route [<network> [<mask>] [longer-prefixes]]
show ip route profile see what happens between routing table & routing protocol
show ip arp
show protocols
debug ip routing
Static Routing
ip route <network> [<mask>] {<address>|<interface>}
[distance] [permanent] [tag <tag>]
ip route 0.0.0.0 0.0.0.0 {<address>|<interface>}
ip default-network <network-number>
Policy Based Routing
route-map <map-name> {permit |deny} <seq> See Route-Map § for details
match
[ip address {<acl>|prefix-list <id>}] Protocol can be matched by ACL
[other criteria]
set
[[default] ip next-hop <ip> [<ips>]] Policy Based Routing*
[[default] interface <interface> [<interfaces>]] Policy Based Routing*
[ip next-hop verify-availability <ip> <seq> track <tid>] PBR with SLA
*default : First try PBR, then destination-based logic
*default : First try destination based-logic*, then PBR *ignores default-route
ip local policy route-map <map-name> apply policy to self
interface <interface-id> apply policy to interface
ip policy route-map <map-name>
ip route-cache policy enable fast-switched policy routing
! troubleshoot
show route-map <map-name>
show ip policy
debug ip policy
IOS IP SLA
ip sla monitor <id> Define a SLA Operation
type echo proto ipIcmp <ip> source-int <interface>
frequency <sec>
ip sla monitor schedule <id> life forever start-time now
track <tid> ip sla <id> reachability Define a tracking object
delay up <secs> down <secs>
ip route <network> <wilcard-mask> <gw> track <tid>
! troubleshoot
show ip sla [statistics |configuration] [<id>]
show track [<tid>]
Routing Protocols Characteristics
C Connected 0
S Static 1
Loading Exchanging LSAs (via LSR, LSU, LSAck) 10 Area Local Opaque 3 Stub Network
Check MTU ! 11 AS Opaque (LSA5 eq) 4 Virtual Link
Full Convergence achieved
OSPF Hello Message OSPF Header Common problems:
- Various mismatched parameters
Field Len Field Len - area id
- area flags (normal/stub/nssa)
M Network Mask 32 M Version 8 - authentication
M Hello Interval 16 Type 8 - ip subnet
- hello & dead timers
(M) Options (Stub Flag) 8 Packet Length 16 - virtual-link
- network type
Router Priority 8 U Router-ID 32 - ip MTU
- Duplicate RID
M Dead Interval 32 M Area ID 32 - Passive Interface
- Frame-Relay maps statements in non
DR IP 32 M Auth Type 16 fully-meshed networks
BDR IP 32 M Auth String 64 - Missing ‘subnets’ parameter for
redistribution
Neighbors Var
interface <interface-id>
! timers
ip hello-interval eigrp <asn> <timer-value> configure local behavior
ip hold-time eigrp <asn> <timer-value> configure remote behavior
! tuning
no ip split-horizon eigrp <asn> required on point-to-multipoint if
delay <tens-of-µs>
bandwidth <kbps> important on subinterfaces!
ip bandwidth-percent eigrp <asn> <%>
! summarization
ip summary-address eigrp <asn> <ip> <mask> [<ad>]
! authentication both commands are mandatory!
ip authentication mode eigrp <asn> md5
ip authentication key-chain eigrp <asn> <chain-name>
! troubleshoot
show ip eigrp interfaces [detail] [<interface-id>] [<asn>]
show ip eigrp neighbors [<asn> <ip> |detail]
show ip eigrp topology [all-links |summary]
show ip eigrp traffic
show ip protocols (—> k values, passive int)
show {clock |key chain}
debug ip eigrp [neighbor |notifications |summary |vrf]
debug eigrp {packets |neighbor| transmit |fsm |nsf}
EIGRP Data Structures
Interface Table Lists all interfaces participating in the routing process, excluding passive interfaces.
Lists all routes learned via EIGRP. Only the best route become candidate for injection in the IP
Topology Table routing table. If multiple have equal metric, or variance is configured, more than one can become
candidate, up to a maximum set by the “maximum-path” setting (default to 4).
! Troubleshoot
Exchange PAs & NLRIs (prefixes)
correctly
BGP Neighbor States configured ...
Idle Admin down or waiting next retry attempt
interface <interface-id>
ip summary-address rip <ip> <mask>
! authentication both commands are mandatory!
ip rip authentication mode md5
ip rip authentication key-chain <chain-name>
! troubleshoot
show ip rip database
debug ip rip BGP Data Structures
Neighbor Lists all BGP peers including
Common problems: their IP, AS, State & Statistics
Missing seed metric for redistribution Table
Missing no split horizon on multipoint interfaces RIB Contains routes learned from
BGP Table BGP Peers and locally injected
BGP Path Selection
Path Win Influence Propagation
Step Route Def Tool
Attribute Criteria Scope
interface <interface-id>
ip pim {dense |sparse |sparse-dense}-mode
If no RP exists for a multicast group, it will NOT be forwarded on interfaces in sparse
mode. It will only be forwarded on interfaces in dense or sparse-dense mode
ip pim passive converts IGMP request to PIM requests; no transit multicast
only one multicast router allowed in the stub VLAN in pim passive mode
Voice VLANs require passive or dense-mode PIM configuration
ip pim query-interval <secs> [msec] 224.0.0.13
ip pim nbma-mode required on point to multipoint interfaces, hub side
ip igmp join-group <mcast-ip> register local router to multicast group
ip igmp version {1|2|3}
ip igmp query-interval <secs> default 60
ip igmp querier-timeout <secs> default 120
ip igmp query-max-response-time <secs> default 10
ip igmp last-member-query-count <1-7> default 2
ip igmp last-member-query-interval <msecs> default 1000
!configure RV point
! - Statically
ip pim rp-address <rp-ip> [<acl-id>] [override] [bidir] static RP configuration
if override, static config gets priority over dynamic config
ip access-list standard <acl-id>
deny 239.x.x.x <wildcard-mask> multicast address which will work in dense mode
permit 239.x.x.x <wildcard-mask> multicast address defined for the designed RP
!LDP-IGP Sync
router ospf <pid>
mpls ldp autoconfig [area <area-id>] activates MPLS on ALL IGP-enabled interfaces
mpls ldp sync enables IGP-LDP synchronization; recommended for MPLS VPN/AToM
mpls ldp igp sync holddown <msecs> allow IGP adjacency establishment after
holddown timer if LDP session not established when IGP-LDP sync is used
Breaks the chicken-egg problem: LDP needs route to neighbor but IGP need LDP adjacency
interface <interface-id>
ip route-cache cef
ip load-sharing {per-packet| per-destination} defaults to per-destination
mpls ip /!\ MPLS must be activated on a per-interface basis
mpls label protocol {ldp |tdp |both} activate label distribution protocol
only required if not globally activated
mpls mtu 1512 should be min 12 units (3 labels) higher than interface MTU
/!\ Do NOT forget to adapt MTU on transit L2 devices
no mpls ldp igp autoconfig exception to global mpls ldp autoconf
no mpls ldp igp sync exception to global mpls ldp sync
MPLS VPN L2
interface <interface-id> enter into the interface to be bridged
encapsulation <type> optional, MUST match on both ends
xconnect <peer-ldp-rid> <vc-id> encaps mpls <vc-id> MUST match on both ends
Labels in stack: Control Word (optional, 4B), Virtual Circuit (4B), Peer-router (4B)
A targeted LDP session is dynamically established with peer to signal the Virtual Circuit
show mpls l2transport vc [<vc-id> [detail]]
show mpls l2transport binding <vc-id>
MPLS VPLS REQUIRES full-mesh mapping between all VPLS access points
l2 vfi <vpls-id> manual
vpn id <vpn-id>
neighbor <peer-ldp-rid> encaps mpls repeat command for each remote access point
interface <interface-id>
xconnect vfi <vpls-id> Max 1 VLAN per VFI instance
l2protocol-tunnel cdp transparently tunnels CDP
l2protocol-tunnel stp MUST be (de)activated consistently across the whole network
Disabled by default; network kept loop free with default split-horizon rule on VPLS
show vfi <vpls-id>
TSHOOT
show ip cef [detail |table]
show adjacency
clear ip cef {interface |inconsistency}
clear adjacency
show mpls interfaces [detail]
show mpls ldp bindings [<route>] displays LIB (Label Information Base)
show mpls forwarding-table [<route> [detail]] displays LFIB (MPLS Routing Table)
show mpls ip binding
clear mpls ldp neighbor *
MPLS Data Structures
Table Built from Purpose
FIB IGP Routing Process Maps destination networks to next-hop address or outbound interface
LDP or Associate local labels with FEC
LIB other Label Distribution method Also performs label distribution to adjacent peers
LFIB IGP & LDP info Database used to forward labeled packets to next-hop addresses
Adjacency Neighbor Relationship Maintains needed L2 information as well as LDP exchange capabilities
Traffic Engineering
interface <wan-interface-id>
mpls traffic-eng tunnels enables interface to carry MPLS-TE tunnels
mpls traffic-eng srlg <srlg-id> all IF sharing same risk should have same SRLG-ID
mpls traffic-eng flooding threshold {up|down} <thresholds>
when reserved bandwidth crosses configured threshold, updated MPLS TE LSAs are flooded
default up{15,30,45,60,75,80,85,90,95,97,98,99,100}
default down{100,99,98,97,96,95,90,85,80,75,60,45,30,15}
mpls traffic-eng administrative-weight <weight> user-specified TE metric
defines link’s TE metric; default to the link’s IGP metric
mpls traffic-eng attribute-flags <0x00000000-0xFFFFFFFF>
attributes are 32 bits flags that can be freely used to characterize the link
characterization MUST be coherent through the whole network
ip rsvp bandwidth <kbps> maximum reservable bandwidth on interface
interface <tunnel-id>
ip unnumbered loopback0
tunnel destination <ip-address>
tunnel mode mpls traffic-eng defines the tunnels type as MPLS TE
tunnel mpls traffic-eng autoroute announce should not be set on backup tunnels
tunnel mpls traffic-eng forwarding-adjacency [holdtime <msecs>]
requires pair of tunnels between two routers;
Advertises TE tunnel pair as a visible link towards the IGP, allowing traffic to be routed
tunnel mpls traffic-eng fast-reroute enables fast-rerouting between known paths
tunnel mpls traffic-eng path-option <pref> lower preference wins
{dynamic| explicit name <path>} [lockdown]
defines possible path; multiple entries allow for multiple path choices
lockdown disables periodic re-optimization
tunnel mpls traffic-eng affinity <properties> [mask <mask>]
defines affinities with regard to attribute-flags and whether each bit is mandatory or not
defaults to {affinity 0x00000000 mask 0x0000FFFF}
tunnel mpls traffic-eng bandwidth <kbps> defines tunnel bandwidth requirement
tunnel mpls traffic-eng priority <setup-prio> [<hold-prio>]
priority value <0-7>; lower wins; setup-prio >= holding-prio to avoid preemption loops
preemption happen if new-tunnel-setup-prio < existing-tunnel-holding-prio
tunnel mpls traffic-eng path-selection metric {igp| te} defaults to igp
Metric to be taken into account for the tunnel creation. IGP Metric vs TE admin weight
E.g.: TE metric could be used to reflect link delay => Voice based on TE, Data on IGP
mpls traffic-eng bandwidth {sub-pool| global} <bandwidth>
ip explicit-path name <path> enable ip explicit-path name <path> enable
next-address <1st hop> exclude-address <excluded hop>
next-address < … hop>
next-address <last-hop>
mpls mldp
mpls mldp [path traffic-eng]
!Multipath support
mpls mldp path multipath
disable mpls mldp forwarding recursive
ip vrf <VRF>
vpn id <AS>:<ID> VPN ID is MANDATORY when working with VMPN
mdt preference mldp [pim] defaults to PIM preferred over MLDP
mdt default mpls mldp <mdt-root-ip> Root of the Multicast Distribution Tree (P)
mdt data mpls mldp <max> max number of data mdt in this VRF
mdt data threshold <kbps> triggers data mdt if mcast traffic flow exceeds value
interface <interface-id>
ipv6 address <ip>/<length> [eui-64 |anycast]
ipv6 address {autoconfig | dhcp}
ipv6 address <general-prefix> <suffix-ip>/<length>
ipv6 unnumbered <interface-id>
ipv6 address <ip> link-local
Static Routing
ipv6 unicast-routing
ipv6 route <prefix/length> {<interface> [<next-hop>] | <next-hop>}
[<ad>] [tag <value>]
RIP-ng
ipv6 unicast-routing
ipv6 router rip <name>
maximum-path <number>
split-horizon
interface <interface-id>
ipv6 {enable |address <…>}
ipv6 rip <name> enable
ipv6 rip default-information {only |originate}
EIGRP-IPv6
ipv6 unicast-routing
ipv6 router eigrp <asn>
eigrp router-id <rid>
no shut
interface <interface-id>
ipv6 {enable |address <…>}
ipv6 eigrp <asn>
interface <interface-id>
ipv6 {enable |address <…>}
ipv6 ospf <pid> area <area>
ipv6 ospf network <type>
Transition Tools
MCT/GRE tunnels Point-to-Point tunnel
interface loopback0
ip address <ipv4> <mask>
interface tunnel0
tunnel mode {ipv6ip|gre ipv6}
tunnel source loopback0
tunnel destination <ipv4>
ipv6 address <ip>/<length>
ipv6 route 2002::/16 tunnel0 create a static route to reach other 6to4 net
Redistribution
By default, redistribution in IPv6 does NOT redistribute connected routes
Troubleshoot Toolkit
debug condition <type> <value> filters debug output to defined criteria
! Layer 1 Diagnosis
test cable-diagnostics tdr interface <interface-id> test cable length
show cable-diagnostics tdr interface <interface-id> show result of test
!works on 2960 / 3560 / 3750 / 4500 / 6500
show interfaces <interface-id> [counters [errors]]
show interfaces <interface-id> transceiver properties
show controller
! Layer 2 Diagnosis
show interfaces [status | description]
show interfaces {switchport |trunk} R/S
show mac address-table R/S
show vlan
show platform forward S
clear mac address-table dynamic R/S
show spanning-tree [vlan <vlan-id>] R/S
show spanning-tree interface <interface-id> detail R/S
show system mtu S
show interfaces <interface-id> etherchannel
show etherchannel [<channel-id>] [ brief | detail | summary |protocol]
show port-security [interface <interface-id>]
traceroute mac <src-mac> <dst-mac> uses CDP to perform a L2 traceroute; S
! Layer 2/3 Mapping Diagnosis
show ip arp R/S
show frame-relay map R
show adjacency [<interface-id> |detail |internal |summary] R/S
clear ip arp
clear adjacency
! Layer 3 Diagnosis
show ip aliases
show ip route [<ip address> |<network> [longer-prefixes]]
show ip cef [{<ip address> |<network> <mask> [longer-pref]}] [detail]
show ip cef exact-route <source-ip> <destination-ip>
show cef {drop |not-cef-switched
|interface}
show mls cef Structured Troubleshoot Approach
1 - Problem Report
show ip cef - Should be as specific as possible
show ip cache 2 - Collect Information
show ip protocols 3 - Examine Information
show ip route profile - Identify Indicators
- Find Evidence
show {standby |vrrp |glbp} [brief] —> What is happening ?
show ip {ospf |eigrp |bgp} [...] —> What should happen ?
interface <interface-id> 4 - Eliminate Potential Causes
5 - Hypothesize underlying cause
ip route-cache [cef] 6 - Verify Hypothesis
traceroute {<ip> |<hostname>} 7 - Problem Resolution
ping {<ip> |<hostname>}
[source {<interface> |<ip>}] [size <lenght>] [repeat <count>]
[df-bit] [timeout <secs>] [validate <item>]
! Layer 4 Diagnosis
ttcp test TCP: network throughput measurement tool
telnet {<ip> |<hostname>} [<port>]
show ip sockets netstat –n equivalent; R
show tcp brief netstat –n equivalent; R
show control-plane host open-ports netstat –n equivalent; S
show ip access-list [<acl-id> |dynamic]
show route-map [<map> |all |dynamic]
ip inspect audit-trail generates syslog entry for new inspect session
show ip inspect {sessions |detail |all}
show logging displays output from logged ACL entries
! Locate a host
traceroute mac <src-mac> <dst-mac> uses CDP to perform a L2 traceroute; S
traceroute <ip>
! login to the pen-ultimate hop, which is the default gateway of destination
show ip arp <ip>
! login to the switch to locate the physical interface
show mac address-table address
show run interface <interface-id>
!if the interface is a trunk to another switch, identify next switch and repeat step
show cdp neighbor <interface-id> detail
!if the interface is an access port, we have found our host.
! general diagnosis
parser config cache interface !speeds up show run
show run [full]
show tech-support | redirect <url> !!cpu intensive!!
show version
show logging
! hardware diagnosis
show processes cpu [history]
show memory
show interfaces
show controllers give detailed stats for controllers
show platform Examine TCAM and specialized switch hardware components
show inventory List hardware components
show diag gather more detailed info than show inventory
clear counters
show platform switch
! High CPU utilization
show processes cpu [sorted 5min |history] [| exclude 0.00%]
show platform tcam utilization
show tcam inacl <tcam-number> statistics
show platform ip unicast counts
show controllers cpu-interface
show memory allocating-process totals
show arp
show tcp {statistics | brief} Performance TSHOOT
show buffers - CPU
- Processes to Check
squeeze flash - ARP Input Process
- Net Background Process
show debug - IP Background Process
- TCP Timer Process
- Areas to check
- Default Route pointed to interface
(AVOID on broadcast interfaces!!)
- Interfaces Throttles, Overruns, Ignores
- Show TCP statistics / brief
- Show processes CPU
- Memory
Packet Flow with NAT - Symptoms
- Syslog Message: SYS-2-MALLOCFAIL
01. Decryption of IPSec - show commands returning blank output
02. Input ACL - Console : “unable to create exec
03. Input Policing no memory or too many processes”
04. Input Accounting - Areas to check
05. NAT Translation - Wrong IOS image (not enough memory)
(Global to Local; IN->OUT) - Memory Leak due to bad IOS image
- Worm / Virus focused on IOS
06. Policy-Based Routing - BGP (show process memory)
07. Redirection to a web-cache - Interface Utilization
08. NAT Translation - Symptoms
(Local to Global; OUT->IN) - High CPU/Memory Utilization
09. Crypto MAP application - Excessive Packets Drops
10. Output ACL - Unreachable destinations
- Areas to check
11. IOS Firewall Inspection - Verifying Switching Mode
12. TCP Interception - Verifying Routing Table
13. Encryption - Verifying CEF / ARP Cache
IPSec Crypto MAP Drawback: ONLY STATIC ROUTING!
crypto isakmp enable
! Configure ISAKMP Policy step 1 = IKE phase 1
crypto isakmp policy <seq-number> 1.1 Exchange and negotiate policy
authentication {pre-share | rsa-{encr|sig}}
encryption {aes {128|192|256} | [3]des}
hash {sha|md5} SHA is more secure
group {1|2|5|14|15|16|19|20|24} See DH table for key length/type info
lifetime <seconds>
! Configure ISAKMP Identity and/or Dead Peer Detection (both optional)
crypto isakmp identity {address |hostname |dn} defaults to address
crypto isakmp keepalive <secs> [<retries>] {periodic |on-demand}
! Create pre-shared keys for all IPSec Peers 1.2 Configure Keys (if PSK)
crypto isakmp key <shared-key> {addr <remote-peer-ip> |host <remote-host>}
! OR define which rsa-sig domain is accepted 1.3 Verify Identity
crypto isakmp profile <isakmp-profile> NOT if PSK, only with rsa-sig
match identity host [domain] <domain> NOT if PSK, only with rsa-sig
! Configure the IP Transform Sets Step 2 = IKE phase 2
crypto ipsec transform-set <IPSec-TS>
{<AH-Trans> | <ESP-Encryption-Trans> <ESP-Auth-Trans>} [comp-lzs]
mode {tunnel | transport}
crypto ipsec security-association lifetime {sec <seconds> |kilo <kbs>}
! Configure ACL matching targeted traffic for encryption Step 3
ip access-list extended <acl-id> other side HAS to be mirrored
permit <protocol> <source & mask> <destination & mask>
! Configure the Crypto Map Step 4
crypto map <map-name> <seq> ipsec-isakmp
match address <acl-id> defines traffic of interest
set peer <remote-peer-ip> default default is used to set primary peer
set peer <remote-peer-ip> when Dead Peer Detection is used
set transform-set <IPSec-TS>
set isakmp-profile <isakmp-profile> NOT if PSK, only with rsa-sig
set pfs group{1|2|5|14|15|16|19|20|24} sets Perfect Forward Secrecy
qos pre-classify required to apply QoS policy for tunneled traffic
interface <public-interface-id>
ip vrf forwarding <F-VRF>
! OR define which rsa-sig domain is accepted 1.3 Verify Identity (if RSA-SIG)
crypto isakmp profile <isakmp-profile> NOT if PSK, only with rsa-sig
[vrf <F-VRF>]
keyring <keyring>
match identity host [domain] <domain> NOT if PSK, only with rsa-sig
! DMVPN Server
interface Tunnel0
description Incoming VPN Tunnels
ip nhrp map group <nhrp-group> service-policy output <policy-id>
tunnel mode gre multipoint mandatory on the server
! DMVPN Client
interface Tunnel0
description VPN Tunnel to Server
ip nhrp map multicast <server-public-ip> define the hub ip for multicast
ip nhrp map <server-private-ip> <server-public-ip>
Map the private (I) address of the server to its public (F) address
ip nhrp nhs <nhrp-server-private-ip> define the “hub” IP
ip nhrp group <nhrp-group> allows hub to apply per-spoke QoS policy
[tunnel mode gre multipoint] only required for spoke-to-spoke tunnels (Phase 2)
! troubleshoot
show ip nhrp
show dmvpn [detail] [static]
debug dmvpn [errors |event |detail |packet |all]
Step 2
ip dhcp pool <DHCP-pool> Create a DHCP pool to use for PPPoE clients
network <nerwork> <mask>
dns-server <pri-dns> <sec-dns>
default-router <router-ip>
Step 3
interface Virtual-Template <vt-id> Create template for inbound PPPoE connections
ip address <ip> <mask> Define the server’s IP address
peer default ip address dhcp-pool <DHCP-pool> and the Pool for client address
ppp authentication chap callin Activate Authentication for PPPoE Sessions
Client Side
Step 1
interface dialer <id> Create a Dialer Interface
dialer pool <dial-pool-id>
encapsulation ppp
ip address negotiated PPP IPCP address negotiation (DHCP equivalent)
ip mtu 1492 PPP adds 8 bytes of overhead (1500 - 8 = 1492)
ppp chap hostname <login>
ppp chap password <password>
Step 2
interface f0/0 Assign the PPPoE Dial-group to the ISP-facing interface
no ip address
pppoe enable
pppoe-client dial-pool-number <dial-pool-id>
no shutdown
Step 3
interface f0/1 Adjust TCP MSS on the client-facing interface
ip tcp adjust-mss 1452 1500 - PPP (8) - IP (40) = 1452
! troubleshoot
show pppoe session [all]
debug pppoe [data |errors |events |packets]
PPTP
Server Side Step 1
vpdn enable Create VPDN Group
vpdn-group <group-id> to handle incoming PPTP requests
accept-dialin
protocol pptp
virtual-template <vt-id> Bind it to a virtual-template
vpn vrf <I-VRF>
Step 2
ip dhcp pool <DHCP-pool> Create a DHCP pool to use for PPPoE clients
network <nerwork> <mask>
dns-server <pri-dns> <sec-dns>
default-router <router-ip>
DynDNS Client
ip ddns update method <dnsmethod>
ddns [both] both: PTR RR also updated
interval maximum <days> <hours> <minutes> <seconds>
http use CTRL+V before ‘?’
add http://<user>:<pass>@<dyn.dns.server>/nic/update?
system=dyndns&hostname=<h>&myip=<a>
remove <url>
! <s> —> DynDNS Server ; <h> —> HostName ; <a> —> IP Address
interface <interface-id>
ip ddns update hostname <dyndns-hostname>
ip ddns update <dnsmethod> [host <dyndns-server>]
! troubleshoot
show ip traffic-export
Quality of Service Impacts: bandwidth, delay, jitter & packet loss
Identify traffic requirements; classify (colorize); define policy per class
! Recommendations
Out of 100 % Link Capacity
- Max 33 % For Real-Time, Priority Traffic (Voice & Video)
- Max 75 % for Guaranteed Traffic, including Priority (-10% Ethernet, IOS hard-coded)
- Min 25 % for Class-Default, Best-Effort (Non-reserved class)
- Max 05 % for Scavenger Class, Policed (optional, from guaranteed traffic)
Mark the traffic AS CLOSE to the source as possible, preferably on switch's —> HW marking
! Don’t Forget : MQC = Modular Qos CLI
Incoming Actions : ONLY Classify, Mark & Police
Outgoing Actions : ALL: Classify, Mark, Police, Shape, Queue, Compress, LFI, …
! Classify Traffic
class-map [match-any] <class-id> default is match-all
description <description>
match access-group name <acl-id>
match input-interface <interface-id>
match class-map <class-id> Nested class
match vlan <vlan-id>
match protocol <nbar-protocol-pattern>
match [ip] precedence <code>
match [ip] dscp <code>
match cos <cos>
match any useful in class-map match-all mode and with match negations
match not <criteria> <value> all match criteria can be negated
sets last
! Shaping & Queuing example —> Hierarchical MQC Wrr-queue bandwidth <q1> <q2> <q3> <q4>
policy-map <child-policy-id>
class CM_QOS_VOICE
Wrr-queue cos-map <queue> <cos-list>
priority 256
compression header ip rtp
mls qos trust device cisco-phone
mls qos map cos-dscp <dscp list>
class CM_QOS_VIDEO
bandwidth 512
compression header ip rtp
mls qos trust ip-precedence
class CM_QOS_MISSIONCRITICAL
bandwidth 400
random-detect dscp-based
class CM_QOS_TRANSACTIONNAL
maps cos values to queues
mls qos trust device
bandwidth 400
queue as Priority Queue
random-detect dscp-based
Priority-queue out
class class-default
fair-queue
random-detect dscp-based
policy-map <policy-id>
class class-default
shape average <bps>
mls qos
ToS Precedence
Montetary Cost
802.1p Priority
IP ToS value
Throughput
Code-Point Name
Per Hop Behavior
Drop Precedence
802.1 CoS
Reliability
RFC 2474
ToS Field
RFC1349
RFC3260
RFC 791
Class Selector
Delay
DSCP
/
ToS String
Flash 1 AF41 100 010 34 0x22 10001000 136 0x88 0100 4 0x4
4 100
Override AF 4 2 AF42 100 100 36 0x24 10010000 144 0x90 1000 8 0x8
Internetwork CS 6 - CS6 110 000 48 0x30 11000000 192 0xC0 0000 0 0x0
6 110
Control - 110 111 55 0x37 11011100 220 0xDC 1110 14 0xE
Network CS 7 - CS7 111 000 56 0x38 11100000 224 0xE0 0000 0 0x0
7 111
Control - 111 111 63 0x3F 11111100 252 0xFC 1110 14 0xE
!RSVP
interface <interface-id>
ip rsvp bandwidth <max-res-bw> <max-flux-bw> define max reservable bandwidth
ip rsvp signalling dscp <dscp> dscp code for RSVP signalization
Cisco IOS Firewall
Zone-Based Firewall Zone-Based instead of Interface-Based, uses MQC
MQC = Modular QoS CLI
Policies applied between zones
Default deny-all policy, except for the self zone (default allow-all)
Interfaces attached to only one zone
Traffic allowed between all interfaces within the same zone
Traffic cannot flow between zone and non zone interfaces
Cannot be combined with legacy firewall inspection
Inspect cannot be used from and to zone ‘self’, only pass or drop
! Control-Plane Protection
! Policing
class–map match-{all|any} <class-id>
match <criteria> <value> See QoS match possibilities
! Port-Filtering
class–map type port-filter match-{all|any} <class-id>
match closed-ports
match port {tcp |udp} {<port> |<port-range-start> <port-range-end>}
memory reserve console 4096 !Reserves memory for console access, in kbps
memory reserve critical 8192 !Reserves memory for critical notifications, in kbps
scheduler allocate 20000 1000
scheduler interval 500 !Max interval allowed without running system processes, in ms
logging source-interface Lo0
logging rate-limit all 10 except critical !Avoids logging buffer overflow
logging buffered 16384 6
logging trap 6
logging host <ip> !defines the address of the remote logging server
login block-for 120 attempts 3 within 40
login quiet-mode access-class <acl-id>
login delay 10 ! enforced time between login attempts
login on-failure log !logs failed login attempts
login on-success log !logs successful login attempts
security authentication failure rate 5 log
security password min-length 8 !sets minimum password length
username <username> privilege <level> secret <secret>
enable secret <secret>
hostname <hostname>
ip domain-name <domain>
crypto key generate rsa gen modulus 2048 !generates strong RSA crypto key
ip cef
interface Loopback0
description Management Interface
ip ssh source-interface Lo0 !Outgoing SSH connections will be sourced from L0
ip ftp source-interface L0 !Outgoing FTP connections will be sourced from L0
ip tftp source-interface L0 !Outgoing TFTP connections will be sourced from L0
ip telnet source-interface L0 !Outgoing Telnet connections will be sourced from L0
ip radius source-interface L0 !Outgoing Radius connections will be sourced from L0
snmp-server source-interface traps Lo0 !SNMP connections will be sourced from L0
snmp-server source-interface informs Lo0 !SNMP connections will be sourced from L0
snmp-server ifindex persist !SNMP interface indexes will persist between reboots
aaa new-model
aaa authentication login default group radius local
aaa authorization exec default group radius local
aaa authorization console
ip http authentication aaa login-authentication default
ip http authentication aaa exec-authentication default
line vty 0 15
transport input ssh !Allow only SSH for remote management (disables Telnet)
transport output ssh telnet !Limit outgoing connections to SSH & Telnet protocols
transport preferred none !Avoids getting angry when making typo’s in the CLI
logging synchronous !Avoids current typed commands to be cut on console by logging
exec-timeout 9 0 !Closes session after 9 minutes of inactivity
access-class <acl-id> in !Limits hosts that are allowed to connect to this line
line con 0
transport output ssh telnet
transport preferred none
logging synchronous
exec-timeout 9 0
line aux 0
transport input none
transport output none
no exec
exec-timeout 0 1
no password
privilege level 0
archive
log config
logging enable !enables logging of configuration changes
logging size 200 !sets the number of entries to be kept in the log file
Hidekeys !suppresses the display of password information in the log file
notify syslog !enables the notification of configuration changes to a remote syslog
path <path> !defines the path of the archive folder
maximum 14 !sets maximum number of previous configuration files to be kept
write-memory !triggers the archival process when saving the configuration
time-period 10080 !triggers the archival process on a regular interval, in secs
show secure bootset show the content of the IOS Resilience archive
rommon> dir slot0:
line vty 0 15
login auth <aaa-list>
enable view
conf t
parser view <view-name>
secret <password>
commands <mode> {include |exclude} [all] <keyword>
tftp-server <file> [alias <alias>] each phone firmware file must be shared by TFTP
Individual config files for IP phones are automatically shared by the telephony-services
!TSHOOT
show telephony-services
[ ephone[-dn] | dial-peer |voice-port |tftp-bind ]
IP Phone Configuration Skinny - SCCP
!SCCP IP Phone Configuration
ephone-dn <e-dn-id> [dual |octo] dual required for multiple calls or conferencing
number <tf-number> [secondary <tf-number>] [no-reg [both|primary]]
description <local display name> displayed on the user’s phone
name <directory entry name> “caller id”, displayed on the called phone
label <line label> displayed next to the line button
corlist in <corlist-in> apply incoming class of restriction
corlist out <corlist-out> apply outgoing class of restriction
pickup-group <pg-id> define a pickup group
transfer-mode {blind |consult} define call transfer mode
ephone <e-ph-id>
type <device-type> [addon 1 <type> [2 <type>]] define the device type
mac-address <aabb.ccdd.eeff>
button <line>:<e-dn-id> [<line>:<e-dn-id>] link the phone to a dial-number
: normal ring - feature ring - beep only - silent - monitor line - watch phone - overlay
codec {g711u |g722r64 |g729r8 [dsp-assist] |ilbc} sets preferred codec
max-calls {1-8}
device-sec {none |auth |encr}
speed-dial <#> <dial-string> define a speed-dial entry
restart soft reboot; suitable for button, line, speed-dial changes; DHCP NOT involved
reset hard reboot; REQUIRED for firmware, locale, url, TFTP changes, DHCP involved
!TSHOOT
! - L1 / PoE —> Switch
test cable-diag tdr interface <interface-id>
show cable-diag tdr interface <interface-id>
show power inline [<interface-id>] PoE status/Switch Power Budget
! - L2 / CDP / VLAN —> Switch
show interface <interface-id> switchport
show {cdp | lldp} neighbors [[<interface-id>] | [detail]]
show vlan
show interface trunk IP Phone Boot Sequence
! - L3 / DHCP —> DHCP Server 1.PoE
show ip dhcp [binding |pool] 2.Boot firmware <— flash
3.CDP/LLDP -> Phone VLAN
debug ip dhcp server events 4.DHCP —> Option 150
show run | s dhcp pool|dhcp excluded 5.TFTP —> Config Load*
! - L7 / TFTP —> CME Router PKI CRT: CTLSEP<MAC>.tlv
show run | i tftp-server SCCP: SEP<MAC>.cnf.xml(.sgn)
show telephony-services tftp-bindings SIP: SIP<MAC>.cnf
Default: XMLDefault.cnf.xml
more system:/its/vrf1/XMLDefault<model>.cnf.xml 6.Registration to CM
debug tftp events
! - L7 / CME —> CME Router
show ephone [ [un]registered | attempt | offhook | dn <dn-id> ]
show telephony-services [ ephone[-dn] | dial-peer |voice-port ]
debug ephone register
Cisco IP Phone Reset:
Soft Reset: Press Settings,
* * #, More, Erase (7945)
* * # * * (6921)
Hard Reset (Forces firmware download):
1) Plug power cord while pressing # AND KEEP it pressed while booting
2) Wait for the line buttons begin to blink
3) Press in sequence: 1 2 3 4 5 6 7 8 9 * 0 #
Secure Call Manager Express Configuration SCCP TLS SRTP
Step 1 - Create a Certificate Authority
crypto key generate rsa general-keys modulus 2048 label CA
crypto pki server <CA>
database level complete
database url flash:/PKI/
grant auto should be disabled after initial setup
lifetime ca-certificate 1095
lifetime certificate 1095
exit
telephony-service
device-security mode {none | authenticated | encrypted }
reset all
!Option 2—Per Phone
ephone <eph-id>
device-security mode {none | authenticated | encrypted }
cert-oper upgrade auth-mode null-string Requests certificate to CAPF
reset
Call Manager Express Configuration SIP
voice service voip
allow sip to sip required to allow calls between SIP endpoints
sip required for SIP IP Phones registration
bind {all |media |control} source-int <interface-id> [ipv{4-6} <ip>]
registrar server
session transport {tcp |udp} defines system session transport; defaults to udp
url sips enables SIP-Secure globally: secure signalling
securertp enables Secure-RTP support globally: secure voice payload
securertp fallback enables RTP fallback if SRTP is not supported by endpoind
signal forward {unconditional |none} prints calling name instead of calling number
clid stip pi-restrict blocks caller-id when privacy exists
clid substitutes name substitutes CLID to display number when name is unavailable
sip-ua
registrar {dhcp | [index] registrar-address[:port]}
authentication username <username> password [0|7] <password>
sip-server {{dns |ip}:<address>[:<port>]} defines SIP-SRV to be referenced in DP
transport {tcp| udp} defines allowed incoming transport; allows all by default
!TSHOOT
! SIP Voice Register (CME)
show voice register [ all | pool | dn | dial-peers | global | tftp-bind ]
debug voice register events debugs SIP phone registration on CME
debug ip dhcp server events
debug tftp events
! SIP User Agent
show sip-ua service status of SIP call service on gateway
show sip-ua status status of SIP user agent: allwed tpt, if binding, sdp options…
show sip-ua register status status of E164# on registrar
show sip-ua timers
show sip-ua connections
show sip-ua calls displays UAC & UAS active call & parameters
show sip-ua statistics
debug ccsip general SIP debugging
debug voip ccapi inout interactions with Call Control API
debug voip ccapi proto headers displays messages between gateways
debug voip dialpeer all monitors Dial-Peer matching process
SIP IP Phone & Dial-Peers Configuration SIP
!SIP IP Phone Configuration
voice register dn <s-dn-id>
number <tf-number>
shared-line [max-calls <2-16>]
label <line display name> displayed next to the line button
name <directory entry name> “caller id”, displayed on the called phone
pickup-group <pg-id> defines a pickup group
voice register pool <s-ph-id>
type <device-type>
id mac <1234.5678.abcd>
number <line> dn <s-dn-id>
dtmf-relay {sip-notify |rtp-nte |cisco-rtp}
voice class codec <codec-tag-id> defaults to G729r8
speed-dial <#> <dial-string> define a speed-dial entry
username <user> password <password>
restart soft reboot; suitable for button, line, speed-dial changes; DHCP NOT involved
reset hard reboot; REQUIRED for firmware, locale, url, TFTP changes, DHCP involved
interface s x/x/x:15
isdn supp-service name calling sends out calling name on ISDN calls
interface loopback0
ip address <local-gw-ip> <mask>
h323-gateway voip interface activate the h323 gateway conf ; mandatory for GK use
h323-gateway voip h323-id <local-gw-id> case-sensitive, must be unique
h323-gateway voip bind srcaddr <local-gw-ip> Optional, defaults to int addr
h323-gateway voip tech-prefix <tech-prefix> REQ if GW registers wildcard prefix
h323-gateway voip id <gk-zone> ip <gk-ip> <port> prio <#> gk-z case-sensitive
voice class codec <codec-tag-id> list all allowed codecs within the class
codec preference <#> <codec> [bytes <bytes>] one entry for each accepted codec
µ-law in Japan & US, A-law in other countries. A-law preferred for interconnections
!TSHOOT
show dial-peer voice summary
show gateway list currently registered numbers & inscription state of local GW on GK
show h323 gateway prefixes show prefixes the local GW has registered to the GK
show h323 gateway show statistics over H225 RAS (Registration, Admission & Status)
show call active {voice |video |fax |media} [compact |brief] detailed
show voice call {status |summary} concise
show voip rtp connections show active RTP sessions information: callID, IPs & ports
!gatekeeper clustering
gatekeeper
zone local <local-element> <dns-suffix> <local-gk-ip>
zone cluster local <cluster-id> <local-element>
element <remote-element> <remote-gk-ip> <port>
element <remote-element> <remote-gk-ip> <port>
!TSHOOT
show gatekeeper status
show gatekeeper endpoints list all registered GW on GK
show gatekeeper calls list active calls handled by GK
show gatekeeper zone status show status of all zones registered on GK
show gatekeeper zone prefix all show all registered prefixes on GK
show gatekeeper gw-type-prefix show tech-prefixes of GW registered on GK
show gatekeeper cluster show configured gatekeeper cluster
show gatekeeper zone cluster show gatekeeper cluster status
!dial-peer settings
dial-peer voice <id> voip
no vad required iff fax pass-through
fax proto {system |t38 |cisco |pass} <…> see global settings protocol options
dtmf-relay h245-signal
!Possible troubleshooting settings
fax rate {<rate> |voice |disable} tune speed to specified rate
fax relay ecm disable facilitate fax pass-through by disabling Error Correction Mode
fax relay sg3-to-g3 negotiate down SG3 signaling to group3 (sg3 relay NOT supported)
fax nsf 000000 overwrites the non-standard facility code
voice-port <fax-port-id> must be an FXS port
no echo-cancel enable required iff fax pass-through
card type e1 0 1
controller E1 0/1/0
framing [NO-]CRC4
pri-group timeslots 1-31
network-clock-participate wic 1
network-clock-select 1 E1 0/1/0
interface Serial0/1/0:15
description E1 Voice Trunk
no ip address
no logging event link-status
isdn switch-type primary-net5
isdn timer T310 120000
isdn overlap-receiving T302 2000
isdn negotiate-bchan
isdn integrate calltype all
trunk-group pri
no keepalive
no cdp enable
!TSHOOT
show controller {e1 |t1 |bri} <slot/port>
show voice port [summary]
show dial-peer voice summary
show call active {voice |video |fax |media} [compact |brief] detailed
show voice call {status |summary} concise
debug isdn {q921| q931}
!Digit Manipulation
Opr Order: 1.num-exp, 2.digit-strip, 3.translation-profile, 4.prefix, 5.forward-digits
!Calling Privileges
!COR Lists Call is accepted if outgoing COR List is a subset of incoming COR List
dial-peer cor custom Step 1 - Define all possible CORs labels
name <name-…> Enter one “name” entry per COR
dial-peer cor list <corlist-id> Step 2 — Define incoming and outgoing COR Lists
member <name-…> one entry for each COR in this list; must be defined in step 1
member <name-…>
!TSHOOT
show num-exp view configured number expansion table
show dialplan number <tf-number> show which dial-peer will be used to reach #
show voice translation-rule [<vtr-id>]
show voice translation-profile [<vtp-id>]
test voice translation-rule <vtr-id> <pattern> [type <type>] [plan <type>]
show dial-peer cor show COR names and lists
show dial-peer voice [<id>] | i Voice|COR|tag|desc show in/out corlist applied
RegEx Rule Char match
^ Match Begin of string
$ Match End of string
/ RegEx delimiter
\ Escape special meaning of next character
- Indicates a range
[list] Match any item in the list
[^list] Match any item NOT in the list
. Match any single character (wildcard)
? Match previous regex zero or one time
* Match previous regex zero or more times
+ Match previous regex once or more times
( ) Group regular expressions
interface <id>
ip rsvp bandwidth <max-res-bw> <max-flux-bw> define max reservable bandwidth
ip rsvp signalling dscp <dscp> dscp code for RSVP signalization
!TSHOOT
show ip rsvp [interface]
show call rsvp-sync {conf | stats}
show dial-peer voice | i -qos
Dial-peer matching
Outbound can be changed with “dial-peer hunt” command
1. destination-pattern most precise wins
2. preference lowest wins
3. random selection amongst remaining choices
Inbound
1. incoming called-number —> DNIS (Called Number)
2. answer-address —> ANI (Caller ID) Required for digit per digit signalling
3. destination-pattern —> ANI (Caller ID)
4. port —> Incoming Voice Port (POTS)
5. fallback to default dial-peer “0” /!\ Try to NEVER reach that last one
—> No QoS (DSCP=0), no RSVP, Any codec, No DTMF Relay, VAD Enabled, Limited Fax Support
DSP Farm & Conferencing
voice-card <dsp-id>
dspfarm
dsp services dspfarm pool the DSP capacity in a DSPFarm
codec complexity {flex |high |medium |secure} default: flex
sccp local <interface-id> interface to use for dspfarm registration to the CME
sccp ccm <cme-ip> id <sccp-id> [port <port>] version <#> link to the CME
sccp
voice class custom-cptone <cptone-name> optional notification tone definition
dualtone conference
frequency <frequency-1> [<frequency-2> ...] IN(800 1200); OUT(400 600)
cadence {<pattern> |continuous} IN(200 100 200 300 200 100 200); OUT(300 200 300)
dsp farm profile <farm-id> transcode create a DSPFarm transcoding profile
associate application SCCP links the DSPFarm to the SCCP CME
codec <codec> one entry by allowed transcoded codec
maximum sessions <#> maximum simultaneous transcoding session
no shut activates the DSPFarm profile
dsp farm profile <farm-id> conference create a DSPFarm conferencing profile
associate application SCCP links the DSPFarm to the SCCP CME
codec <codec> one entry by allowed transcoded codec
maximum sessions <#> maximum simultaneous conferences
maximum conference-participants <#> maximum participants per conference
conference-join custom-cptone <cptone-name-join> optional notification tone
conference-leave custom-cptone <cptone-name-leave> optional notification tone
no shut activates the DSPFarm profile
sccp ccm group <gid> configure the DSP capacity for registration to a CME
associate ccm <sccp-id> priority <#>
associate profile <farm-id> register <farm-register-id>
keepalive retries <#>
telephony-services
conference hardware enable multi-party conferencing
max-conferences {0-16} gain [-6 |0 |3 |6] maximum supported conferences on CME
sdspfarm units <#> defines how many dspfarms are allowed to register
sdspfarm tag <#> <farm-register-id> defines allowed DSPFarm IDs on CME
sdspfarm transcode sessions <#> maximum transcoding sessions on CME
sdspfarm conference mute-on <string> mute-off <string>
ephone-dn <e-dn-id> dual-line create virtual conferencing rooms
number <tf-number>
conference {ad-hoc |meetme}
preference <#>
no huntstop do NOT configure on the last meeting number
!TSHOOT
show dial-peer voice [summary]
show call active {voice |video |fax |media} [compact |brief] detailed
show voice call {status |summary} concise
show voip rtp connections show active RTP sessions information: callID, IPs & ports
show voice dsp [detail]
show call history <type> [brief |compact]
debug voip ipipgw IP-to-IP Gateway
debug voip dialpeer monitors Dial-Peer matching process
debug cch323 all
debug ras H323 Registration, Admission and Status
debug {h225 [events |q931] |h245 [events]} debug call setup/features process
debug {h225 |h245} {asn1 |events} debug gatekeeper registration process
debug ccsip message
debug voip ccapi inout
ephone <eph-id>
video enables video capability on the device
MGCP configuration
ccm-manager mgcp enables MGCP communications with UCM
—————————————————————————
???
call fallback threshold <type> <value>
call fallback monitor
call fallback active
dial-peer voice <id> voip
call fallback
Port L4 Protocol Info Flood
20 TCP FTP Data
File Transfer
21 TCP FTP Control
22 TCP SSH Secure Shell
23 TCP Telnet
25 TCP SMTP Simple Mail Transfer
53 Both DNS Domain Name System
67 UDP DHCP Server
Dynamic Host Configuration
68 UDP DHCP Client
69 UDP TFTP Trivial FTP
80 TCP HTTP Hyper Text Transfer
110 TCP POP3 Post Office
113 TCP Ident Identification
123 UDP NTP Network Time Y
135 Both RPC EM EndPoint Mapper
137 UDP NetBios NS Name Service Y
138 UDP NetBios DGM Datagram Service Y
139 TCP NetBios Ses Session Service
143 TCP IMAP Internet Message Access
161 UDP SNMP
Simple Network Management
162 UDP SNMP Traps
179 TCP BGP Border Gateway
194 TCP IRC Internet Chat Relay
220 TCP IMAPv3 Internet Message Access
389 Both LDAP Lightweight Directory Access Y
443 TCP HTTPS HTTP Secure
445 TCP SMB (Samba) Windows Shares Y
514 UDP Syslog Remote System Event Logging
520 UDP RIP
631 Both CUPS Common Unix Printing Services
636 Both LDAPS LDAP Secure
646 Both MPLS LDP Label Distribution
873 TCP Rsync Remote Sync
989 TCP FTPS Data
FTP Secure
990 TCP FTPS Control
993 TCP IMAPS IMAP Secure
995 TCP POP3S POP3 Secure
Cisco ASA Firewall
hostname <hostname>
domain-name <dns>
passwd <password>
username <user> password <password> privilege {0-15}
CIR = Tc x Bc
Binary Tables
IPv4 Addressing Rules
IPv4 IP Addresses
Start End Max No. of Netw orks Max No. of Hosts
Class A 1.0.0.0 126.255.255.255 2^(8-1)-2 or 2^7-2 126 2^24-2 16 777 214
Class B 128.0.0.0 191.255.255.255 2^(16-2) or 2^14 16 384 2^16-2 65 534
Class C 192.0.0.0 223.255.255.255 2^(24-3) or 2^21 2 097 152 2^8-2 254
Class D 224.0.0.0 239.255.255.255
Class E 224.0.0.0 239.255.255.255
IPv4 Reserved Private Space Default
From To Subnet Mask MAC Addresses
Class A 10.0.0.0 10.255.255.255 255.0.0.0 Unicast OUI V ID
Class B 172.16.0.0 172.31.255.255 255.255.0.0 C0 00 00 00 00 00
Broadcast
Class C 192.168.0.0 192.168.255.255 255.255.255.0 FF FF FF FF FF FF
APIPA B 169.254.0.0 169.254.255.255 255.255.0.0 Multicast 01 00 5E xx yy zz
n 2^n 2^n - 1 masks
0 1 0 0
Subnetting 1 2 1 128
2 4 3 192
8 16 24 32 3 8 7 224
4 16 15 240
Use 10.0.0.0/9 to make 4 subnet’s 5 32 31 248
6 64 63 252
Method: 7 128 127 254
8 256 255 255
1. 4 net’s = 4 states => 2 bits 9 512 511
10 1024 1023
codable
2. Subnet’s subnet masks: Netblock
9 + 2 = 11 8 16 24 32
216-11 = 25 = 32
100 224-20 = 24 = 16
4. Add step size and subnet 6
mask:
10.0.0.0/11 1. Netblock’s start address:
10.32.0.0/11 6 x 16 = 96 100.200.96.0
10.64.0.0/11 2. Netblock’s last address:
10.96.0.0/11 96 + 16 = 112 -1
100.200.111.255
JORIS Christophe
Subnet mask conversion 2. « Field» Decimal Method:
8 16 24 32
8 16 24 32 from 10.03.0.0/16
Use 100.200.100.200/20 to 10.76.0.0/16
New notation: 3-3/16 = from 10.3.0.0/16 to 10.3.0.0/16
256 – 224-20 = 240 10.3.0.0 3 not divisible by 2 3-3/16
JORIS Christophe
Variable Length Subnet Masking (VLSM) 1 Back to Back
A
Distribute 177.77.16.0/20 into 5 networks with following
clients: {250,110,300,75,90} 2 B
1. List clients by prio
3 C
2. Compute number of bits needed
D
3. Compute mask
4
E
4. Compute network starting from 1st available address and
using mask for step size 5
# Clients # bits Mask = 32 - # bits Network Netblock
5 300 9 /23 177.77.16.0/23 177.77.16.0 => 177.77.17.255
1 250 8 /24 177.77.18.0/24 177.77.18.0 => 177.77.18.255
JORIS Christophe
10 1024 1023
RJ45 Ethernet Cable Pinout (8P8C Connector)
T568A T568A Crossover
Pin Pair Signal Color RJ Pin Pair Signal Color
1 3 Tx+ A+ tip White-Green 1 2 Rx+ B+ tip White-Orange
2 3 Tx- A- ring Green 2 2 Rx- B- ring Orange
3 2 Rx+ B+ tip White-Orange 3 3 Tx+ A+ tip White-Green
4 1 C+ ring Blue 4 4 D+ ring White-Brown
5 1 C- tip White-Blue 5 4 D- tip Brown
6 2 Rx- B- ring Orange 6 3 Tx- A- ring Green
7 4 D+ tip White-Brown 7 1 C+ tip Blue
8 4 D- ring Brown 8 1 C- ring White-Blue
T568B T568B Crossover
Pin Pair Signal Color RJ Pin Pair Signal Color
1 3 Tx+ A+ tip White-Orange 1 2 Rx+ B+ tip White-Green
2 3 Tx- A- ring Orange 2 2 Rx- B- ring Green
3 2 Rx+ B+ tip White-Green 3 3 Tx+ A+ tip White-Orange
4 1 C+ tip Blue 4 1 D+ tip White-Brown
5 1 C- ring White-Blue 5 1 D- ring Brown
6 2 Rx- B- ring Green 6 3 Tx- A- ring Orange
7 4 D+ ring White-Brown 7 4 C+ ring Blue
8 4 D- tip Brown 8 4 C- tip White-Blue
Share Alike — If you alter, transform, or build upon this work, you may
distribute the resulting work only under the same or similar
license to this one.
This is a human-readable summary of the legal code (the full license) available at
http://creativecommons.org/licenses/by-sa/3.0/legalcode
24 February 2014
EVRARD
Benjamin