Configuring a Router

Posted: November 22, 2008 in CISCO, IP, ROUTING
Tags: ,
Configuration Example: VTP and Inter-VLAN Routing

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, April 3, 2008

Configuration Example: Basic Router Configuration


Figure A shows the network topology for the configuration that follows, which shows a basic router configuration using the commands covered in this chapter. 




Boston Router

Router>en

Enters privileged mode

Router#clock set 18:30:00 15 Nov 2004

Sets local time on router

Router#config t

Enters global config mode

Router(config)#hostname Boston

Sets router name to Boston

Boston(config)#no ip domain-lookup

Turns off name resolution on unrecognized commands (spelling mistakes)

Boston(config)#banner motd #

Creates an MOTD banner

This is the Boston Router.


Authorized Access Only


#


Boston(config)#clock timezone EST 5

Sets time zone to Eastern Standard Time (5 from UTC)

Boston(config)#enable secret cisco

Enables secret password set to cisco

Boston(config)#service password-encryption

Passwords will be given weak encryption

Boston(config)#line con 0

Enters line console mode

Boston(config-line)#logging sync

Commands will not be interrupted by unsolicited messages

Boston(config-line)#password class

Sets password to class

Boston(config-line)#login

Enables password checking at login

Boston(config-line)#line vty 0 4

Moves to virtual Telnet lines 0 through 4

Boston(config-line)#password class

Sets password to class

Boston(config-line)#login

Enables password checking at login

Boston(config-line)#line aux 0

Moves to line auxiliary mode

Boston(config-line)#password class

Sets password to class

Boston(config-line)#login

Enables password checking at login

Boston(config-line)#exit

Moves back to global config mode

Boston(config)#no service password-encryption

Turns off password encryption

Boston(config)#int fa 0/0

Moves to Fast Ethernet 0/0 mode

Boston(config-if)#desc Engineering LAN

Sets locally significant description of the interface

Boston(config-if)#ip address 172.16.10.1 255.255.255.0

Assigns IP address and subnet mask to the interface

Boston(config-if)#no shut

Turns on the interface

Boston(config-if)#int s0/0

Moves directly to Serial 0/0 mode

Boston(config-if)#desc Link to Buffalo Router

Sets locally significant description of the interface

Boston(config-if)#ip address 172.16.20.1 255.255.255.0

Assigns IP address and subnet mask to the interface

Boston(config-if)#clock rate 56000

Sets a clock rate for serial transmission. DCE cable must be plugged into this interface

Boston(config-if)#no shut

Turns on the interface

Boston(config-if)#exit

Moves back to global config mode

Boston(config)#ip host buffalo 172.16.20.2

Sets a local host name resolution to IP address 172.16.20.2

Boston(config)#exit

Moves back to privileged mode

Boston#copy run start

Saves running-config to NVRAM

 

Wednesday, April 2, 2008

Erasing Configurations – Networking How-to

Erasing Configurations

Router#erase start

Deletes the startup-config file from NVRAM


Tip:

Running-config is still in dynamic memory. Reload the router to clear the running-config.

Tuesday, April 1, 2008

Saving Configurations – Networking How-to

Saving Configurations

Router#copy run start

Saves the running-config to local NVRAM

Router#copy run tftp

Saves the running-config remotely to TFTP server

exec-timeout Command – Networking How-to

exec-timeout Command

Router(config)#line con 0


Router(config-line)#exec-timeout 0 0

Sets time limit when console automatically logs off. Set to 0 0 (minutes seconds) means console never logs off

Router(config-line)#



Tip:

exec-timeout 0 0 is great for a lab because the console never logs out. This bad security is very dangerous in the real world.

Monday, March 31, 2008

logging synchronous Command – Networking How-to

logging synchronous Command

Router(config)#line con 0

Router(config-line)#logging synchronous

Turns on synchronous logging. Information items sent to console will not interrupt the command you are typing. The command will be moved to a new line


Tip:

Ever try to type in a command and an informational line appears in the middle of what you were typing? Lose your place? Do not know where you are in the command, so you just press Enter and start all over? The logging synchronous command will tell the router that if any informational items get displayed on the screen, your prompt and command line should be moved to a new line, so as not to confuse you.

The informational line does not get inserted into the middle of the command you are trying to type. If you were to continue typing, the command would execute properly, even though it looks wrong on the screen.

Sunday, March 30, 2008

no ip domain-lookup Command

Router(config)#no ip domain-lookup Router(config)#

Turns off trying to automatically resolve an unrecognized command to a local host name


Tip:

Ever type in a command incorrectly and are left having to wait for a minute or two as the router tries to translate your command to a domain server of 255.255.255.255? The router is set by default to try to resolve any word that is not a command to a DNS server at address 255.255.255.255. If you are not going to set up DNS, turn this feature off to save you time as you type, especially if you are a poor typist.


Monday, March 17, 2008

Assigning a Local Host Name to an IP Address – Networking How-to

Assigning a Local Host Name to an IP Address

Router(config)#ip host london 172.16.1.3

Assigns a host name to the IP address. After this assignment, you can use the host name instead of an IP address when trying to Telnet or ping to that address

Router#ping london

=

Router#ping 172.16.1.3

 

Tip:

The default port number in the ip host command is 23, or Telnet. If you want to Telnet to a device, just enter the IP host name itself:

Router#london = Router#telnet london = Router#telnet 172.16.1.3

Sunday, March 16, 2008

Setting the Clock Time Zone on a Cisco Router – Networking How-to

Setting the Clock Time Zone

Router(config)#clock timezone EST 5

Sets the time zone for display purposes. Based on coordinated universal time (Eastern Standard Time is 5 hours behind UTC)

Thursday, March 13, 2008

Creating an MOTD Banner on a Router – Networking How-to

Creating an MOTD Banner

Router(config)#banner motd # This is a secure system. Authorized Personnel Only! # Router(config)#

# is known as a delimiting character. The delimiting character must surround the banner message and can be any character so long as it is not a character used within the body of the message

Wednesday, March 12, 2008

Configuring an Ethernet/Fast Ethernet Interface on a Router – Networking How-to

Configuring an Ethernet/Fast Ethernet Interface

Router(config)#int fa0/0

Moves to Fast Ethernet 0/0 interface mode

Router(config-if)#description Accounting LAN

Optional descriptor of the link is locally significant

Router(config-if)#ip address 192.168.20.1 255.255.255.0

Assigns address and subnet mask to interface

Router(config-if)#no shut

Turns interface on

Tuesday, March 11, 2008

Configuring a Serial Interface on a Cisco Router – Networking How-to

Configuring a Serial Interface

Router(config)#int s0/0

Moves to interface Serial 0/0 mode

Router(config-if)#description Link to ISP

Optional descriptor of the link is locally significant

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Assigns address and subnet mask to interface

Router(config-if)#clock rate 56000

Assigns a clock rate for the interface

Router(config-if)#no shut

Turns interface on

Tip:

The clock rate command is used only on a serial interface that has a DCE cable plugged into it. There must be a clock rate set on every serial link between routers. It does not matter which router has the DCE cable plugged into it, or which interface the cable is plugged into. Serial 0 on one router can be plugged into Serial 1 on another router.

Sunday, March 9, 2008

Moving Between Router Interfaces – Networking How-to

Moving Between Interfaces

What happens in Column 1 is the same thing occurring in Column 2.

Router(config)#int s0

Router(config)#int s0

Moves to interface S0 mode

Router(config-if)#exit

Router(config-if)#int e0

In int S0, move to E0

Router(config)#int e0

Router(config-if)#

In E0 mode now

Router(config-if)#


Prompt does not change; be careful

Thursday, March 6, 2008

Interface Names on a Cisco Router – Networking How-to

Interface Names

One of the biggest problems that new administrators face is the interface names on the different models of routers. With all of the different Cisco devices that are in production networks today, some administrators are becoming confused on the names of their interfaces.

The following chart is a sample of some of the different interface names for various routers. This is by no means a complete list. Refer to the hardware guide of the specific router that you are working on to see the different combinations, or use the following command to see which interfaces are installed on your particular router:

router#show ip interface brief

Router Model

Port Location/Slot Number

Slot/Port Type

Slot Numbering Range

Example

2501

On Board

Ethernet

Interface-type Number

ethernet0 (e0)

On Board

Serial

Interface-type Number

serial0 (s0) & s1

2514

On Board

Ethernet

Interface-type Number

e0 & e1

On Board

Serial

Interface-type Number

s0 & s1

1721

On Board

FastEthernet

Interface-type Number

fastethernet0 (fa0)

Slot 0

WAC (WIN Interface Card) (Serial)

Interface-type Number

s0 & s1

1760

On Board

Fast Ethernet

Interface-types 0/port

fa0/0

Slot 0

WIC/VIC (Voice Interface Card)

Interface-type 0/port

s 0/0 & s0/1

v0/0 & v0/1

Slot 1

WIC/VIC

Interface-type 1/port

s1/0 & s1/1

v1/0 & v1/1

Slot 2

VIC

Interface-type 2/port

v2/0 & v2/1

Slot 3

VIC

Interface-type 3/port

v3/0 & v3/1

2610

On Board

Ethernet

Interface-type 0/port

e0/0

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

2611

On Board

Ethernet

Interface-type 0/port

e0/0 & e0/1

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

2620

On Board

FastEthernet

Interface-type 0/port

fa0/0

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

2621

On Board

FastEthernet

Interface-type 0/port

fa0/0 & fa 0/1

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

1841

On Board

FastEthernet

Interface-type 0/port

fa 0/0 & fa 0/1

Slot 0

High Speed WAN Interface Card (HWIC)/WIC/VWIC

Interface-type 0/slot/port

s0/0/0 & s0/0/1

1841

Slot 1

HWIC/WIC/VWIC

Interface-type 0/slot/port

s0/1/0 & s0/1/1

2801

On Board

FastEthernet

Interface-type 0/port

fa0/0 & fa 0/1

Slot 0

VIC/VWIC (voice only)

Interface-type 0/slot/port

voice0/0/0 voice0/0/3

Slot 1

HWIC/WIC/VWIC

Interface-type 0/slot/port

0/1/0 0/1/3 (single-wide HWIC) 0/1/0 0/1/7 (double-wide HWIC)

Slot 2

WIC/VIC/VWIC

Interface-type 0/slot/port

0/2/0 – 0/2/3

Slot 3

HWIC/WIC/VWIC

Interface-type 0/slot/port

0/3/0 0/3/3 (single-wide HWIC) 0/3/0 – 0/3/7 (double-wide HWIC)

2811

Built into Chassis Front

USB

Interface-type port

usb0 & usb 1

Built into Chassis Rear

FastEthernet Gigabit Ethernet

Interface-type 0/port

fa0/0 & fa 0/1

gi0/0 & gi0/1

Slot 0

HWIC/HWIC-D/WIC/VWIC/VIC

Interface-type 0/slot/port

s0/0/0 & s0/0/1

fa0/0/0 & 0/0/1

Slot 1

HWIC/HWIC-D/WIC/VWIC/VIC

Interface-type 0/slot/port

s0/1/0 & s0/1/1

fa0/1/0 & 0/1/1

NME Slot

NM/NME

Interface-type 1/port

gi1/0 & gi1/1

s1/0 & s1/1


Wednesday, March 5, 2008

Show Commands on Cisco Routers – Networking How-to

show Commands

Router#show ?

Lists all show commands available

Router#show interfaces

Displays statistics for all interfaces

Router#show interface serial 0

Displays statistics for a specific interface, in this case Serial 0

Router#show ip interface brief

Displays a summary of all interfaces, including status and IP address assigned

Router#show controllers serial 0

Displays statistics for interface hardware. Statistics display if the clock rate is set and if the cable is DCE, DTE, or not attached

Router#show clock

Displays time set on device

Router#show hosts

Displays local host-to-IP address cache. These are the names and addresses of hosts on the network to which you can connect

Router#show users

Displays all users connected to device

Router#show history

Displays history of commands used at this edit level

Router#show flash

Displays info about Flash memory

Router#show version

Displays info about loaded software version

Router#show arp

Displays the ARP table

Router#show protocols

Displays status of configured Layer 3 protocols

Router#show startup-config

Displays configuration saved in NVRAM

Router#show running-config

Displays configuration currently running in RAM

Tuesday, March 4, 2008

Password Encryption on a Router/Switch – Networking How-to

Password Encryption

Router(config)#service password-encryption

Applies a weak encryption to passwords

Router(config)#enable password cisco

Sets enable password to cisco

Router(config)#line con 0

Router(config-line)#password Cisco

Continue setting passwords as above


Router(config)#no service password-encryption

Turns off password encryption

Caution:

If you have turned on service password encryption, used it, and then turned it off, any passwords that you have encrypted will stay encrypted. New passwords will remain unencrypted.

Monday, March 3, 2008

Configuring Passwords on a Cisco Router – Networking How-to

Configuring Passwords

Works on both routers and switches.


Router(config)#enable password cisco Sets enable password

Router(config)#enable secret class Sets enable secret password

Router(config)#line con 0 Enters console-line mode
Router(config-line)#password console Sets console-line mode password to console
Router(config-line)#login Enables password checking at login

Router(config)#line vty 0 4 Enters vty line mode for all five vty lines
Router(config-line)#password telnet Sets vty password to telnet
Router(config-line)#login Enables password checking at login

Router(config)#line aux 0 Enters auxiliary line mode
Router(config-line)#password backdoor Sets auxiliary line mode password to backdoor
Router(config-line)#login Enables password checking at login

 

Caution:

enable secret password is encrypted by default. enable password is not. For this reason, recommended practice is that you never use the enable password. Use only the enable secret password in a router configuration.

Caution:

You cannot set both enable secret and enable password to the same password. Doing so defeats the use of encryption.

Sunday, March 2, 2008

Networking How-to: Configuring a Router Name

This command works on both routers and switches.

Router(config)#hostname Cisco

Name can be any word you choose

Cisco(config)#

Networking How-to: Cisco Router Modes

Router Modes

Router>

User mode

Router#

Privileged mode

Router(config)#

Global configuration mode

Router(config-if)#

Interface mode

Router(config-subif)#

Subinterface mode

Router(config-line)#

Line mode

Router(config-router)#

Router configuration mode


Tip:

There are other modes than these. Not all commands work in all modes. Be careful. If you type in a command that you know is correctshow run, for exampleand you get an error, make sure that you are in the correct mode.

Configuration Example: RIP-2 Routing

Figure A shows the network topology for the configuration that follows, which shows how to configure RIP-2 using the commands covered in this chapter.

 

Figure 8-1. Network Topology for RIP-2 Routing Configuration

Boston Router

Boston>en

Boston#config t

Boston(config)#router rip

Enables RIP routing

Boston(config-router)#version 2

Enables RIP-2

Boston(config-router)#network 172.16.0.0

Advertises directly connected networks (classful address only)

Boston(config-router)#no auto-summary

Turns off autosummarization

Boston(config-router)#exit

Boston(config)#exit

Boston#copy run start


Buffalo Router

Buffalo>en

Buffalo#config t

Buffalo(config)#router rip

Enables RIP routing

Buffalo(config-router)#version 2

Enables RIP-2

Buffalo(config-router)#network 172.16.0.0

Advertises directly connected networks (classful address only)

Buffalo(config-router)#no auto-summary

Turns off autosummarization

Buffalo(config-router)#Cntl+z

Exits back to privileged mode

Buffalo#copy run start


Bangor Router

Bangor>en

Bangor#config t

Bangor(config)#router rip

Enables RIP routing

Bangor(config-router)#version 2

Enables RIP-2

Bangor(config-router)#network 172.16.0.0

Advertises directly connected networks (classful address only)

Bangor(config-router)#no auto-summary

Turns off autosummarization

Bangor(config-router)#Cntl+z

Exits back to privileged mode

Bangor#copy run start

Sunday, April 20, 2008

RIP Version 2: Optional Commands

RIP Version 2: Optional Commands

Router(config-router)#no version 2

Changes back to RIP-1

Router(config-router)#version 1

Changes RIP routing to RIP-1

Router(config-router)#no auto-summary

RIP-2 summarizes networks at the classful boundary. This command turns autosummarization off

Router(config-router)#auto-summary

Re-enables autosummarization at the classful boundary


Thursday, April 17, 2008

RIP Version 2: Mandatory Commands Networking How-to

RIP Version 2: Mandatory Commands

Router(config)#router rip

Turns on the RIP routing process; the same command as used for RIP Version 1 (RIP-1)

Router(config-router)#version 2

Turns on Version 2 of the routing process. Version 1 is default

Router(config-router)#network w.x.y.z

w.x.y.z is the network number of the directly connected classful network you want to advertise

Wednesday, April 16, 2008

Troubleshooting RIP Networking How-to

Troubleshooting RIP Issues

Router#debug ip rip

Displays all RIP activity in real time

Router#show ip rip database

Displays contents of the RIP database


Tuesday, April 15, 2008

RIP Version 2 Networking How-to

RIP Version 2

Note:

RIP-2 is not currently part of the CCNA certification exam. Commands are listed here for reference only.


Router(config-router)#version 2

RIP will now send and receive RIP-2 packets globally

Router(config-if)#ip rip send version 1

Interface will send only RIP-1 packets

Router(config-if)#ip rip send version 2

Interface will send only RIP-2 packets

Router(config-if)#ip rip send version 1 2

Interface will send both RIP-1 and RIP-2 packets

Router(config-if)#ip rip receive version 1

Interface will receive only RIP-1 packets

Router(config-if)#ip rip receive version 2

Interface will receive only RIP-2 packets

Router(config-if)#ip rip receive version 1 2

Interface will receive both RIP-1 and RIP-2 packets


Monday, April 14, 2008

RIP Routing: Optional Commands Networking How-to


RIP Routing: Optional Commands

Router(config)#no router rip

Turns off the RIP routing process

Router(config-router)#no network w.x.y.z

Removes network w.x.y.z from the RIP routing process

Router(config-router)#passive-interface s0/0

RIP updates will not be sent out this interface

Router(config-router)#neighbor a.b.c.d

Defines a specific neighbor with which to exchange information

Router(config-router)#no ip split-horizon

Turns off split horizon (on by default)

Router(config-router)#ip split-horizon

Re-enables split horizon

Router(config-router#timers basic 30 90 180 270 360

Changes timers in RIP:

30 = Update timer (in seconds)

90 = Invalid timer (in seconds)

180 = Hold-down timer (in seconds)

270 = Flush timer (in seconds)

360 = Sleep time (in milliseconds)

Router(config-router)#maximum-paths x

Limits the number of paths for load balancing to x (4 = default, 6 = maximum)

Router(config-router)#default-information originate

Generates a default route into RIP


RIP Routing: Mandatory Commands Networking How-to

RIP Routing: Mandatory Commands

Router(config)#router rip

Enables RIP as a routing protocol

Router(config-router)#network w.x.y.z

w.x.y.z is the network number of the directly connected network you want to advertise


Note:

You need to advertise only the classful network number, not a subnet:

Router(config-router)#network 172.16.0.0


not

Router(config-router)#network 172.16.10.0


If you advertise a subnet, you will not receive an error message, because the router will automatically convert the subnet to the classful network address.

Thursday, April 10, 2008

IP Classless Command Networking How-to

IP Classless

Router(config)#ip classless

Instructs IOS to forward packets destined for an unknown subnet to the best supernet route

Router(config)#no ip classless

Turns off the ip classless command

Note:
A supernet route is a route that covers a range of subnets with a single entry.


Note:
The ip classless command is enabled by default in Cisco IOS Software Release 11.3 and later.

Figure A. Network Topology for Basic Router Configuration

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

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s