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 originatecommand 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
networkcommand in OSPF requires you to specify the area.- Ex.
network IP-ADDRESS WILDCARD-MASK area AREA
- Ex.
- Also, the
networkcommand 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-IDcommand 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 originatecommand 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.Dis used to change the Router-ID, the change will not take effect until an OSPF restart is performed.
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
Router Show Parancsok
8. Útvonalak
8.1 Általános
- show ip route [argument]
-->Megjeleníti a router/switch routing table-jét, opcionális argumentummal szűrve egy adott útvonaltípusra- show ip protocols
-->Megjeleníti az útválasztó protokoll információit8.2 EIGRP Útvonalak
- show ip eigrp neighbors
-->Megjeleníti az EIGRP szomszédok adatait- show ip eigrp topology
-->Megjeleníti az EIGRP-n keresztül tanult összes útvonalat és azok információit. Tartalmaz olyan útvonalakat is, amelyek jelenleg nem láthatók ashow ip routekimenetében, és megmutatja az EIGRP Feasible Distance és Reported Distance értékeket8.3 OSPF Útvonalak
Eredeti hivatkozása
- show ip ospf database
-->Megjeleníti az összes Link State Advertisement-et (LSA) a Link State Database-ben (LSDB)- show ip ospf neighbor
-->Megjeleníti a router OSPF szomszédait- show ip ospf interface [interface-id]
-->Részletes információkat jelenít meg az OSPF-et futtató összes interfészről, vagy a megadott konkrét interfészről
- show ip ospf interface brief
-->Tömör összefoglaló nézet az összes OSPF interfészrőlRouter Globális Konfigurációs Parancsok
Router Parancsok
Általános
- router routing-protocol
- network arguments
-->Engedélyezi az útválasztó protokollt a megadott IP tartományba eső interfészeken- passive-interface interface-id
-->Passzív interfészbe állítja az interfészt, így nem küld ki protokoll hirdetéseket (advertisements). A router továbbra is hirdeti az interfész hálózati prefixét- passive-interface default
-->Alapértelmezés szerint minden interfészen bekapcsolja a passzív interfész módot- default-information originate
-->Hirdeti az alapértelmezett útvonalat (default route) a szomszédok felé- no router-id
-->Visszaállítja a router aktuális Router ID értékét- distance distance-value
-->Módosítja az útválasztó protokoll administrative distance (AD) értékét- maximum-paths path-value
-->Módosítja az Equal Cost Multi-Path (ECMP) során használható útvonalak maximális számátRIP
- router rip
-->Belép a RIP konfigurációs módba- version 2
-->Átvált a 2-es RIP verzióra- no auto-summary
-->Kikapcsolja az automatikus összegzést (auto-summarization), így nem alakítja át a classless címeket classful címekké- network ip-address
-->Engedélyezi a RIP-et az adott IP tartományba eső összes interfészenEIGRP
- router eigrp autonomous-system-number
-->Belép az EIGRP konfigurációs módba a megadott autonomous system csoportban- eigrp router-id a.b.c.d
-->Módosítja az EIGRP router ID-t- no auto-summary
-->Kikapcsolja az automatikus összegzést- network ip-address [wildcard-mask]
-->Engedélyezi az EIGRP-t a megadott tartományba eső interfészeken. Opcionálisan wildcard maszk is használhatóOSPF
- router ospf process-id
-->Belép az OSPF router konfigurációba a megadott process-hez- router-id a.b.c.d
-->Módosítja az OSPF router ID-t- network ip-address wildcard-mask area area-number
-->Engedélyezi az OSPF-et a megadott tartomány interfészein, és hozzárendeli őket a megadott area-hoz- auto-cost reference-bandwidth megabits-per-second
-->Megváltoztatja a metrika/költség számításához használt alapértelmezett referencia sávszélességet- shutdown
-->Leállítja az aktuális OSPF folyamatot OSPF konfigurációs módban
Eredeti hivatkozása2. OSPF
Eredeti hivatkozása
- clear ip ospf process
-->Újraindítja az aktuális OSPF folyamatotOSPF Interfész Parancsok
1. OSPF
Eredeti hivatkozása
- ip ospf cost cost
-->Módosítja az interfész költségértékét- ip ospf process-ID area area
-->Közvetlenül az interfészen engedélyezi az OSPF-et- ip ospf priority priority
-->Módosítja az interfész OSPF prioritását (a DR/BDR választásnál használatos)- ip ospf network network-type { broadcast
/point-to-point/non-broadcast }-->Módosítja az interfészen használt OSPF hálózattípust- ip ospf hello-interval seconds
-->Módosítja a Hello üzenet időzítőjét- ip ospf dead-interval seconds
-->Módosítja a Dead üzenet időzítőjét- ip ospf authentication
-->Engedélyezi az OSPF hitelesítést az aktuális interfészen- ip ospf authentication-key password
-->Beállítja a hitelesítési kulcsot/jelszót az interfészenSoros (Serial)
Eredeti hivatkozása
- interface serial port/number
-->Belép a soros interfész konfigurációs módba
- clock rate bits-per-second
-->Beállítja a soros interfész működési sebességét, a DCE (Data Communications Equipment) oldalon használatos- encapsulation protocol {ppp
/hdlc}-->Megváltoztatja az encapsulation módot. A soros kapcsolat mindkét végén egyeznie kell
OSPF Információk
Az Open Shortest Path First (OSPF) egy dinamikus útválasztó protokoll, amelyet széles körben alkalmaznak a modern hálózatokban. A Shortest Path First (SPF) algoritmust használja (más néven Dijkstra-algoritmus).
- Az OSPF-nek 3 verziója létezik:
- OSPFv1: Régi, már nem használt.
- OSPFv2: IPv4-hez használatos.
- OSPFv3: IPv6-hoz használatos (használható IPv4-hez is, de általában a v2-t használják).
A routerek a hálózatra vonatkozó információkat LSA-kban (Link State Advertisements) tárolják, amelyeket LSDB-kbe (Link State Databases) szerveznek.
A routerek addig árasztják (flood) az LSA-kat, amíg az adott OSPF area minden routere el nem készíti a hálózat ugyanazon térképét (amíg minden routernél azonos LSDB nem jön létre).
LSA Árasztási Folyamat (Flooding Process)
- Amikor az OSPF aktiválódik egy interfészen, a router létrehoz egy LSA-t, hogy tájékoztassa szomszédait az adott interfészhez kapcsolódó hálózatról.
- Az LSA elárasztja a hálózatot, amíg minden router meg nem kapja.
- Végül minden router azonos LSDB-vel fog rendelkezni, és minden router az SPF algoritmus segítségével kiszámítja a legjobb útvonalakat.
Az OSPF-ben az LSA-k megosztásának és a legjobb útvonalak meghatározásának 3 fő lépése:
- Szomszédsági viszony kialakítása a többi routerrel
- LSA-k cseréje a szomszédos routerekkel
- A legjobb útvonalak kiszámítása
OSPF Területek (Areas)
Az OSPF area-kat használ a hálózat felosztására.
A kisebb hálózatok negatív hatások nélkül használhatnak single-area (egyetlen területből álló) elrendezést.
Nagyobb hálózatokban azonban a single-area kialakítás számos problémát okozhat.
A single-area elrendezés hatásai nagy hálózatokban
- Az SPF algoritmusnak több időre van szüksége az útvonalak kiszámításához
- Az SPF algoritmus exponenciálisan több processzorkapacitást (CPU) igényel a routereken
- A nagyobb LSDB több memóriát (RAM) foglal el a routereken
- A hálózatban bekövetkező bármilyen apró változás miatt minden router újra elárasztja az LSA-kat, és újra lefutattja az SPF algoritmust
OSPF Terminológia
-
Area: Olyan routerek és kapcsolatok halmaza, amelyek azonos LSDB-vel rendelkeznek.
-
Backbone Area (area 0): Egy speciális terület, amelyhez a hálózat összes többi area-jának csatlakoznia kell.
-
Belső routerek (Internal Routers): Olyan routerek, amelyek összes interfésze ugyanabban az area-ban található.
-
Area Border Routers (ABR): Olyan routerek, amelyek interfészei több különböző area-hoz tartoznak.
-
Autonomous System Boundary Router (ASBR): Olyan OSPF router, amely az OSPF hálózatot külső hálózathoz/routerhez köti.
-
Backbone routerek (Backbone Routers): A backbone area-hoz közvetlenül csatlakozó routerek.
-
Intra-area Route: Olyan útvonal, amelynek célállomása ugyanabban az OSPF area-ban van.
-
Interarea Route: Olyan útvonal, amelynek célállomása egy másik OSPF area-ban található.
OSPF Area Szabályok
- Az OSPF area-knak folytonosnak (contiguous) kell lenniük.
- (A nem folytonos terület azt jelentené, hogy például az area 1 két különálló részre van szakadva)
- Minden OSPF area-nak rendelkeznie kell legalább egy olyan ABR routerrel, amely a backbone area-hoz csatlakozik.
- Az azonos alhálózaton lévő OSPF interfészeknek ugyanahhoz az area-hoz kell tartozniuk.
ABR routerek maximális Area kapcsolatai
- Az ABR routerek külön LSDB adatbázist tartanak fenn minden egyes area számára, amelyhez csatlakoznak.
- Javasolt, hogy egy ABR legfeljebb 2 area-hoz csatlakozzon.
- Ha egy ABR-t 3 vagy több területhez csatlakoztatunk, az túlzottan leterhelheti a routert.
OSPF Autonomous System Boundary Router (ASBR)
Az Autonomous System Boundary Router (ASBR) egy olyan OSPF router, amely az OSPF hálózatot egy külső hálózathoz/routerhez köti össze.
- Ez a szerepkör akkor jön létre, amikor a router rendelkezik egy alapértelmezett útvonallal (default route), és kiadjuk a routeren a
default-information originateparancsot.
Alapvető OSPF Konfiguráció
Az OSPF indítása a router ospf PROCESS-ID paranccsal történik.
Az OSPF process ID csak lokálisan bír jelentőséggel a routeren. Az eltérő process ID-vel rendelkező routerek is képesek egymással OSPF szomszédságot létesíteni, nem szükséges egyezniük a process ID-knak.
- Network parancs:
- A
networkparancsban az OSPF megköveteli az area megadását.- Pl.
network IP-ADDRESS WILDCARD-MASK area AREA
- Pl.
- A
networkparancs arra utasítja a routert, hogy:- Keressen olyan interfészeket, amelyek IP-címe a megadott tartományba esik, és aktiválja rajtuk az OSPF-et a megadott area-ban.
- A router ezután megkísérel OSPF szomszédságot kialakítani más OSPF routerekkel.
- A
- Passzív interfész (Passive Interface) parancs:
- A
passive-interface INTERFACE-IDparancs arra utasítja a routert, hogy fejezze be az OSPF Hello üzenetek küldését a megadott interfészen. Olyan interfészeken használatos, amelyekhez nem csatlakozik OSPF szomszéd. - A router azonban továbbra is küld LSA-kat, amelyekben tájékoztatja a szomszédokat az adott interfészen konfigurált alhálózatról.
- A
- Default Information parancs:
- A
default-information originateparancs arra utasítja a routert, hogy hirdesse meg az alapértelmezett útvonalát (default route) a többi protokoll szomszéd felé.
- A
OSPF Router ID
Az OSPF router ID 3 módszer egyikével kerül kiválasztásra, az alábbi prioritási sorrendben:
- Kézi konfiguráció (a
router-id A.B.C.Dparanccsal) - A loopback interfészen lévő legmagasabb IP-cím
- A fizikai interfészen lévő legmagasabb IP-cím
Figyelem: A Router-ID működése
- Ha az OSPF már elindult az eszközön (a
router ospf PROCESS-IDparanccsal) és a Router-ID hozzárendelésre került kézzel vagy automatikusan, akkor a Router-ID érvényben marad, és nem változik meg az OSPF folyamat újraindításáig.- Még ha a
router-id A.B.C.Dparancsot használjuk is a Router-ID módosítására, a változtatás csak az OSPF újraindítása (pl.clear ip ospf process) után lép életbe.