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
Open Shortest Path First (OPSF) is a dynamic routing protocol that is widely used in modern networks. It uses the Shortest Path First (SPF) algorithm (also called Dijkstra’s algorithm)
- OSPF has three versions:
- OSPFv1: Old and not in use anymore.
- OSPFv2: Used for IPv4
- OSPFv3: Used for IPv6 (can also be used for IPv4, but usually v2 is used)
Routers store information about the network in LSAs (Link State Advertisements) which are organized in LSDBs (Link State Databases)
Routers will flood LSAs until all routers in the OSPF area develop the same map of the network. (until all routers have the same LSDB)
LSA Flooding Process
- When OSPF is activated on an interface, the router creates an LSA to tell its neighbors about the network on that interface.
- The LSA is flooded throughout the network until it has been received by all routers.
- Eventually, all routers will have the same LSDB and each router will use the SPF algorithm to calculate the best routes
In OSPF, the three main steps to sharing LSAs and determining the best route are:
- Become neighbors with other routers
- Exchange LSAs with neighbor routers
- Calculate the best routes
OSPF Areas
OSPF uses areas to divide up the network.
Small networks can use a single-area setup without any negative effects.
However, large networks can suffer from many negative effects if a single-area setup is used.
The effects of single-area on large networks
- The SPF algorithm takes more time to calculate routes
- The SPF algorithm requires exponentially more processing power on the routers
- The larger LSDB takes up more memory on the routers
- Any small change in the network causes every router to flood LSAs and run the SPF algorithm again
OSPF Terminology
-
Area: An area is a set of routers and links that share the same LSDB.
-
Backbone Area (area 0): A special area that all other areas in the network must connect to.
-
Internal Routers: Routers with all interfaces in the same area.
-
Area Border Routers (ABR): Routers with interfaces in multiple areas.
-
Autonomous System Boundary Router (ASBR): OSPF router that connects the OSPF network to an external router.
-
Backbone Routers: Routers connected to the backbone area.
-
Intra-area Route: A route to a destination inside the same OSPF area.
-
Interarea Route: A route to a destination in a different OSPF area.
OSPF Area Rules
- OSPF areas should be contiguous.
- (Being non-contiguous would mean having a area 1 be split up into two different places, for example)
- All OSPF areas must have at least one ABR connected to the backbone area.
- OSPF interfaces in the same subnet must be in the same area.
ABRs Maximum Area Connections
- ABRs maintain a separate LSDB for each area they are connected to.
- It is recommended that you connect an ABR to a maximum of 2 areas.
- Connecting an ABR to 3+ areas can overburden the router.
OSPF Autonomous System Boundary Router (ASBR)
The Autonomous System Boundary Router (ASBR) is an OSPF router that connects the OSPF network to an external router.
- It is assigned when a router has a default route and the
default-information originate
command is used on the router.
Basic OSPF Configuration
OSPF initialization is done through the router ospf PROCESS-ID area AREA-ID
command.
The OSPF process ID is locally significant on the router itself. Routers with different process IDs can become OSPF neighbors, they do not need to have matching process IDs.
- Network command:
- The
network
command in OSPF requires you to specify the area.- Ex.
network IP-ADDRESS WILDCARD-MASK area AREA
- Ex.
- Also, the
network
command tells the router to:- Look for interfaces with an IP address that is in the specified range and activate OSPF on them in the specified area.
- The router will then try to become OSPF neighbors with other OSPF routers.
- The
- Passive Interface command:
- The
passive-interface INTERFACE-ID
command tells the router to stop sending OSPF Hello messages out of the specified interface. It is used on interfaces that don’t have any OSPF neighbors. - However, the router will still continue to send LSAs informing its neighbors about the subnet configured on that interface.
- The
- Default Information command:
- The
default-information originate
command tells the router to advertise its default route to the other protocol neighbors.
- The
OSPF Router ID
The OSPF router ID is selected through 3 methods, with priority being from top to bottom
- Manual Configuration (via
router-id A.B.C.D
) - Highest IP address on a loopback interface
- Highest IP address on a physical interface
Watch out: Router-ID functionality
- If OSPF has already been started on the device (through
router ospf PROCESS-ID area AREA-ID
) and a Router-ID has been assigned either manually or automatically, then the Router-ID will stay the same, and will not change until the OSPF process is restarted.- Even if
router-id A.B.C.D
is used to change the Router-ID, the change will not take effect until an OSPF restart is performed.