Routing Table

Perutean

Definisi

Struktur data yang disimpan dalam router yang mencantumkan tujuan jaringan yang diketahui dan next hop atau antarmuka untuk mencapai masing-masing. Tabel routing diisi oleh konfigurasi statis atau protokol routing dinamis seperti BGP dan OSPF.

What a Routing Table Contains

A routing table entry typically includes: the destination network prefix, the subnet mask or prefix length, the next-hop IP address, the outgoing interface, the administrative distance (a trustworthiness score for the routing source), the metric, and how the route was learned — connected, static, OSPFOpen Shortest Path First. An interior gateway routing protocol that uses link-state advertisements and Dijkstra's algorithm to compute the shortest path within an autonomous system., BGPBorder Gateway Protocol. The routing protocol that exchanges reachability information between autonomous systems, effectively determining how data traverses the internet. Often called the "postal service of the internet.", etc.

Routers maintain separate routing tables for IPv4 and IPv6. On internet backbone routers, the IPv4 table holds over 900,000 prefixes as of 2024 — this is the global BGP routing table, sometimes called the Default-Free Zone (DFZ).

Longest-Prefix Match

When multiple entries match a destination, the RouterA network device that forwards data packets between different networks by examining destination IP addresses and consulting its routing table. Routers operate at Layer 3 (Network) of the OSI model. selects the most specific one — the entry with the longest prefix length. A /24 route beats a /16 route for addresses within the /24 range, which in turn beats the Default RouteA routing table entry (0.0.0.0/0 in IPv4) that matches all destination addresses not covered by more specific routes. It acts as a catch-all, typically pointing to the network's gateway router. (/0). This hierarchical lookup allows efficient traffic engineering and policy enforcement at scale.

How Tables Are Built

Routing tables are populated through three mechanisms: directly connected routes (added automatically when an interface comes up), static routes (manually configured), and dynamic routing protocols that discover and advertise routes automatically.

The FIB (Forwarding Information Base) is the hardware-optimized version of the routing table used for actual packet forwarding. The routing table is the source of truth; the FIB is its compiled, lookup-optimized derivative. Use traceroute to observe which paths packets actually take, revealing the effective routing table behavior across the network.

Istilah Terkait

Lainnya di Perutean