Cisco Show Commands
Cisco Show Commands
To Show Trunks
SwitchA#show interfaces trunk
To show Etherchannel
SwitchA#show etherchannel <1> port-channel (specific)
SwitchA#show etherchannel summary (all etherchannels)
Port Channel:
SwitchA#show etherchannel load-balance (to show load balancing mechanism)
src-mac default
SwitchA(config)#port-channel load-balance dst-mac (to change loadbalacing
mechanism)
Spanning Tree
SwitchA#show spanning-tree
SwitchB(config)#interface fa0/14
SwitchB(config-if)#spanning-tree cost 500 (to change path cost per interface)
SwitchA(config)#interface fa0/14
SwitchA(config-if)#spanning-tree port-priority 16 (to change port priority)
SwitchA(config)interface fa0/1
SwitchA(config-if)#spanning-tree portfast (enable portfast)
ROUTING
Show ip route
Show ip protocols
EIGRP
To configure bandwidth
R1(config)#interface serial 0/0
R1(config-if)#bandwidth 512 -> in Kbps
R1(config-if)#exit
PASSIVE INTERFACE
EIGRP Authentication
1) Configure Key Chain -> container of key strin or password
2) Activate eigrp authentication on an interface
3) Configure keychain on the activated interface
R1(config-keychain)#key ?
<0-2147483647> Key identifier
OSPF
Configure Router ID
router3(config)#interface fa0/0
router3(config-if)#ip ospf priority 255
router3(config-if)#exit
router5(config)#interface fa0/0
router5(config-if)#ip ospf priority 0
router5(config-if)#exit
Summary of router id
R1#sh ip ospf interface brief -> show activated ospf interface
ACCESS CONTROL LIST
Standard
conft
R1(config)#access-list 50 permit 19.168.10.0 0.0.0.255
R1(config)#access-list 50 permit 172.16.17.0 0.0.0.255
R1(config)#access-list 50 deny host 172.16.18.1
R1(config)#access-list 50 permit 172.16.18.0 0.0.0.255
(IMPLICIT deny any)
R3(config)#line vty 0 4
R3(config-line)#access-class 60 in
R3(config-line)#exit
Show command:
R1#show access-list
EXTENDED ACL
To apply to interface:
Ip access-grup <acl name> <in/out>
R3(config)#interface serial 0/1
R3(config-if)#ip access-group std-rules in
R3(config-if)#exit
R3(config)#
@interface
No ip access-group <acl#/group> <in/out>
Apply to interface
NETWORK ADDRESS TRANSLATION
DYNAMIC NAT
Step 1: Create a pool of Public IP address
Conf t
R3(config)#ip nat pool <poolname> <lower ip limit> <upper ip limit>
netmask <subnetmask>
Note: if 1 public only, it will become both the lower and upper
limit
Syntax
Access-list <acl#> permit <src ip/net ad> <WM>
Exit
Step 3: Link the Public Pool and the standard ACL together
Note if NAT is “Many” (many to one, one to many, many to many) use
port numbering (PAT)port address translation
Interface <int>
Ip nat inside/outside
Exit
INSIDE
R3(config)#interface lo0
R3(config-if)#ip nat inside
Exit
R3(config-if)#interface lo2
R3(config-if)#ip nat inside
Exit
OUTSIDE
STATIC NAT
Step 1 link the private and public together
R3(config)#interface lo 0
R3(config-if)#ip nat inside
R3(config-if)#exit
R3(config)#interface lo1
R3(config-if)#ip nat inside
R3(config-if)#exit
Conf t
Interface fa0/0
Standby <group#> ip <virtual ip>
(group # should be same with redundant routers)
Standby <group#> priority <priority value>
(highest priority is the main router)
Main router
MAIN(config)#interface fa0/0
MAIN(config-if)#standby 1 ip 192.168.10.10
MAIN(config-if)#standby 1 priority 120
MAIN(config-if)#standby 1 preempt
MAIN#show exit
Preempt -> to force the active status
MAIN#show standby
backup router
BACKUP(config)#interface fa0/0
BACKUP(config-if)#standby 1 ip 192.168.10.10
BACKUP(config-if)#exit
(since this is backup 1.we can leave the priority at default 2.Preempt should not be
configured since it is backup)
Note
Failover will effect after deadtimer 10secs
Status of standby will become main
Status of active will become init
VRRP
Step1 configure VRRP group number and virtual ip
Step2 configure priority
Step3 configure preempt
Conf t
Interface fa0/0
vrrp <group#> ip <virtual ip>
(group # should be same with redundant routers)
vrrp <group#> priority <priority value>
(highest priority is the main router)
MAIN#conf t
Enter configuration commands, one per line. End with CNTL/Z.
MAIN(config)#interface fa0/0
MAIN(config-if)#vrrp 2 ip 192.168.10.10
MAIN(config-if)#vrrp 2 priority 150
MAIN(config-if)#vrrp 2 preempt
MAIN(config-if)#exit
MAIN#show vrrp
BACKUP#conf t
BACKUP(config)#interface fa0/0
BACKUP(config-if)#vrrp 2 ip 192.168.10.10
BACKUP(config-if)#exit
GRE Tunnel
Step 1 create tunnel interface and configure ip address
Step 2 configure gre tunnel
Step 3 configure source and destination ip (public ip)
R1(config)#interface tunnel 0
R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#tunnel mode gre ip
R1(config-if)#tunnel source 50.0.0.1
R1(config-if)#tunnel destination 60.0.0.1
R1(config-if)#exit
R2(config)#interface tunnel 0
R2(config-if)#ip address 192.168.10.2 255.255.255.0
R2(config-if)#tunnel source 60.0.0.1
R2(config-if)#tunnel destination 50.0.0.1
R2(config-if)#exit
CDP
SW1#configure terminal
SW1(config)#interface Fas0/1
SW1(config-if)#no cdp enable
SW1#show cdp interface -> will show which interface runs cdp
SW1#show cdp neighbor -> will show table of neighbors
SW1#show cdp neighbor detail -> will show IOS version also
To enable the CDP, use the cdp run command in global configuration mode. To disable CDP, use the no
form of this command. cdp run & no cdp run