Tuesday, October 26, 2010

Commands for 10/26/2010 (Class of 10/24/2010)

0 comments
Router> = User Exec Mode (Level 1)


Router# = Privilege Exec Mode (Level 15),

Router(config)# = Global Configuration Mode,

Router(config-if)# = Interface Configuration Mode

Router(config-line)# = Line Configuration Mode
 
Switch(config-if)#switchport mode trunk (To set the TRUNKING mode of an interface to ON)


Switch(config-if)#switchport mode dynamic auto | desirable (To set the DTP trunking mode of an interface to AUTO or DESIRABLE)

TIP:- Remember the COMBINATION of the various DTP mode and whether they will end in a port becoming a TRUNK or NOT.

Switch(config-if)#switchport trunk allowed vlan (To explicitly set WHICH VLANS will be allowed over a trunk)

Switch(config)#vtp domain (To assign a DOMAIN name to the switch VTP process)


Switch(config)#vtp mode server | client | transparent (To change the VTP MODE on a switch)

TIP :- The following THREE commands form the HOLY TRINITY of Switch configuration commands. With these the CCNA exam becomes easier but it can be argued, without these, it becomes IMPOSSIBLE.

Switch#show vlan brief (ONE OF THE MOST IMPORTANT COMMANDS ON A SWITCH. Can be used to display VLANS AND their associated PORTS on a switch)


Switch#show interface trunk (To see the status of ANY trunk ports on a switch)

Switch#show vtp status (To display VTP specific details on a switch)

Switch(config-if)#switchport port-security (TO ENABLE MAC address based port security on a switch port. WITHOUT THIS COMMAND, THE COMMANDS BELOW WILL HAVE NO EFFECT)

Switch(config-if)#switchport port-security mac-address {H.H.H | sticky} (Allowes for the the traffic from MAC address H.H.H OR allowes for DYNAMIC learning of a MAC address on a port using the STICKY keyword)

Switch(config-if)#switchport port-security maximum <#> (Defines HOW many MAC addresses can pass data on a particular port)

______________________________________________________________

The following commands are for use on a ROUTER

Router#show ip interface brief ( THE #1 MOST IMPORTANT COMMAND FOR THE CCNA COURSE; TO SEE CURRENT STATUS OF INTERFACES)

Router#show ip route (THE SECOND MOST IMPORTANT COMMANDS ON A ROUTER. Used to display the current ROUTING TABLE on the router)


Router(config)#interface f0/0 (To change over to INTERFACE configuration mode)


Router(config-if)#no shutdown (To NO SHUT the interface)

Router(config-if)#ip address A.B.C.D A.B.C.D (To assign an IP address AND a subnet mask to a router interface. THIS ALSO RESULTS IN THE CREATION OF A CONNECTED ROUTE TO THAT NETWORK ON THIS INTERFACE)

Router(config)#ip route A.B.C.D W.X.Y.Z {next-hop ip | exit-interface} (Used to create a static route to network A.B.C.D with a Subnet mask of W.X.Y.Z using EITHER the next-hop router's IP address OR the exit-interface on the local router)
Router(config)#ip route 0.0.0.0 0.0.0.0 {next-hop ip | exit-interface} (Used to create a static DEFAULT ROUTE, known as the GATEWAY OF LAST RESORT on the local router)

Monday, October 25, 2010

Files for 10/24/2010

0 comments
RIP/OSPF/EIGRP Blank

Commands for 10/25/2010 (Class of 10/24/2010)

0 comments
Router> = User Exec Mode (Level 1)

Router# = Privilege Exec Mode (Level 15),

Router(config)# = Global Configuration Mode,

Router(config-if)# = Interface Configuration Mode

Router(config-line)# = Line Configuration Mode

Router>show privilege (To show the current Privilege Level)

Router>enable (To change over to PRIVILEGE Exec mode)

Router#configure terminal (To change over to GLOBAL configuration mode)

Router(config)#hostname (To change the Hostname)

Router(config)#enable password (To configure the Cisco device to ask for a password when the enable command is entered in the exec mode. THIS PASSWORD IS DISPLAYED IN THE CONFIGURATION IN PLAIN TEXT!!)

Router(config)#service password-encryption (To configure the Cisco device to display ALL configured passwords in a weak encryption and not plain text)

Router(config)#enable secret (Same as the enable password command but the password is stored in the configuration as MD5 hash)

Router(config)#no ip domain-lookup (A housekeeping command used to PREVENT the router from trying to resolve TYPOS in the exec mode for IP Addresses. Saves valuable time that would be wasted by the router trying to look up a DNS server)

Router(config)#line console 0 (To change to LINE configuration mode)

Router(config-line)#logging synchronous (To enable the REPAINTING of prompt after a log message)

Router(config-line)#no exec-timeout OR exec-timeout 0 0 (Disables the default behavior of the Cisco device which is to log a user OUT after 5 minutes of inactivity. After this command the user is NOT logged out at all).

Router(config)#interface f0/0 (To change over to INTERFACE configuration mode)


Router(config-if)#no shut (To NO SHUT the interface)

Router(config-if)#exit (To GO BACK to ONE LEVEL below current configuration mode)

Router(config-if)#end ( To GO BACK to EXEC mode)

Router#show ip interface brief ( MOST IMPORTANT COMMAND; TO SEE CURRENT STATUS OF INTERFACES)


Router#show cdp neighbors (detail) (To see the current neigbors via Cisco Discovery Protocol)

Switch#show arp (To see the CURRENT ARP table of the switch)

Router#ping (Used on a router to generate ICMP pings)

Switch#show mac address-table OR show mac-address-table (VARIES BY IOS PLATFORM, shows the current MAC address table of the switch)

Switch#show spanning-tree (VERY IMPORTANT COMMAND. Possible THE most important on a switch. Show information about the CURRENT state of STP ports AND information about the LOCAL and ROOT BRIDGE) KNOW THIS COMMAND INSIDE AND OUT.


Switch(config-if)#spanning-tree portfast (An STP command that puts the interface into FORWARDING state WITHOUT first going through the listening and learning states. Used for ports connected to NON-STP devices such as END HOSTS and ROUTERS).
 
Switch(config)#vlan (To create a new VLAN)


Switch(config-vlan)#name (To assign a NAME to the above created VLAN)

Switch#show vlan brief (ONE OF THE MOST IMPORTANT COMMANDS ON A SWITCH. Can be used to display VLANS AND their associated PORTS on a switch)

Switch(config-if)#switchport mode access (To EXPLICITLY turn a port into an ACCESS port. This port CANNOT become a trunk)


Switch(config-if)#switchport access vlan <#> (To associate an access port with a VLAN)

Thursday, September 2, 2010

Commands for 09/01/2010

0 comments
The following commands are the HOLY TRINITY of router commands

Router#show ip interface brief - This command is used to watch the STATE and IP ADDRESSES assigned to ALL the interfaces in a very concise and effective way. OUR MAIN MOTIVE HERE IS TO INSURE THAT IP ADDRESSES ASSIGNED ARE PROPER, IN THE CORRECT SUBNET ETC. AND THE INTERFACE IS IN UP/UP STATE.

Router#show ip route - The command used to view the current RIB (Routing Information Base) or Routing Table of a router. THE IMPORTANCE OF THIS COMMAND ON A CISCO ROUTER CANNOT BE UNDERSTATED. THE IMPORTANCE OF IT ON THE CCNA EXAM IS EVEN MORE.

Router#show ip protocols - The command to view the current routing protocols in use on the router currently. All the pertinent information about each protocol can be found on the screen.

Router(config-if)#no shutdown - ALL interfaces on a router, as opposed to a switch, are ADMINISTRATIVELY DOWN by default. This is the command needed to bring the interfaces to the UP state.

Router(config-if)#ip address - This is the interface command used to assign an IP address to a router interface. IN ADDITION TO ASSIGNING AN IP ADDRESS FOR THE ROUTER TO RESPOND TO, PROVIDES THE ROUTER WITH A ROUTE TO THE ENTIRE NETWORK THE IP BELONGS TO. THIS ROUTE IS STORED AS A CONNECTED ROUTE IN THE RIB. Thus, we can consider this command the BASIC building block of an IP network.

Router(config)#ip route {NEXT-HOP IP | EXIT INTERFACE} - The command to configure a static route on a router. THE NEXT-HOP IP SHOULD BE USED FOR LAN INTERFACES AND EXIT INTERFACE IS A BEST PRACTICE CONFIGURATION FOR WAN (POINT-TO-POINT) INTERFACES.

Router(config)#ip route 0.0.0.0 0.0.0.0 {NEXT-HOP IP | EXIT-INTERFACE} - This is the Cisco command to configure a GATEWAY OF LAST RESORT otherwise known as a default route on a router.
_________________________________________________________________________
RIP COMMANDS

Router(config)#router rip - The command to both start the RIP process on the router, as well as to enter the RIP configuration sub-mode. This is the mode where all the RIP related configuration will take place.

Router(config-router)#version 2 - The default RIP version on Cisco IOS is classfull version, version 1. To start the classless version of RIP, this command is needed. For most cases, it could be considered MANDATORY.

Router(config-router)#no auto-summary - Command to DISABLE the undesirable auto-summarization behavior of RIP. Considered in most cases to be MANDATORY.
Router(config-router)#network A.B.C.D - The command to start the advertizing the local networks via RIP. The network needs to be specified to the MAJOR CLASSFUL network boundry ONLY. Thus, A.0.0.0 for class A, A.B.0.0 for class B and A.B.C.0 for class C.
_______________________________________________________
FRAME RELAY COMMANDS

Router#show frame-relay lmi - Command to verify LMI connectivity with the Frame-Relay switch. TO MAKE SURE THAT THE STATISTICS BEING VIEWED ARE NOT OLD, ISSUE THE COMMAND SEVERAL TIMES IN SUCCESSION IN A 30 - 40 SECOND PERIOD TO MAKE SURE THAT THE STATISTICS ARE INCREASING.

Router#show frame-relay pvc - Command to view the PVC/DLCIs that have been issued to the router via the Frame-Relay switch. Any DLCIs viewed here can be used to send/receive traffic on Frame-Relay cloud.

Router#show frame-relay map - Command to view the current DLCI to IP mappings that are present on the router. MAPPINGS VIA INVERSE-ARP WILL HAVE THE DYNAMIC KEYWORD.

Router(config-if)#encapsulation frame-relay - Command to change the current encapsulation being used by the interface to Frame-Relay.

Router(config-if)#frame-relay map ip - The command to STATICALLY map a REMOTE IP address to a LOCAL DLCI. This command should be used on Physical or Point-to-multipoint interface ONLY.