Adaptability
If we have a static route in place, to go to router D go over router B.
The router can detect if the interface goes down. The router is smart enough to remove the static route then and takes another route. If the problem happens in between the WAN link and not the whole interface goes down, the router cannot detect that it went down.
Scalability
Even with a small network, we have to type a lot of static routes. But with a bigger environment, you don’t have the time to create all these static routes by hand. So let’s use the routing procol like OSPF here, and let the routers talk to each other.
When we use routing protocols (OSPF, EIGRP or BGP (and RIP) ) it sends out an HELLO and wants to form a relationship. Then the gossip begins, one is telling him all the informations it got, and so on. Then there is a algorithm to get the best route to the destination.
BGP is the routing protocol of the internet. BGP is slow by intention. Imagine how many networks got down and up in this time you are readingthis. So BGP sees that the network goes down, stares at it like “is it coming up”, “is it up yet”, “not, sure about that”, “ok let’s tell our neighbours and these neighbours act the same way.
Categories of Routing Protocols
It’s very easy to setup, but when things go wrong you have to know how it works.
- IGP / EGP (interior gateway protocol / exterior gateway protocol)
the only EGP in existence is BGP for the internet.
Everything else is considered IGP. - Distance vector -> “Routing by rumor”
very resource friendly, they just know what their neighbours tell them, but could run into problems, because they don’t see the whole picture.
For example if a router gets connected to a network of routers, the new router only gets the message from its neighbour “if you want to go to network A, come to me, I got you covered”. And it is not telling the whole route etc.- RIP
- EIGRP
- Link state -> “Routing by map”
uses more resources, faster overall network convergence. In a small network it doesn’t needed.
If a new router gets connected to a network of routers, the new router gets send the whole routes, so every router knows exactly where to go and where its packets will flow (it knows router 4 goes to router 3 and router 3 goes to router 1 and so on).
IS-IS was intendet to get used by the OSI protocol, OSPF was intended to get used by the TCP / IP protocol- OSPF
- IS-IS
- Path vector -> “Yo mama”
it’s sooo big! If you strip it down, BGP is a distance vector protocol.- BGP
So BGP can also be used if you want to communicate with another network and use BGP in between, because BGP allows you to select very easyily which route to use.
- BGP
How Routing Protocols Find The Best Way
Route selection: defining truth (for routers)
- Inputs vs route table
routing table is NOT everything he knows about, that’s just the best of the best - “BIG” decision points
- Specificity
the more specific route wins! That’s why the default route doesn’t win all the time.
- Administrative distance (A.D.)
How believable is the source of the route? The lower the better
so OSPF automatically beat RIP! Remember for exam!
- metric
- Specificity
- Metric decision points
- RIP uses something called as HOP(-count)
every router is a HOP. If the HOP-count is even, RIP does load balance as default
- OSPF uses a metric called COST (100 / bandwidth_in Mbps)
lower wins! (100 Mbps and 1Gbps and 10 Gbps gives us the result 1!) But you can adjust the formula!
- EIGRP uses a composite metric (bandwidth, reliability, load and more)
K-Value formula -> lower is better
- RIP uses something called as HOP(-count)
- Load balancing (ECMP)
will turn on by default if the COST is even. One packet here, one packet there. - Floating static
For example when we use a cellular connection as a backup route. Normally these backup routes are cheap as long as you don’t need them, so we don’t want to use HELLO packets flowing through, so we need a static route which does not get triggered until its time.
ip route <IP> <SUBNET> <INTERFACE> <AD_1_higher_than_your_worst_protocol>
ip route 10.0.18.0 255.255.255.0 fa0/23 121
Understanding The Network Command
| Routing protocol | Process id | |
| Router | Ospf | 1 |
You are now in the config mode of that routing protocol.
The network command
- Identifies what interfaces should form a relationship (HELLO!)
- Identifies which local networks should be advertised
which networks do YOU want others to know about?
In our environment for example, the Fallout-Shelter does not care about the PATRON-Networks, so we would just advertise the Admin-Networks via this command.
| Command | IP | OSPF wild card bits | Area |
| Network | 10.0.18.0 | 0.0.0.31 | Area 1 |
The network command is about identifying “that’s the interface” So the command above does not even have to match the exact subnetmak of the interface. It’s just for identifying which one. For example:
| Command | IP | OSPF wild card bits | Area |
| Network | 10.0.18.1 | 0.0.0.0 | Area 0 |
That works as well. Because it just identifies the interface.
This command does not effect the network that is advertised! The router is smart enough to advertise the network and not just the interface. All the network command does is “I choose you to do those two things (HELLO messages and identifying which local networks should be advertised)”
As soon as we hit enter, it does two things, we are sending out HELLO’s out to that interface. Number two: that network I will include in the neighbor relationship that I form.
This command turns off the HELLO messages sent to this Admin-Interface, because there will never be a relationship formed:
| Command | Interface | Interface number (of VLAN) |
| Passive-interface | gigabitEthernet | 0/0.10 |
Because if you send out HELLO messages, that could be a security vulnerability. Because someone could take a rogue device and form a relationship with that interface and if this person could form that relationship the would have the whole network card of our network.
Castle Rysen – Implementing OSPF Routing Protocol
The area represents a segment of the map.
Map = LSDB (link state database)
ABR -> area border router
All devices in the same area have the same map, the same area, but how they navigate the map is different depends on where their starting point is.
Area 0 AKA the backbone area, all other areas must attach the first area that you create. So area 0 is the first area we create.
Summarization -> we summarize all the small networks to one bigger network like all the 10.1.1.0 /24, 10.1.2.0 /24, 10.1.3.0 /24 and so on, but the ABR only gets the summarization which is 10.1.0.0 /16. So his routing table stays efficient.
OSPF Troubleshooting
- neighbor process
HELLO
to form a relationship you have to have: the same subnetmask, the same area, the same hello/death timer (like 10 sec for hello and 40 sec for death), authentication and network type
when you set up a broadcast network it will elect a DR (designated router) and a BDR (backup designated router). These are the king and the queen which are talking over multicast frequency 224.0.0.6 to each other.
DBD
database description, high level view of the roadmap, they exchange the DBD
LSA
link state advertisement, every route has its own “trading card” of the route (how long known, where to go, which network and so on)
LSU
link state updates are the updates of that “trading cards”, things that happen as the network is known
LSACK
“got it” - Top show commands
- Show ip protocols
- Show ip ospf int brief
- Router id
- Clear ip ospf process
- Show ip ospf database
- Show ip ospf neighbor (Number 1)
- OSPF states
- Down ->nothing happens
- Init -> send hello message
- 2-way -> once the DR and BDR is elected, and there are other OSPF neighbors (peers) in the same broadcast domain, they are listed as 2-way
- Exstart -> they exchange the database “here’s the summary”
- Exchange -> LSAs and LSUs
- Loading -> I think I got everything and completes the database with the updates
- Full
Castle Rysen – Scaling OSPF to Larger Networks
- Multi-area benefits-> limiting the link state advertisements LSAs
- ABR -> area border router
no other router has the ability to summarize (except the ASBR). - ASBR
- ABR -> area border router
- Summarizing
- DR / BDR election control
All routers in one area have the same link state database!
LSA Type 1-> network advertisement (router)
LSA Type 2 -> LSA from a DR or BDR
LSA Type 3 -> summary LSA generated by the ABR
LSA Type4 ->
LSA Type 5 -> autonomous system boundary router ASBR, if the router connects to an outside system
Default-information originate always -> always send the default route information EVEN when the default route goes down
1 DR per segment (broadcast network)-> to control the DR -> ip ospf priority <NUMBER>
Cisco IOS commands learned in this chapter
| Command | Description | ||||
| Router | Ospf | <process-id> | Enters the global routing configuration mode for OSPF | ||
| Network | <ip-address> | <wildcard-mask> | Area | <area-id> | Identifies which local interfaces run OSPF, matches them via wildcards, and assigns them to an OSPF area |
| Passive-interface | <interface-id> | Stops outgoing HELLO packets on user-facing or local LAN interfaces to mitigate rogue-device vulnerabilities | |||
| Ip route | <subnet-mask> | <next-hop-ip | exit-interface> | <administrative-distance> | Creates a backup static route with a manual Administrative Distance (A.D.) higher than the dynamic protocol’s cost (e.g., higher than OSPF’s A.D. of 110) so it remains hidden until the primary link drops | |
| Default-information | Originate | Always | Forces the router to advertise a default route (0.0.0.0/0) into the OSPF domain so all other routers know how to reach external networks | ||
| Interface | <interface-id> | ||||
| Ip | Ospf | Priority | <0-255> | Manipulates which router becomes the DR (King) or BDR (Queen) on a multi-access broadcast segment | |
| Auto-cost | Reference-bandwidth | <bandwidth-in-mbps> | Example: auto-cost reference-bandwidth 10000 (Updates the reference to 10Gbps so faster links get lower, more accurate cost values) | ||
| Area | <area-id> | Range | <summary-ip> | <summary-mask> | ABR has the ability to summarize routes (like condensing 10.1.1.0/24 through 10.1.3.0/24 into a clean 10.1.0.0/16) |
| Clear | Ip | Ospf | Process | Forces the router to clear its neighbor relationships, flush its map database, and restart the HELLO process to pick up new configurations or force a DR/BDR re-election | |
| Show | Ip | Ospf | Neighbor | Shows the current status of all adjacent OSPF routers, their current state and their Router ID | |
| Show | Ip | Ospf | Database | Displays the Link State Database containing the individual “trading cards” (LSA Type 1, Type 2, Type 3, etc.) shared within the area | |
| Show | Ip | Ospf | Interface | Brief | Provides a brief list of all OSPF-enabled interfaces, their assigned areas, cost calculations, and whether they are active or passive |
| Show | Ip | Protocols | Shows general protocol behavior, routing metrics, active process IDs, Router ID, filter choices, and which networks are actively being advertised | ||
| Show | Ip | Route | Shows the definitive final IP routing table—the “best of the best” chosen by Specificity, AD, and Metric |