0% found this document useful (0 votes)
9 views7 pages

Basic Router Configurations

Routing configurations in Cisco

Uploaded by

Ceasar mk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Basic Router Configurations

Routing configurations in Cisco

Uploaded by

Ceasar mk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

BASIC ROUTER CONFIGURATIONS

Configuring Global Parameters


To configure the global parameters for your router, follow these steps.

SUMMARY STEPS
1. configure terminal
2. hostname name
3. enable secret password
4. no ip domain-lookup

DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode, when using the console
Router> enable port.
Router# configure terminal
Step hostname name Specifies the name for the
2 Example: router.
Router(config)# hostname Router
Step enable secret password Specifies an encrypted
3 Example: password to prevent
Router(config)# enable secret cr1ny5ho unauthorized access to the
router.
Step no ip domain-lookup Disables the router from
4 Example: translating unfamiliar words
Router(config)# no ip domain-lookup (typos) into IP addresses.

Configuring Command-Line Access


To configure parameters to control access to the router, perform the following steps.

SUMMARY STEPS
1. configure terminal
2. line [ aux | console | tty | vty ] line-number
3. password password
4. login
5. exec-timeout minutes [ seconds ]
6. line [ aux | console | tty | vty ] line-number
7. password password
8. login
9. end
DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode.
Router# configure terminal
Step line [ aux | console | tty | vty ] line-number Enters line configuration mode,
2 Example: and specifies the type of line.
Router(config)# line console 0
Step password password Specifies a unique password for
3 Example: the console terminal line.
Router(config)# password 5dr4Hepw3
Step login Enables password verification
4 Example: at the terminal login session.
Router(config-line)# login
Step exec-timeout minutes [ seconds ] Sets the interval that the EXEC
5 Example: command interpreter waits until
Router(config-line)# exec-timeout 5 30 user input is detected. The
default is 10 minutes. You can
also optionally add seconds to
the interval value.
Step line [ aux | console | tty | vty ] line-number Specifies a virtual terminal for
6 Example: remote console access.
Router(config-line)# line vty 0 4
Step password password Specifies a unique password for
7 Example: the virtual terminal line.
Router(config-line)# password aldf2ad1
Step login Enables password verifiation at
8 Example: the virtual terminal login
Router(config-line)# login session.
Step end Exits line configuration mode,
9 Example: and returns to privileged EXEC
Router(config-line)# endRouter# mode.

Configuring Gigabit Ethernet LAN Interfaces


To manually configure Gigabit Ethernet (GE) LAN interfaces, follow these steps, beginning in
global configuration mode.

SUMMARY STEPS
1. configure terminal
2. interface gigabitethernet slot/port
3. ip address ip-address mask
4. no shutdown
5. exit
DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode.
Router# configure terminal
Step interface gigabitethernet slot/port Enters the configuration mode
2 Example: for a Gigabit Ethernet interface
Router(config)# interface gigabitethernet 0/1 on the router.
Note GigabitEthernet LAN
Interfaces are 0/0 to 0/7 for
Cisco C841M-8X ISR and 0/0
to 0/3 for Cisco C841M-4X
ISR.
Step ip address ip-address mask Sets the IP address and subnet
3 Example: mask for the specified GE
Router(config-if)# ip address 192.168.12.2 interface.
255.255.255.0

Step no shutdown Enables the GE interface,


4 Example: changing its state from
Router(config-if)# no shutdown administratively down to
administratively up.
Step exit Exits configuration mode for
5 Example: the GE interface and returns to
Router(config-if)# exit global configuration mode.

Configuring Gigabit Ethernet WAN Interfaces


You can connect WAN interfaces either by using straight polarity connectors or reversed polarity
connectors.
To configure Gigabit Ethernet (GE) WAN interfaces, follow these steps, beginning in global
configuration mode.

SUMMARY STEPS
1. configure terminal
2. interface gigabitethernet slot/port
3. ip address ip-address mask
4. no shutdown
5. exit

DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode.
Router# configure terminal
Step interface gigabitethernet slot/port Enters the configuration mode
2 Example: for a Gigabit Ethernet interface
Router(config)# interface gigabitethernet 0/8 on the router.
Note GigabitEthernet WAN
Interfaces are 0/8 and 0/9 for
Cisco C841M-8X ISR and 0/4
to 0/5 for Cisco C841M-4X
Step ip address ip-address mask Sets the IP address and subnet
3 Example: mask for the specified GE
Router(config-if)# ip address 192.168.12.2 interface.
255.255.255.0

Step no shutdown Enables the GE interface,


4 Example: changing its state from
Router(config-if)# no shutdown administratively down to
administratively up.
Step exit Exits configuration mode for
5 Example: the GE interface and returns to
Router(config-if)# exit global configuration mode.

Configuring a Loopback Interface


The loopback interface acts as a placeholder for the static IP address and provides default routing
information.
To configure a loopback interface, follow these steps, beginning in global configuration mode.

SUMMARY STEPS
1. configure terminal
2. interface type number
3. ip address ip-address mask
4. exit

DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode.
Router# configure terminal
Step interface type number Enters configuration mode for
2 Example: the loopback interface.
Router(config)# interface Loopback 0

Step ip address ip-address mask Sets the IP address and subnet


3 Example: mask for the loopback
interface.
Router(config-if)# ip address 10.108.1.1
255.255.255.0

Step exit Exits configuration mode for


4 Example: the loopback interface and
Router(config-if)# exit returns to global configuration
mode.

Configuring Static Routes


Static routes provide fixed routing paths through the network. They are manually configured on
the router. If the network topology changes, the static route must be updated with a new route.
Static routes are private routes unless they are redistributed by a routing protocol.
To configure static routes, perform these steps in global configuration mode.

SUMMARY STEPS
1. configure terminal
2. ip route prefix mask { ip-address | interface-type interface-number [ ip-address ]}
3. end

DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration
1 Example: mode.
Router# configure terminal
Step ip route prefix mask { ip-address | interface- Specifies the static route for the
2 type interface-number [ ip-address ]} IP packets.
Example:
Router(config)# ip route 192.168.1.0 255.255.0.0
10.10.10.2

Step end Exits router configuration


3 Example: mode, and enters privileged
Router(config)# end EXEC mode.

Example: Configuring Static Routes


In the following configuration example, the static route sends out all IP packets with a destination
IP address of 192.168.1.0 and a subnet mask of 255.255.255.0 on the Gigabit Ethernet interface to
another device with an IP address of 10.10.10.2. Specifically, the packets are sent to the configured
PVC.
You do not need to enter the command marked “(default).” This command appears automatically
in the configuration file generated when you use the show running-config command.

ip route 192.168.1.0 255.255.255.0 10.10.10.2


Configuring Dynamic Routes
In dynamic routing, the network protocol adjusts the path automatically, based on network traffic
or topology. Changes in dynamic routes are shared with other routers in the network.
The Cisco routers can use IP routing protocols, such as Routing Information Protocol (RIP) or
Enhanced Interior Gateway Routing Protocol (EIGRP), to learn routes dynamically. You can
configure either of these routing protocols on your router.
Configuring Routing Information Protocol
To configure the RIP routing protocol on the router, follow these steps, beginning in global
configuration mode.

SUMMARY STEPS
1. configure terminal
2. router rip
3. version { 1 | 2 }
4. network ip-address
5. no auto-summary
6. end

DETAILED STEPS

Command Task
Step configure terminal Enters global configuration
1 Example: mode.
Router> configure terminal
Step router rip Enters router configuration
2 Example: mode, and enables RIP on the
Router(config)# router rip router.
Step version { 1 | 2 } Specifies use of RIP version 1
3 Example: or 2.
Router(config-router)# version 2

Step network ip-address Specifies a list of networks on


4 Example: which RIP is to be applied,
Router(config-router)# network 192.168.1.1 using the address of the
network of each directly
connected network.
Step no auto-summary Disables automatic
5 Example: summarization of subnet routes
Router(config-router)# no auto-summary into network-level routes. This
allows subprefix routing
information to pass across
classful network boundaries.
Step end Exits router configuration
6 Example: mode, and enters privileged
Router(config-router)# end EXEC mode.
Example: RIP Configuration
The following configuration example shows RIP version 2 enabled in IP network 10.0.0.0 and
192.168.1.0.
To see this configuration, use the show running-config command from privileged EXEC mode.

Router# show running-config


router rip
version 2
network 10.0.0.0
network 192.168.1.0
no auto-summary

Configuring OSPF 1
OSPF’s basic configuration is very simple. Just like with other routing protocols covered so far
(RIP, EIGRP) first you need to enable OSPF on a router. This is done by using the router ospf
PROCESS-ID global configuration command. Next, you need to define on which interfaces OSPF
will run and what networks will be advertised. This is done by using the network IP_ADDRESS
WILDCARD_MASK AREA_ID command from the ospf configuration mode.
Let’s get started with some basic OSPF configuration. We will use the following network
topology:

First, we need to enable OSPF on both routers. Then we need to define what network will be
advertised in OSPF. This can be done by using the following sequence of commands on both
routers:

R1(config-router)#router ospf 1
R1(config-router)#network 10.0.1.0 0.0.0.255 area 0
R1(config-router)#network 172.16.0.0 0.0.255.255 area 0

R2(config-router)#router ospf 1
R2(config-router)#network 192.168.0.0 0.0.0.255 area 0
R2(config-router)#network 172.16.0.0 0.0.255.255 area 0

The network commands entered on both routers include subnets directly connected to both routers.
We can verify that the routers have become neighbors by typing the show ip ospf
neighbors command on either router:

You might also like