Showing posts with label cisco networking. Show all posts
Showing posts with label cisco networking. Show all posts

Saturday, March 27, 2010

Useful Cisco Switch Commands (suitable for a 2950)

 Showing the Running configuration of the Switch. Example commands:
show run ' to see the conplete switch running
confige
show run int f0/1 ' to see running confige on
FastEthernet, slot 0, port 1
show run int vlan x ' where x = the management vlan for the
switch
show int status ' show basic interface configuation
information


Saving the Switch Running Configuation. Example command:
copy run start


Dealing with Switch Logging. Example commands:
service timestamps debug datetime localtime
service timestamps log datertime localtime
logging buffered

clear log ' clear logs if they have been on for a
long period of time
show log ' see see the switch logs


Setting the switch clock:
show clock ' to see the clock settings
clock set hh:mm:ss d m y ' clock set 14:10:55 9 sept 2005


Finding out the general topology of the connecting network. Example
commands:
show cdp ne ' for an overview
show cdp ne de ' to be more specific. This gives the
neighbour IP address


Managing the ARP:
show arp ' to see the ARP table
clear arp ' to clear the ARP table


Troubleshooting connectivity issues:
ping x.x.x.x ' ping a known address 5 times. There should
be a quick response.
ping ' extended ping, followed by return to do an
extended ping test. Can state no. of pings
trace x.x.x.x ' to do a trace route to an IP address


Looking at the Switch counters:
clear counters ' to clear all switch counters
show int counters ' to see all interface counters
show int counters error ' to see errors on all the interfaces
show int fa0/22 ' to see errors on a particular
interface

So how fast are Ports running:
show proc cpu
sh cont util


Making changes:
config t ' to go into configuration mode
int range f0/1 - 10 ' to set changes to be make to a range
of ports
speed 100 ' to set the speed of the port to 100Mb
duplex full ' to set the line duplex to full, half
or auto


Setting up the Banner:
config t
banner motd ^C

^C

Working with VLAN's:
show vlan
show vtp status
vlan database
vtp transparent|server|client ' Choose wisely here!! Swithces come
out of the box in Server mode!!!


The source of the picture above is from here.

Friday, March 26, 2010

Subnetting in your head - What do we know?

What do we know about a /25?
128 mask
1 bits on and 7 bits off (10000000)
Block size of 128
2 subnets, each with 126 hosts

What do we know about a /26?
192 mask
 2 bits on and 6 bits off (11000000)
 Block size of 64
 4 subnets, each with 62 hosts

What do we know about a /27?
 224 mask
 3 bits on and 5 bits off (11100000)
 Block size of 32
 8 subnets, each with 30 hosts

What do we know about a /28?
 240 mask
 4 bits on and 4 bits off
 Block size of 16
 16 subnets, each with 14 hosts

What do we know about a /29?
 248 mask
 5 bits on and 3 bits off
 Block size of 8
 32 subnets, each with 6 hosts

What do we know about a /30?
 252 mask
 6 bits on and 2 bits off
 Block size of 4
 64 subnets, each with 2 hosts

Regardless of whether you have a Class A, Class B, or Class C address, the /30 mask will provide you with only two hosts, ever. This mask is suited almost exclusively—as well as suggested by Cisco—for use on point-to-point links.

If you can memorize this “What Do We Know?” section, you’ll be much better off in your day-to-day job and in your studies. Try saying it out loud, which helps you memorize things—yes, your significant other and/or coworkers will think you’ve lost it, but they probably already do if you are in the networking field. And if you’re not yet in the networking field but are studying all this to break into it, you might as well have people start thinking you’re an odd bird now since they will eventually anyway.

Friday, May 22, 2009

Configuring vlan on Cisco Catalyst 3560



The objective to create 2 vlans. Vlan 151 as the port that will connect to the netmodem and vlan 90 as the port that connects to Cisco IP Phone 7940.


Telnet into Cisco Catalyst 3560 by using putty or any telnet tool of your choice. Enter the IP address (192.168.1.25 in my case) of the switch then click on open.

Enter the administration password for Cisco Catalyst 3560 (assuming that the switch has already been configured)

Once you have the prompt for the switch type enable then hit enter.


Enter the password for IOS to enter the configuration mode.


From this point you may enter the IOS commands below for the configuration.


To return an interface to its default configuration, use the default interface interface-id interface configuration command.
This example shows how to configure a port as an access port in VLAN 2:
Switch# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)# interface gigabitethernet0/1

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 2


Switch(config-if)# end