CCNA2 - Module 14 - 16 Flashcards

(75 cards)

1
Q

When a router gets an IP packet through one of its ports (called interfaces), it decides where to send it next. This process is called _. The router chooses another interface to send the packet toward its destination. Sometimes, the destination is directly connected to the router. Other times, the router sends the packet to another router that will continue moving it closer to the final destination.

Most of the time, each network a router connects to needs its own interface, but there are exceptions.

A

routing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The two main jobs of a router are:

A
  1. Find the best path for a packet using its routing table.
  2. Send the packet on its way to the destination.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

he router uses its _ to determine which path (route) to use to forward a packet. R1 and R2 will use their respective IP routing tables to first determine the best path, and then forward the packet.

A

IP routing table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • The best path in the routing table is also known as the .
A

longest match

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

the route in the routing table that has the greatest number of far-left matching bits with the destination IP address of the packet. The longest match is always the preferred route.

A

longest match

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

: Added to the routing table when a local interface is configured with an IP address and subnet mask (prefix length) and is active (up and up).

A

Directly Connected Networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

: Networks that are not directly connected to the router. Routers learn about remote networks in two ways:

A

Remote Networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
    • Added to the routing table when a route is manually configured.
A

Static routes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
    • Added to the routing table when routing protocols dynamically learn about the remote network.
A

Dynamic routing protocols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

: Specifies a next-hop router to use when the routing table does not contain a specific route that matches the destination IP address. The default route can be entered manually as a static route, or learned automatically from a dynamic routing protocol.

A

Default Route

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This means that no bits need to match the destination IP address for this route entry to be used. If there are no routes with a match longer than 0 bits, the default route is used to forward the packet. The default route is sometimes referred to as a gateway of last resort.

A

default route

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Packet Forwarding Decision Process

A
  1. The data link frame with an encapsulated IP packet arrives on the ingress interface.
  2. The router examines the destination IP address in the packet header and consults its IP routing table.
  3. The router finds the longest matching prefix in the routing table.
  4. The router encapsulates the packet in a data link frame and forwards it out the egress interface. The destination could be a device connected to the network or a next-hop router.
  5. However, if there is no matching route entry the packet is dropped.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What a Router Does After Choosing the Best Path

A
  1. Forwarding to a Device on a Directly Connected Network
  • If the router sees that the destination is on a network it’s directly connected to (like a local Ethernet LAN), it sends the packet straight to that device.
  • To do this, it wraps the packet in a special frame (like an envelope) and needs to know the device’s MAC address.
  • The way it finds the MAC address depends on whether the packet uses IPv4 or IPv6.
  1. Forwarding to a Next-Hop Router
  • If the destination is not directly connected, the packet has to go through another router (called the next-hop).
  • The router uses its routing table to find the next-hop router’s IP address.
  • Then, just like before, it finds the MAC address—but this time it looks up the next-hop router’s MAC address (not the final destination’s).
  • This process may differ depending on the type of network being used (like Ethernet vs others).
  1. Dropping the Packet
  • If the router can’t find a match for the destination in its routing table and there’s no default route, it drops the packet (meaning it doesn’t forward it anywhere).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How Routers Actually Send Packets Out (Encapsulation)

A
  • Routers send packets out using a data link frame—basically, a format that matches the type of connection being used (like Ethernet, PPP, or HDLC).
  • The faster the router can wrap and send packets in the right format, the better its performance.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Three Ways Routers Forward Packets

A
  1. Process Switching (Oldest & Slowest)
    * Every packet is handled by the CPU one by one.
    * Even if many packets go to the same place, the router repeats the whole process for each one.
  2. Fast Switching (Better)
    * The router uses a cache to remember past forwarding decisions.
    * The first packet is handled like process switching, but the next ones going to the same place are sent much faster using the cached info.
  3. Cisco Express Forwarding (CEF) – Fastest and Default Today
    * Instead of reacting to each packet, the router prepares ahead of time using special tables (FIB and adjacency table).
    * These tables are kept up to date when the network changes, so the router always knows the best and fastest way to forward packets.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Verification Commands
Common verification commands include the following:

A
  • show ip interface brief
  • show running-config interface interface-type number
  • show interfaces
  • show ip interface
  • show ip route
  • ping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Filter Command Output

A

Filtering commands can be used to display specific sections of output. To enable the filtering command, enter a pipe (|) character after the show command and then enter a filtering parameter and a filtering expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The filtering parameters that can be configured after the pipe include:

A
  • section - This displays the entire section that starts with the filtering expression.
  • include - This includes all output lines that match the filtering expression.
  • exclude - This excludes all output lines that match the filtering expression.
  • begin - This displays all the output lines from a certain point, starting with the line that matches the filtering expression.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

A routing table contains a list of routes to known networks (prefixes and prefix lengths). The source of this information is derived from the following:

A
  • Directly connected networks
  • Static routes
  • Dynamic routing protocols
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The source for each route in the routing table is identified by a code. Common codes include the following:

A
  • L - Identifies the address assigned to a router interface.
  • C - Identifies a directly connected network.
  • S - Identifies a static route created to reach a specific network.
  • O - Identifies a dynamically learned network from another router using the OSPF routing protocol.
  • *- This route is a candidate for a default route.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Routing Table Entries
In the figure, the numbers identify the following information:

A
  • Route source - This identifies how the route was learned.
  • Destination network (prefix and prefix length) - This identifies the address of the remote network.
  • Administrative distance - This identifies the trustworthiness of the route source. Lower values indicate preferred route source.
  • Metric - This identifies the value assigned to reach the remote network. Lower values indicate preferred routes.
  • Next-hop - This identifies the IP address of the next router to which the packet would be forwarded.
  • Route timestamp - This identifies how much time has passed since the route was learned.
  • Exit interface - This identifies the egress interface to use for outgoing packets to reach their final destination.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  • This identifies how the route was learned.
A
  • Route source
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  • This identifies the address of the remote network.
A
  • Destination network (prefix and prefix length)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
  • This identifies the trustworthiness of the route source. Lower values indicate preferred route source.
A
  • Administrative distance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
- This identifies the value assigned to reach the remote network. Lower values indicate preferred routes.
* **Metric**
23
- This identifies the IP address of the next router to which the packet would be forwarded.
* **Next-hop**
24
- This identifies how much time has passed since the route was learned.
* **Route timestamp**
24
- This identifies the egress interface to use for outgoing packets to reach their final destination.
* **Exit interface**
25
**Directly Connected Networks**
* A directly connected network is created when a router’s interface is given an IP address and turned on. * These routes appear in the routing table with a C (Connected). * The router also creates a local route (marked L) for the interface’s IP address itself. * Local routes match the exact IP (IPv4 uses /32, IPv6 uses /128) and are used to recognize packets meant for the router, not for forwarding.
25
**Static Routes**
* Static routes are manually added paths to reach remote networks. * They don't update automatically if the network changes. * Used for: Simple, small networks. A single default route to handle unknown destinations (0.0.0.0/0 or ::/0). Stub networks (a network with only one way in or out).
25
**Dynamic Routing**
* Dynamic routing protocols (like OSPF) automatically share network info between routers. * These routes update on their own when network changes happen. * In the routing table, O indicates a route learned from OSPF. * IPv6 uses the link-local address as the next-hop router.
26
**Default Route**
* A default route is used when there’s no exact match in the routing table. * IPv4 default: 0.0.0.0/0, IPv6 default: ::/0. * Can be static or dynamic.
27
**Routing Table Structure**
**IPv4** * Still follows an older class-based format. * Parent routes show the main network. * Child routes (indented) show more specific subnets and forwarding info. * Directly connected interfaces always appear as child routes. **IPv6** * Has a simple, consistent format with no class-based structure. * Every route entry is listed the same way.
28
**Administrative Distance (AD)**
* If the router learns the same route from different sources (e.g., static route, OSPF, RIP), it only picks one. * Administrative Distance `tells the router which source to trust more`—lower AD = more trusted. * Example: A static route (AD 1) is preferred over a RIP route (AD 120).
29
**Static vs. Dynamic Routing**
**Static Routes** are manually set and don't change unless you edit them. * Useful for small or simple networks. * Commonly used for: Default routes Stub networks Specific, controlled paths **Dynamic Routing** Protocols automatically update routes as the network changes. * Good for larger, growing networks. * Examples: OSPF, EIGRP, RIP.
30
**How Dynamic Routing Works**
**Dynamic routing uses:** * Tables (stored in RAM) to track routes * Messages to share info with other routers * Algorithms to choose the best path **Key functions:** * Learn about other networks * Choose the best route (based on metrics like distance, speed, or reliability) * Find new routes if one goes down
31
**Best Path Selection**
* The best path is the one with the lowest metric. * Each protocol uses its own metric: 1. **RIP** = hop count - max of 15 hops - each router along a path adds a hop to the hop count 2. **OSPF** = bandwidth - faster links are assigned lower cost 3. **EIGRP** = combination (bandwidth, delay, etc.) - include load and reliability into the metric calculation
31
* If multiple paths to a destination have the same metric, the router uses all of them—this is called ________ * Helps improve speed and reliability. * Only EIGRP supports unequal cost load balancing.
**equal cost load balancing.**
31
- Routing protocols typically use tables or databases for their operations. This information is kept in RAM.
**Data structures**
31
* - Routing protocols use various types of messages to discover neighboring routers, exchange routing information, and other tasks to learn and maintain accurate information about the network.
**Routing protocol messages**
32
*` - An is a finite list of steps used to accomplish a task`. Routing protocols use algorithms for facilitating routing information and for the best path determination.
**Algorithm**
32
= hop count - max of 15 hops - each router along a path adds a hop to the hop count
**Routing Information Protocol (RIP)**
33
= bandwidth - faster links are assigned lower cost
**Open Shortest Path First (OSPF)**
33
= combination (bandwidth, delay, etc.) - include load and reliability into the metric calculation
**Enhanced Interior Gateway Routing Protocol (EIGRP)**
33
When a router has two or more paths to a destination with equal cost metrics, then the router forwards the packets using both paths equally. This is called _.
**equal cost load balancing**
34
**Next-Hop Options** When configuring a static route, the next hop can be identified by an IP address, exit interface, or both. How the destination is specified creates one of the three following types of static route:
* **Next-hop route** - Only the next-hop IP address is specified * **Directly connected static route** - Only the router exit interface is specified * **Fully specified static route** - The next-hop IP address and exit interface are specified
34
**IPv4 Static Route Command**
Router(config)# `ip route network-address subnet-mask { ip-address | exit-intf [ip-address]} [distance]` **Note:** Either the ip-address, exit-intf, or the ip-address and exit-intf parameters must be configured.
35
**IPv6 Static Route Command**
Router(config)# `ipv6 route ipv6-prefix/prefix-length {ipv6-address | exit-intf [ipv6-address]} [distance]`
35
In a _, only the next-hop IP address is specified. The exit interface is derived from the next hop. For example, three next-hop IPv4 static routes are configured on R1 using the IP address of the next hop, R2.
**next-hop static route**
36
**IPv4 Next-Hop Static Route**
R1(config)# `ip route 172.16.1.0 255.255.255.0 172.16.2.2 ` R1(config)# `ip route 192.168.1.0 255.255.255.0 172.16.2.2 ` R1(config)# `ip route 192.168.2.0 255.255.255.0 172.16.2.2`
37
**IPv6 Next-Hop Static Route**
R1(config)# `ipv6 unicast-routing ` R1(config)# `ipv6 route 2001:db8:acad:1::/64 2001:db8:acad:2::2 ` R1(config)# `ipv6 route 2001:db8:cafe:1::/64 2001:db8:acad:2::2 ` R1(config)# `ipv6 route 2001:db8:cafe:2::/64 2001:db8:acad:2::2`
38
**IPv4 Directly Connected Static Route**
R1(config)# `ip route 172.16.1.0 255.255.255.0 s0/1/0 ` R1(config)# `ip route 192.168.1.0 255.255.255.0 s0/1/0 ` R1(config)# `ip route 192.168.2.0 255.255.255.0 s0/1/0`
39
**IPv6 Directly Connected Static Route**
R1(config)# `ipv6 route 2001:db8:acad:1::/64 s0/1/0 ` R1(config)# `ipv6 route 2001:db8:cafe:1::/64 s0/1/0 ` R1(config)# `ipv6 route 2001:db8:cafe:2::/64 s0/1/0`
40
**Fully Specified Static Route (IPv4 & IPv6)**
**A fully specified static route includes:** * The exit interface (where to send the packet) * The next-hop IP address (the next device to send it to) **When to Use:** * Required when the exit interface is multi-access (like Ethernet). * Especially important in IPv6 when using a link-local address as the next hop. * Link-local addresses only work on a single network segment. * The router needs both the exit interface and next-hop to avoid confusion. **Why It Matters:** * Ensures the router knows exactly where and to whom to send the packet.
41
**Verify a Static Route**
Along with **show ip route**, show ipv6 route, `ping` and `traceroute`, other useful commands to verify static routes include the following: * `show ip route static` * `show ip route network` * `show running-config | section ip route` Replace ip with ipv6 for the IPv6 versions of the command.
42
is a static route that matches all packets. A single default route represents any network that is not in the routing table.
**default route**
43
* are commonly used when connecting an edge router to a service provider network, or a stub router (a router with only one upstream neighbor router).
**Default static routes**
44
* : The command syntax for an IPv4 default static route is similar to any other IPv4 static route, except that the network address is 0.0.0.0 and the subnet mask is 0.0.0.0. The 0.0.0.0 0.0.0.0 in the route will match any network address.
**IPv4 Default Static Route** * Router(config)# `ip route 0.0.0.0 0.0.0.0 {ip-address | exit-intf}`
45
* : The command syntax for an IPv6 default static route is similar to any other IPv6 static route, except that the ipv6-prefix/prefix-length is ::/0, which matches all routes.
**IPv6 Default Static Route** * Router(config)# `ipv6 route ::/0 {ipv6-address | exit-intf}`
46
**Configure a Default Static Route**
The example shows an IPv4 default static route configured on R1. With the configuration shown in the example, any packets not matching more specific route entries are forwarded to R2 at 172.16.2.2. R1(config)# `ip route 0.0.0.0 0.0.0.0 172.16.2.2` An IPv6 default static route is configured in similar fashion. With this configuration any packets not matching more specific IPv6 route entries are forwarded to R2 at 2001:db8:acad:2::2 R1(config)# `ipv6 route ::/0 2001:db8:acad:2::2`
47
**Default Static Route (IPv4 & IPv6)**
* Use the command show ip route static or show ipv6 route static to view static routes. * A /0 (IPv4) or ::/0 (IPv6) means a default route — it matches all destinations when no better match exists. The route is marked with an asterisk *, showing it’s the Gateway of Last Resort.
48
**Floating Static Route**
* A floating static route is a backup route used only when the main route fails. * It works by setting a higher administrative distance than the primary route. * The router will ignore the floating route unless the better one is unavailable. * Use this to add redundancy without interfering with normal routing.
49
**Verifying & Testing**
* Use `show ip route` or s`how ipv6 route` to check if the route is active. * If the main path (e.g., R2) goes down, the floating route (e.g., to R3) automatically takes over.
50
* PC1 addresses a packet to PC3 and sends it to the default gateway address. * When the packet arrives on the R1 G0/0/0 interface, R1 decapsulates the packet and searches the routing table for a matching destination network entry.
**Static Routes and Packet Forwarding**
51
**If the destination IP address:** `Matches a static route entry, ...`
R1 will use the static route to identify the next-hop IP address or exit interface.
52
**If the destination IP address:** `Does not match a specific route to the destination network, ...`
then R1 will use the default static route (if configured).
53
**If the destination IP address:** `Does not match a route table entry,`
then R1 will drop the packet and send an ICMP message back to the source (i.e., PC1).
54
**Assuming R1 matches a routing table entry, it encapsulates the packet in a new frame and forwards it out of interface S0/1/0 to R2.**
* R2 receives the packet on its S0/1/0 interface. * It decapsulates and processes the packet the same way R1 did. * When R2 finds a match in the routing table, it uses the identified next-hop IP address or exit interface and sends the packet out of its interface S0/1/1 towards R3.
55
**R3 process**
56
**Networks fail for various reasons:**
* An interface can fail * A service provider drops a connection * Links can become oversaturated * An administrator may enter a wrong configuration Network administrators are responsible for troubleshooting and solving these problems. To efficiently find and solve issues, it is recommended to be familiar with tools that help isolate routing problems quickly.
57
* Verify Layer 3 connectivity to destination. * Extended pings provide additional options.
**ping**
58
* Verify the path to the destination network. * Uses ICMP echo reply messages to determine the hops to the destination.
**traceroute**
59
* Displays the routing table. * Used to verify route entries for destination IP addresses.
**show ip route**
60
* Displays the status of device interfaces. * Used to verify the operational status and IP address of an interface.
**show ip interface brief**
61
* Displays a list of directly connected Cisco devices. * Also used to validate Layer 1 and 2 connectivity.
**show cdp neighbors**