0% found this document useful (0 votes)
25 views41 pages

Chapter 3

These one very nice
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)
25 views41 pages

Chapter 3

These one very nice
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/ 41

Chapter Three

Routers

1. Router basic configuration

A Router is a computer, just like any other computer including a PC. Routers have many of the
same hardware and software components that are found in other computers including:

 CPU
 RAM
 ROM
 Operating System

1841 Integrated Services Router

Router is the basic backbone for the Internet. The main function of the router is to connect two or
more than two network and forwards the packet from one network to another. A router connects
multiple networks. This means that it has multiple interfaces that each belong to a different IP
network. When a router receives an IP packet on one interface, it determines which interface to
use to forward the packet onto its destination. The interface that the router uses to forward the
packet may be the network of the final destination of the packet (the network with the destination
IP address of this packet), or it may be a network connected to another router that is used to
reach the destination network. A router uses IP to forward packets from the source network to
the destination network. The packets must include an identifier for both the source and
destination networks. A router uses the IP address of the destination network to deliver a packet
to the correct network. When the packet arrives at a router connected to the destination network,
the router uses the IP address to locate the specific computer on the network.
A router uses IP to forward packets from the source network to the destination network. The
packets must include an identifier for both the source and destination networks. A router uses the
IP address of the destination network to deliver a packet to the correct network. When the packet
arrives at a router connected to the destination network, the router uses the IP address to locate
the specific computer on the network.

Routing and Routing Protocols

The primary responsibility of a router is to direct packets destined for local and remote networks
by:

 Determining the best path to send packets


 Forwarding packets toward their destination

The router uses its routing table to determine the best path to forward the packet. When the
router receives a packet, it examines its destination IP address and searches for the best match
with a network address in the router’s routing table. The routing table also includes the interface
to be used to forward the packet. Once a match is found, the router encapsulates the IP packet
into the data link frame

2. Static routing

Static routes are configured manually, network administrators must add and delete static routes
to reflect any network topology changes. In a large network, the manual maintenance of routing
tables could require a lot of administrative time. On small networks with few possible changes,
static routes require very little maintenance. Static routing is not as scalable as dynamic routing
because of the extra administrative requirements. Even in large networks, static routes that are
intended to accomplish a specific purpose are often configured in conjunction with a dynamic
routing protocol.

When to use static Routing

A network consists of only a few routers. Using a dynamic routing protocol in such a case does
not present any substantial benefit. On the contrary, dynamic routing may add more
administrative overhead.

A network is connected to the Internet only through a single ISP. There is no need to use a
dynamic routing protocol across this link because the ISP represents the only exit point to the
Internet.

A large network is configured in a hub-and-spoke topology. A hub-and-spoke topology consists


of a central location (the hub) and multiple branch locations (spokes), with each spoke having
only one connection to the hub. Using dynamic routing would be unnecessary because each
branch has only one path to a given destination through the central location.
Connected Routes

Those network that are directly connected to the Router are called connected routes and are not
needed to configure on the router for routing. They are automatically routed by the Router.

Dynamic Routes: Dynamic routing protocol uses a route that a routing protocol adjusts
automatically for topology or traffic changes. Non-adaptive routing algorithm When a ROUTER
uses a non-adaptive routing algorithm it consults a static table in order to determine to which
computer it should send a PACKET of data. This is in contrast to an ADAPTIVE ROUTING
ALGORITHM, which bases its decisions on data which reflects current traffic conditions (Also
called static route) adaptive routing algorithm When a ROUTER uses an adaptive routing
algorithm to decide the next computer to which to transfer a PACKET of data, it examines the
traffic conditions in order to determine a route which is as near optimal as possible. For example,
it tries to pick a route, which involves communication lines which have light traffic. This
strategy is in contrast to a NON-ADAPTIVE ROUTING ALGORITHM. (Also called Dynamic
route)

3. Dynamic routing

Dynamic routing is a technique in which a router learns about routing information without an
administrator’s help and adds the best route to its routing table. A router running a dynamic
routing protocol adds the best route to its routing table and can also determine another path if the
primary route goes down. Also a networking technique provides optimal data routing. Unlike
static routing, dynamic routing enables routers to select paths according to real-time logical
network layout changes

At the dynamic routing section, we will discuss the implementation of RIPv1, RIPv2, EIGRP,
and Single-Area OSPF.

4. Routing protocols matrix

Routing Protocol:

A routing protocol is the communication used between routers. A routing protocol allows routers
to share information about networks and their proximity to each other. Routers use this
information to build and maintain routing tables. Autonomous System: An AS is a collection of
networks under a common administration that share a common routing strategy. To the outside
world, an AS is viewed as a single entity. The AS may be run by one or more operators while it
presents a consistent view of routing to the external world.

The American Registry of Internet Numbers (ARIN), a service provider, or an administrator


assigns a 16- bit identification number to each AS.
IGP vs Routing Protocols

Dynamic Routing Protocol:

1. Interior Gateway protocol (IGP)

I. Distance Vector Protocol

II. Link State Protocol

2. Exterior Gateway Protocol (EGP)

Interior gateway protocol (IGP): Within one Autonomous System.

Exterior Routing Protocol (EGP): Between the Autonomous System. Example BGP (Boarder
gateway protocol).

Metric:

There are cases when a routing protocol learns of more than one route to the same destination.
To select the best path, the routing protocol must be able to evaluate and differentiate between
the available paths. For this purpose a metric is used. A metric is a value used by routing
protocols to assign costs to reach remote networks. The metric is used to determine which path is
most preferable when there are multiple paths to the same remote network. Each routing protocol
uses its own metric. For example, RIP uses hop count, EIGRP uses a combination of bandwidth
and delay, and Cisco’s implementation of OSPF uses bandwidth.
Viewing the Default Configuration

When you first boot up your Cisco router, some basic configuration has already been performed.
All of the LAN and WAN interfaces have been created, console and VTY ports are configured,
and the inside interface for Network Address Translation has been assigned. Use the show
running-config command to view the initial configuration.

Router# show running-config

Information Needed for Configuration

You need to gather some or all of the following information, depending on your planned network
scenario, prior to configuring your network

 If you are setting up an Internet connection, gather the following information:


 Point-to-Point Protocol (PPP) client name that is assigned as your login name
 PPP authentication type: Challenge Handshake Authentication Protocol (CHAP) or
Password Authentication Protocol (PAP)
 PPP password to access your Internet service provider (ISP) account
 DNS server IP address and default gateways
 If you are setting up a connection to a corporate network, you and the network
administrator must generate and share the following information for the WAN interfaces
of the routers:
 PPP authentication type: CHAP or PAP
 PPP client name to access the router
 PPP password to access the router
 If you are setting up IP routing:
 Generate the addressing scheme for your IP network.
 Determine the IP routing parameter information, including IP address, and ATM
permanent virtual circuits (PVCs). These PVC parameters are typically virtual path
identifier (VPI), virtual circuit identifier (VCI), and traffic shaping parameters.
 Determine the number of PVCs that your service provider has given you, along
with their VPIs and VCIs. – For each PVC determine the type of AAL5
encapsulation supported. It can be one of the following: AAL5SNAP
 This can be either routed RFC 1483 or bridged RFC 1483. For routed RFC 1483,
the service provider must provide you with a static IP address. For bridged RFC
1483, you may use DHCP to obtain your IP address, or you may obtain a static IP
address from your service provider. AAL5MUX PPP
 With this type of encapsulation, you need to determine the PPP-related
configuration items.
 If you plan to connect over an ADSL or G.SHDSL line: – Order the appropriate line from
your public telephone service provider. For ADSL lines—ensure that the ADSL signaling
type is DMT (also called ANSI T1.413) or DMT Issue 2. For G.SHDSL lines—Verify
that the G.SHDSL line conforms to the ITU G.991.2 standard and supports Annex A
(North America) or Annex B (Europe). Once you have collected the appropriate
information, you can perform a full configuration on your router, beginning with the
tasks in the “Configuring Basic Parameters” section.

Configure Global Parameters

Perform these steps to configure selected global parameters for your router:

For complete information on the global parameter commands

Configure Fast Ethernet LAN Interfaces

The Fast Ethernet LAN interfaces on your router are automatically configured as part of the
default VLAN and as such, they are not configured with individual addresses. Access is afforded
through the VLAN. You may assign the interfaces to other VLANs if desired.
Configure WAN Interfaces

The Cisco 851 and Cisco 871 routers each have one Fast Ethernet interface for WAN connection.
The Cisco 857, Cisco 877, and Cisco 878 routers each have one ATM interface for WAN
connection. Based on the router model you have, configure the WAN interface(s) using one of
the following procedures:

 Configure the Fast Ethernet WAN Interface


 Configure the ATM WAN Interface

Configure the Fast Ethernet WAN Interface

This procedure applies only to the Cisco 851 and Cisco 871 router models. Perform these steps
to configure the Fast Ethernet interface, beginning in global configuration mode:

Configure the Fast Ethernet WAN Interface


Configure the ATM WAN Interface

This procedure applies only to the Cisco 857, Cisco 876, Cisco 877 and Cisco 878 models.
Perform these steps to configure the ATM interface, beginning in global configuration mode:

Configure the ATM WAN Interface


Configuring a Loopback Interface

The loopback interface acts as a placeholder for the static IP address and provides default routing
information

Configuring a Loopback Interface

Configuration Example

The loopback interface in this sample configuration is used to support Network Address
Translation (NAT) on the virtual-template interface. This configuration example shows the
loopback interface configured on the Fast Ethernet interface with an IP address of
10.10.10.100/24, which acts as a static IP address. The loopback interface points back to virtual-
template1, which has a negotiated IP address.

interface loopback 0

ip address 10.10.10.100 255.255.255.0 (static IP address)

ip nat outside
!

interface Virtual-Template1

ip unnumbered loopback0

no ip directed-broadcast

ip nat outside

Verifying Your Configuration

To verify that you have properly configured the loopback interface, enter the show interface
loopback command. You should see verification output similar to the following example.

Router# show interface loopback 0

Configuring Command-Line Access to the Router

Perform these steps to configure parameters to control access to the router, beginning in global
configuration mode.
Configuring Command-Line Access to the Router

Configuration Example

The following configuration shows the command-line access commands. You do not need to
input the commands marked “default.” These commands appear automatically in the
configuration file generated when you use the show running-config command.

line con 0

exec-timeout 10 0

password 4youreyesonly

login

transport input none (default)

stopbits 1 (default)

line vty 0 4

password secret

login
!

5. RIP

Routing Information Protocol (RIP) is a distance-vector routing protocol. Routers running the
distance-vector protocol send all or a portion of their routing tables in routing-update messages
to their neighbors. You can use RIP to configure the hosts as part of a RIP network. This type of
routing requires little maintenance and also automatically reconfigures routing tables when your
network changes or network communication stops. RIPv2 was added to the System product so
you can send and receive RIP packets to update routes throughout your network.

In the following figure, a static route is added to the central system (AS1) that describes the
connection to the network 10.1.1.x by way of AS2. This is a static route (added by your network
administrator) with route redistribution set to yes. This setting causes this route to be shared with
other routers and systems so that when they have traffic for 10.1.1.x, they route the traffic to
your central System i platform (AS1). AS2 has the routed system started so that it sends and
receives RIP information. In this example, AS1 is sending the message that AS2 has a direct
connection to 10.1.2.x.

The following process describes the routing of traffic in the preceding figure.

 AS1 receives this RIP packet from AS2 and processes it. If AS1 does not have a route to
10.1.2.x, it will store this route. If it does have a path to 10.1.2.x that is the same number
of hops or fewer, it will discard this new route information. In this example, AS1 keeps
the route data.
 AS1 receives information from R1 with route information to 10.1.5.x. AS1 keeps this
route information.
 AS1 receives information from R2 with route information to 10.1.3.x. AS1 keeps this
route information.
 The next time AS1 sends RIP messages, it will send information to R1 that describes all
the connections AS1 knows about that R1 might not know about. AS1 sends route
information about 10.1.1.x, 10.1.2.x, and 10.1.3.x. AS1 does not send information about
10.1.4.x to R1 because AS1 knows that R1 is connected to 10.1.4.x and does not need a
route. Similar information is sent to R2 and AS3.

How to Configure RIPv1 and RIPv2 in Cisco Routers

When would you need this: When you need to implement a routing protocol for a small network
and you need the configuration to be simple. Routing Information Protocol is the simplest that it
can get.

Special Requirements: None.

1. The first thing to do is to enable the RIP protocol on the router: Router(config)#router rip
2. Identify the networks to be advertised using the ‘network’ command. Using this
command, you need to identify only the networks that are directly connected to the
router: Router(config-router)#network network-id If the network is sub netted, you will
need to write the main network address without the need to write the subnets. For
example, if you have the following subnets connected to the router (172.16.0.0/24,
172.16.1.0/24, and 172.16.2.0/24), you can put them all in single ‘network’ command
like this: Router(config router) #network 172.16.0.0. The router is intelligent enough to
figure out which subnets are connected to the router.
3. If you need to adjust the timers (update, invalid, hold down, and flush timers), use the
‘timers basic’ command. All the four parameters of this command, update, invalid, hold
down, and flush timer consecutively, are in seconds: Router (config-router)#timers basic
30 180 180 240 The example above is set with the default values of the RIP timers.
Remember to keep the relativity of the timer values. Always keep it as (n 6n 6n 8n). If,
for example, you set the update timer to 40, you need to make the other timers 240 240
320 consecutively. It is highly recommended that you keep the timers on their default
values.
4. You will need to stop the updates from being broadcasted to the Internet, if one of the
router interfaces is connected to the Internet. For this purpose, use the ‘passive interface’
command. This command prevents the interface from forwarding any RIP broadcasts, but
keeps the interface listening to what others are saying in RIP. Router (config
router)#passive-interface interface-type interface-number where interface-type is the type
of the interface, such as Serial, Fast Ethernet, or Ethernet. Interface-number is the number
of the interface such as 0/0 or 0/1/0
5. RIP, by nature, sends updates as broadcast. If the router is connected through non-
broadcast networks (like Frame Relay), you will need to tell RIP to send the updates on
this network as unicast. This is achieved by the ‘neighbor’ command: Router (config-
router)#neighbor neighbor-address where neighbor-address is the IP address of the
neighbor.
6. Cisco’s implementation of RIP Version 2 supports authentication, key management, route
summarization, classless inter-domain routing (CIDR), and variable-length subnet masks
(VLSMs). By default, the router receives RIP Version 1 and Version 2 packets, but sends
only Version 1 packets. You can configure the router to receive and send only Version 2
packets. To do so, use the ‘version’ command: Router (config-router)#version 2 If you
like to stick to version one, just replace the 2 in the command above with 1. Furthermore,
you can control the versions of the updates sent and received on each interface to have
more flexibility in support of both versions. This is achieved by the ‘ip rip send version’
and ‘ip rip receive version’ commands:
Router (config-if)#ip rip send version 2
Router (config-if)#ip rip receive version 1
7. Check the RIP configuration using these commands:
Router#show ip route
Router#show ip protocols
Router#debug ip rip

8. IGRP

How to Configure IGRP (Interior Gateway Routing Protocol)

Interior Gateway Routing Protocol (IGRP) is a distance vector interior routing protocol (IGP)
invented by Cisco. It is used by routers to exchange routing data within an autonomous system.
IGRP is a proprietary protocol. IGRP was created in part to overcome the limitations of RIP
(maximum hop count of only 15, and a single routing metric) when used within large networks.

IGRP supports multiple metrics for each route, including bandwidth, delay, load, MTU, and
reliability; to compare two routes these metrics are combined together into a single metric, using
a formula which can be adjusted through the use of pre-set constants. The maximum hop count
of IGRP-routed packets is 255 (default 100), and routing updates are broadcast every 90 seconds
(by default).

IGRP is considered a classful routing protocol. Because the protocol has no field for a subnet
mask, the router assumes that all sub network addresses within the same Class A, Class B, or
Class C network have the same subnet mask as the subnet mask configured for the interfaces in
question. This contrasts with classless routing protocols that can use variable length subnet
masks. Classful protocols have become less popular as they are wasteful of IP address space.

In order to address the issues of address space and other factors, Cisco created EIGRP (Enhanced
Interior Gateway Routing Protocol). EIGRP adds support for VLSM (variable length subnet
mask) and adds the Diffusing Update Algorithm (DUAL) in order to improve routing and
provide a loopless environment. EIGRP has completely replaced IGRP, making IGRP an
obsolete routing protocol. In Cisco IOS versions 12.3 and greater, IGRP is completely
unsupported. In the new Cisco CCNA curriculum (version 4), IGRP is mentioned only briefly, as
an “obsolete protocol”.

The IGRP protocol allows a number of gateways to coordinate their routing. Its goals are the
following:

 Stable routing even in very large or complex networks. No routing loops should occur,
even as transients.
 Fast response to changes in network topology.
 Low overhead. That is, IGRP itself should not use more bandwidth than what is actually
needed for its task.
 Splitting traffic among several parallel routes when they are of roughly equal desirability
 Taking into account error rates and level of traffic on different paths.

A very simple configuration of IGRP can be:

Router A

RouterA# conf t

RouterA(config)# interface eth0

RouterA(config-if)# ip address 70.0.0.1 255.0.0.0

RouterA(config-if)# exit

RouterA(config)# interface serial0

RouterA(config-if)# ip address 20.30.40.2 255.255.255.252

RouterA(config-if)# exit

RouterA(config)# router igrp 1

RouterA(config-router)# redistribute connected

RouterA(config-router)# network 20.0.0.0

RouterA(config-router)# network 70.0.0.0

RouterA(config-router)# network 71.0.0.0


Router B

RouterB# conf t

RouterB(config)# interface eth0

RouterB(config-if)# ip address 71.0.0.1 255.0.0.0

RouterB(config-if)# exit

RouterB(config)# interface serial0

RouterA(config-if)# ip address 20.30.40.1 255.255.255.252

RouterA(config-if)# exit (config)# router igrp 1

RouterA(config-router)# redistribute connected

RouterA(config-router)# network 20.0.0.0

RouterA(config-router)# network 70.0.0.0

RouterA(config-router)# network 71.0.0.0

A few other commands might come in useful. Variance 2 can be used to configure IGRP to load
balance between equal cost paths. The command passive-interface eth0 disables IGRP from
sending updates out of eth0.

Testing

router# debug ip igrp events

Only shows the sending or receiving of IGRP packets and the number of routes in each update. It
does show the routes that are advertised!

router# debug ip igrp transactions

Sames as debug ip igrp events but also shows the routes that are advertised.

router# show ip route

As with debugging any routing problem, look at the routing table. Is there a static route that takes
precendece?

router# show ip interface brief

This command is always useful to quickly verify which links are and which aren’t.
9. EIGRP

Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary, scalable, classless


routing protocol commonly used in small-to-large internetworks. It offers significant advantages
over RIP and IGRP, and in some cases over OSPF, as well.

EIGRP neighbors find one another using EIGRP “Hello” packets, which are sent to 224.0.0.10 (a
Class “D” link-local multicast address). When a new neighbor is found, the two neighbors
exchange routing information via EIGRP “Update” packets. Like a standard D-V protocol this
information is made up of routing table entries, but unlike a standard D-V protocol EIGRP
“Ack” packets are used to acknowledge the updates. Once the neighbors exchange routing
information, they only receive updates when routing table changes occur, and the neighbor
relationship is maintained with periodic “Hello” packets.

When a neighbor gives routing information, the receiving router places the information in its
EIGRP “topology table”, which is stored in RAM and is a compilation of the neighbors’ routing
tables. Then the router determines the best next hop for each known destination with the
Diffusing Update Algorithm (DUAL) which it places in its own routing table.

How to Configure EIGRP on a Cisco Router

When would you need this: When you are implementing a routing protocol on a large
Internetwork and all the networking devices involved are Cisco devices or devices supporting
EIGRP.

Special Requirements: EIGRP is a Cisco proprietary protocol. So, either all the routers in the
Internetwork must be Cisco routers, or the routers should be EIGRP capable.

Before we start, if you have not set the bandwidth of the interfaces, set them now. For correct
routing decisions, you need to set the bandwidth for the serial interfaces depending on the WAN
technologies that you are using. This is done using the following command on each serial
interface:

Router (config-if) #bandwidth bandwidth

Where bandwidth is the bandwidth of the WAN connection in kilobits per second.

Next, you can start configuring EIGRP as in the following steps:

1. Enable EIGRP on the router with the command, Router (config)#router eigrp
autonomous-system where autonomous-system is the autonomous system number. The
same autonomous-system number must be used for all the routers that you want to
exchange routing information.
2. Instruct the router to advertise the networks that are directly connected to it. Router
(config-router) #network network-address where network-address is the network address
of a network that is directly connected to the router. Repeat this step for each network
that is directly connected to the specific router that you are configuring. For sub netted
networks, remember that you need only to write the original network address of a group
of subnets and the router will automatically identify the subnets. For example, if the
router is connected to the networks, 172.16.1.0/24, 172.16.2.0/24, and 172.16.3.0/24, you
will need to do one ‘network’ command with the address 172.16.0.0.
3. By default, EIGRP packets consume a maximum of 50% of the link bandwidth, as
configured with the ‘bandwidth’ interface configuration command. You might want to
change that value if a different level of link utilization is required or if the configured
bandwidth does not match the actual link bandwidth (it may have been configured to
influence route metric calculations). Use the following command to set the percentage of
bandwidth to be used on each interface separately:

Router (config-if) #ip bandwidth-percent eigrp bandwidth percentage

Where bandwidth-percentage is the percentage of bandwidth to be used

4. You can change the intervals of the hello packets and the hold down timer on each
interface using command:

Router (config-if) #ip hello-interval eigrp autonomous system timer where autonomous-
system is the autonomous system number and time is the new hello packet interval time
in seconds. Router (config-if) #ip hold-time eigrp autonomous-system time

Where autonomous-system is the autonomous system number and time is the new hold
down time in seconds.

5. Check your configuration on the routers after configuring all the routers in the
internetwork using the following commands: To display information about interfaces
configured for EIGRP.

Router #show ip eigrp interfaces interface-type autonomous-system Display the EIGRP


discovered neighbors.

Router #show ip eigrp neighbors to display the EIGRP topology table for a given process.

Router #show ip eigrp topology autonomous-system

Or

Router #show ip eigrp topology network-address subnet mask To display the number of
packets sent and received for all or a specified EIGRP process. Router #show ip
eigrp traffic autonomous-system where interface-type is the interface type. Autonomous-
system autonomous system number. Network-address and subnet mask are the network
address and subnet mask.

EIGRP Implementation Notes

1. If you are using discontinuous networks, which is mostly the case, you should turn off
auto-summarization using the following command: Router (config)#no ip auto-summary.
2. You can set manual summary addresses using the following command: Router (config-
if)#ip eigrp summary address autonomous system summarized-network summary-subnet
mask where autonomous-system is the autonomous system number and summarized
summarized-network is the network address expressing the summary of multiple
networks. Summary-subnet mask is the subnet mask for the summarized address.
3. When you are using non-broadcast networking technologies such as Frame Relay and
SMDS, you will need to turn off split-horizon to let EIGRP perform efficiently and
effectively.

Router (config-if)#no ip split-horizon autonomous-system where autonomous-system is


the autonomous system number.

4. To clear the neighbour table, use the command:

Router#clear ip eigrp neighbors

10. OSPF

The OSPF (Open Shortest Path First) protocol is one of a family of IP Routing protocols, and is
an Interior Gateway Protocol (IGP) for the Internet, used to distribute IP routing information
throughout a single Autonomous System (AS) in an IP network.

The OSPF protocol is a link-state routing protocol, which means that the routers exchange
topology information with their nearest neighbors. The topology information is flooded
throughout the AS, so that every router within the AS has a complete picture of the topology of
the AS. This picture is then used to calculate end-to-end paths through the AS, normally using a
variant of the Dijkstra algorithm. Therefore, in a link-state routing protocol, the next hop address
to which data is forwarded is determined by choosing the best end-to-end path to the eventual
destination.

The main advantage of a link state routing protocol like OSPF is that the complete knowledge of
topology allows routers to calculate routes that satisfy particular criteria. This can be useful for
traffic engineering purposes, where routes can be constrained to meet particular quality of
service requirements. The main disadvantage of a link state routing protocol is that it does not
scale well as more routers are added to the routing domain. Increasing the number of routers
increases the size and frequency of the topology updates, and also the length of time it takes to
calculate end-to-end routes. This lack of scalability means that a link state routing protocol is
unsuitable for routing across the Internet at large, which is the reason why IGPs only route traffic
within a single AS.

Each OSPF router distributes information about its local state (usable interfaces and reachable
neighbors, and the cost of using each interface) to other routers using a Link State Advertisement
(LSA) message. Each router uses the received messages to build up an identical database that
describes the topology of the AS.

From this database, each router calculates its own routing table using a Shortest Path First (SPF)
or Dijkstra algorithm. This routing table contains all the destinations the routing protocol knows
about, associated with a next hop IP address and outgoing interface.

 The protocol recalculates routes when network topology changes, using the Dijkstra
algorithm, and minimizes the routing protocol traffic that it generates.
 It provides support for multiple paths of equal cost.
 It provides a multi-level hierarchy (two-level for OSPF) called "area routing," so that
information about the topology within a defined area of the AS is hidden from routers
outside this area. This enables an additional level of routing protection and a reduction in
routing protocol traffic.
 All protocol exchanges can be authenticated so that only trusted routers can join in the
routing exchanges for the AS.

When would you need this: When you need to set up dynamic routing with Cisco and non-Cisco
routers?

Special Requirements: None.

OSPF is one of the most widely used dynamic routing protocols. Cisco’s version of OSPF is
compatible with non-Cisco routers. Single-area OSPF is suitable for small-to-medium
internetworks. An area is a logical grouping of routers running OSPF. All routers in the same
area share the same topology database. Multiple-Area OSPF is used for large networks to
prevent their topology databases from becoming out of the capability of the router. Single-area
OSPF configuration is as follows:

 Since OSPF best route calculations rely solely on bandwidth, you need to set up the
bandwidth of the serial interface involved in the routing process using the following
command on the interface: Router(config-if)#bandwidth bandwidth Where: bandwidth is
the bandwidth of the connection in kilobits per second. Remember that this command
does not change the actual bandwidth. It only changes the bandwidth value being used by
the routing protocol for the purpose of best path calculation.
 Instruct the router to activate the OSPF routing process: Router (config)#router ospf
process-number Where: process-number is the process number of OSPF. This process
number is of local significance. It does not have to be the same on all routers.
 Instruct the router to advertise the directly connected networks: Router(config-
router)#network network-address wildcard mask area 0 Where: network-address is the
network address of a directly connected network. Wildcard-mask is the wildcard mask of
the network address. Since we are setting a single-area OSPF, we will always use ‘area
0’.
 Repeat step 3 for every network that is directly connected to the router. If you finished
the first four steps on all the routers involved in the process, everything should work just
fine.

If you want to do more configurations, there are a few optional advanced steps to go through:

 To change the selection process of the DR (Designated Router) and BDR (Backup
Designated Router), use the following command to change the router’s OSPF priority on
a certain interface: Router(config)#ip ospf priority priority Where: priority is the priority
(0–255). The router with the highest priority becomes the DR. A priority of 0 means that
this router will never be elected as DR.
 To restart the whole process of DR and BDR elections, use the command: Router#clear
ip ospf process *
 To change the cost of a certain link in the OSPF process, use the following command:
Router(config-if)#ip ospf cost suggested-cost Where: CC is the suggested cost (0–65,
535).

For troubleshooting, you can use the following commands:

 To show the OSPF processes information: Router#show ip ospf


 To show the OSPF database of the topology: Router#show ip ospf database
 To show the OSPF operation on the interfaces: Router#show ip ospf interface
 To show the OSPF neighbors table: Router#show ip ospf neighbor
 To debug all the OSPF process events: Router#debug ip ospf events

How to Configure Single-Area OSPFv3 for IPv6 on a Cisco Router

When would you need this: When you need to set up dynamic routing with Cisco and non-Cisco
routers Special Requirements: None.

 Enable IPv6 routing on the router: Router (config)#ipv6 unicast-routing


 Since OSPF best route calculations rely solely on bandwidth, you need to set up the
bandwidth of the serial interface involved in the routing process using the following
command on the interface: Router(config-if)#bandwidth bandwidth Where: bandwidth is
the bandwidth of the connection in kilobits per second. Remember that this command
does not change the actual bandwidth. It only changes the bandwidth value being used by
the routing protocol for the purpose of best path calculation.
 Instruct the router to activate the OSPF routing process: Router(config)#ipv6 router ospf
process-number Where process-number is the process number of OSPF. This process
number is of local significance. It does not have to be the same on all routers.
 Enable OSFP process on each interface you want to participate in the OSPF process:

Router(config)#interface interface-type interface number

Router(config-if)#ipv6 enable

Router(config-if)#ipv6 ospf process-number Area 0 Where interface-type and interface-


number are the type and number of the interface. Process-number is the process number of OSPF
identified in step 3. Since we are setting a single-area OSPF, we will always use ‘area 0’. Using
the ‘ipv6 enable’ command will inform the router to create a link-local IPv6 address for this
interface. If you want to use a different IPv6 address, you can use the following command
instead of ‘ipv6 enable’:

Router(config-if)#ipv6 address ipv6-address/prefix length

Where ipv6-address is the IPv6 address you want to assign to this interface. Prefix-length is the
prefix length for the IPv6 address.

 Repeat step 4 for every network that is directly connected to the router. If you finished
the first four steps on all the routers involved in the process, everything should work just
fine.

If you want to do more configurations, there are a few optional advanced steps to go through:

 To change the selection process of the DR (Designated Router) and BDR (Backup
Designated Router), use the following command to change the router’s OSPF priority on
a certain interface: Router(config)#ipv6 ospf priority priority where priority is the priority
(0–255). The router with the highest priority becomes the DR. A priority of 0 means that
this router will never be elected as DR.
 To restart the whole process of DR and BDR elections, use the command: Router#clear
ipv6 ospf process *
 To change the cost of a certain link in the OSPF process, use the following command:
Router(config-if)#ipv6 ospf cost suggested-cost

Where CC is the suggested cost (0–65,535) For troubleshooting, you can use the following
commands:

 To show the OSPF processes information: Router#show ipv6 ospf


 To show the OSPF database of the topology: Router#show ipv6 ospf database
 To show the OSPF operation on the interfaces: Router#show ipv6 ospf interface
 To show the OSPF neighbors table: Router#show ipv6 ospf neighbor
 To debug all the OSPF process events: Router#debug ipv6 ospf events

11. DHCP

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically


provides an Internet Protocol (IP) host with its IP address and other related configuration
information such as the subnet mask and default gateway. RFCs 2131 and 2132 define DHCP as
an Internet Engineering Task Force (IETF) standard based on Bootstrap Protocol (BOOTP), a
protocol with which DHCP shares many implementation details. DHCP allows hosts to obtain
required TCP/IP configuration information from a DHCP server. Windows Server 2016 includes
DHCP Server, which is an optional networking server role that you can deploy on your network
to lease IP addresses and other information to DHCP clients. All Windows-based client operating
systems include the DHCP client as part of TCP/IP, and DHCP client is enabled by default.

Every device on a TCP/IP-based network must have a unique unicast IP address to access the
network and its resources. Without DHCP, IP addresses for new computers or computers that are
moved from one subnet to another must be configured manually; IP addresses for computers that
are removed from the network must be manually reclaimed. With DHCP, this entire process is
automated and managed centrally. The DHCP server maintains a pool of IP addresses and leases
an address to any DHCP-enabled client when it starts up on the network. Because the IP
addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in
use are automatically returned to the pool for reallocation.

The network administrator establishes DHCP servers that maintain TCP/IP configuration
information and provide address configuration to DHCP-enabled clients in the form of a lease
offer. The DHCP server stores the configuration information in a database that includes:

 Valid TCP/IP configuration parameters for all clients on the network.


 Valid IP addresses, maintained in a pool for assignment to clients, as well as excluded
addresses.
 Reserved IP addresses associated with particular DHCP clients. This allows consistent
assignment of a single IP address to a single DHCP client.
 The lease duration, or the length of time for which the IP address can be used before a
lease renewal is required.

A DHCP-enabled client, upon accepting a lease offer, receives:

 A valid IP address for the subnet to which it is connecting.


 Requested DHCP options, which are additional parameters that a DHCP server is
configured to assign to clients. Some examples of DHCP options are Router (default
gateway), DNS Servers, and DNS Domain Name.

Benefits of DHCP

DHCP provides the following benefits.

 Reliable IP address configuration. DHCP minimizes configuration errors caused by


manual IP address configuration, such as typographical errors, or address conflicts caused
by the assignment of an IP address to more than one computer at the same time.
 Reduced network administration. DHCP includes the following features to reduce
network administration:
 Centralized and automated TCP/IP configuration.
 The ability to define TCP/IP configurations from a central location.
 The ability to assign a full range of additional TCP/IP configuration values by
means of DHCP options.
 The efficient handling of IP address changes for clients that must be updated
frequently, such as those for portable devices that move to different locations on a
wireless network.
 The forwarding of initial DHCP messages by using a DHCP relay agent, which
eliminates the need for a DHCP server on every subnet.

How to Configure a Cisco Router as a DHCP Client

When would you need this: When your ISP gives you a dynamic IP address upon each
connection or you need to configure the router to obtain its interface IP address automatically.
Special Requirements: None.

This is done using a single command:

Router(config-if)#ip address dhcp Some service providers might ask you to use a client-id and/or
a hostname of their own choice. This can be done by adding the following parameters to the
command above:

Router(config-if)#ip address dhcp client-id interfacename hostname hostname

Where interface-name is the interface name that will be used for the client-id and hostname is the
hostname that will be used for the DHCP binding. This hostname can be different from the one
that was set for the router in the global configuration. You can use both of these parameters, one
of them, or none of them.

How to Configure a Cisco Router as a DHCP Server


When would you need this: When using the router as a DHCP server to provide IP addresses and
related information to DHCP clients.

Special Requirements: DHCP server software is supported for these series: 800, 1000, 1400,
1600, 1700 series (support for the Cisco 1700 series was added in Cisco IOS Release 12.0[2]T),
2500, 2600, 3600, 3800, MC3810, 4000, AS5100, AS5200, AS5300, 7000, 7100, 7200, MGX
8800 with an installed Route Processor Module, 12000, uBR900, uBR7200, Catalyst 5000
family switches with an installed Route Switch Module, Catalyst 6000 family switches with an
installed MultiLayer Switch Feature Card, and Catalyst 8500.

The configuration steps are as follows:

 Define the DHCP address pool:


Router(config)#ip dhcp pool dhcp-pool-name
Router(dhcp-config)#network network-address subnetmask
Where dhcp-pool-name is the DHCP pool name, network-address is the network address
to be used by the DHCP pool, and subnetmask is the subnet mask for the network. You
can replace the subnet mask by (/prefix) to provide the subnet mask.
 Configure the parameters to be sent to the client:
Router(dhcp-config)#dns-server dns-server-address
To provide the DNS server IP address:
Router(dhcp-config)#default-router default-gateway address
To provide the IP address of the default-gateway, which is usually the IP address of the
router interface connected to the network.
Router(dhcp-config)#domain-name domain
To provide the name of the domain of the network (if in a domain environment):
Router(dhcp-config)#netbios-name-server netbios-server address
To provide the IP address of the NetBIOS name server:
Router(dhcp-config)#lease days hours minutes
To define the lease time of the addresses given to the client. You can make it
infinite, which is not advised, by using this command instead
Router(dhcp-config)#lease infinite
There is a large group of settings that you can configure to be sent to the clients and I
have only mentioned the most frequently used.
 Configure the IP addresses to be excluded from the pool. This is usually done to avoid
the conflicts caused by the DHCP with servers and printers. Remember to give all servers
and network printers’ static IP addresses in the same range of the DHCP pool. Afterward,
exclude these addresses from the pool to avoid conflicts.
Router(config)#ip dhcp excluded-address excluded-ipaddress Use the command in the
previous form to exclude a single address. You can repeat it as many times as you see fit
for the IP addresses you want to exclude. You can also use the same command to exclude
a range of IP addresses all in a single command:
Router(config)#ip dhcp excluded-address start-ip-address end-ip-address
Where start-ip-address is the first address in the range to be excluded from the pool and
end-ip-address is the last excluded address in the range.
 Enable the DHCP service in the router:
Router(config)#service dhcp
To disable it, use Router(config)#no service dhcp
Usually, the DHCP service is enabled by default on your router
 Use the following commands to check the DHCP operation on the router:
Router#show ip dhcp binding
This command shows the current bindings of addresses given to clients.
Router#show ip dhcp server statistics
This command shows the DHCP server statistics.
Router#debug ip dhcp server
This debug command is used to troubleshoot DHCP issues.

Implementation notes:

 You can create a DHCP database agent that stores the DHCP binding database. A DHCP
database agent is any host; for example, an FTP, TFTP, or RCP server that stores the
DHCP bindings’ database. You can configure multiple DHCP database agents, and you
can configure the interval between database updates and transfers for each agent. To
configure a database agent and database agent parameters, use the following command in
global configuration mode:

Router(config)#ip dhcp database URL [timeout seconds | write-delay seconds]

An example URL is this ftp://user:[email protected]/router-dhcp

If you choose not to configure a DHCP database agent, disable the recording of DHCP address
conflicts on the DHCP server. To disable DHCP address conflict logging, use the following
command in global configuration mode:

Router(config)#no ip dhcp conflict logging

 DHCP service uses port 67 and 68. So, if you are using a firewall, remember to open
these ports. To clear DHCP server variables, use the following commands as needed:

Router#clear ip dhcp server statistics

Router#clear ip dhcp binding *

If you want to clear a certain binding not all of them, replace the * in the previous command with
the IP address to be cleared.
How to Configure a Cisco Router as a DHCP Server for IPv6

When would you need this: When using the router as a DHCP server to provide IPv6 in stateless
and stateful configuration of DHCPv6.

Special Requirements: DHCPv6 support in IOS.

 Create the DHCP pool:


Router(config)#ipv6 dhcp pool pool-name
 Configure the parameters you want to pass to the clients:
Router(config-dhcp)#dns-server server-ipv6-address
Router(config-dhcp)#domain-name domain
 If you are working on a stateless address auto-configuration scenario, skip the next two
steps and jump to 6.
 Configure the IPv6 address prefix:
Router(config-dhcp)#address prefix ipv6-address-prefix
Where the ipv6-address-prefix is the 64-bit hexadecimal network address prefix.
 An optional step is to set up a link address prefix: Router(config-dhcp)#link-address
ipv6-link-prefix
 Enable DHCPv6 on the interface you want to be part of the DHCP process and assign a
specific pool to the interface:
Router(config-if)#ipv6 dhcp server pool-name
 Check the address leases (in stateful addressing only):
Router#show ipv6 dhcp lease

12. NAT and PAT

Network Address Translation (NAT)

NAT is used to convert a private IP address into a public IP address and also a public IP address
into a private IP address. We use NAT due to the shortage of IP addresses. IP Version 4 is a 32-
bit address and it has almost 4.3 billion IP addresses, but the population of the world is much
higher and it is approximately about 7.8 billion as of the latest reports of June 2020. Most of
them use multiple gadgets and devices like smartphones, laptops, tablets and many more for
accessing the internet for various needs. All these devices need an IP address. So, 4.3 billion IP
addresses is not sufficient for more than 7.8 billion people. Hence, we use NAT. It is also used to
convert a private IP address onto public and public IP address into private.
Port Address Translation (PAT)

PAT is the port address translation. Initially when NAT was there it was very easy and thought
everything was too easy with only NAT. But, when multiple users open one website from one pc
and give a second request to open a second website, the IP address is the same. So, there arises
confusion on where the contents need to be delivered and fetched on which Multipage. If it was a
single request, then NAT was enough but when multiple requests are coming from one pc itself
then which content to be displayed on which page there was a confusion. Then, the PAT
technology came into use. Along with NAT even PAT is important because, by using NAT the ip
address was carried and translated. However, by using PAT, the port from which content is to be
carried to which port is done.

When would you need this: When you want to connect a local network to the Internet and the
available global IP addresses are less than the local IP addresses. This can also be used as an
additional security feature.

Special Requirements: None.

There are two types of NAT that can be configured on a Cisco router: static and dynamic.

Static NAT Configuration

This type is used when you want to do one-to-one assignment of global (namely public) IP
addresses to local IP addresses.
 Establish static translation between an inside local address and an inside global address:
Router(config)#ip nat inside source static local-ip-address global-ip-address where local-
ip address is the (inside) local address and global-ip-address is the (inside) global address.
 Specify the local interface (the interface connected to the internal network). This is done
by going to the interface configuration mode and issuing:
Router(config-if)#ip nat inside
 Specify the global interface (the interface connected to the external network).
This is done by going to the interface configuration mode and issuing:
Router(config-if)#ip nat outside

Dynamic NAT Configuration

This type is used when you want the router to do the mapping dynamically. This method is
useful when you have too many global and local addresses and you do not want to do the
mapping manually, or when the number of global addresses available is less than the local
addresses.

This would lead us to two different scenarios:

A. The number of global IP addresses is more than one and it is equal or less than the
local addresses.
 Define a pool of global addresses that would be employed in the translation:
Router(config)#ip nat pool pool-name first-public-address last-public-address netmask
public-subnetmask.

Where pool-name is the name of the pool, first-public-address is the starting IP address of the
pool, last-public-address is the end IP address of the pool, and public-subnetmask is the subnet
mask of the network that the pool is part of (i.e., the global network).

 Define the range of local addresses permitted to participate in the translation using an
access-list:

Router(config)#access-list access-list-number permit local-network-address wildcard-mask

Where access-list-number is the number of the access-list, which is usually a standard access list;
thus, the number can be any number from 1 to 99; local-network-address is the network address
of the local network or the starting IP address of the range; and wildcard-mask is the wildcard
mask used to define the range. You can issue more than one access-list sentence in the same
access-list to define the specific IP address range(s). If you are not familiar with wildcard masks,
refer to the note in section.

 Associate the pool and the local range in a dynamic NAT translation command:

Router(config)#ip nat inside source list access-list number pool nat-pool-name [overload]
Where : access-list-number is the number of the access-list, nat-pool-name is the name of the
global pool, and overload : This parameter must be used when you have global IP addresses less
than local IP addresses (this type of NAT is also known as Port Address Translation, PAT).

 Specify the local interface. This is done by going to the interface configuration mode and
issuing:

Router(config-if)#ip nat inside

 Specify the global interface. This is done by going to the interface configuration mode
and issuing:

Router(config-if)#ip nat outside

B. The other scenario is when there is only one global IP address and a group of local
IP addresses.

In this case, the only global IP address is assigned to the interface connected to the global
network.

 Define the range of local addresses permitted to participate in the translation using an
access-list:

Router(config)#access-list access-list-number permit local-network-address wildcard mask

Where: access-list-number is the number of the access-list, which is usually a standard accesslist;
thus, the number can be any number from 1 to 99, local-network-address is the network address
of the local network or the starting IP address of the range, and wildcard-mask is the wildcard
mask used to define the range. You can issue more than one access-list sentence in the same
access-list to define the specific IP address range(s). If you are not familiar with wildcard masks,
refer to the note in Section.

 Associate the pool and the local range in a dynamic NAT translation command:

Router(config)#ip nat inside source list access-listnumber interface interface-type interface-


number overload .

Where: access-list-number is the number of the access-list, interface-type is the type of the
interface that has the global IP address (e.g., serial or Ethernet), and interface-number is the
number of the interfaces. An example of the interface type and number is serial 0 or Ethernet 0/0.

 Specify the local interface. This is done by going to the interface configuration mode and
issuing: Router(config-if)#ip nat inside
 Specify the global interface. This is done by going to the interface configuration mode
and issuing:
Router(config-if)#ip nat outside

Troubleshooting Commands

 To show the current translations performed by NAT

Router#show ip nat translation

Note that these translations have a certain lifetime. They do not remain in the list forever. If you
need to test your NAT configuration, ping to an outside host from an inside host and look for the
translations immediately.

 To show the static translations of NAT:

Router#show ip nat static

 To watch the instantaneous interactions of NAT:

Router#debug ip nat

Disabling NAT

To disable NAT, you need to do the following steps:

 Disable NAT on the local and global interfaces:

Router(config-if)#no ip nat inside on the local, and

Router(config-if)#no ip nat outside on the global interface.

 Clear the contents of the translation table:

Router#clear ip nat translations

 Remove the NAT assignment command by preceding it with a ‘no’. For example,

Router(config)#no ip nat inside source list access-listnumber interface interface-type interface-


number overload

 Remove the access-list, if any, by putting ‘no’ ahead of the command: Router(config)#no
access-list access-list-number
13. PPP

Point-to-Point Protocol (PPP) refers to a suite of computer communication protocols that provide
a standard way to transport multiprotocol data over point-to-point links. PPP has the following
three main components:

 A way to encapsulate multiprotocol datagrams;


 Link Control Protocol to establish, configure and test the data link connection; and
 A group of separate network control protocols that establish and configure different types
of network layer protocols.

In terms of the Open Systems Interconnection model, however, PPP provides Layer 2, or data
link layer, service that creates the foundation for network layer protocols to operate on top. From
an operational standpoint, PPP is a peer-to-peer protocol, meaning that either side of the link can
be used to establish a PPP connection. However, when it is put in real-world situations, there
typically is a PPP server that operates as a connection hub for multiple PPP clients. The PPP
server sits idle until a PPP client attempts to establish a connection. If the PPP server is
configured for authentication, the server responds to the client with an authentication request.
PPP can use Challenge-Handshake Authentication Protocol or Password Authentication
Protocol. Once authenticated, the final step is to establish the Network Control Protocol (NCP)
used between systems. The most commonly used NCP is Internet Protocol Control Protocol.
Once established, the client and server can begin communicating and transmitting packets
between each other.

How to Configure PPP on a Cisco Router

When would you need this: When you are creating a WAN link. This procedure might also be
required when the other end of a WAN link is not a Cisco router. Point-to-Point Protocol can be
used in synchronous, asynchronous, HSSI, and ISDN links.

Special Requirements: None.

A. Get to the interface configuration mode of the router’s serial interface and issue the
following command,

Router(config-if)#encapsulation ppp

B. If you want to configure authentication (which is almost always the case), go through the
following steps:
 Choose the authentication type: Password Authentication Protocol (PAP) or
Challenge Handshake Authentication Protocol (CHAP)
Router(config-if)#ppp authentication authentication type
Where authentication type is the authentication type, which can be: PAP, CHAP, PAP
CHAP, or CHAP PAP. The last two choices are to use the second authentication type
when the first one fails. CHAP is strongly recommended over PAP for two reasons. First,
PAP sends the username and password in plaintext, while CHAP sends hashed challenges
only.
Second is that CHAP does an operation similar to periodic re-authentication in the middle
of the communication session, such that it provides more security than PAP.
 Set a username and a password that the remote router would use to connect to
your local router. You can define many username/password pairs for many PPP
connections to the same router.
Router(config)#username remote-username password remote-password
Where remote-username is username sent from the remote router, and remote-password
is its password. If the remote router was not configured with a username to send, it will
send its hostname instead. Issue this command once for each PPP connection. For
example, if you are connecting RouterA to RouterB and RouterC, on RouterA issue this
command once for each remote router.
 Now, you can set the username and password that your local router would send to
access the remote router. For PAP authentication, you can specify the username
and password that the local router will send to the remote router for authentication
using the following command,
Router(config-if)#ppp pap sent-username sent-username password sent-password For
CHAP, two commands are used,
Router(config-if)#ppp chap hostname sent-usernam
Router(config-if)#ppp chap password sent-password
The usernames and passwords are case sensitive, so be careful when writing them. This
way, you will have to write the username and password of the remote router in your local
router and write the username and password of your local router into your remote using
the ‘username’ command. If you do not set the username and password that will be sent
from the local router to the remote router for authentication, the router will use its
hostname and secret password instead.
C. You can monitor the quality of the serial link that is using PPP with the following
command,

Router(config-if)#ppp quality percentage

Where percentage is the minimum accepted link quality. If the link quality drops below the
percentage, the link will be shutdown and considered bad.

D. If the available bandwidth is small, you might consider compressing the data being
transmitted using the following command,

Router(config-if)#ppp compress compression-type

Where compression type is the compression type which can be predictor or stacker.
E. To troubleshoot PPP, you can use the following commands,

Router#debug ppp negotioations

Router#debug ppp packets

Router#debug ppp errors

Router#debug ppp authentication

14. Frame Relay

Frame relay is a type of telecommunications technology that can be used to connect local area
networks (LANs) and to transmit data between endpoints in wide area networks (WANs). Frame
relay uses packet switching technology. This means that it breaks data, such as call data, into
smaller packets, also known as frames, to transmit it through a shared frame relay network.
These data packets are then reassembled at the data’s destination. Frame relay has long been
used as part of many companies’ Integrated Services Digital Network (ISDN) systems. It’s often
considered to be the streamlined update to the older type of packet switching tech, X.25 packets.

Frame relay services are usually used either for transferring data between geographically
separated LANs or across a WAN. Frame relay is a cost-effective alternative to point-to-point
circuits, which are dedicated leased lines between LANs or in a WAN. Frame relay is cheaper
because rather than paying for the bandwidth of one or more leased lines, each router in the
network shares the single, multi-access network provided by the frame relay virtual circuit. The
amount of bandwidth that each company using the virtual circuit gets is determined by the
service provider’s committed information rate (CIR)–the guaranteed minimum amount of
bandwidth for each circuit.
Access to a frame relay network is given via a frame relay access device (FRAD) on a
company’s premises, which could be software in the router or a separate device. The FRAD
connects to one of the service provider’s frame relay switch ports via the User-to-Network
Interface (UNI) and creates an access link.

How to Configure Frame-Relay in a Cisco Router

When would you need this: When you are setting up a Frame-relay WAN connection rented
from a service provider.

Special Requirements: None.

Frame-relay configuration mainly depends on the topology you are using.

Point-to-Point Connection of Two Sites Using Physical Interfaces

 On the serial interface, change the encapsulation type to Frame-relay:

Router(config)#interface serial interface-number

Router(config-if)#encapsulation Frame-relay

where interface number is the number of the serial interface connected to the frame-relay
equipment.

 Configure the LMI type:

Router(config-if)#Frame-relay lmi-type lmi-type

where lmi-type is the type of LMI standard used. The supported types are Cisco, ansi and q933a.
This information should be given to you by the Frame-relay service provider.

 Assign an IP address to the interface

Router(config-if)#ip address ip-address1 subnetmask1

where the ip address1 and subnetmask1 are the IP address and subnetmask assigned to the
Frame-relay interface on the first side of the link.

 Map the Frame-relay DLCI number to a destination IP address:

Router(config-if)#Frame-relay map ip-address2 dlci-number encapsulation-type

where

ip-address2 is the IP address of the other side of the link. dlci-number is the virtual circuit
number given to you by the Frame-relay service provider. encapsulation-type is the type of
encapsulation standard used. The value is usually either Cisco or ietf. This information should
also be given to you by the Frame-relay service provider.

 On the other end, the serial interface encapsulation type is changed to Frame-
relay:

Router(config)#interface serial interface-number

Router(config-if)#encapsulation Frame-relay

where interface number is the number of the serial interface connected to the Frame-relay
equipment.

 Configure the LMI type:

Router(config-if)#Frame-relay lmi-type lmi-type

where lmi-type is the type of LMI standard used. The supported types are Cisco, ansi and q933a.
This information should be given to you by the Frame-relay service provider. Usually, it is the
same type used in step 2.

 Assign an IP address to the interface

Router(config-if)#ip address ip-address2 subnetmask2

where the ip address2 and subnetmask2 are the IP address and subnetmask assigned to the
Frame-relay interface on the second side of the link.

 Map the Frame-relay DLCI number to a destination IP address:

Router(config-if)#Frame-relay map ip-address1 dlci-number encapsulation-type

where

ip address1 is the IP address of the first side of the link. dlci-number is the virtual circuit number
given to you by the Frame-relay service provider. encapsulation-type is the type of encapsulation
standard used. The value is usually either Cisco or ietf. This information should also be given to
you by the Frame-relay service provider.

 Use the following commands for troubleshooting:

Router#show Frame-relay lmi

Router#show Frame-relay pvc


Frame-Relay and Routing Issues

Cisco routers employ a technique called split-horizon. This technique is used to eliminate routing
loops by which a routing update cannot be forwarded to the same interface it came from.
Building on that logic, split-horizon can cause issues when using Frame-relay point-to-multipoint
topologies. Now think of a scenario where a routing update is coming from one of the remote
points connected on the other end of a point-to-multipoint link. The routing update, due to split-
horizon, will not be forwarded on the same physical link over to the other points connected to the
point-to-multipoint topology, because it will be considered coming from one interface and
cannot be forwarded over to the same interface. This way, the other points will not be able to
exchange routing updates.

Split-horizon can be disabled using the following command on the interface level:

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

On OSPF, you can use the following command:

Router(config-if)#ip ospf network point-to-multipoint

15. Router on the stick

Router on a Stick’ allows routing between VLANs with only one interface. Each VLAN
represents a different Subnet. In general, routers can take traffic from only one subnet and
transfer it to another subnet. And we can assign only one IP Address to a router interface.
‘Router on a stick’ allow us to create sub-interfaces, and assign IP Addresses to those sub-
interfaces. To make it work, we have to create a truck connection between the switch and a
router so that traffic from multiple VLANs can be sent to the router. If we create a route between
VLANs without the ‘Router on a Stick’ method, then we have to waste interfaces on the switches
and routers. And if we enable routing between multiple VLANs then it will become practically
inefficient as the switches and the routers will use those multiple interfaces. The image below is
an alternative method for allowing routing between VLANs. As you can see, we are using two
interfaces on both the router and a switch to allow routing between VLANs. We have not created
sub-interface in the below figure.
Configuration of Router on a stick

Switches divide broadcast domain through VLAN (Virtual LAN). VLAN is a partitioned
broadcast domain from a single broadcast domain. Switch doesn’t forward packets across
different VLANs by itself. If we want to make these virtual LANs communicate with each other,
a concept of Inter VLAN Routing is used.

Inter VLAN Routing:

Inter VLAN routing is a process in which we make different virtual LANs communicate with
each other irrespective of where the VLANs are present (on same switch or different switch).
Inter VLAN Routing can be achieved through a layer-3 device i.e. Router or layer-3 Switch.
When the Inter VLAN Routing is done through Router it is known as Router on a stick.

Router on a Stick:

The Router’s interface is divided into sub-interfaces, which acts as a default gateway to their
respective VLANs.

Configuration:

Configuration

Here is a topology in which there is a router and a switch and some end hosts. 2 different VLANs
have been created on the switch. The router’s interface is divided into 2 sub-interfaces (as there
are 2 different VLANs) which will acts as a default gateway to their respective VLANs. Then
router will perform Inter VLAN Routing and the VLANs will communicate with each other.

First we will assign IP address to the host PC1 as 192.168.1.10/24, Server 192.168.1.20/24, and
the other host PC2 will have IP address 192.168.2.10/24 manually.
Now, we will make sub-interface of fa0/0 as fa0/0.1 and fa0/0.2 and assign IP addresses as
192.168.1.1/24 and 192.168.2.1/24 respectively on the router’s ports.

r1# int fa0/0.1

r1# encapsulation dot1q 2

r1# ip address 192.168.1.1 255.255.255.0

r1# int fa0/0.2

r1# encapsulation dot1q 3

r1# ip address 192.168.2.1 255.255.255.0

NOTE : Here encapsulation type dot1q is used for frame tagging between the 2 different VLAN.
When the switch forwards packet of one VLAN to another, it inserts a VLAN into the Ethernet
header.

Now, we will make 2 different VLANs on switch namely VLAN 2 and VLAN 3 giving names
HR_dept and sales_dept.

Switch# vlan 2

Switch# name HR_dept

Switch# vlan 3

Switch# name sales_dept

Switch# int range fa0/1-2

Switch# switchport mode access

Switch# switchport access vlan 2

Switch# int fa0/3

Switch# switchport mode access

Switch# switchport access vlan 3

Here, we have assigned VLAN 2 to the specific switch ports fa0/1, fa0/2 and vlan 3 to fa0/3
respectively.

NOTE: int range fa0/1-2 command is used as there are more than one host present in a single
VLAN.
Now to check reachability of PC2 from PC1, we will try to PING PC2 from PC1.

PING PC2 from PC1


From the above figures, we see that the packet is delivered to the router by the switch, because
now the broadcast domain have been divided by the different VLANs present on the switch
therefore, the packet will be delivered to the default gateway (as PC2 is present on different
network) and then to the destination.

You might also like