0% found this document useful (0 votes)
7 views

Layer 3 Routing 2

Uploaded by

lynnunderwater
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Layer 3 Routing 2

Uploaded by

lynnunderwater
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LAYER 3 ROUTING

Components of routing

Routing, in its most basic form, is the process of moving data between Layer 3 networks. Routing
requirements:

• End-to-End communication paths

• Routing information on participating Layer 3 devices.

You must consider several components and other aspects to effectively implement routing between
remote networks. However, you can classify the various components and considerations into two
primary requirements—having an end-to-end communications path and ensuring all Layer 3 devices
within the communications path have the required routing information. As long as the physical path is
configured and functioning correctly, the first requirement is satisfied. For the second requirement, all
Layer 3 devices participating in the communications path must have the necessary routing information.
The gateway device must determine the proper next hop for each destination prefix for transit traffic it
receives.

Layer 3 interfaces

When configuring Layer 3 interfaces on Juniper devices, we must consider physical and logical
properties.

The following list provides details for some physical interface properties:

Juniper Business Use Only


• Data Link Layer protocol and keepalives: You can change the Data Link Layer protocol for the
particular media type (for example, PPP to Cisco HDLC), and you can turn keepalives on or off;
• Link mode: On Ethernet interfaces you can hardcode the duplex setting to either half-duplex
or full-duplex;
• Speed: You can specify the link speed on certain interface types;
• Maximum transmission unit (MTU): You can vary the size from 256 to 9192 bytes;
• Scrambling: Refers to payload scrambling, which can be on or off;
• Frame check sequence (FCS): You can modify to 32-bit mode (the default is 16-bit mode);

The following list provides details for some logical interface properties:

• Protocol family: Refers to the protocol family you want to use, such as family inet, inet6, iso,
mpls, or ethernet-switching;
• Addresses: Refers to the address associated with the particular family (for example, IP address
using family inet);
• Virtual circuits: Refers to the virtual circuit identifier, such as a data-link connection identifier
(DLCI), virtual path identifier (VPI), virtual channel identifier (VCI), or virtual LAN (VLAN) tag;

So, what is a Routing Table?

In computer networking a routing table, or routing information base (RIB), is a data table stored in a
router or a network host that lists the routes to particular network destinations, and in some cases,
metrics (distances) associated with those routes. The routing table contains information about the
topology of the network immediately around it.

The construction of routing tables is the primary goal of routing protocols. Static routes are entries
made in a routing table by non-automatic means and which are fixed rather than being the result of
routing protocols and associated network topology discovery procedures. We will review static routes
later on.

Whenever a node needs to send data to another node on a network, it must first know where to send it.
If the node cannot directly connect to the destination node, it has to send it via other nodes along a
route to the destination node. Each node needs to keep track of which way to deliver various packages
of data, and for this it uses a routing table. A routing table is a database that keeps track of paths, like a
map, and uses these to determine which way to forward traffic. A routing table is a data file in RAM that
is used to store route information about directly connected and remote networks. Nodes can also share
the contents of their routing table with other nodes.

The primary function of a router is to forward a packet toward its destination network, which is the
destination IP address of the packet. To do this, a router needs to search the routing information stored
in its routing table. The routing table contains network/next hop associations. These associations tell a
router that a particular destination can be optimally reached by sending the packet to a specific router

Juniper Business Use Only


that represents the next hop on the way to the final destination. The next hop association can also be
the outgoing or exit interface to the final destination.

With hop-by-hop routing, each routing table lists, for all reachable destinations, the address of the next
device along the path to that destination: the next hop. Assuming that the routing tables are consistent,
the simple algorithm of relaying packets to their destination's next hop thus suffices to deliver data
anywhere in a network. Hop-by-hop is the fundamental characteristic of the IP Internet layer[1] and the
OSI Network Layer.

When a router interface is configured with an IP address and subnet mask, the interface becomes a host
on that attached network. A directly connected network is a network that is directly attached to one of
the router interfaces. The network address and subnet mask of the interface, along with the interface
type and number, are entered into the routing table as a directly connected network.

A remote network is a network that can only be reached by sending the packet to another router.
Routing table entries to remote networks may be either dynamic or static. Dynamic routes are routes to
remote networks that were learned automatically by the router through a dynamic routing protocol.
Static routes are routes that a network administrator manually configured.

Viewing the routing table

The slide shows the use of the show route command, which displays all route entries in the routing
table. As identified on the slide, all active routes are marked with an asterisk (*) next to the selected
entry. Each route entry displays the source from which the device learned the route, along with the
route preference for that source. The show route command displays a summary of active, holddown,
and hidden routes. Active routes are the routes the system uses to forward traffic. Holddown routes are
routes that are in a pending state before the system declares them as inactive.

Longest Prefix Match

Longest prefix match (also called Maximum prefix length match) refers to an algorithm used by routers
in Internet Protocol (IP) networking to select an entry from a forwarding table.

Because each entry in a forwarding table may specify a sub-network, one destination address may
match more than one forwarding table entry. The most specific of the matching table entries — the one
with the longest subnet mask — is called the longest prefix match. It is called this because it is also the
entry where the largest number of leading address bits of the destination address match those in the
table entry.

Longest Match Example


• The router receives a packet with a destination IP address of 192.168.1.33.
• The routing table contains the following possible matches:
• 192.168.1.32/28
• 192.168.1.0/24
• 192.168.0.0/16
To determine the longest match, it’s easiest to convert the IP addresses in Table 1 to binary and
compare them.
Table 1: Converted IP Addresses

Juniper Business Use Only


Address Converted Binary Address
192.168.1.33 (destination IP 11000000.10101000.00000001.00100001
address)
192.168.1.32/28 11000000.10101000.00000001.00100000 (<–Best
match)
192.168.1.0/24 11000000.10101000.00000001.00000000
192.168.0.0/16 11000000.10101000.00000000.00000000

Two types of routing

A static routing table is created, maintained, and updated by a network administrator, manually. A static
route to every network must be configured on every router for full connectivity. This provides a granular
level of control over routing, but quickly becomes impractical on large networks.

Routers will not share static routes with each other, thus reducing CPU/RAM overhead and saving
bandwidth. However, static routing is not fault-tolerant, as any change to the routing infrastructure
(such as a link going down, or a new network added) requires manual intervention. Routers operating in
a purely static environment cannot seamlessly choose a better route if a link becomes unavailable.

A dynamic routing table is created, maintained, and updated by a routing protocol running on the
router. Routers do share dynamic routing information with each other, which increases CPU, RAM, and
bandwidth usage. However, routing protocols are capable of dynamically choosing a different (or better)
path when there is a change to the routing infrastructure.

The following briefly outlines the advantages and disadvantages of static routing:
Advantages of Static Routing
• Minimal CPU/Memory overhead
• No bandwidth overhead (updates are not shared between routers)
• Granular control on how traffic is routed
Disadvantages of Static Routing
• Infrastructure changes must be manually adjusted
• No “dynamic” fault tolerance if a link goes down
• Impractical on large network.

The following briefly outlines the advantages and disadvantages of dynamic routing:
Advantages of Dynamic Routing
• Simpler to configure on larger networks
• Will dynamically choose a different (or better) route if a link goes down
• Ability to load balance between multiple links
Disadvantages of Dynamic Routing
• Updates are shared between routers, thus consuming bandwidth
• Routing protocols put additional load on router CPU/RAM
• The choice of the “best route” is in the hands of the routing protocol, and not the network
administrator.

Juniper Business Use Only


Static routes

Static routes are used in a networking environment for multiple purposes, including a default route for
the autonomous system (AS) and as routes to customer networks. Unlike dynamic routing protocols, you
manually configure the routing information provided by static routes on each router or multilayer switch
in the network.

Static routes must have a valid next-hop defined. Often that next-hop value is the IP address of the
neighboring router headed toward the ultimate destination. On point-to-point interfaces, you can
specify the egress interface name rather than the IP address of the remote device. By default, the next-
hop IP address of static routes configured in the Junos OS must be reachable using a direct route. Static
routes remain in the routing table until you remove them or until they become inactive. One possible
scenario in which a static route becomes inactive is when the IP address used as the next hop becomes
unreachable.

Resolving indirect-next-hops

By default, the Junos OS requires that the next-hop IP address of static routes be reachable using a
direct route. Unlike software from other vendors, the Junos OS does not perform recursive lookups of
next hops by default. You can alter the default next-hop resolution behavior using the resolve CLI
option. In addition to the resolve CLI option, a route to the indirect next hop is also required. Indirect
next hops can be resolved through another static route or through a dynamic routing protocol. We
recommend, whenever possible, that you use a dynamic routing protocol as your method of resolution.
Using a dynamic routing protocol, rather than a static route to resolve indirect next hops, dynamically
removes the static route if the indirect next hop becomes unavailable.

Dynamic Routing

Static routing is ideal in small networks where only a few routes exist or in networks where absolute
control of routing is necessary. However, static routing has certain drawbacks that might make it
cumbersome and hard to manage in large environments where growth and change are constant. For
large networks or networks that change regularly, dynamic routing might be the best option. With
dynamic routing, you simply configure the network interfaces to participate in a routing protocol.
Devices running routing protocols can dynamically learn routing information from each other. When a
device adds or removes routing information for a participating device, all other devices automatically
update.

Benefits of Dynamic Routing Dynamic routing resolves many of the limitations and drawbacks of static
routing. Some of the general benefits of dynamic routing include:

• Lower administrative overhead: The device learns routing information automatically, which eliminates
the need for manual route definition;

Juniper Business Use Only


• Increased network availability: During failure situations, dynamic routing can reroute traffic around
the failure automatically (the ability to react to failures when they occur can provide increased network
uptime); and
• Greater network scalability: The device easily manages network growth by dynamically learning routes
and calculating the best paths through a network.

Summary of Dynamic Routing Protocols

▪ IGPs operate within a single autonomous system

▪ Single network administration that provides for unique routing information and flexible
use of network resources

▪ Examples include OSPF, ISIS.

▪ EGPs operate among different autonomous systems

▪ Independent administrative entities that communicate between independent network


infrastructures.

▪ Current EGP in use today is BGP.

Dynamic Routing Categories

There are two distinct categories of dynamic routing protocols:

▪ Distance-vector protocols

▪ Link-state protocols

Distance-vector Routing Protocols

All distance-vector routing protocols share several key characteristics:


• Periodic updates of the full routing table are sent to routing neighbors.
• Distance-vector protocols suffer from slow convergence and are highly susceptible to loops.
• Some form of distance is used to calculate a route’s metric.
• The Bellman-Ford algorithm is used to determine the shortest path.

A distance-vector routing protocol begins by advertising directly-connected networks to its neighbors.


These updates are sent regularly. Neighbors will add the routes from these updates to their own routing
tables. Each neighbor trusts this information completely and will forward their full routing table
(connected and learned routes) to every other neighbor. Thus, routers fully (and blindly) rely on
neighbors for route information, a concept known as routing by rumor.

Distance-vector protocols utilize some form of distance to calculate a route’s metric.

Link-State Routing Protocols

Link-state routing protocols were developed to alleviate the convergence and loop issues of distance-
vector protocols. Link-state protocols maintain three separate tables:
• Neighbor table – contains a list of all neighbors, and the interface each neighbor is connected off of.
Neighbors are formed by sending Hello packets.

Juniper Business Use Only


• Topology table – otherwise known as the “link-state” table, contains a map of all links within an area,
including each link’s status.
• Shortest-Path table – contains the best routes to each particular destination (otherwise known as the
“routing” table”)

Link-state protocols do not “route by rumor.” Instead, routers send updates advertising the state of
their links (a link is a directly-connected network). All routers know the state of all existing links within
their area, and store this information in a topology table. All routers within an area have identical
topology tables.

The best route to each link (network) is stored in the routing (or shortestpath) table. If the state of a link
changes, such as a router interface failing, an advertisement containing only this link-state change will
be sent to all routers within that area. Each router will adjust its topology table accordingly and will
calculate a new best route if required. By maintaining a consistent topology table among all routers
within an area, link-state protocols can converge very quickly and are immune to routing loops.
Additionally, because updates are sent only during a link-state change and contain only the change (and
not the full table), link-state protocols are less bandwidth intensive than distance-vector protocols.
However, the three link-state tables utilize more RAM and CPU on the router itself.

Link-state protocols utilize some form of cost, usually based on bandwidth, to calculate a route’s metric.
The Dijkstra formula is used to determine the shortest path.

Juniper Business Use Only

You might also like