Wednesday, February 25, 2015

PPPoE - Dynamic


no ip dhcp use vrf connected
ip dhcp excluded-address 172.24.20.1 172.24.20.99
!
ip dhcp pool LAN
   import all
   network 172.24.20.0 255.255.255.0
   default-router 172.24.20.1
   dns-server XXX.XXX.XXX.XXX
!
!
ip name-server XXX.XXX.XXX.XXX
vpdn enable
!
!
username admin password 7 PASSWORD
!
!
!
!
interface FastEthernet0/0
 description "WAN_PPPoE"
 no ip address
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 no ip mroute-cache
 duplex auto
 speed auto
 pppoe enable
 pppoe-client dial-pool-number 1
 no cdp enable
!
interface FastEthernet0/1
 description "Office_LAN"
 ip address 172.24.20.1 255.255.255.0
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip nat inside
 no ip mroute-cache
 duplex auto
 speed auto
!
interface Dialer1
 ip address negotiated
 ip mtu 1492
 ip nat outside
 encapsulation ppp
 ip tcp adjust-mss 1452
 dialer pool 1
 dialer-group 1
 ppp authentication chap pap callin
 ppp chap hostname USERNAME
 ppp chap password 7 PASSWORD
 ppp pap sent-username USERNAME password 7 PASSWORD
 ppp ipcp dns request accept
 ppp ipcp address accept
!
ip route 0.0.0.0 0.0.0.0 Dialer1
!
no ip http server
ip nat inside source list WAN_ACCESSLIST interface Dialer1 overload
!
ip access-list extended WAN_ACCESSLIST
 permit ip 172.24.20.0 0.0.0.255 any

Saturday, August 31, 2013

Configuring CUCM Express as a TFTP Server

When a Cisco IP phone successfully powers up, it will use CDP to determine the voice VLAN it should belong to and then request and receive, at a minimum, an IP address/subnet mask and gateway IP address via DHCP. It also must have the all – important option 150 IP address, which is the location of the TFTP server. The TFTP server is responsible for delivering Cisco phone firmware and configuration files to the phones when requested. The TFTP server can be located anywhere on your network, but in smaller environments, the CUCM Express router is configured for TFTP. This is the first server the IP phone gets its information from. One group of files that our Cisco IP phone will request is its firmware, which is specifically tailored to the type of Cisco phone hardware. If you are using your CUCM Express router to handle TFTP server functionality, you must configure the IOS to serve up the firmware that your phones will request. Because we’ve downloaded and extracted the .tar CUCM Express software, the extraction process neatly placed all the necessary firmware files needed by most phones into an easy - to - understand directory structure. All you need to do is figure out which Cisco phones you will want to allow on your network and then configure the router to serve the appropriate files. You can see all of the firmware file directories by issuing the dir flash:/phone command:

Directory of flash:/phone/

  47 drw- 0 Aug 31 2013 18:18:28 +00:00 7945-7965
  56 drw- 0 Aug 31 2013 18:18:56 +00:00 7937
  58 drw- 0 Aug 31 2013 18:19:24 +00:00 7914
  60 drw- 0 Aug 31 2013 18:19:26 +00:00 7906-7911
  69 drw- 0 Aug 31 2013 18:19:52 +00:00 7920
  71 drw- 0 Aug 31 2013 18:19:58 +00:00 7931
  79 drw- 0 Aug 31 2013 18:20:24 +00:00 7942-7962
  88 drw- 0 Aug 31 2013 18:28:46 +00:00 7921
  96 drw- 0 Aug 31 2013 18:29:30 +00:00 7940-7960
  101 drw- 0 Aug 31 2013 18:29:38 +00:00 7970-7971
  110 drw- 0 Aug 31 2013 18:30:06 +00:00 7975
  118 drw- 0 Aug 31 2013 18:30:34 +00:00 7941-7961

511664128 bytes total (395001856 bytes free)

Let’s assume that we are going to be configuring Cisco 7945, 7965, and 7970 phones in our environment. Therefore, we need to configure our TFTP server to offer all of the files within the flash:/phone/7945 - 7965 and flash:/phone/7970 - 7971 directories. Note that some of the firmware files work for multiple phones. For example, the firmware files required by the Cisco 7945 are the same as those required by the 7965. This is because the phones are essentially identical except for the number of extension buttons they have. The 7945 has four extension buttons, whereas the 7965 has six. Configuring the Cisco CUCM Express router to serve as a TFTP server for the firmware files is quite simple. Each firmware file needs to have its own tftp-server flash:/phone/ < firmware_file > command. Also note that because our CUCM Express files are organized with a directory structure, we must provide a directory alias for the Cisco phones. Remember that Cisco phones are unintelligent devices for the most part. They know only the name of the firmware files and not where they are located. Because we’ve organized our CUCM Express software into directories, we must create aliases so that when the Cisco phone asks for a file, it knows which subdirectory the file is located in. Let’s use the 7945 - 7965 phone firmware files as an example. We’ll first run the dir flash:/phone/7945 - 7965 command to see what firmware files those specific phones will require:

Router# dir flash:phone/7945-7965

Directory of flash:phone/7945-7965/
  48 -rw- 2496963 Aug 31 2013 18:26:30 +00:00 apps45.8-3-2-27.sbn
  49 -rw- 585536 Aug 31 2013 18:26:34 +00:00 cnu45.8-3-2-27.sbn
  50 -rw- 2453202 Aug 31 2013 18:26:44 +00:00 cvm45sccp.8-3-2-27.sbn
  51 -rw- 326315 Aug 31 2013 18:26:46 +00:00 dsp45.8-3-2-27.sbn
  52 -rw- 555406 Aug 31 2013 18:26:48 +00:00 jar45sccp.8-3-2-27.sbn
  53 -rw- 638 Aug 31 2013 18:26:50 +00:00 SCCP45.8-3-3S.loads
  54 -rw- 642 Aug 31 2013 18:26:50 +00:00 term45.default.loads
  55 -rw- 642 Aug 31 2013 18:26:52 +00:00 term65.default.loads

These phones will need all eight files to fully function properly. To offer up these files for downloading to the phones, we need to configure the following:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#tftp-server flash:/phone/7945-7965/apps45.8-3-2-27.sbn alias apps45.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7945-7965/cnu45.8-3-2-27.sbn alias cnu45.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7945-7965/cvm45sccp.8-3-2-27.sbn alias cvm45sccp.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7945-7965/dsp45.8-3-2-27.sbn alias dsp45.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7945-7965/jar45sccp.8-3-2-27.sbn alias jar45sccp.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7945-7965/SCCP45.8-3-3S.loads alias SCCP45.8-3-3S.loads
Router(config)#tftp-server flash:/phone/7945-7965/term45.default.loads alias term45.default.loads
Router(config)#tftp-server flash:/phone/7945-7965/term65.default.loads alias term65.default.loads
Router(config)#

We’ve now successfully configured our CUCM Express router to serve up firmware files for the Cisco 7945 and 7965 phones using TFTP. Let’s go ahead and finish off this example by configuring the router to serve up firmware files for the Cisco 7971 phones. First we look in the phone directory for the 7970 and 7971 phones:

Router# dir flash:/phone/7970-7971

Directory of flash:/phone/7970-7971/
  102 -rw- 2494499 Aug 31 2013 18:29:46 +00:00 apps70.8-3-2-27.sbn
  103 -rw- 547706 Aug 31 2013 18:29:48 +00:00 cnu70.8-3-2-27.sbn
  104 -rw- 2456051 Aug 31 2013 18:29:58 +00:00 cvm70sccp.8-3-2-27.sbn
  105 -rw- 530601 Aug 31 2013 18:30:00 +00:00 dsp70.8-3-2-27.sbn
  106 -rw- 538527 Aug 31 2013 18:30:04 +00:00 jar70sccp.8-3-2-27.sbn
  107 -rw- 638 Aug 31 2013 18:30:06 +00:00 SCCP70.8-3-3S.loads
  108 -rw- 642 Aug 31 2013 18:30:06 +00:00 term70.default.loads
  109 -rw- 642 Aug 31 2013 18:30:06 +00:00 term71.default.loads

511664128 bytes total (395001856 bytes free)

Now we configure IOS to begin serving up these files using TFTP:

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#tftp-server flash:/phone/7970-7971/apps70.8-3-2-27.sbn alias apps70.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7970-7971/cnu70.8-3-2-27.sbn alias cnu70.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7970-7971/cvm70sccp.8-3-2-27.sbn alias cvm70sccp.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7970-7971/dsp70.8-3-2-27.sbn alias dsp70.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7970-7971/ jar70sccp.8-3-2-27.sbn alias jar70sccp.8-3-2-27.sbn
Router(config)#tftp-server flash:/phone/7970-7971/SCCP70.8-3-3S.loads alias SCCP70.8-3-3S.loads
Router(config)#tftp-server flash:/phone/7970-7971/term70.default.loads alias term70.default.loads
Router(config)#tftp-server flash:/phone/7970-7971/term71.default.loads alias term71.default.loads
Router(config)#

That’s all there is to it! At this point, if you were to add one of these phones to your network, it would receive all the necessary IP information and download the phone firmware files from the TFTP server. The phone will not register to the CUCM Express, however. It is still missing vital configurations that must be set up on the CUCM Express for the registration process to occur.

Configuring Voice VLANs

When it comes to configuring a separate VLAN for voice traffic, the process of configuration and VLAN creation is exactly the same whether traffic is going router-to-switch or switch-to-switch. The voice VLAN configuration differs when you want to use Cisco IP phones that incorporate a data port on the phone for PC connections. Many Cisco mid - and high - range phones such as the 7945G give users the ability to plug a PC into an Ethernet port on the phone to provide network connectivity. The phone essentially becomes a three-port switch at that point. One port connects the phone to the access-layer switch, the second (virtual) port is for voice traffic to the phone, and the third port is to connect to a PC for standard data transport. Figure below shows how a PC is plugged directly into the phone, which is essentially trunked with both a voice and data VLAN.


As you can see, the connection between the switch and the Cisco phone is an 802.1Q trunk link. It is necessary to have a VLAN trunk because we have our voice and data separated on two different VLANs. When configuring the VLAN trunk on the switchport that connects to the phone, we use a slightly different method. The Cisco IOS has a unique command to identify a VLAN as a voice VLAN. The command is switchport voice vlan. Even though the switchport command doesn’t specifically reference 802.1a, in all actuality, this trunk link between our switch and the Cisco phone is not a full-pledged 802.1Q trunk. Instead, the Cisco switch and Cisco IP phone use CDP to implement this quasi-trunk. The VLAN that is configured the voice VLAN is marked with an 802.1Q tag, while the data VLAN is considered to be the native VLAN and is left unmarked. This VLAN trunk is capable of handling only two VLANs — one tagged VLAN for voice and one untagged VLAN for data.

Configuring Voice VLAN:

Switch#configure terminal
Switch(config)#vlan 100
Switch(config-vlan)#name Voice

Switch(config-vlan)#end

Configure the int fa0/5 switchport to quasi-trunk VLAN 100 for voice and VLAN 10 for data transport:

Switch#configure terminal
Switch(config)#interface fa0/5
Switch(config-if)#switchport voice vlan 100
Switch(config-if)#switchport access vlan 10

Switch(config-if)#end

Thursday, July 8, 2010

Adding ACL on CATOS (6500)

Console> (enable) set ip permit 172.16.0.0 255.255.0.0 telnet
172.16.0.0 with mask 255.255.0.0 added to telnet permit list.

Console> (enable) set ip permit 172.20.52.42 255.255.255.224 snmp
172.20.52.42 with mask 255.255.255.224 added to snmp permit list.

To check:
Console> (enable) sh ip permit

Thursday, April 16, 2009

Adding Repositories on CentOS

Adding DAG Repo:

#cd /etc/yum.repos.d
#vi dag.repo


Fill-in the following lines and save it.

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1


Issue this ;

# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt


Try to install using yum.

Neat huh...

Monday, January 19, 2009

Cisco Discovery Protocol

Cisco Discovery Protocol

Router#show cdp

Displays global CDP information (such as timers)

Router#show cdp neighbors

Displays information about neighbors

Router#show cdp neighbors detail

Displays more detail about neighbor device

Router#show cdp entry word

Displays information about device named word

Router#show cdp entry *

Displays information about all devices

Router#show cdp interface

Displays info about interfaces that have CDP running

Router#show cdp interface x

Displays info about specific interface x running CDP

Router#show cdp traffic

Displays traffic infopackets in/out/version

Router(config)#cdp holdtime x

Changes length of time to keep CDP packets

Router(config)#cdp timer x

Changes how often CDP updates are sent

Router(config)#cdp run

Enables CDP globally (on by default)

Router(config)#no cdp run

Turns off CDP globally

Router(config-if)#cdp enable

Enables CDP on a specific interface

Router(config-if)#no cdp enable

Turns off CDP on a specific interface

Router#clear cdp counters

Resets traffic counters to 0

Router#clear cdp table

Deletes the CDP table

Router#debug cdp adjacency

Monitors CDP neighbor information

Router#debug cdp events

Monitors all CDP events

Router#debug cdp ip

Monitors CDP events specifically for IP

Router#debug cdp packets

Monitors CDP packet-related information


Caution:

Although CDP is an excellent source of information to you the network administrator, is it a potential security risk if a hacker gains access to one of your systems. The information that you gain through CDP is also gained by the hacker.

After you have used CDP to gather your information in a production environment, turn it off to thwart any bad people from using it for no good.


Tuesday, January 13, 2009

Copying IOS to TFTP Server

Copying IOS to TFTP Server

2900 Series Switch

2900Switch#copy flash:c2900XL-hs-mz-112.8.10-SA6.bin tftp

Same procedure as with router

Source filename [c2900XL-hs-mz-112.8.10-SA6.bin]?

Just press ENTER

Destination IP address or hostname [ ]192.168.1.3

Address of TFTP server

Destination filename [c2900XL-hs-mz-112.8.10-SA6.bin]?

Just press ENTER

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!

Each bang symbol (!) = 1 datagram sent

1119104 bytes copied in 21.43 secs

2900Switch#


2950 Series Switch

2950Switch#copy flash tftp

Same procedure as with router

Source filename [ ]? c2950-c3h2s-mz.120-5.3.WC.1.bin

Destination IP address or hostname [ ]192.168.1.3

Address of TFTP server

Destination filename [c2950-c3h2s-mz.120-5.3.WC.1.bin]?

Just press ENTER

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!

Each bang symbol (!) = 1 datagram sent

1674921 bytes copied in 31.542 secs

2950Switch#


Tuesday, January 6, 2009

Restoring IOS from ROMmon Mode Using Xmodem

Restoring IOS from ROMmon Mode Using Xmodem

The output that follows was taken from a 1720 router. Some of this output might vary from yours, depending on the router model that you are using.

rommon 1 >confreg

Shows configuration summary. Step through the questions, answering defaults until you can change the console baud rate. Change it to 115200; makes transfer go faster

     Configuration Summary
enabled are:

load rom after netboot fails

console baud: 9600


boot: image specified by the boot
system commands

or default to: cisco2-c1700


do you wish to change the
configuration? y/n [n]: y

enable "diagnostic mode"? y/n [n]: n

enable "use net in IP bcast address"? y/n [n]: n

disable "load rom after netboot
fails"? y/n [n]: n

enable "use all zero broadcast"? y/n [n]: n

enable "break/abort has effect"? y/n [n]: n

enable "ignore system config info"? y/n [n]: n

change console baud rate? y/n [n]: y

enter rate: 0=9600, 1=4800, 2=1200, 3=2400

4=19200, 5=38400,
6=57600, 7=115200 [0]: 7

change the boot characteristics? y/n [n]: n

Prompts will begin to ask a series of questions that will allow you to change the config-register. Answer n to all questions except the one that asks you to change the console baud rate. For the enter rate, choose 7 because that is the number that represents a baud rate of 115200

     Configuration Summary

enabled are:


load rom after netboot fails

console baud: 115200

boot: image specified by the boot system commands

or default to: cisco2-c1700

do you wish to change the configuration? y/n [n]: n

rommon2>

After the summary is shown again, choose n to not change the configuration and go to the rommon> prompt again



rommon 2>reset

Reloads router at new com speed. Change HyperTerminal setting to 115200 to match the router's new console setting





Rommon 1>xmodem c1700-js-l_121-3.bin

Asking to transfer this image using Xmodem

......


Do you wish to continue? y/n [n ]:y

Choose y to continue






In HyperTerminal, go to Transfer, then Send File (See Figure A). Locate the IOS file on the hard drive and click Send (See Figure B)

Router will reload when transfer is completed




Reset baud rate on router




Router(config)#line con 0


Router(config-line)#speed 9600


Router(config-line)#exit

HyperTerminal will stop responding. Reconnect to the router using 9600 baud, 8-N-1


Figure A. Finding the IOS Image File










Figure B. Sending the IOS Image File to the Router

Sunday, December 21, 2008

Restoring/Upgrading IOS from a TFTP Server

Restoring/Upgrading IOS from a TFTP Server

Otep#copy tftp flash


    Address or name of remote host [ ]?
192.168.119.20


    Source filename [ ]? c2600-js-l_121-3.bin ***Hit ENTER


    Destination filename [c2600-js-l_121-3.bin]?
***Hit ENTER


    Accessing tftp://192.168.119.20/c2600-js-l_121-3.bin


    Erase flash: before copying? [confirm] ***Hit ENTER

If Flash memory is full, must erase it first

    Erasing the flash file system will remove all
files


    Continue? [confirm]***Hit ENTER

Press CNTL+C if you want to cancel

    Erasing device eeeeeeeeeeeeeeeeee...erased

Each e represents data being erased

    Loading c2600-js-l_121-3.bin
from 192.168.119.20


    (via) FastEthernet 0/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Each bang symbol (!) = 1 datagram of data

    Verifying Check sum .................. OK


    [OK  8906589 Bytes]


    8906589 bytes copied in 277.45 secs


Otep#

Success


Tuesday, December 16, 2008

Backing Up IOS to a TFTP Server

Backing Up IOS to a TFTP Server

OTEP#copy flash tftp

    Source filename [ ]? c2600-js-l_121-3.bin

Name of IOS image

    Address or name of remote host [ ]?
192.168.119.20

Address of TFTP server

    Destination filename [c2600-js-l_121-3.bin]?Hit ENTER

Destination filename is the same as the source filename, so just press ENTER


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(u@!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    8906589 bytes copied in 263.68 seconds

OTEP#


Thursday, December 4, 2008

Restoring Configurations

Restoring Configurations

Otep#copy tftp run

Copies configuration file from TFTP server to DRAM

    Address or name of remote host[ ]?
192.168.119.20

IP address of TFTP server

    Source filename [ ]?Otep-confg

Enter the name of the file you want to retrieve

    Destination filename [running-config]? Hit ENTER

    Accessing tftp://192.168.119.20/Denver-confg...

    Loading Denver-confg from 192.168.119.02
(via Fast Ethernet 0/0):

    !!!!!!!!!!!!!!

    [OK-624 bytes]

    624 bytes copied in 9.45 secs

Otep#

File has been transferred successfully


Note:

You can also use the preceding sequence for a copy tftp start command sequence.

Tuesday, December 2, 2008

Backing Up Configurations

Backing Up Configurations

OTEP#copy run start

Saves running-config from DRAM to NVRAM (locally)

OTEP#copy run tftp

Copies running-config to remote TFTP server

    Address or name of remote host[ ]?
192.168.119.20

IP address of TFTP server

    Destination Filename [OTEP-confg]? PRESS ENTER

Name to use for file saved on TFTP server

   !!!!!!!!!!!!!!!

Each bang symbol (!) = 1 datagram of data

   624 bytes copied in 7.05 secs

OTEP#

File has been transferred successfully


Note:

You can also use the preceding sequence for a copy start tftp command sequence.

Wednesday, November 26, 2008

Boot System Commands

Boot System Commands

Router(config)#boot system flash image-name

Loads IOS with image-name

Router(config)#boot system tftp image-name172.16.10.3

Loads IOS with image-name from a TFTP server

Router(config)#boot system rom

Loads IOS from ROM

Router(config)#exit

Router#copy run start

Saves running-configuration to NVRAM. Router will execute commands in order they were entered on next reload


If you enter boot system flash first, that is the first place the router will go to look for the IOS. If you want to go to a TFTP server first, make sure that the boot system tftp command is the first one you enter.

Thursday, November 20, 2008

Configuration Example: VTP and Inter-VLAN Routing

Configuration Example: VTP and Inter-VLAN Routing

Figure A shows the network topology for the configuration of VTP and inter-VLAN routing. There are separate sections on configuring both 2900 and 2950 series switches.

Figure A. Network Topology for VTP and Inter-VLAN Routing Configuration











ISP Router


Router>en

Router>#config t

Router(config)#hostname ISP
Sets the host name

ISP(config)#no ip domain-lookup
Turns off DNS resolution to avoid wait time dur to DNS lookup of spelling errors

ISP(config)#line con 0

ISP(config-line)#logging synchronous
Appends the command line to a new lineno interruption from info items

ISP(config-line)#exec-timeout 0 0
Console session will never time out

ISP(config-line)#exit

ISP(config)#enable secret cisco
Sets the secret password to cisco

ISP(config)#int lo 0
Creates a loopback address for testing purposes

ISP(config-if)#description simulated address representing remote website

ISP(config-if)#ip address 172.16.1.1 255.255.255.0

ISP(config-if)#int s0/0
Enters serial interface configuration mode

ISP(config-if)#description WAN link to the Corporate Router

ISP(config-if)#ip address 200.200.200.13 255.255.255.252

ISP(config-if)#clock 56000
Sets the clock rate for the serial link

ISP(config-if)#no shut

ISP(config-if)#exit

ISP(config-if)#router eigrp 10
Turns on the EIGRP routing process

ISP(config-router)#network 172.16.0.0
Advertises the 172.16.0.0 network

ISP(config-router)#network 200.200.200.0
Advertises the 200.200.200.0 network

ISP(config-router)#no auto-summary
Turns off automatic summarization at the classful boundary

ISP(config-router)#exit

ISP(config)#exit

ISP#copy run start
Saves the configuration to NVRAM


CORP Router (1721 Router Running Cisco IOS Software Release 12.2(4)
These commands work also for the 1760 and the 2620/2621 series routers

Router>en

Router#config t

Router(config)#hostname CORP
Sets host name

CORP(config)#no ip domain-lookup
Turns off resolution to avoid wait time due to DNS lookup of spelling errors

CORP(config)#line con 0

CORP(config-line)#logging synchronous
Appends the command line to a new lineno interruption from info items

CORP(config-line)#exec-timeout 0 0
Console session will never time out

CORP(config-line)#exit

CORP(config)#enable secret cisco
Sets the secret password to cisco

CORP(config)#int s1

CORP(config-if)#desc WAN link to ISP Router

CORP(config-if)#ip add 200.200.200.14 255.255.255.252

CORP(config-if)#bandwidth 1544
Sets bandwith to 1544 kilobits for EIGRP calculation

CORP(config-if)#no shut

CORP(config-if)#exit

CORP(config)#int fa0

CORP(config-if)#full duplex

CORP(config-if)#no shut

CORP(config-if)#int fa0.1
Creates a subinterface

CORP(config-if)#no ip address
Ensures there is no IP address assigned to the interface

CORP(config-subif)#desc Management VLAN 1
Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 1 native
Enables Dot1Q encapsulation with VLAN 1 as the native VLAN

CORP(config-subif)#ip add 192.168.1.1 255.255.255.0
Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.10
Creates a subinterface

CORP(config-subif)#desc Sales VLAN 10
Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 10
Enables Dot1Q encapsulation on VLAN 10

CORP(config-subif)#ip add 192.168.10.1 255.255.255.0
Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.20
Creates a subinterface

CORP(config-subif)#desc Engineering VLAN 20
Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 20
Enables Dot1Q encapsulation on VLAN 20

CORP(config-subif)#ip add 192.168.20.1 255.255.255.0
Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.30
Creates a subinterface

CORP(config-subif)#desc Marketing VLAN 30
Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 30
Enables Dot1Q encapsulation on VLAN 30

CORP(config-subif)#ip add 192.168.1.1 255.255.255.0
Assigns an IP address to the subinterface

CORP(config-subif)#exit

CORP(config)#router eigrp 10
Turns on the EIGRP routing process

CORP(config-router)#network 192.168.1.0
Advertises the 192.168.1.0 network

CORP(config-router)#network 192.168.10.0
Advertises the 192.168.10.0 network

CORP(config-router)#network 192.168.20.0
Advertises the 192.168.20.0 network

CORP(config-router)#network 192.168.30.0
Advertises the 192.168.30.0 network

CORP(config-router)#network 200.200.200.0
Advertises the 200.200.200.0 network

CORP(config-router)#no auto-summary
Turns off auto summari-zation

CORP(config-router)#exit

CORP(config)#exit

CORP#copy run start
Saves the configuration to NVRAM

Caution: Remember to advertise all networks. Advertising 192.168.0.0 does not advertise networks from 192.168.0.0192.168.255.0. These are separate classful networks, so they must be advertised separately, just like 200.200.200.0 is advertised separately.


2900 Series Switch

switch>en

switch>#config t

switch(config)#hostname 2900Switch
Sets host name

2900Switch(config)#no ip domain-lookup
Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

2900Switch(config)#line con 0

2900Switch(config-line)#logging synchronous
Appends the command line to a new lineno interruption from info items

2900Switch(config-line)#exec-timeout 0 0
Console session will never time out

2900Switch(config)#exit

2900Switch(config)#enable secret cisco
Sets the secret password to cisco

2900Switch(config)#exit

2900Switch#vlan database
Enters VLAN database mode

2900Switch(vlan)#vlan 10 name Sales
Creates VLAN 10 with the name Sales

2900Switch(vlan)#vlan 20 name Engineering
Creates VLAN 20 with the name Engineering

2900Switch(vlan)#vlan 30 name Marketing
Creates VLAN 30 with the name Marketing

2900Switch(vlan)#vtp server
Makes the switch a VTP server

2900Switch(vlan)#vtp domain academy
Assigns a domain name of academy

2900Switch(vlan)#exit
Applies all changes to VLAN database and exits mode

2900Switch#config t

2900Switch(config)#int vlan1

2900Switch(config-if)#ip add 192.168.1.2 255.255.255.0

2900Switch(config-if)#no shutdown

2900Switch(config-if)#exit

2900Switch(config)#ip default-gateway 192.168.1.1

2900Switch(config)#int fa 0/1

2900Switch(config-if)#desc Trunk Link to CORP Router

2900Switch(config-if)#switchport mode trunk
Creates a trunk link

2900Switch(config-if)#switchport trunk encapsulation dot1q
Sets encapsulation to Dot1Q

2900Switch(config-if)#int fa 0/2

2900Switch(config-if)#switchport access vlan 10
Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in Spanning Tree Protocol (STP)

Note: The command switchport mode access is not needed, because this is the default mode for interfaces. Use it only if the port was previously set to be a trunk link.

2900Switch(config-if)#int fa0/3

2900Switch(config-if)#switchport access vlan 10
Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/4

2900Switch(config-if)#switchport access vlan 10
Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/5

2900Switch(config-if)#switchport access vlan 20
Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/6

2900Switch(config-if)#switchport access vlan 20
Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/7

2900Switch(config-if)#switchport access vlan 20
Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/8

2900Switch(config-if)#switchport access vlan 20
Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/9

2900Switch(config-if)#switchport access vlan 30
Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/10

2900Switch(config-if)#switchport access vlan 30
Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/11

2900Switch(config-if)#switchport access vlan 30
Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/12
Save as Draft

2900Switch(config-if)#switchport access vlan 30
Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast
Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)# CTRL + Z

2900Switch#copy run start
Saves the configuration to NVRAM

2900Switch#





2950 Series Switch

switch>en

switch>#config t

switch(config)#hostname 2950Switch
Sets the host name

2950Switch(config)#no ip domain-lookup
Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

2950Switch(config)#line con 0

2950Switch(config-line)#logging synchronous
Appends the command line to a new lineno interruption from info items

2950Switch(config-line)#exec-timeout 0 0
Console session will never time out

2950Switch(config-line)#exit

2950Switch(config)#enable secret cisco
Sets the secret password to cisco

2950Switch(config)#vlan 10
Creates VLAN 10

2950Switch(config-vlan)#name Sales
Defines the name of Sales

2950Switch(config-vlan)#vlan 20
Creates VLAN 20

2950Switch(config-vlan)#name Engineering
Defines the name of Engineering

2950Switch(config-vlan)#vlan 30
Creates VLAN 30

2950Switch(config-vlan)#name Marketing
Defines the name of Marketing

2950Switch(config-vlan)#exit

2950Switch(config)#vtp mode server
Makes the switch a VTP server

2950Switch(config)#vtp domain academy
Assigns a domain name of academy

2950Switch(config)#int vlan1
Creates the virtual VLAN 1 interface

2950Switch(config-if)#ip add 192.168.1.2 255.255.255.0
Assigns an IP address to the interface

2950Switch(config-if)#no shutdown

2950Switch(config-if)#exit

2950Switch(config)#ip default-gateway 192.168.1.1
Assigns the IP address of the default gateway

2950Switch(config)#int fa 0/1

2950Switch(config-if)#desc Trunk Link to CORP Router

2950Switch(config-if)#switchport mode trunk
Creates a trunk link

2950Switch(config-if)#int range fa 0/2 4

2950Switch(config-if-range)#switchport access vlan 10
Assigns ports to VLAN 10

2950Switch(config-if-range)#spanning-tree portfast
Transitions ports directly to the Forwarding state in STP

Note: The command switchport mode access is not needed, because this is the default mode for interfaces. Use it only if the port was previously set to be a trunk link.

2950Switch(config-if-range)#int range fa0/5 8

2950Switch(config-if-range)#switchport access vlan 20
Assigns ports to VLAN 20

2950Switch(config-if-range)#spanning-tree portfast
Transitions port directly to the Forwarding state in STP

2950Switch(config-if-range)#int range fa0/9 - 12

2950Switch(config-if-range)#switchport access vlan 30
Assigns ports to VLAN 10

2950Switch(config-if-range)#spanning-tree portfast
Transitions ports directly to the Forwarding state in STP

2950Switch(config-if-range)# CTRL + Z

2950Switch#copy run start
Saves the configuration to NVRAM



Monday, November 17, 2008

Inter-VLAN Communication: Router-on-a-Stick

Inter-VLAN Communication: Router-on-a-Stick

Router(config)#int fa 0/0

Enters interface mode for interface fa 0/0

Router(config-if)#no shut

Turns the interface on

Router(config-if)#int fa 0/0.1

Creates subinterface 0/0.1

Router(config-subif)#encapsulation dot1q 1 native

Assigns the native VLAN (usually VLAN 1) to this logical subinterface

Router(config-subif)#ip address 192.168.1.1 255.255.255.0

Assigns an IP address to the subinterface

Router(config-subif)#int fa 0/0.10

Creates subinterface 0/0.10

Router(config-subif)#encapsulation dot1q 10

Assigns VLAN 10 to this subinterface

Router(config-subif)#ip address 192.168.10.1 255.255.255.0

Assigns an IP address to the subinterface

Router(config-subif)# CNTL + Z


Router#



Thursday, November 13, 2008

Confirming VTP Configuration

Confirming VTP Configuration

1900 Series Switch

1900Switch#show vtp

Displays all VTP information


2900/2950 Series Switch

29x0Switch#show vtp status

Displays VTP domain status

29x0Switch#show vtp counters

Displays VTP statistics


Wednesday, November 12, 2008

VTP Configuration

VTP Configuration

1900 Series Switch

1900Switch(config)#vtp client ***Changes the switch to VTP client mode

1900Switch(config)#vtp server ***Changes the switch to default VTP server mode

1900Switch(config)#vtp transparent ***Changes the switch to VTP transparent mode

1900Switch(config)#vtp domain CNAP ***Sets the name of the VTP management domain to CNAP

1900Switch(config)#vtp password cisco ***Sets the VTP password to cisco

2900 Series Switch

2900Switch#vlan database ***Enters VLAN database mode

2900Switch(vlan)#vtp client ***Changes the switch to client mode

2900Switch(vlan)#vtp server ***Changes the switch to server mode 2900Switch(vlan)#vtp transparent Changes the switch to transparent mode

2900Switch(vlan)#vtp domain academy ***Sets the name of the VTP management domain to academy

2900Switch(vlan)#vtp password catalyst ***Sets the VTP password to catalyst

2900Switch(vlan)#vtp v2-mode ***Sets VTP mode to version 2

2900Switch(vlan)#vtp pruning ***Enables VTP pruning

2900Switch(vlan)#exit ***Applies the changes and exits mode

2900Switch#

2950 Series Switch

2950Switch#config t ***Enters global config mode

2950Switch(config)#vtp mode client ***Changes the switch to client mode

2950Switch(config)#vtp mode server ***Changes the switch to server mode

2950Switch(config)#vtp mode transparent ***Changes the switch to transparent mode

2950Switch(config)#vtp domain academy ***Sets the name of the VTP management domain to academy

2950Switch(config)#vtp password catalyst ***Sets the VTP password to catalyst

2950Switch(config)#vtp v2-mode ***Sets VTP mode to version 2

2950Switch(config)#vtp pruning ***Enables VTP pruning

Note:
VTP versions 1 and 2 are not interoperable. All switches must use the same version. The biggest difference between version 1 and 2 is that version 2 has support for Token Ring VLANs.

Caution:
Switches that are in client mode update their VLAN database from switches that are in server mode. If you have two or more switches interconnected and you delete a VLAN database, you may find that it becomes updated from a server switch because of your VTP mode.
Another serious problem occurs when you take a new switch in server mode (the default mode) and plug it into an existing network. If the VTP revision number is higher on the new switch, it sends an update to all other switches to overwrite their VLAN database with new informationin this case, an empty VLAN database. You now have a production network with no VLAN information.
Recommended practice is that you put a switch into VTP client mode before adding them into a production network, allow it to receive an update of current VLAN information, and then change it to VTP server mode.