Thursday, March 18, 2010

Show command with pipe

show ip interface brief | exclude unassigned
=> show interface with IP address

show running-config | begin router
=> show routing protocol configuration

show ip protocols
=> show the various routing protocols configured, its participating network and its various running timer

show interface trunk
=> show the interface which are configured as trunk and using 802.1q or ISL encapsulation

show ip route
=>show the routing table
R => RIP
O => OSPF
D => EIGRP
B => BGP
C => connected
S => static
* => default route

Thursday, February 11, 2010

Enable Port security


configure terminal

interface fast ethernet (port)

switchport mode access =>change dynamic to access mode

switchport port-security =>enable port security
switchport port-security mac-address sticky =>remember mac-address
switchport port-security maximum 1 =>only allow 1 mac address
switchport port-security violation shutdown =>shutdown if detect other mac


Thursday, January 21, 2010

Enable faster convergence of switch


For port assign to PC, remember to enable portfast so that it will not be involve in the spanning tree re-calculation

configure terminal

interface fast ethernet (port)

spanning-tree portfast

Friday, December 11, 2009

Stop those translating time


If you do not have DNS enable. You can stop those annoying translating time when you accidentally hit enter when typing anything

configure terminal

no ip domain-lookup

Thursday, November 19, 2009

Prefix and Subnet

Number of Usable IP addresses
Prefix Subnet mask binary form Total IPs Usable IPs
/32 255.255.255.255 11111111.11111111.11111111.11111111 XX XX
/31 255.255.255.254 11111111.11111111.11111111.11111110 2 XX
/30 255.255.255.252 11111111.11111111.11111111.11111100 4 2
/29 255.255.255.248 11111111.11111111.11111111.11111000 8 6
/28 255.255.255.240 11111111.11111111.11111111.11110000 16 14
/27 255.255.255.224 11111111.11111111.11111111.11100000 32 30
/26 255.255.255.192 11111111.11111111.11111111.11000000 64 62
/25 255.255.255.128 11111111.11111111.11111111.10000000 128 126
/24 255.255.255.0 11111111.11111111.11111111.00000000 256 254
/23 255.255.254.0 11111111.11111111.11111110.00000000 512 510
/22 255.255.252.0 11111111.11111111.11111100.00000000 1024 1022
/21 255.255.248.0 11111111.11111111.11111000.00000000 2048 2046
/20 255.255.240.0 11111111.11111111.11110000.00000000 4096 4094
/19 255.255.224.0 11111111.11111111.11100000.00000000 8192 8190
/18 and so on ... ...

***Subnet mask will begin with series of '1' and end with series of  '0', there will not be combination of '1' between '0' and '0' between '1'.
***Total IPs formula 2 to the power of n where n is equal to the number of '1'
***Usable IPs = Total IPs - 2 (2 IPs is due to network and broadcast address)