Classical IOS vs. IOS XE: Classical IOS is
monolithic, meaning all features are in one file, and failures in one function
can cause the entire system to fail, requiring a reboot for upgrades. IOS XE is
used on ASR1K and operates more like Linux with an IOS interface, allowing access
to the Linux shell and daemon-based operations.
Prefix Lists: Prefix lists match both the prefix and
prefix length for routing decisions. EIGRP can advertise directly connected
networks without extra configuration. The "ge" option helps define
specific prefix ranges.
IP Routing Overview: Routers forward packets by
comparing the destination IP address to the routing table, always choosing the
most specific match (longest match rule). Static routes can remain even if the
next-hop becomes unreachable using the "permanent" keyword.
IP Packet Fields:
- Version:
Identifies the IP version (e.g., IPv4).
- Header
Length: Defines the length of the IP header.
- Type
of Service (TOS): Sets the handling priority for packets.
- TTL:
Limits packet lifetime to prevent endless wandering in networks, often
used as a hop count.
- Fragmentation:
Routers fragment packets if they exceed the MTU of a link. The "More
Fragments" bit helps keep track of fragments during reassembly.
Subnetting and VLSM: Subnets divide larger networks
into smaller segments. Variable Length Subnet Masks (VLSM) allow the use of
different masks in a network, conserving IP addresses.
CIDR (Classless Interdomain Routing): CIDR allows for
route summarization, reducing routing table sizes and supporting efficient IP
allocation.
Classful vs. Classless Routing: Classful routing
protocols like RIP and IGRP assume a default subnet mask, while classless
protocols like OSPF, EIGRP, and IS-IS explicitly advertise masks.
Traceroute: Uses the TTL field to trace a route by
incrementing TTL for each router along the path, gathering source addresses
from routers that decrement TTL to zero.
ARP Concepts:
- Proxy
ARP: Routers respond to ARP requests on behalf of devices when no
default gateway is set, mapping multiple IP addresses to the router's MAC
address.
- Gratuitous
ARP: Used for duplicate address detection or updating ARP caches with
new hardware addresses.
- Reverse
ARP (RARP): Maps an IP address to a known hardware address, used by
devices without pre-configured IPs.
Cisco Express Forwarding (CEF):
- Planes:
Divides functions into management (admin tasks), control
(packet-forwarding decisions), and data planes (actual traffic
forwarding).
- FIB
and Adjacency Table: The FIB (Forwarding Information Base) is used for
faster packet forwarding based on routing data. The adjacency table
contains Layer 2 header information needed to forward packets to the next
hop.
Process Switching vs. Fast Switching vs. CEF:
- Process
Switching: CPU processes every packet, slower.
- Fast
Switching: Caches route info for faster lookups.
- CEF:
Hardware-based forwarding for faster, efficient packet switching.
Distance Vector vs. Link State Routing:
- Distance
Vector: Routers share their routing tables with neighbors, but only
know the next-hop and metric to reach destinations.
- Link
State: Routers exchange link states and build a full map of the
network, calculating the best path using the Shortest Path First (SPF)
algorithm. Link state protocols (OSPF, IS-IS) are faster and less prone to
loops.
Path Vector Algorithm: Used by BGP, this protocol
selects paths based on attributes like AS-Path, MED, and Local Preference.
Directed Broadcast: Packets sent to a valid broadcast
address for a subnet but originating from outside that subnet are forwarded as
unicast until they reach the target subnet, where they are broadcast.
Routing Metrics:
- Delay:
Measures the time for a packet to traverse a route, considering factors
like queuing and router latency.
- Reliability:
Based on the likelihood of link failure or error rates.
Path Selection: Routers choose paths based on prefix
length (longest match), administrative distance (AD), and metrics like hop
count or delay.
Administrative Distance (AD): Measures the
trustworthiness of routing protocols; lower AD is preferred. AD can be modified
to prioritize routes learned via different protocols (e.g., EIGRP vs. OSPF).
TCP Options: Includes Maximum Segment Size (MSS),
which specifies the largest segment the sender can accept, padded with zeros
for alignment.
Process Switching: Routers that process each packet
individually, looking up route and data-link info, useful when packets can't be
handled by CEF.
Convergence: Modern protocols like OSPF, EIGRP, and
IS-IS converge quickly (under 10 seconds), adjusting routes faster than older
protocols like RIP.
Autonomous System (AS): A network under a single
administration that runs routing protocols like OSPF or EIGRP. Redistribution
is used to route between ASes.
RIP Concepts: Passive-interface prevents broadcast
updates, and the offset-list command adjusts route metrics based on access
lists.
VRF-lite
Virtual Routing and Forwarding-lite (VRF-lite)
enables the creation of multiple routing tables within a single device without
using MPLS. It isolates traffic between different networks, similar to how
VLANs work at Layer 2 but at Layer 3. VRF-lite does not require MPLS and is
useful in small-scale scenarios like enterprises where network segmentation or
isolation is needed. Technical Tip: In interviews, be prepared to
explain how VRF-lite helps segregate routing domains in an enterprise network
to provide multi-tenancy without MPLS. Also, understand the ip vrf command and
VRF route leaking methods.
Static Routing
Static Route Types
- Directly
Attached Static Routes: These routes are configured using the outbound
interface and require the interface to be in an "up" state to be
installed in the Routing Information Base (RIB). Example: ip route
10.22.22.0 255.255.255.0 Serial 1/0.
- Recursive
Static Routes: Instead of an interface, the next-hop IP address is
specified. The router must perform a recursive lookup to resolve the
outbound interface from the routing table. Technical Tip: In
recursive routes, ensure that next-hop addresses resolve in the RIB;
otherwise, the route will not be installed.
- Fully
Specified Static Routes: This route includes both the outbound
interface and the next-hop IP address, eliminating recursive lookups and
ARP overhead. Example: ip route 10.22.22.0 255.255.255.0
GigabitEthernet0/0 10.12.1.2.
Static Null Routes
Static Null Routes drop traffic directed to a null
interface, typically used to prevent routing loops or to blackhole certain
traffic. Example: ip route 172.16.0.0 255.255.0.0 Null0.
Difference between Interior and Exterior Gateway
Protocols
Interior Gateway Protocols (IGP) are used within an
Autonomous System (AS). Examples: OSPF, EIGRP, RIP. Exterior Gateway
Protocols (EGP), such as BGP, operate between different Autonomous Systems.
Technical Tip: When asked about BGP in interviews, highlight that BGP
makes path decisions based on policy rather than metrics and is optimized for
scalability and policy control between ISPs.
Equal-Cost Multipathing (ECMP)
ECMP allows load sharing across multiple equal-cost
paths to a destination, supported by OSPF, EIGRP, RIP, and IS-IS. Technical
Tip: Discuss how ECMP increases bandwidth by splitting traffic across
multiple paths. Some routing protocols may support unequal-cost load balancing
(like EIGRP).
Policy-Based Routing (PBR)
PBR makes routing decisions based on criteria other
than the destination IP, such as source IP, application type, or packet size.
Example: set ip next-hop 10.2.12.2 in a route-map to direct traffic from
VLAN_20 (172.16.20.0/24) to the desired next-hop. Technical Tip: Mention
that PBR works outside normal destination-based routing decisions, and be
prepared to discuss scenarios where PBR is useful, such as QoS marking, traffic
engineering, or forcing traffic over non-default routes.
Applying PBR to Locally Created Packets
By default, PBR only applies to incoming traffic. To route
packets generated locally by the router itself, use the command ip local policy
route-map.
SDM Templates for PBR on Catalyst Switches
Certain switches (e.g., Catalyst 3550, 3650) need to
repartition TCAM to support PBR using SDM templates. The command sdm prefer
routing activates a template for PBR, routing, or IPv6 support.
Recursive Static Routes – Key Pitfall
If the recursive lookup resolves to a different outbound
interface, it can cause incorrect routing behavior. Use fully specified
static routes to avoid this issue.
Comments
Post a Comment