May 18, 2012

CLI Shortucts

Often I will help one of my students and while doing so I use commands that are not covered in class, mostly because they are either a shortcut or because I am looking for something very specific. Here is a short list of some of my favorites:

show run interface:

blog_demo#sh run int f0/0

Building configuration…


Current configuration : 93 bytes

!

interface FastEthernet0/0

ip address 10.1.1.1 255.255.255.0

duplex auto

speed auto

end


show run | section:

blog_demo#sh run | section interface

interface FastEthernet0/0

ip address 10.1.1.1 255.255.255.0

duplex auto

speed auto

interface FastEthernet1/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

blog_demo#

show run | begin :

blog_demo#sh run | begin interface

interface FastEthernet0/0

ip address 10.1.1.1 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet1/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

!

ip http server

no ip http secure-server

ip classless

!

control-plane

!

!

–More–


show run | include:

blog_demo#sh run interface f0/0 | include ip

ip address 10.1.1.1 255.255.255.0

show ip interface brief:

blog_demo#sh ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 10.1.1.1 YES manual up up

FastEthernet1/0 192.168.1.1 YES manual up up

blog_demo#


Also while doing a show run you can use the / character to find something specific:

blog_demo#sh run

Building configuration…

Current configuration : 663 bytes

!

version 12.3

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname blog_demo

!

boot-start-marker

boot-end-marker

!

!

memory-size iomem 5

no aaa new-model

ip subnet-zero

!

!

!

!

ip cef

ip ips po max-events 100

/192.168

filtering…

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

!

ip http server


Enjoy, and If you find this helpful please leave a comment and let me know!  

CCNA: Another Subnetting Trick

This tip is taken from Dan Stanton at Ascolta Training.


Dan is one of the countries leading instructors for Cisco Works and he's famous to boot.  Recently one of my CCNA Students asked be about Dans Method and I was at a loss.  Well I pinged Dan and here it is.  Thanks Dan!  


You can also find my "Eight Easy Steps to Subnetting" here.


Bits:                1     2      3        4      5        6      7      8
Mul Octet:    128   64    32      16     8        4      2      1
Sub Mask:   128  192   224    240  248   252   254  255
Wild Mask:   127    63    31      15     7       3       1     0

The number of bits determine the multiple of the octet.

SUBNETS:

255.255.255.224 is multiples of 32 in the last octet.

  Subnet                  Broadcast
  204.10.20.0/27      204.10.20.31
  204.10.20.32/27    204.10.20.63
  04.10.20.64/27      204.10.20.95
  etc…

255.255.248.0 is multiples of 8 in the third octet.

  Subnet                   Broadcast
  144.251.8.0/21      144.251.15.255
  144.251.16.0/21    144.251.23.255
  144.251.24.0/21    144.251.31.255
   etc…


VLMS (A multiple of 32 can be divided into 4 multiples of 8)

  204.10.20.0/27
  204.10.20.32/27 = 204.10.20.32/29
                    204.10.20.40/29
                    204.10.20.48/29
                    204.10.20.56/29
  204.10.20.64/27
  204.10.20.96/27
  etc

ROUTE SUMMARIZATION (4 subnets in the summary route.)

  144.251.12.0/22 = 144.251.12.0/24
                    144.251.13.0/24
                    144.251.14.0/24
                    144.251.15.0/24

SUPER NETTING (4 networks in the summary route.)

  204.251.12.0/22 = 204.251.12.0/24
                    204.251.13.0/24
                    204.251.14.0/24
                    204.251.15.0/24

WILDCARD MASKS

  Wild card masks are the inverse of subnet masks on contiguous subnets

  255   255     255
 -128 -192   -224  etc…
===== ====    ====
  127     63        31



Router Command Modes Chart

Thought I would add the first draft of my Router Command Mode Mind Map.  I hope it helps all you CCNA Students.


Download router_modes.pdf