Sunteți pe pagina 1din 5

How to Name the Router

Router(config)# hostname HOSTNAME


How to Set a Password on Privileged Mode
Router(config)# enable password PASSWORD
or Router(config)# enable secret PASSWORD

Unencrypted
Encrypted

How to Configure Interface Loopback 0


Router(Config-if)# interface loopback 0
Router(config-if)# ip address X.X.X.X M.M.M.M
How to Configure ARPA over an Ethernet Interface
Router(config)# interface ethernet X
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# no shutdown
How to Configure HDLC over a Serial Interface
Router(config)# interface serial X
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# clock rate X
Router(config-if)# no shutdown
How to Configure PPP over a Serial Interface
Router(config)# interface serial X
Router(config-if)# encapsulation ppp
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# clock rate X
Router(config-if)# no shutdown

HDLC is the Default Encapsulation Type


DCE Only

DCE Only

How to Configure PPP PAP over a Serial Interface


Router(config)# hostname INTERNALROUTER
This Password is Unknown to Other Routers
Router(config)# enable secret INTERNALPASSWORD
Router(config)# username REMOTEROUTER password REMOTEPASSWORD
Router(config)# interface serial X
Router(config-if)# encapsulation ppp
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# ppp authentication pap
Router(config-if)# ppp pap sent-username LOCALROUTER password LOCALPASSWORD
Router(config-if)# clock rate X
DCE Only
Router(config-if)# no shutdown
How to Configure PPP CHAP over a Serial Interface
Router(config)# hostname INTERNALROUTER
This Password is Unknown to Other Routers
Router(config)# enable secret INTERNALPASSWORD
Router(config)# username REMOTEROUTER password REMOTEPASSWORD
Router(config)# interface serial X
Router(config-if)# encapsulation ppp
Router(config-if)# ppp authentication chap
Router(config-if)# ppp chap hostname LOCALROUTER
Router(config-if)# ppp chap password LOCALPASSWORD
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# clock rate X
DCE Only
Router(config-if)# no shutdown
How to Link Names with IP Addresses (Static DNS Entries)

Router(config)# ip host REMOTE_ROUTER X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


Repeat Until Remote Routers Active Interfaces are all Listed
How to Configure Router Browsing Sessions
Router(config)#ip http server

Not recommended for security reasons

How to Configure the Console Port


Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password PASSWORD
How to Configure Frame-Relay over a Serial Interface
Router(config)# frame-relay switching
Router(config)# interface serial X
Router(config-if)# encapsulation frame-relay
Router(config-if)# ip address X.X.X.X M.M.M.M
Router(config-if)# frame-relay local-dlci X
Router(config-if)# frame-relay inverse-arp ip X
Router(config-if)# frame-relay intf-type dce
Router(config-if)# clock rate X
Router(config-if)# bandwidth X
Router(config-if)# no shutdown

Do not use the IP Unnumbered command


DCE Only
DCE Only

How to Configure Async Ports for Reverse Telnet into Console ports
Router(config)# interface async X
Router(config-if)# ip unnumbered loopback 0
Router(config-if)# encapsulation ppp
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# line X
Router(config-line)# password XXXXXX
Router(config-line)# login
Router(config-line)# transport input telnet
Router(config-line)# modem inout
Router(config-line)# speed 9600
Router(config-line)# databits 8
Router(config-line)# parity none
Router(config-line)# stopbits 1
Router(config-line)# flow none

How to Configure Telnet Sessions


Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password PASSWORD
How to Connect Other Routers Using Reverse Telnet
Router# telnet X.X.X.X 20[01-16] (async port)
How to Exit Other Routers Using Reverse Telnet
Press CTRL + SHIFT + 6
Release and Quickly press X
Router# Disconnect
How to Configure RIPv2 on a router
Router(config)# router rip

4 is the maximum number of simultaneous


telnet sessions allowed on a 2500 series

Boot target router on for initial connection

Router(config-router)# version 2
Router(config-router)# network X.X.X.X
How to Configure IGRP on a router
Router(config)# router igrp X
Router(config-router)# network X.X.X.X

X.X.X.X is a Network Directly Connected to the Router


Repeat Until All Directly Connected Networks are Used
X is an Autonomous System Number Assigned

How to Configure EIGRP on a router


Router(config)# router eigrp X
Router(config-router)# network X.X.X.X

X is an Autonomous System Number Assigned

How to Configure single area OSPF on a router


Router(config)# router ospf Z
Router(config-router)# network X.X.X.X M.M.M.M area Y
Router(config-router)# neighbor X.X.X.X
How to Enable Classless Routing
Router(config)# ip classless
Router(config)# router PROTOCOL
Router(config-router)# network X.X.X.X
Router(config-router)# no auto-summary
Router(config-router)# redistribute connected
How to Configure IP Access-Lists
Router(config)#access-list X <Permit/Deny> D.D.D.D W.W.W.W

Z is the Process Number


Y is the Area Number

(Does not work with RIP & IGRP)

X is between 1 and 99
D is Destination Mask
W is Wildcard

How to Configure Extended IP Access-Lists


X is between 100 and 199
Router(config)#access-list X <Permit/Deny> S.S.S.S W.W.W.W D.D.D.D W.W.W.W
S is Source Mask
How to Apply Access-Lists to Interfaces
Router(Config)# interface type X
(Types are async, ethernet, loopback, serial)
Router(Config-if)# ip access-group X in
(in-in to the router / out-out of the router)
How to Configure Router as DHCP Server
Router(config)#ip dhcp pool NAME
Router(dhcp-config)#import all
Router(dhcp-config)network X.X.X.X M.M.M.M
Router(dhcp-config)default-router X.X.X.X
Set to Default Gateway IP Address
Router(dhcp-config)dns-server X.X.X.X Y.Y.Y.Y Set to DNS server addresses
How to Configure Router as DHCP Client
Router(config)# interface INTERFACE X
Router(config-if)# ip address dhcp
Router(config-if)# no shutdown
How to Configure NAT (PAT)
Router(config)#ip nat inside source list N interface OUTSIDEINTERFACE X overload
Router(config)#access-list N permit ip X.X.X.X W.W.W.W any
Router(config)#interface INSIDEINTERFACE X
Router(config-if)#ip address X.X.X.X M.M.M.M
Router(config-if)#ip nat inside
Router(config-if)##interface OUTSIDEINTERFACE X
Router(config-if)#ip address X.X.X.X M.M.M.M
Router(config-if)#ip nat outside

How to Configure Reverse Pointers (IP Tunnels)


Router(config)#ip nat inside source static tcp X.X.X.X PORT interface ethernet X PORT
How to Erase the Password on a Router (Non-Destructive)
Connect to the console port
Power cycle the router
When the router begins to boot hold CONTROL and hit BREAK
Type:
>o/r 0x2142
>i
The router reboots itself
Type:
Router> enable
Router# copy start run
Router# config t
Router(config)# enable secret PASSWORD
Router(config)# config-reg 0x2102
Router(config)# end
Router# copy run start
Router# reload
How to Erase a Router (Destructive)
Connect to the console port
Power cycle the router
When the router begins to boot hold CONTROL and hit BREAK
Type:
>o/r 0x2142
>i
The router reboots itself
Type:
Router> enable
Router# clear start
Router# config t
Router(config)# config-reg 0x2102
Router(config)# end
Router# reload

How to Upgrade an IOS of a Router


A TFTP Server is Required
Connect to the console port using a rollover cable
Connect an ethernet port to the router using a crossover cable or a hub
Set an ip address on the computer
Set up a tftp server on the computer
Power cycle the router
When the router begins to boot hold CONTROL and hit BREAK
Type:
>o/r 0x2141
0x21 {4 ignores the startup config}{1 boots an IOS from ROM}
>i
The router reboots itself
Type:
Router(boot)> enable
Router(boot)# config t
Router(boot)(config)# interface ethernet X

Router(boot)(config-if)# ip address X.X.X.X M.M.M.M


Router(boot)(config-if)# no shutdown
Router(boot)(config-if)# end
Router(boot)# copy tftp flash follow the directions.
Router(boot)# config t
Router(boot)(config)# config-reg 0x2102 0x21 {0 uses startup-config}{2 boots an IOS from Flash}
Router(boot)(config)# end
Router# reload
How to Unpartition the Flash of a Router
Power cycle the router
When the router begins to boot hold CONTROL and hit BREAK
Type:
>o/r 0x2141
0x21 {4 ignores the startup config}{1 boots an IOS from ROM}
>i
The router reboots itself
Type:
Router(boot)> enable
Router(boot)# erase flash
Follow the instructions for each existing partition
Router(boot)# config t
Router(boot)(config)# partition flash 1
Router(boot)(config)# end
Router(boot)# show flash
Verify that there is only one partition using show flash
How to Secure Router default values
Router(config)#no cdp run
Router(config)#no snmp
Router(config)#no ip http server
Router(config)#access-list NAME deny ip any any
Router(config)#line vty 0 4
Router(config-line)#access-class NAME in
Router(config-line)# access-class NAME out
Router(config-line)#line con 0
Router(config-line)#exec-timeout 120 0

Disables Cisco Discovery Protocol


Disables SNMP Access
Disables HTTP Access
Disables Telnet Access

Sets Console Timeout at 120 Seconds

S-ar putea să vă placă și