Jeremy’s IT Lab lecture video:
Commands
Commands List
Router Show Commands
8. Routes
8.1 General
- show ip route [argument]
-->
Shows the router/switch’s routing table, optionally with an argument to filter for routes of a specific type
- show ip protocols
-->
Shows routing protocol information8.2 EIGRP Routes
- show ip eigrp neighbors
-->
Shows information about EIGRP neighbors- show ip eigrp topology
-->
Shows all learned routes through EIGRP and their information. Includes routes that aren’t currently displayed inshow ip route
, and shows the EIGRP Feasible Distance and Reported Distance8.3 OSPF Routes
Link to original
- show ip ospf database
-->
Shows all of the Link State Advertisements (LSA) in the Link State Database (LSDB)- show ip ospf neighbor
-->
Shows the router’s OSPF neighbors- show ip ospf interface [interface-id]
-->
Shows detailed information about all the interfaces running OSPF, or one specific interface if specified
- show ip ospf interface brief
-->
Brief view of all OSPF interfacesRouter Global Configuration Commands
Router Commands
General
- router routing-protocol
- network arguments
-->
Enables the routing protocol on interfaces within that IP range- passive-interface interface-id
-->
Turns the interface into a passive interface that doesn’t send out protocol advertisements. The router will still continue to advertise the network prefix of the interface- passive-interface default
-->
Enables the Passive Interface mode on all interfaces by default- default-information originate
-->
Advertises the default route to all other neighbors- no router-id
-->
Resets the current Router ID on the router.- distance distance-value
-->
Changes the administrative distance (AD) of the routing protocol- maximum-paths path-value
-->
Changes the maximum amount of paths that Equal Cost Multi-Path (ECMP) can be done overRIP
- router rip
-->
Goes into RIP configuration mode- version 2
-->
Switches RIP version to 2- no auto-summary
-->
Disables auto-summarization to stop routers from converting advertised classless addresses into classful addresses- network ip-address
-->
Enables RIP on all interfaces that are within the IP rangeEIGRP
- router eigrp autonomous-system-number
-->
Goes into EIGRP configuration mode in the specified autonomous system group- eigrp router-id a.b.c.d
-->
Changes the EIGRP router ID- no auto-summary
-->
Disables auto-summarization to stop routers from converting advertised classless addresses into classful addresses- network ip-address [wildcard-mask]
-->
Enables EIGRP on interfaces within the specified range. A wildcard mask can be used optionallyOSPF
- router ospf process-id
-->
Goes into OSPF router configuration for the specified process- router-id a.b.c.d
-->
Changes the OSPF router ID- network ip-address wildcard-mask area area-number
-->
Enables OSPF on interfaces within the specified range and puts them in the specified area number.- auto-cost reference-bandwidth megabits-per-second
-->
Changes the default reference bandwidth that is used for calculating the metric/cost- shutdown
-->
Shuts down the current OSPF process when in OSPF process configuration mode
Link to original2. OSPF
Link to original
- clear ip ospf process
-->
Restarts the current OSPF processOSPF Interface Commands
1. OSPF
Link to original
- ip ospf cost cost
-->
Changes the interface’s cost value- ip ospf process-ID area area
-->
Enables OSPF directly on an interface- ip ospf priority priority
-->
Changes the interface’s OSPF priority, used for DR/BDR elections- ip ospf network network-type { broadcast
/
point-to-point/
non-broadcast }-->
Changes the OSPF network type used on the interface- ip ospf hello-interval seconds
-->
Changes the Hello message timer- ip ospf dead-interval seconds
-->
Changes the Dead message timer- ip ospf authentication
-->
Enables OSPF authentication on the current interface- ip ospf authentication-key password
-->
Sets the authentication key/password on the interfaceSerial
Link to original
- interface serial port/number
-->
Enters serial interface configuration mode
- clock rate bits-per-second
-->
Changes the serial interface’s operating speed, used on the DCE (Data Communications Equipment) side- encapsulation protocol {ppp
/
hdlc}-->
Changes the encapsulation mode. Must match on both sides of the serial connection
OSPF Information
Loopback Interfaces
A loopback interface is a virtual interface in the router that’s always in an up/up state (unless shutdown).
- It does not depend on a physical interface, therefore, it provides a consistent IP address that can be used to reach the router or identify it.
OSPF Network Types
OSPF has a few network types that are used for different scenarios and behave differently. The 3 main ones are:
- Broadcast
- Enabled by default on Ethernet and FDDI (Fiber Distributed Data Interface) interfaces.
- Point-to-point
- Enabled by default on PPP (Point-to-Point Protocol) and HDLC (High-Level Data Link Control).
- Non-broadcast
- Enabled by default on Frame Relay and X.25 interfaces.
How to change the network type on an interface?
The OSPF network type can be configured on an interface with the
ip ospf network NETWORK-TYPE
command
Network Type Table Summary
Broadcast | Point-to-point | Non-broadcast |
---|---|---|
Default on Ethernet and FDDI | Default on PPP and HDLC | Default on Frame Relay and X.25 |
DR/BDR elected | No DR/BDR elected | No DR/BDR elected |
Neighbors dynamically discovered | Neighbors dynamically discovered | Neighbors aren't dynamically discovered |
Default timers: Hello - 10 seconds Dead - 40 seconds | Default timers: Hello - 10 seconds Dead - 40 seconds | Default timers: Hello - 30 seconds Dead - 120 seconds |
Broadcast Network Type
The broadcast network type is enabled by default on Ethernet and FDDI (Fiber Distributed Data Interface) interfaces.
- Routers dynamically discover neighbors by sending and receiving OSPF Hello messages using the multicast address of 224.0.0.5
- A DR (Designated Router) and BDR (Backup Designated Router) must be elected on each subnet. (With there only being a DR if there are no OSPF neighbors)
- Any other routers in the network which aren’t DRs or BDRs will become DROthers.
- Messages to the DR/BDR are sent to the multicast address of 224.0.0.6
Important DR/BDR and DROthers info
- Routers will only form a FULL OSPF adjacency with the DR and BDR of the segment. Therefore, routers only exchange LSAs with the DR and BDR.
- Meanwhile, the DROthers establish a 2-way connection between each other, and do not share LSAs with each other. (All routers will still have the same LSDB, but this reduces the amount of LSAs flooding the network.)
- In short,
- the DR and BDR will form a FULL OSPF adjacency with ALL routers in the subnet.
- DROthers will form a FULL OSPF adjacency only with the DR/BDR
DR and BDR Election
There are two values that are checked when electing a DR and BDR, with the order of priority being from top to bottom
- Highest OSPF interface priority
- Highest OSPF Router ID
The first place is assigned the DR role for the subnet, the second place is assigned the BDR role. All other routers in the subnet will become DROthers.
- The DR/BDR election is ‘non-preemptive’, meaning that once both the DR and BDR are selected, they will keep their role until the OSPF process is reset, or the interface is shutdown/fails, etc.
- If the OSPF process is reset or the DR/BDR interface is down for whatever reason, the BDR will instantly assume the role of DR and a new BDR election will be held, even if there are currently interfaces with higher priorities or Router IDs.
OSPF Interface Priority
The default OSPF interface priority is 1 on all interfaces.
If the OSPF interface priority is set to 0, the router cannot become a DR or BDR for the subnet.The priority can be changed on a per-interface basis with a maximum value of 255 using the command:
ip ospf priority PRIORITY-VALUE
Point-to-Point Network Type
The Point-to-Point network type is enabled by default on PPP (Point-to-Point Protocol) and HDLC (High-Level Data Link Control).
- Routers dynamically discover neighbors by sending and receiving OSPF Hello messages using the multicast address of 224.0.0.5
- There are no DR/BDR elections, as this connection type is used between two devices (aka point-to-point), so there would be no need to elect a DR or BDR.
Serial Interfaces
Serial interfaces are old interfaces that were used before the invention of Ethernet interfaces.
- It consists of two connections with one side functioning as the DCE (Data Communications Equipment) and the other functioning as the DTE (Data Terminal Equipment).
- The DCE side of the connection is the one responsible for the clock rate (speed) of the connection.
- The default encapsulation on a serial interface is HDLC. (cHDLC for Cisco devices)
- The encapsulation type must match on both sides of the connection, or else, both interfaces will go down won’t be able to communicate with each other.
Clock rate VS. Speed
Ethernet interfaces use the
speed MEGABITS-PER-SECOND
command to configure their interfaces’ working speed.
Meanwhile, Serial interfaces use theclock rate BITS-PER-SECOND
command
How to figure out which side is DCE and which is DTE?
You can check which side is DCE and DTE with the
show controllers serial INTERFACE-ID
command. Where INTERFACE-ID is the ID of the serial interface you’re checking.
OSPF Neighbor Requirements
For OSPF routers to become neighbors, there are multiple requirements they should meet. The most important ones are:
- OSPF process must not be shutdown
- Interfaces must be in the same subnet
- Area number must match
- OSPF Router IDs must be unique
- Hello and Dead timers must match
- Authentication settings must match
- IP MTU settings must match
- OSPF Network Type must match
IP MTU and Network Type disclaimer
For #7 (IP MTU settings must match) and #8 (OSPF Network Type must match), routers can become OSPF neighbors with each other, however, they will not operate properly.
- So, if you check the OSPF show commands and everything looks fine but the system isn’t functioning correctly, make sure to check on #7 and #8
OSPF LSA Types
The OSPF LSDB contains a list of LSAs, and, there are 11 different types of LSAs that can be contained within that database. The most important three for the CCNA are:
- Type 1 (Router LSA)
- Every OSPF router generates this LSA.
- It identifies the router using the Router ID.
- It lists the networks attached to the router’s OSPF-activated interfaces.
- Type 2 (Network LSA)
- Generated by the DR of each multi-access network (like the broadcast network type)
- Lists the routers which are attached to the multi-access network.
- Type 5 (AS-External LSA)
- Generated by the ASBRs to describe routes to destinations outside of the AS (OSPF domain)