You are on page 1of 9

Router & RP commands ver 1.

1 Basic Configuration of Router Command R>enable R# show running config R# Show start-up R# show interface s0/0/0 R# Show ip interface brief R# Show version R# Show history R# Show flah R# write (= copy run start ) R# copy start tftp R# copy run tftp R# copy flash tftp R# copy tftp start Description Enter privileged mode

Flash memory Backup on a tftp server

Restores from tftp

R# enable password XXXX R# enable secret XXXX R# configure terminal R(config)# hostname XXXX

Set password for the privileged mode Encrypt the privileged mode password Enter global configuration mode Set the hostname of the router Set the password of the console line Set the password of the vty lines which allows access to router via telnet. The router cant be accessed remotely if this password is not set.

R(config)#banner motd # message # R#erase startup-config R# copy running-config tftp

Backups the running config. File on a tftp server Configure Fa Interface

R(config)#int fa 0/0 R(config-if)#no ip address R(config-if)# Router(config-if)#description xxxxxx #

Removes the ip address of the interface Describes the interface Configure serial Interface

R#configure terminal R(config)#interface fa0/0 R(config-if)#description Connects to main switch in Building A R#show ip interface brief R#ping 192.168.1.1 R#traceroute 192.168.1.1

Set description for the interface

Ping and traceroute

R#show ip route Router#show interfaces

Shows the routing table

Password Recovery
On startup of the router: Ctrl+ Break (3 times) you will enter to the rom monitor Self decompressing the image : ########## monitor: command "boot" aborted due to user interrupt rommon 1 >confreg 0x2142 ( this will let the router start with empty running config file) rommon 2 > reset (this will reload) ################ R> en R# copy start run R#conf t R#no enable Password (resets the Password) R#copy run start R# reload ##################### (ctrl+ break) rommon 1 >confreg 0x2102 ( this will let the router load the startup config on the startup) rommon 2 > reset ################

Static Routing
R#debug ip routing R#Undebug ip routing R#Undebug all R# show cdp neighbors R# show cdp neighbors details Displays the routes as they are added to the routing table Stops debug ip routing Stops all debugging types

Router(config)#no cdp run Router(config-if)#no cdp enable

R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2 R1(config)#ip route 172.16.1.0 255.255.255.0 serial 0/0/1

R1(config)#no ip route 172.16.1.0 255.255.255.0 172.16.2.2

Disable the cdp on the device If you want to use CDP but need to stop CDP advertisements on a particular interface, use this command - ip route : Static route command - 172.16.1.0 : Network address of remote network - 255.255.255.0 : Subnet mask of remote network - 172.16.2.2: next-hop - serial 0/0/1: exit interface Removes the route from the routing table

RIP
R(config)#router RIP The router runs RIP If you enter a subnet address, the IOS automatically converts it to a classful network address. For example, if you enter the command network 192.168.1.32, the router will convert it to network 192.168.1.0. Enables RIP on all interfaces that belong to a specific network. Associated interfaces will now both send and receive RIP updates. Advertises the specified network in RIP routing updates sent to other routers every 30 seconds. This command displays RIP routing updates as they are sent and received. Stops the debugging This command stops routing updates out the specified interface. However, the network that the specified interface belongs to will still be advertised in routing updates that are sent out other interfaces. Shows imformation about the running protocol Stops advertising the network and the send receive from the interface Stops the rip on the device Sets the default static route, so that default traffic is directed to serial 0/0/1 You configure a default static route on R2 connected to internet, and let it advertise this route to all routers using RIP using this command.

Router(config-router)#network directly-connectedclassful-network-address

R#Debug ip rip R# undebug all Router(config-router)#passive-interface interfacetype interface-number

R#show ip protocols

R(config)#no router rip

Runs RIP v.2 on the router Stops auto summary

EIGRP
Router(config)#router eigrp 1 Runs the EIGRP on the Router 1: is the autonomous system (can be any 16 bit value) the show ip protocols command can be used to verify that EIGRP is enabled.

R#show ip eigrp neighbors

Router(config-router)#metric weights tos k1 k2 k3 k4 k5

The show ip protocols command is used to verify the K values. tos=0

By using the show interface command we can examine the actual values used for bandwidth, delay, reliability, and load in the computation of the routing metric.

The value of the bandwidth may or may not reflect the actual physical bandwidth of the interface R2#show ip eigrp topology To view detailed R2#show ip eigrp topology 192.168.1.0 information about the R2#show ip eigrp topology all-links metrics of a specific entry in the topology table, add the optional parameter [network] to the show ip eigrp topology command shows all possible paths to a network including successors, feasible successors, and even those routes that are not feasible successors

R#debug eigrp fsm

turn on DUAL debugging

Stops autosummary Set the loopback interface

To establish EIGRP manual summarization on all interfaces that send EIGRP packets

64 Kbps

Router(config-if)#ip hello-interval eigrp as-number seconds Router(config-if)#ip hold-time eigrp as-number second

configure a different hello interval configure a different hold interval

R2#show run

<some output omitted> ! router eigrp 1 network 172.16.0.0 network 192.168.10.8 0.0.0.3 auto-summary !

OSPF
R1(config)#router ospf 1 1: Process ID 0.0.0.15 is the wildcard 172.16.1.16 is the directly connected network address Shows the ID of the device

Shows the cost

Calculation of cost

R1(config)#interface serial 0/0/0 R1(config-if)#ip ospf cost 1562 Router(config-if)#ip ospf priority {0 - 255}

No calculation needed Modify the osfp priority of the interface

You might also like