IGPs

Internal Gateway Protocols

Routing

Cisco IOS Commands

Cisco Command

Juniper Command

Co-Ordinating Definition

show run

sh configuration

Show running configuration

sh ver

sh ver

Show version

show ip interface brief

show interface terse

displays the status of interfaces configured for IP

show interface [intfc]

show interfaces [intfc] detail

displays the interface configuration, status and statistics.

show controller intfc

show interfaces intfc extensive

displays information about a physical port device

show interface | incl (proto|Desc)

show interfaces description

displays the interface configuration, status and statistics

show ip route

show route

displays summary information about entries in the routing table

show ip bgp summary

show bgp summary

displays the status of all Border Gateway Protocol (BGP) connections

show ip bgp net mask

show route protocol bgp prefix

will show you how that route is being advertised, look for the first line

show ip bgp net mask longer-prefixes

show route range prefix

will show you how that route is being advertised, look for the first line

show ip bgp regexp AS-regexp

show route aspath-regexp "AS-regexp"

displays routes matching the autonomous system (AS) path regular expression

show ip bgp neighbors neigh received-routes

show route receive-protocol bgp neigh show route source-gateway neigh protocol bgp

Shows whether a neighbor supports the route refresh capability

show ip bgp neighbor neigh advertised-routes

show route advertising-protocol bgp neigh

Shows whether a neighbor supports the route refresh capability

show clns neighbors

show isis adjacency

displays both ES and IS neighbors

show clns interface

show isis interface

shows specific information about each interface

show ip route isis

show isis routes

displays the current state of the the routing table

show isis topology

show isis spf

displays a list of all connected routers in all areas

show ip ospf interface

show ospf neighbor

shows neighbor ID, Priority, IP, & State if the neighbor router, dead time.

show ip ospf interface

show ospf interface

shows neighbor id, pri, state, dead time, address and interface

show ip route ospf

show ospf route

display the current state of the routing table

show ip ospf database

show ospf database

display list of information related to the OSPF database for a specific communication server

show version

show version, show system uptime

display the system hardware config., software version, and name and source of configuration files and boot images

show diags

show chasis hardware

displays power-on diagnostics status

show processes cpu

show system process

displays utilization statistics

show tech-support

request support info

displays the current software image, configuration, controllers, counters, stacks, interfaces, memory and buffers

show logging

show log messages

display the state of logging to the syslog

show route-map name

show policy name

displayall route-maps configured or only the one specified

show ip prefix-list name

show policy name

display information about a prefix list or prefix list entries

show ip community-list list

configure, show policy-options community name

display routes that are permitted by BGP community list

show environment all

show chassis environment

displays temperature and voltage information on the console

ping dest

ping dest rapid (for cisco like output) ping dest (for unix like output)

to check to see if a destination is alive

ping (setting source int)

ping dest bypass-routing

to check to see if a destination is alive

terminal monitor

monitor start messages

Change console terminal settings

terminal no monitor

monitor stop

Change console terminal settings

terminal length 0

set cli screen-length 0

sets the length for displaying command output

Configuring Basic Router Settings

  • Step 1. Name the device. This changes the router prompt and helps distinguish the device from others.

  • Step 2. Secure management access. Specifically, secure the privileged EXEC, user EXEC, and Telnet access, and encrypt passwords to their highest level.

  • Step 3. Configure a banner. Although optional, this is a recommended step to provide legal notice to anyone attempting to access the device.

  • Step 4. Save the configuration.

Scenario: Configuring R1 Settings

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# hostname R1
R1(config)#
R1(config)# enable secret class
R1(config)#
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)#
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)#
R1(config)# service password-encryption
R1(config)#
R1(config)# banner motd $ Authorized Access Only! $
R1(config)# end
R1#
R1# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#

Configuring an IPv4 Router Interface

  • Step 1. Add a description. Although optional, it is a necessary component for documenting a network.

  • Step 2. Configure the IPv4 address.

  • Step 3. Configure a clock rate on Serial interfaces. This is only necessary on the DCE device in our lab environment and does not apply to Ethernet interfaces.

  • Step 4. Enable the interface.

R1(config)# interface ser3/0
R1(config-if)# description Link to LAN 1
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
R2(config)# interface ser3/0
R2(config-if)# description Link to LAN 2
R2(config-if)# ip address 192.168.10.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit

Configuring an IPv4 Loopback Interface

Another common configuration of Cisco IOS routers is enabling a loopback interface.

The loopback interface is a logical interface internal to the router. It is not assigned to a physical port and can therefore never be connected to any other device. It is considered a software interface that is automatically placed in an “up/up” state, as long as the router is functioning.

  • Step 1. Create the loopback interface using the interface loopback number global configuration command.

  • Step 2. Add a description. Although optional, it is a necessary component for documenting a network.

  • Step 3. Configure the IP address.

R1# configure terminal
R1(config)# interface loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)#

Verify Connectivity of Directly Connected Networks

Verify Interface Settings

There are several show commands that can be used to verify the operation and configuration of an interface. The following three commands are especially useful to quickly identify an interface status:

  • show ip interface brief: Displays a summary for all interfaces, including the IPv4 address of the interface and current operational status.

  • show interfaces: Displays interface information and packet flow count for all interfaces on the device

  • show ip route: Displays the contents of the IPv4 routing table stored in RAM. In Cisco IOS 15, active interfaces should appear in the routing table with two related entries identified by the code 'C' (Connected) or 'L' (Local). In previous IOS versions, only a single entry with the code 'C' will appear.

  • show running-config interface interface-id: Displays the commands configured on the specified interface.

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MM7-vgadR52_iOdY_vG%2F-MM70kPLsKbswzJHzCK9%2Fimage.png?alt=media&token=6d28829c-76e6-425e-83ae-4557e92fe477
https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MM7-vgadR52_iOdY_vG%2F-MM71x-JaR9-HuSPuMK1%2Fimage.png?alt=media&token=dce65a3a-7b47-4821-aa2a-a524025a7afe

Command History Feature

R1# terminal history size 200
R1#
R1# show history
  show ip interface brief
  show interface g0/0
  show ip interface g0/1
  show ip route
  show ip route 209.165.200.224
  show running-config interface s0/0/0
  terminal history size 200
  show history
R1#

Show Current Configuration

sh run

Static Routing

Static routing – Static routing is a process in which we have to manually add routes to the routing table. Advantages –

  • No routing overhead for router CPU which means a cheaper router can be used to do routing.

  • It adds security because only administrators can allow routing to particular networks only.

  • No bandwidth usage between routers.

Disadvantage –

  • For a large network, it is a hectic task for administrators to manually add each route for the network in the routing table on each router.

  • The administrator should have good knowledge of the topology. If a new administrator comes, then he has to manually add each route so he should have very good knowledge of the routes of the topology.

Configuration –

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MLYFF47mER7lPeVVRBn%2F-MLYFgj3ZM3yPEFH4NDb%2Fimage.png?alt=media&token=30cadd9d-5a46-48e3-bebd-6d583beee961

R1 having IP address 172.16.10.6/30 on s0/0/1, 192.168.10.1/24 on fa0/0. R2 having IP address 172.16.10.2/30 on s0/0/0, 192.168.20.1/24 on fa0/0. R3 having IP address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24 on fa0/0.

Now configuring static routes for router R3:

R3(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.2
R3(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.6

Here, provided the route for 192.168.10.0 network where 192.168.10.0 is its network I’d and 172.16.10.2 and 172.16.10.6 are the next hop address. Now, configuring for R2:

R2(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.1
R2(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.1
R2(config)#ip route 172.16.10.4 255.255.255.0 172.16.10.1

Similarly for R1:

R1(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.5
R1(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.5
R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.5

Default Routing

https://www.cisco.com/c/en/us/support/docs/dial-access/floating-static-route/118263-technote-nexthop-00.html

This is the method where the router is configured to send all packets towards a single router (next hop). It doesn’t matter to which network the packet belongs, it is forwarded out to router which is configured for default routing. It is generally used with stub routers. A stub router is a router that has only one route to reach all other networks. Configuration – Using the same topology which we have used for the static routing before.

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MLYHisZDZyZULwfl646%2F-MLYO6CF3pHRNaoZYsHW%2Fimage.png?alt=media&token=3b805846-57b8-4db4-9e97-1f5f937f00d4

In this topology, R1 and R2 are stub routers so we can configure default routing for both these routers. Configuring default routing for R1:

R1(config)#ip route 0.0.0.0 0.0.0.0  172.16.10.5 or s0/0/1

Now configuring default routing for R2:

R2(config)#ip route 0.0.0.0 0.0.0.0  172.16.10.1

Static Route to Interface without Next Hop IP Address

If you point a static route to an interface and do not specify the next-hop IP address, the route is inserted into the routing table only when the interface is active. This configuration is not recommended because when the static route points to an interface and has no next-hop information, the router considers each of the hosts within the range of the route to be directly connected through that interface. An example of such a static route is IP route 0.0.0.0 0.0.0.0 Ethernet0.

With this type of configuration, a router performs Address Resolution Protocol (ARP) on the Ethernet for every destination that the router finds through the default route because the router considers all of these destinations as directly connected to Ethernet 0. This kind of static route, especially if it is used by many packets to many different destination subnets, can cause high processor utilization and a very large ARP cache (along with memory allocation failures). Therefore, this kind of static route is not recommended.

When you specify the next-hop address on a directly connected interface, the router does not perform ARP for each destination address. An example is ip route 0.0.0.0 0.0.0.0 Ethernet0 192.168.1.1. You can specify the directly connected next-hop address only, but this is not recommended for reasons that are described in this document. You do not need to specify the directly connected next-hop address. You can specify the remote next-hop address and the interface to which the remote next-hop recurses.

If there is the possibility that the interface with the next hop goes down and the next hop would become reachable through a recursive route, then you should specify both the next-hop IP address and the alternate interface through which the next hop should be found. For example, ip route 10.0.0.1 255.255.255.255 Serial 3/3 192.168.20.1. The addition of the alternate interface enables the static route installation to become more deterministic.

Floating Static Route Example

This example describes the use of floating static routes and illustrates the need to both specify the outbound interface and the next hop address with the static route command.

Problem

With the network configuration that is illustrated in the next image, one host 172.31.10.1 has connectivity to the Internet. In this example, the host makes a connection to the remote Internet host 10.100.1.1:

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MLYHisZDZyZULwfl646%2F-MLYdhuD-nWs9rtOmc86%2Fimage.png?alt=media&token=ca75e88c-a889-4fcd-8f3d-0401a622f358

Specify a Next Hop IP Address for Static RoutesThis document describes the basic concept of static routes.www.cisco.com

Configuring R1 Static route (10.0.0.0/30)

Configure s3/0 & s3/1 Interfaces

##########################################
conf t
interface ser3/0
no shut
address 10.10.10.1 255.255.255.252 # Network ID + Subnet Mask

##########################################

conf t
interface ser3/1
no shut
address 10.10.10.5 255.255.255.252
  1. Connect serial link with all.

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MKzV8e7Y1NcILOpXFcT%2F-MKzY9MPLdIPj8CQKQgz%2Fimage.png?alt=media&token=f2b7074f-2d31-4c8a-a1fc-174e1fbee184

Route Summarization

Route summarization is a method where we create one summary route that represents multiple networks/subnets. It’s also called route aggregation or supernetting.

Summarization has a number of advantages:

  • Saves memory: routing tables will be smaller which reduces memory requirements.

  • Saves bandwidth: there are less routes to advertise so we save some bandwidth.

  • Saves CPU cycles: less packets to process and smaller routing tables to work on.

  • Stability: Prevents routing table instability due to flapping networks.

There are also some disadvantages to summarization:

  • Forwarding traffic for unused networks: a router will drop traffic when it doesn’t have a matching destination in its routing table. When we use summarization, it’s possible that the summary route covers networks that are not in use. The router that has a summary route will forward them to the router that has advertised the summary route.

  • Sub-optimal routing: routers prefer the path with the longest prefix match. When you use summaries, it’s possible that your router prefers another path where it has learned a more specific network from. The summary route also has a single metric.

Configuration

This is the topology we will use:

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MLYFF47mER7lPeVVRBn%2F-MLYHQ0VAYXd1tPgQy9h%2Fimage.png?alt=media&token=e5c429c6-2f59-4248-b83a-2246d44e7b8c

For now, we only need two routers. R1 has four loopback interfaces that we will advertise in RIP. I’ll show you a “before” and “after” of route summarization.

Route summarization is a method where we create one summary route that represents multiple networks/subnets. It's also called route aggregation or supernetting. Summarization has a number of advantages: Saves memory: routing tables will be smaller which reduces memory requirements. Saves bandwidth: t

Without Route Summarization

Let’s configure RIP so that all loopback interfaces are advertised:

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 172.16.0.0
R1(config-router)#network 192.168.12.0
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0

Let’s enable a debug so that we can see what is going on behind the scenes:

R1 & R2
#debug ip rip
RIP protocol debugging is on

Here’s what we will see:

R1#
RIP: sending v2 update to 224.0.0.9 via GigabitEthernet0/1 (192.168.12.1)
RIP: build update entries
        172.16.0.0/24 via 0.0.0.0, metric 1, tag 0
        172.16.1.0/24 via 0.0.0.0, metric 1, tag 0
        172.16.2.0/24 via 0.0.0.0, metric 1, tag 0
        172.16.3.0/24 via 0.0.0.0, metric 1, tag 0

R1 is advertising four different networks. R2 receives them:

R2#
RIP: received v2 update from 192.168.12.1 on GigabitEthernet0/1
     172.16.0.0/24 via 0.0.0.0 in 1 hops
     172.16.1.0/24 via 0.0.0.0 in 1 hops
     172.16.2.0/24 via 0.0.0.0 in 1 hops
     172.16.3.0/24 via 0.0.0.0 in 1 hops

The more information we advertise, the more bandwidth we require and more CPU cycles are required to process them. Of course, four networks on a Gigabit interface are no problem but in larger networks, there might be thousands or hundred of thousands of networks that are advertised.

Let’s check R2:

R2#show ip route rip
R     172.16.0.0/24 [120/1] via 192.168.12.1, 00:00:11, GigabitEthernet0/1
R     172.16.1.0/24 [120/1] via 192.168.12.1, 00:00:11, GigabitEthernet0/1
R     172.16.2.0/24 [120/1] via 192.168.12.1, 00:00:11, GigabitEthernet0/1
R     172.16.3.0/24 [120/1] via 192.168.12.1, 00:00:11, GigabitEthernet0/1

R2 stores all networks in its routing table which requires memory.

Let’s talk about stability. Let me show you what happens when we shut one of the loopback interfaces on R1:

R1(config)#interface loopback 0
R1(config-if)#shutdown

As soon as this happens, R1 will send a triggered update to R2:

RIP: sending v2 flash update to 224.0.0.9 via GigabitEthernet0/1 (192.168.12.1)
RIP: build flash update entries
        172.16.0.0/24 via 0.0.0.0, metric 16, tag 0

R2 receives this update:

R2#
RIP: received v2 update from 192.168.12.1 on GigabitEthernet0/1
     172.16.0.0/24 via 0.0.0.0 in 16 hops  (inaccessible)

After a while, R2 will remove this network from its routing table. Every time an interface goes up and down, packets are generated and the routing table will change. All of this requires bandwidth, CPU cycles, and memory. No problem for our small network but when you have thousands of networks and dozens of routers then it’s a different story.

With Route Summarization

Let’s see how route summarization works. I’ll configure R1 to advertise a summary towards R2:

R1(config)#interface GigabitEthernet 0/1
R1(config-if)#ip summary-address rip 172.16.0.0 255.255.0.0

Here’s what R1 advertises now:

RIP: sending v2 update to 224.0.0.9 via GigabitEthernet0/1 (192.168.12.1)
RIP: build update entries
        172.16.0.0/16 via 0.0.0.0, metric 1, tag 0

And here’s what R2 receives:

RIP: received v2 update from 192.168.12.1 on GigabitEthernet0/1
     172.16.0.0/16 via 0.0.0.0 in 1 hops

Only one network is advertised, our summary route. Less information, less bandwidth, less CPU cycles required and less memory. Here’s the routing table of R2:

R2#show ip route rip
R     172.16.0.0/16 [120/1] via 192.168.12.1, 00:00:10, GigabitEthernet0/1

Only one entry remains. R2 is still able to reach every network that our summary route covers. Let’s try this:

R2#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/6 ms

This is looking good. Let me also show you one of the disadvantages of summarization. Here’s what happens when we ping an IP address that is covered by the summary route but which is not available:

R2#ping 172.16.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.4.4, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)

The U means it’s unreachable. R2 has a matching route towards R1 so it sends these packets to R1. When R1 receives them, it drops them since it doesn’t have a matching entry and informs R2 about this.

Remember what happened when we shut one of the loopback interface? RIP would send a triggered update. Let’s try that again:

R1(config)#interface loopback 0
R1(config-if)#shutdown

Nothing will happen now! As long as there is one interface up with an IP address that falls within the summary route then the summary will be advertised. This makes our network far more stable.

Let me show you what happens when I shut the remaining loopbacks:

R1(config)#interface loopback 1
R1(config-if)#shutdown
R1(config)#interface loopback 2
R1(config-if)#shutdown
R1(config)#interface loopback 3
R1(config-if)#shutdown

Once I shut the last loopback, something happens:

R1#
RIP: sending v2 flash update to 224.0.0.9 via GigabitEthernet0/1 (192.168.12.1)
RIP: build flash update entries
        172.16.0.0/16 via 0.0.0.0, metric 16, tag 0

Once the final loopback interface is gone, R1 sends the triggered update to inform R2 that the summary route is gone. Here’s R2:

R2#
RIP: received v2 update from 192.168.12.1 on GigabitEthernet0/1
     172.16.0.0/16 via 0.0.0.0 in 16 hops  (inaccessible)

There is one more disadvantage to summarization but to demonstrate this, I will have to add another router. Let’s add R3:

We use the same topology but R1 and R2 are now also connected to R3. Let’s make sure our loopback interfaces are up again:

R1(config)#interface range loopback 0 - 3
R1(config-if-range)#no shutdown

Let’s configure R1 so that it sends RIP packets to R3:

R1(config)#router rip
R1(config-router)#network 192.168.13.0
R1(config)#access-list 1 deny any
R1(config)#router rip
R1(config-router)distribute-list 1 in GigabitEthernet 0/2

The access-list on R1 is required to prevent R1 from installing any RIP routes from R3. Otherwise the summary route is advertised from R1 > R2 > R3 > R1, causing a routing loop.

Let’s configure R2:

R2(config-if)#router rip
R2(config-router)#network 192.168.23.0

And R3:

R3(config-if)#router rip
R3(config-R3)#version 2
R3(config-R3)#no auto-summary
R3(config-R3)#network 192.168.13.0
R3(config-R3)#network 192.168.23.0

Now let’s take a look at the routing tables:

R3#show ip route rip
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R        172.16.0.0/16 [120/2] via 192.168.23.2, 00:00:22, GigabitEthernet0/2
R        172.16.0.0/24 [120/1] via 192.168.13.1, 00:00:24, GigabitEthernet0/1
R        172.16.1.0/24 [120/1] via 192.168.13.1, 00:00:24, GigabitEthernet0/1
R        172.16.2.0/24 [120/1] via 192.168.13.1, 00:00:24, GigabitEthernet0/1
R        172.16.3.0/24 [120/1] via 192.168.13.1, 00:00:24, GigabitEthernet0/1
R     192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:22, GigabitEthernet0/2
                      [120/1] via 192.168.13.1, 00:00:24, GigabitEthernet0/1

Above you can see that R3 learns the summary route from R2, all other networks are learned from R1. Let’s check R2:

R2#show ip route rip
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R        172.16.0.0/16 [120/1] via 192.168.12.1, 00:00:08, GigabitEthernet0/1
R        172.16.0.0/24 [120/2] via 192.168.23.3, 00:00:10, GigabitEthernet0/2
R        172.16.1.0/24 [120/2] via 192.168.23.3, 00:00:10, GigabitEthernet0/2
R        172.16.2.0/24 [120/2] via 192.168.23.3, 00:00:10, GigabitEthernet0/2
R        172.16.3.0/24 [120/2] via 192.168.23.3, 00:00:10, GigabitEthernet0/2
R     192.168.13.0/24 [120/1] via 192.168.23.3, 00:00:10, GigabitEthernet0/2
                      [120/1] via 192.168.12.1, 00:00:08, GigabitEthernet0/1

Above you can see that we now have sub-optimal routing on R2. Since the router prefers the most specific path, it will use R3 to reach the four 172.16.x.0/24 networks and it’s not using the summary route from R1. We can verify this with a traceroute:

R2#traceroute 172.16.0.1 probe 1
Type escape sequence to abort.
Tracing the route to 172.16.0.1
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.23.3 5 msec
  2 192.168.13.1 10 msec

Dynamic Routing Protocols

Dynamic routing is a networking technique that provides optimal data routing. Unlike static routing, dynamic routing enables routers to select paths according to real-time logical network layout changes.

Dynamic routing uses multiple algorithms and protocols. The most popular are Routing Information Protocol (RIP), Open Shortest Path First (OSPF), and EIGRP.

Dynamic routing protocols allow routers to share information about the network with other routers to allow them to select the best path to reach a destination.

  • IGP = Interior Gateway Protocol

  • EGP = Exterior Gateway Protocol

IGP - Single Area OSPF

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MSNXBj2pGZQ6mSMCOTD%2F-MSNYIHhJMxBfCS4n1BH%2Fimage.png?alt=media&token=89a3cd85-e4c8-4042-92e5-0997062ca1f9

Open Shortest Path First (OSPF) is a link-state routing protocol that is used to find the best path between the source and the destination router using its own Shortest Path First).

OSPF terms –

  1. Router I’d – It is the highest active IP address present on the router. First, highest loopback address is considered. If no loopback is configured then the highest active IP address on the interface of the router is considered.

  2. Router priority – It is a 8 bit value assigned to a router operating OSPF, used to elect DR and BDR in a broadcast network.

  3. Designated Router (DR) – It is elected to minimize the number of adjacency formed. DR distributes the LSAs to all the other routers. DR is elected in a broadcast network to which all the other routers shares their DBD. In a broadcast network, router requests for an update to DR and DR will respond to that request with an update.

  4. Backup Designated Router (BDR) – BDR is backup to DR in a broadcast network. When DR goes down, BDR becomes DR and performs its functions.

DR and BDR election – DR and BDR election takes place in broadcast network or multi-access network. Here are the criteria for the election:

  1. Router having the highest router priority will be declared as DR.

  2. If there is a tie in router priority then highest router I’d will be considered. First, the highest loopback address is considered. If no loopback is configured then the highest active IP address on the interface of the router is considered.

OSPF states – The device operating OSPF goes through certain states. These states are:

  1. Down – In this state, no hello packet have been received on the interface. Note – The Down state doesn’t mean that the interface is physically down. Here, it means that OSPF adjacency process has not started yet.

  2. INIT – In this state, hello packet have been received from the other router.

  3. 2WAY – In the 2WAY state, both the routers have received the hello packets from other routers. Bidirectional connectivity has been established. Note – In between the 2WAY state and Exstart state, the DR and BDR election takes place.

  4. Exstart – In this state, NULL DBD are exchanged.In this state, master and slave election take place. The router having the higher router I’d becomes the master while other becomes the slave. This election decides Which router will send it’s DBD first (routers who have formed neighbourship will take part in this election).

  5. Exchange – In this state, the actual DBDs are exchanged.

  6. Loading – In this sate, LSR, LSU and LSA (Link State Acknowledgement) are exchanged. Important – When a router receives DBD from other router, it compares it’s own DBD with the other router DBD. If the received DBD is more updated than its own DBD then the router will send LSR to the other router stating what links are needed. The other router replies with the LSU containing the updates that are needed. In return to this, the router replies with the Link State Acknowledgement.

  7. Full – In this state, synchronization of all the information takes place. OSPF routing can begin only after the Full state.

OSPF messages – OSPF uses certain messages for the communication between the routers operating OSPF.

  • Hello message – These are keep alive messages used for neighbor discovery /recovery. These are exchanged in every 10 seconds. This include following information : Router I’d, Hello/dead interval, Area I’d, Router priority, DR and BDR IP address, authentication data.

  • Database Description (DBD) – It is the OSPF routes of the router. This contains topology of an AS or an area (routing domain).

  • Link state request (LSR) – When a router receive DBD, it compares it with its own DBD. If the DBD received has some more updates than its own DBD then LSR is being sent to its neighbor.

  • Link state update (LSU) – When a router receives LSR, it responds with LSU message containing the details requested.

  • Link state acknowledgement – This provides reliability to the link state exchange process. It is sent as the acknowledgement of LSU.

  • Link state advertisement (LSA) – It is an OSPF data packet that contains link-state routing information, shared only with the routers to which adjacency has been formed.

Note – Link State Advertisement and Link State Acknowledgement both are different messages.

Timers –

  • Hello timer – The interval in which OSPF router sends a hello message on an interface. It is 10 seconds by default.

  • Dead timer – The interval in which the neighbor will be declared dead if it is not able to send the hello packet . It is 40 seconds by default.It is usually 4 times the hello interval but can be configured manually according to need.

OSPF supports/provides/advantages –

  • Both IPv4 and IPv6 routed protocols

  • Load balancing with equal cost routes for same destination

  • VLSM and route summarization

  • Unlimited hop counts

  • Trigger updates for fast convergence

  • A loop free topology using SPF algorithm

  • Run on most routers

  • Classless protocol

OSPF Administrative Distance Values

For Best Path selection, Administrative Distance(Preference) values are very important. Every Routing Protocol has an AD value. The Administrative Distance (Preference) of the Open Shortest Path First is 110 for Cisco devices. This is a little different for Alcatel-Lucent, Huawei and Juniper devices. They use Interneal and External Preference values for Open Shortest Path First. Preference value is 10 for Internal OSPF Routes and 150 for External OSPF Routes on the devices of these vendors.

Open Shortest Path First Cost

Open Shortest Path First uses path Cost as its metric. Generally, Bandwidth value is used as path Cost. AS a formula, the Cost is calculated like below in OSPF:

Cost = Reference BW(default 10 000 000) / BW

Configuring OSPF

OSPF Design GuideThe Open Shortest Path First (OSPF) protocol, defined in RFC 2328, is an Interior Gateway Protocol used to distribute routing information within a single Autonomous System. This paper examines how OSPF works and how it can be used to design and build today's large and complicated networks.www.cisco.com

IP Routing: OSPF Configuration Guide - Configuring OSPF [Cisco Cloud Services Router 1000V Series]IP Routing: OSPF Configuration Guide - Configuring OSPFwww.cisco.com

USE SERIAL LINK NOT LIKE IMG

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MORMTyX-fkd9zGX8MKf%2F-MORTOt2v3id1CZf3El-%2Fimage.png?alt=media&token=fdd6f983-8483-470b-bf6f-0f9fa1a2b225

Configure Router Interfaces

Router A

Hostname and IP address configuration in Router A
Connect to Router01 console and use the following IOS commands to configure host name as Router01.
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname RouterA
RouterA(config)#
# Configuring SERIAL Link Interface on Router A to Router C
Router01>enable
Router01#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router01(config)#interface fa0/0
Router01(config-if)#ip address 10.10.10.10.1 255.255.255.0
Router01(config-if)#no shutdown
# Serial Link form A to B
Router01(config)#interface fa1/0
Router01(config-if)#ip address 10.10.10.11.1 255.255.255.0
Router01(config-if)#no shutdown
# Loopback on Router A
Step 1. Create the loopback interface using the interface loopback number global configuration command.
Step 2. Add a description. Although optional, it is a necessary component for documenting a network.
Step 3. Configure the IP address.
R1# configure terminal
R1(config)# interface loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)#

Router B

Hostname and IP address configuration in Router B
Connect to Router01 console and use the following IOS commands to configure host name as Router01.
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname RouterB
RouterA(config)#
>enable
#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
(config)#interface fa0/0
(config-if)#ip address 10.10.10.12.1 255.255.255.0
(config-if)#no shutdown
(config)#interface fa1/0
(config-if)#ip address 10.10.10.11.2 255.255.255.0
(config-if)#no shutdown
# Add Loopback interface

Configure Interfaces for The other routers.

Enabling the OSPF Routing Protocol

The following command is needed in order to enable OSPF routing protocol on the router:

Router(config)# router ospf process-number
Router(config)# router ospf 1

The process-number is nothing more than a number local to the router.
It’s only used to distinguish processes within a router and can be given an
arbitrary value. This value does not have to be the same on every router within
the area.
However, it is always good practice to keep this number the same for
better administration.

Configuring OSPF Router ID

Each Router in an OSPF network needs a unique OSPF Router ID. The OSPF Router ID is used to provide a unique identity to the OSPF Router.

>enable
R1#configure terminal
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#exit
R1(config)#exit
R1#

**write mem**

Adding OSPF Networks

Enabling OSPF is not enough to activate it. The OSPF process needs to know the networks that are going to be advertised. After enabling OSPF process on our Cisco Router A, then, we will add our networks that will be in OSPF network with their wildcard masks.

  • We can either add the networks one by one, Or if we want all networks use 0.0.0.0 for All.

Router A

Router A
Router(config)#network 10.10.10.1 0.0.0.255 area 0  # This is F0.0
Router(config)#network 10.0.0.1 0.0.0.255 area 0 # This is Loopback on RouterA
(config-router)# no shut
# Router B
B(config)# router ospf 1
B(config)# router-id 1
B(config-router)# network 10.10.11.0 0.0.0.255 area 0
B(config-router)# network 10.10.12.0 0.0.0.255 area 0
## B(config-router)# network 10.10.12.0 0.0.0.3 area 0 # class Example
## Note the subnet - Kiku kien 252 subnet / 30 Jigi 0.0.0.3 (255 - 252 = 3)
## Add Loopbacks if needed.
B(config-router)# no shut
B(config-router)# exit
B # copy running-config startup-config

**write mem**

Saving OSPF Config

A # copy running-config startup-config

The following command configures all interfaces to participate in OSPF area 0:
Router(config-router)#network 0.0.0.0 255.255.255.255 area 0
The following command will force only interfaces addressed from 192.168.0.0 to participate in OSPF:
Router(config-router)#network 192.168.0.0 0.0.255.255 area 0
The following command specifically forces the serial interface to participate in OSPF area 0:
Router(config-router)#network 172.16.1.1 0.0.0.0 area 0

**write mem**
https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MU7yT3xcLwrPSq8O-ul%2F-MU7z_YU9anVwrssEN1I%2Fimage.png?alt=media&token=d1304938-59d2-4daa-8117-a1b3418f93bc

Repeat for the Other Routers

OSPF verification of single area

show ip route
show ip ospf neighbor
show ip protocols
show ip ospf : command used to display the OSPF process ID and router ID, as well as the OSPF SPF and OSPF area information.
show ip ospf interface : command that provides a detailed list of each interface with OSPF enabled and is very useful to determine if the network instructions were composed correctly.
show ip ospf interface brief : useful command to show a summary and the status of interfaces with OSPF enabled.
show ip ospf database

**write mem**

Configuring Advanced Options

A few advanced options can be useful in administrating OSPF, though they are not necessary for OSPF normal operation. These options include:

Configuring a loopback interface Specifying the router ID (RID)Manipulating the cost command changing the routers priority

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MORoaBdxsYPwnLeN_94%2F-MORp1iXk_hleYn2eZ40%2Fimage.png?alt=media&token=8ad279ed-d67e-4284-9303-92e730755bed

Configuring the Cost of an Interface

As already mentioned, the OSPF process assigns cost values to interfaces based on the inverse of the bandwidth parameter assigned to the interface with the bandwidth command.

For calculating the SPF to a given destination, the router takes into consideration the costs of the links along various paths. The path with the lower cost is selected as the shortest path.

To force the router to pick up a certain path, manual setting of the cost on a link along the path can be achieved using the following command:

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MORoaBdxsYPwnLeN_94%2F-MORq-GZ5EGWhj4tesHu%2Fimage.png?alt=media&token=b09c1ef2-8a2c-4f63-aa7b-f760aea454e1
Examples
This example shows how to configure the interface cost value to 65:
show ip ospf interface
switch(config)# interface ethernet f0/0
switch(config-if)# no switchport
switch(config-if)# ip ospf cost 65
switch(config-if)#
https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MORqTrXoqQrKCgnvtIa%2F-MORyzwBnfSFU7CjEHq6%2Fimage.png?alt=media&token=70be54bb-34f3-483a-9460-420748f769d7

Higher bandwidth has a lower cost. Lower bandwidth has a higher cost.

Lowest cost = Higher Path Priority (Shortest)

DR - BDR Election

DR and BDR election is done via the Hello protocol. Hello packets are exchanged via IP multicast packets (Appendix B) on each segment. The router with the highest OSPF priority on a segment will become the DR for that segment. The same process is repeated for the BDR. In case of a tie, the router with the highest RID will win.

R3# show ip ospf neighbor
Manual Priority Configurations
We can influence the DR election process by administratively
configuring higher priorities for routers we want to win the DR election.
Suppose we wanted R1 to become the DR and R2 to become the BDR:
R1(config)# interface f0/0
R1(config-if)# ip ospf priority 100
R2(config)# interface f0/0
R2(config-if)# ip ospf priority 90
show ip ospf neighbor

Saving OSPF Config

A # copy running-config startup-config / write mem


IGP - MultiArea OSPF

OSPF Database

R1 # show ip ospf database router

LSA/Area Types

LSA Types

  • LSA Type 1: Router LSA.

  • LSA Type 2: Network LSA.

  • LSA Type 3: Summary LSA.

  • LSA Type 4: Summary ASBR LSA.

  • LSA Type 5: Autonomous system external LSA.

  • LSA Type 6: Multicast OSPF LSA.

  • LSA Type 7: Not-so-stubby area LSA.

  • LSA Type 8: External attribute LSA for BGP.

LSA TYPE 1 – OSPF ROUTER LSA

LSA Type 1 (Router LSA) packets are sent between routers within the same area of origin and do not leave the area. An OSPF router uses LSA Type 1 packets to describe its own interfaces but also carries information about its neighbors to adjacent routers in the same area.

LSA TYPE 2 – OSPF NETWORK LSA

LSA Type 2 (Network LSA) packets are generated by the Designated Router (DR) to describe all routers connected to its segment directly. LSA Type 2 packets are flooded between neighbors in the same area of origin and remain within that area.

LSA TYPE 3 – OSPF SUMMARY LSA

LSA Type 3 (Summary LSA) packets are generated by Area Border Routers (ABR) to summarize its directly connected area, and advertise inter-area router information to other areas the ABR is connected to, with the use of a summary prefix (e.g 192.168.0.0/22). LSA Type 3 packets are flooded to multiple areas throughout the network and help with OSPF’s scalability with the use of summary prefixes

LSA TYPE 4 – OSPF ASBR SUMMARY LSA

LSA Type 4 (ASBR Summary LSA) packets are the LSAs that advertise the presence of an Autonomous System Border Router (ASBR) to other areas. In the example below when R2 (ABR) receives the LSA Type 1 packet from R1 it will create a LSA Type 4 (Summary ASBR LSA) packet, which advertises the ASBR route received from Area 1, and inject it into Area 0.

LSA TYPE 5 – OSPF ASBR EXTERNAL LSA

LSA Type 5 (ASBR External LSA) packets are generated by the ASBR to advertise external redistributed routes into the OSPF’s AS. A typical example of an LSA Type 5 would be an external prefix e.g 192.168.10.0/24 or default route (internet) as shown below:

LSA TYPE 6 – OSPF GROUP MEMBERSHIP LSA

LSA Type 6 (Group Membership LSA) packets were designed for Multicast OSPF (MOSPF), a protocol that supports multicast routing through OSPF. MOSPF is not supported by Cisco and is not widely used and is expected to be retired soon.

LSA TYPE 7 – OSPF NOT SO STUBBY AREA (NSSA) EXTERNAL LSA

LSA Type 7 (NSSA External LSA) packets are used for some special area types that do not allow external distributed routes to go through and thus block LSA Type 5 packets from flooding through them, LSA Type 7 packets act as a mask for LSA Type 5 packets to allow them to move through these special areas and reach the ABR that is able to translate LSA Type 7 packets back to LSA Type 5 packets.

LSA Type 8 packets (External Attributes LSA -OSPFv2-/ Link Local LSA -OSPFv3-) in OSPFv2 (IPv4) are called External Attribute LSAs, and are used to transit BGP attributes through an OSPF network while BGP destinations are conveyed via LSA Type 5 packets, however, this feature isn’t supported by most routers. With OSPFv3 IPv6), LSA Type 8 is redefined to carry IPv6 information through OSPF network.

Implementing Multi-Area OSPF

Advertisements

  • Advertise all respective networks for R4, R5, R6, and R7 which reside in the OSPF domain. (Note: Not all the networks reside in the same area)

R4
router ospf 1
 router-id 4.4.4.4
 passive-interface default
 no passive-interface FastEthernet0/0
 network 10.1.0.0 0.0.0.255 area 0

R5
router ospf 1
 router-id 5.5.5.5
 passive-interface default
 no passive-interface FastEthernet0/0
 no passive-interface FastEthernet1/0
 network 10.1.0.0 0.0.0.255 area 0
 network 10.1.1.0 0.0.0.3 area 1

R6
router ospf 1
 router-id 6.6.6.6
 passive-interface default
 no passive-interface FastEthernet0/0
 network 0.0.0.0 255.255.255.255 area 0

R7
router ospf 1
 router-id 7.7.7.7
 passive-interface default
 no passive-interface FastEthernet1/0
 network 0.0.0.0 255.255.255.255 area 1
https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MZ3rr5stKG09xnPWLPJ%2F-MZ3uQcYa5sjXlCFfMIz%2Fimage.png?alt=media&token=77fb5bb4-76bf-4d8a-9599-72b0b458a098

In this scenario - Area 1 is the transit Area

  • In order for Area 2 to form part of the Multi-Area OSPF

    • A Virtual Link must be created

    • Virtual Link will make the scenario as if Area 1 doesn't exist, thus makes Area 2 was directly connected with R4 (Backbone /ABR)

    R4

    ABR of Area 1.
    
    ## conf t
    ## int ser3/0
    ## area 1 virtual-link 5.5.5.5
    
    $$ On R4 (ABR of Area 0/1) and created a virtual link
    $$ to R5 (Another ABR) - And used it's router ID of 5.5.5.5
    $$ wr mem

    R5 - Repeat Steps on Other Side.

    ## ABR of Area 1/2.
    ## conf t
    ## int ser3/0
    ## area 1 virtual-link 4.4.4.4
    $$ to R5 (Another ABR) - And used it's router ID of 4.4.4.4
    $$ wr mem

    Route Summarization for Different Area

    • Must Advertise each loopback individually for the same area.

    • However, for Advertising R2 Loopbacks in Area 1, Advertise the route summary of Loopbacks on ABR (R4).

    https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MZ43nOOUT030C1I9h0K%2F-MZ44HpWmqJY5iejkets%2Fimage.png?alt=media&token=1080a0bf-2b5a-4197-92e0-ede5b5e94b10

    DO - Summary on the ABR Router - LSA Type 3

    • LSA Type 3 = Multi Area

    • LSA Type 1 & 2 = Same Area

    • LSA TYPE 2 = Is related to DR BDR.

    • In this Scenario, R2 Loopbacks will be learned by R6 via LSA Type 1.

    • But R5 will learn the Loopbacks summary via R4 via an LSA type 3.

    R4

    ## Summaring R2 Loopbacks and Summarizing on R4 (ABR)
    ## So R5 can learn 1 route ( the summary ).
    ## conf t
    ## router ospf 1
    ## area 1 range 192.168.0.0 mask

    R5

    ## sh ip ospf database router
    ## sh ip route

    Stub Configuration

    Stub

    https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MVG3w5MWJuzlR7bq7tx%2F-MVG70XQAnpkACSgzdzj%2Fimage.png?alt=media&token=c5c165b9-d3ce-44a7-8e30-158287fcfc6f

    R2
    conf t
    router ospf 1
    area 1 stub
    
    R1
    conf t
    router ospf 1
    area 1 stub

    https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MZ43nOOUT030C1I9h0K%2F-MZ46JIXn5aMhcth5YzB%2Fimage.png?alt=media&token=76eb5eb5-5441-494f-be4e-66b433dd5fde

    Totally Stub Configuration

    On the ABR

    R2
    conf t
    router ospf 1
    area 1 stub
    
    R1
    conf t
    router ospf 1
    area 1 stub no summary
    ## On R2
    ## sh ip ospf database

IGP - EIGRP

https://www.youtube.com/watch?v=QyymlFWDEgM

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MOjmrVe3XpBVFkp0w3q%2F-MOmTn_wFd-ScOKwuf_p%2Fimage.png?alt=media&token=f95bb495-281b-4c68-a5e5-a801ce1ef677

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MOjmrVe3XpBVFkp0w3q%2F-MOmTtano9osyFeiznEO%2Fimage.png?alt=media&token=321a0d47-abcd-4872-9bf4-416bb34817a2

EIGRP-Named-Mode

This image is a sample topology

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MOjmrVe3XpBVFkp0w3q%2F-MOmWswAf5KvERa9ffQP%2Fimage.png?alt=media&token=4481655b-cc10-4a66-a92b-7c7b92a4413c

configuring EIGRP for router GfGBangalore
GfGB(config)#router eigrp Process_eigrp
GfGB(config-router)#network 10.10.10.0  # network to be advertised
GfGB(config-router)#network 10.10.11.0  # network to be advertised
GfGB(config-router)#network 172.16.10.0 # Link advertised
GfGB(config-router)#network 172.16.10.4 # Link advertised
no auto-summary # Might need to remove auto summary because of IP conflicts.
write mem
GfGDelhi(config)#router eigrp Process_eigrp
GfGDelhi(config-router)#network 172.16.10.4 - Serial Link advertised
GfGDelhi(config-router)#network 10.10.50.0 - network to be advertised
GfGDelhi(config-router)#network 10.10.40.0  - network to be advertised (lookbacks)
no auto-summary
write mem

Now, similarly configuring EIGRP for GfGNoida, the networks to be advertised are 10.10.20.0/24, 10.10.30.0/24, 172.16.10.0/30

GfGN(config)#router eigrp Process_eigrp
GfGN(config-router)#network 172.16.10.0
GfGN(config-router)#network 10.10.20.0
GfGN(config-router)#network 10.10.30.0
no auto-summary
write mem

This is a simple configuration in which user has to write the network I’d of the network to be advertised with network command.

Verify the EIGRP process

show ip protocols: show parameters and current state of any active routing protocols, displays different types of output specific to each routing protocol
show ip eigrp neighbors
show ip interface brief
show ip route command. EIGRP routes are denoted in the routing table with a D. The letter D was used to represent EIGRP because the protocol is based upon the DUAL algorithm.

EGRIP Implementation 2 - /w Process ID

Configure EIGRP

EIGRP on R1, R2, R3 and R4, whilst also injecting the static route which was preconfigured on R8 into the EIGRP domain. Keep in mind to adhere to the following:

  • Advertise all respective networks for R1, R2, R3 and R4 which reside in the EIGRP domain.

# R2
router eigrp 10
 network 0.0.0.0
 passive-interface default
 no passive-interface Serial3/1
wr mem

R1
router eigrp 10
 network 0.0.0.0
 passive-interface default
 no passive-interface Serial3/0
 no passive-interface FastEthernet1/0
R3

router eigrp 10
 network 0.0.0.0
 passive-interface default
 no passive-interface Serial3/1
 no passive-interface Serial3/0
 no passive-interface Serial3/2

 R4
 router eigrp 10
 network 10.0.0.8 0.0.0.3
 passive-interface default
 no passive-interface FastEthernet1/0

Verify the EIGRP process

show ip protocols: show parameters and current state of any active routing protocols, displays different types of output specific to each routing protocol
show ip eigrp neighbors
show ip interface brief
show ip route command. EIGRP routes are denoted in the routing table with a D. The letter D was used to represent EIGRP because the protocol is based upon the DUAL algorithm.

Advanced configuration

Configure EIGRP Manual Summarization

EIGRP automatic & manual summarizationThis article explains EIGRP automatic and manual summarization.study-ccna.com

To establish EIGRP manual summarization on a specific EIGRP interface, use the following interface configuration mode command:

Router(config-if)# ip summary-address eigrp as-number network-address subnet-mask

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MOmbk_9-SSHtxhIOsbr%2F-MOmcKtsHggbdD0DvAYY%2Fimage.png?alt=media&token=8341577b-a1e5-4324-bac9-52d85f3e9c52

Supernet Calculator for IP - Online and Free!Supernetting Calculator - summarize routes easilysubnet-calculator.org

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MOmcWjCqOcZP263xIHp%2F-MOmcfm9jtbX7F0LBx8q%2Fimage.png?alt=media&token=faeaec51-7a69-4829-9c78-8d29792901eb

Fine-tune EIGRP interface

Bandwidth utilization

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

Hello and hold timers

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

EIGRP load balancing

EIGRP-Advanced Configuration and troubleshootingfrankfu.click

EIGRP authentication & load balancingThis article explains EIGRP authentication and load balancing.study-ccna.com


Redistribution & Route-Filtering

  • Scenario 👽

Implement 2-way redistribution and in turn advertise all networks in both routing domains. Keep in mind to adhere to the following:

Objectives

  • 1st part = Implementing IGP (Dynamic) = OSPF/EIGRP

  • Configure EIGRP on R4 and R1 and accurately advertise all relevant networks that reside in the EIGRP domain

R1(config)#router eigrp 100
R1(config-router)#network 10.0.1.0 0.0.0.3
R1(config-router)#exit
wr mem

R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#router eigrp 100
R4(config-router)#no auto-summary
R4(config-router)#network 10.0.1.0 0.0.0.3
R4(config-router)#
*Mar 22 13:27:57.895: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.0.1.2 (Serial3/0) is up: new adjacency
R4(config-router)#network 192.168.10.1 0.0.0.0
R4(config-router)#network 192.168.20.1 0.0.0.0
R4(config-router)#network 192.168.30.1 0.0.0.0
R4(config-router)#network 192.168.40.1 0.0.0.0
wr mem
  • Configure single area OSPF on R1, R2, and R3 and accurately advertise all relevant networks that reside in the OSPF domain.

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface f0/0
R1(config-if)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 10.0.0.0 0.0.0.255 area 0
R1(config-router)#no shut
wr mem
R1(config-router)#exit

R2(config)#interface f0/0
R2(config-if)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 10.0.0.0 0.0.0.255 area 0
*Mar 22 13:30:05.843: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar 22 13:30:13.511: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
R2(config-router)#network 172.16.10.1 0.0.0.0 area 0
R2(config-router)#network 172.16.20.1 0.0.0.0 area 0
R2(config-router)#network 172.16.30.1 0.0.0.0 area 0
wr mem
R2(config-router)#exit
Same for R3.
  • Inject OSPF routes into EIGRP, so that R4 is able to learn about networks which were originally advertised via OSPF. Note: such networks are displayed as “D EX”.

Redistribute OSPF into EIGRP
First, we’ll redistribute OSPF into EIGRP. We do this under the EIGRP process:
R1 (config)#router eigrp 100
Let’s take a look at the redistribute ospf options:
R1(config-router)#redistribute ospf ?
  <1-65535>  Process ID

R1 (config)#redistribute ospf 1 metric 1 1 1 1 1
show ip route
From R4 will see D EX Routes.
  • Inject EIGRP routes into OSPF, so that R2 and R3 are able to learn about networks which were originally advertised via EIGRP. Note: such networks are displayed as “O E2”.

Redistribute EIGRP into OSPF
# First go into the OSPFProcess and Inject the EIGRP process in it. Process num = 100
R1(config)#router ospf 1
R2(config-router)#redistribute eigrp 100 subnets

Route Filtering

Implement route filtering to limit the networks which should be received by R1 and injected in both routing domains. Keep in mind to adhere to the following:

Objectives

  • R1 should only learn about R4’s Lo1, Lo3 and Lo4 networks via EIGRP. Note: Network advertisements should be restricted at source.

# At Source
# conf t
## router eigrp 100
## distribute-list [NAMEOFFILTER] [out] [theinterface]
## distribute-list Filter_TO_R1 out s3/0
## do sh run   ## To see the distribute list in the EIGRP Process.
## Need an ACL now.
# R1
## ip access-list standard Filter_TO_R1
## 10 permit host 192.168.10.1
## 20 permit host 192.168.30.1
## 30 permit host 192.168.40.1
  • Only R4's Lo1 and Lo3 networks should be injected into OSPF domain, with a modified metric of 30 and 40, respectively. (Method to be used: Route maps without distribute list)

## So we dont distribute every loopback in EIGRP.
## R1 - We want to inject into OSPF - So conf the OSPF Process.
## Remove previous Thingy above task
## R1
## ip access-list standard metric_30
## 10 permit host 192.168.10.1
exit
## ip access-list standard metric_40
## 10 permit host 192.168.30.1
exit
## R1
route-map EIGRP_to_OSPF permit 10
match ip address metric_30
set metric 30
exit
route-map EIGRP_to_OSPF permit 20
match ip address metric_40
set metric 40
exit
redistribute eigrp 100 subnets route-map EIGRP_to_OSPF
  • Only R2's Lo2 and Lo3 networks should be injected into the EIGRP domain. (Method to be used: Distribute list using ACLs)

R1
router eigrp 100
distribute-list 1 out ospf 1
  • R3 should only have routes to reach R4’s Lo1 and R2’s Lo2 networks

Filtering -
router ospf 1
distribute-list 1 in f0/0
ip access-list standard 1
10 permit host 172.16.10.1
20 permit host 172.16.20.1
sh ip route
ping 172.16.20.1 source f0/0

Source-based Routing

Source-based routing, often referred to as policy routing, is used when the source IP address of the connection determines, in part or completely, which route is used. Source-based routing can be used to ensure that traffic is sent via a specific connection.

Routing decision based on SOURCE,

  • Traditional routing is based on destination.

  • Imagine this scenario below

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MY47hJUsr_QCcqqRNUu%2F-MY4BSWCyylXlj4lPQGX%2Fimage.png?alt=media&token=a17eeb3e-e6f3-4899-a656-cb07e26d9689

  • At school, we have two ISPs - Source-based routing what will do is, For example, Admin Vlan traffic will pass through the GO route and HR VLAN Traffic will go through Melita Route. This is source-based routing.

Scenario 2

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MY4CfTAiKRDexpwgn68%2F-MY4DXaAe5HE9IUiCapZ%2Fimage.png?alt=media&token=33bae83a-6063-455e-bd4c-5639bc3fe7c3

  • Configure Source-based routing on R1 so that Admin PC uses the upper path and HR Path uses the path on the bottom.

    • Note the upper path has a shorter distance due to the Faster e cable and the bottom path uses two serial cables which are slower.

    • Configuration on R1 - Using ROUTE MAPS and attach ACL to it.

Scenario

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MY4HqPN1bwPMhva6PKA%2F-MY5FJo_y38VjXq98064%2Fimage.png?alt=media&token=9c91c801-3b7e-4d09-be61-1bef0c0fd4b6

Flow

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MY4HqPN1bwPMhva6PKA%2F-MY5FTzpvSG2pNwn97A3%2Fimage.png?alt=media&token=038690c1-1d42-48e8-93de-759e9ca5249b

Implementation

R1
conf t
Creating ACL's for Admin VLAN
ip access-list standard admin_pbr_acl
10 permit 192.168.10.0 0.0.0.255
exit
Creating ACL for HR VLAN
ip access-list standard hr_pbr_acl
10 permit 192.168.10.0 0.0.0.255
exit
#########################################

Creating RouteMap
route-map routepolicy permit 10  # creating route-map [name] permits [line10]
match ip address admin_pbr_acl  # Will trigger when traffic comins from admin subnet
set ip next-hop 10.0.0.2   # Specifying Route - Traffic from Admin subnet goes to this hop. Upper path
exit
Editing Routemap - Inserting HR Vlan
route-map routepolicy permit 20  # creating route-map [name] permits [line10]
match ip address hr_pbr_acl  # Will trigger when traffic comins from HR subnet
set ip next-hop 10.0.0.10   # Specifying Route - Traffic from HR subnet goes to this hop. Upper path
exit
### Apply Routemaps on the VLAN Interfaces
R1
# interface f0/0.10
# ip policy route-map routepolicy # Applying Routemap on Admin VLAN
# interface f0/0.20
# ip policy route-map routepolicy # Applying Routemap on HR VLAN
exit
wr mem

Note

Scenario - HR Subnet traffic will pass via the botton link now, however, when it reaches R4, the route back will not come back using the same path since from there R4 can see it's slower,

So the traffic back will come from the upper path, And this is called Asymmetric Routing.


GRE Tunneling

https://gblobscdn.gitbook.com/assets%2F-M1dzu4e1FFgfrsm2XxL%2F-MYdMRmrwB16DU6uhkPt%2F-MYeIkvwJKNstRf62v2C%2Fimage.png?alt=media&token=8b2e6357-61e8-41a6-a023-2ed4e1483caa

What is and why.

  • Scenario

    • This topology has 3 routers, part of EIGRP, however, the loopbacks are not. Advertise the loop backs to R3 only via OSPF.

    • And to do this, we can create a GRE Tunnel that will use the OSPF.

    • So R2 (ISP) won't see the loopbacks, because they're not advertised via EIGRP. They will only get advertised to R3 via OSPF.

Step 1

## Setting UP EIGRP Process.

# R1
# router eirgp 10
# no auto-summary
# network 10.0.0.0 0.0.0.3

# R2
# router eirgp 10
# no auto-summary
# network 10.0.0.0 0.0.0.3
# network 10.0.0.4 0.0.0.3

# R3
# router eirgp 10
# no auto-summary
# network 10.0.0.4 0.0.0.3

Step 2

########################################################

Creating Basic GRE Tunnel From R1 to R3

Router1(config)# interface tunnel 0
Router1(config)# ip address 10.0.0.9 255.255.255.252
Router1(config-if)# tunnel source 10.0.0.1
Router1(config-if)# tunnel destination 10.0.0.6

########################################################
Creating Basic GRE Tunnel From R3 to R1

Router3(config)# interface tunnel 0
Router3(config)# ip address 10.0.0.10 255.255.255.252
Router3(config-if)# tunnel source 10.0.0.6
Router3(config-if)# tunnel destination 10.0.0.1

######
Advertise the GRE route in the OSPF/EIGRP process youre using.
In this instance the loopbacks are in OSPF and Routers are forming
neibhorship with EIGRP, thus tunnel is outside of EIGRP, thus we need
to advertise as same process as loopbacks = ospf.

So advertise GRE Tunnel in OSPF.
########################################################

# Creating OSPF Process on R1
Router1(config)# router ospf 1
Router1(config-ospf)# router-id 1.1.1.1
# network 192.168.0.0 0.0.255.255 area 0 # Advertising Loopbacks
# network 10.0.0.8 0.0.0.3 area 0 # Advertising GRE Tunnel in OSPF

# Creating OSPF Process on R3
Router3(config)# router ospf 1
Router3(config-ospf)# router-id 3.3.3.3
# network 172.16.0.0 0.0.255.255 area 0 # Advertising Loopbacks
# network 10.0.0.8 0.0.0.3 area 0 # Advertising GRE Tunnel in OSPF

Last updated

Was this helpful?