14

What is the difference between a routing table and a forwarding table?

3 Answers 3

14

In routers you normally have two separate planes, often called "control plane" and "forwarding plane".

The control plane is the "brain" of the router and handles things as management of the device and routing protocols among other things. It is sometimes called a "routing engine" or "supervisor" by vendors.

The forwarding plane is responsible for the actual packet forwarding. In bigger routers it is often implemented by specialized chips and very fast memory for route lookups.

The routing table (or more than one routing table) resides in the control plane. It contains routing information received through routing protocols (OSPF, BGP, ...) and from configuration (connected routes, static routes). There may be more than one entry for a given prefix if multiple routing information is received by the control plane.

From all these information the "best" path for a prefix is selected. This selection is then collected in the forwarding table. The forwarding table has the definitive destination information where a packet is routed for any given IP prefix (or MAC address depending on the layer). This forwarding table is then pushed into the forwarding plane of the router and often distributed into each linecard in bigger chassis based routers.

5

They definitely don't keep the same informations.

Routing table is a L3 table which states for X.X.X.X/Y IP destination, go through z.z.z.z router.
Forwarding table is a L2 table which states for communicating with z.z.z.z router, send packets to Mac Address aa:bb:cc:dd:ee:ff.

In your local network, you use the forwarding table to get the other hosts mac addresses and send them the packets. Your network device will have broadcast an arp whohas ip z.z.z.z tell ME packet at L2 to get the relevant mac address.

To communicate with a host in a different subnet, you should route it through a router within your local network. The routing table will tell which IP this router has. Which router you reach using the same forwarding mechanism as above.

3
  • 1
    I do not get why my answer deserves being downvoted while the upvoted answer is specific to router implementation. How would you define the control plane and data plane on a linux device? I have more than 10 years experience in networking industry which does not summarized to the router implementation of forwarding and routing tables in data plane or control plane. The essential point of those tables is how they act in the OSI model, not how any vendor would have implemented their handling in their own hardware. Jul 31, 2018 at 21:05
  • Thank you for this answer! These two terms seem to be very often confused. I think I spent almost two hours reading different sources on the internet and not understanding anything until I found this very simple answer.
    – tjespe
    May 4, 2021 at 12:16
  • this is much better, the other answer is incomprehensible.
    – Nimitz14
    Nov 1, 2022 at 22:52
0

Routing and Forwarding are distinct.

However, both routing table and forwarding table are used for Forwarding, according to RFC1812 Requirements for IP Version 4 Routers, RFC3222 Terminology for Forwarding Information Base (FIB) based Router Performance and RFC6115 Recommendation for a Routing Architecture.

The main difference is that forwarding tables are more compact and provide faster lookup than routing tables, since the latter need to maintain information(e.g. metric/cost) for routing protocol, and support update.

References

RFC1812

Section 2.2.3

Forwarding an IP datagram generally requires the router to choose the address and relevant interface of the next-hop router or (for the final hop) the destination host. This choice, called relaying or forwarding depends upon a route database within the router. The route database is also called a routing table or forwarding table. The term "router" derives from the process of building this route database; routing protocols and configuration interact in a process called routing.

Section 5.2.1.2

The forwarder determines the next hop IP address for the packet, usually by looking up the packet's destination in the router's routing table.

RFC3222

Section 5.3

The forwarding information base is distinct from the "routing table" (or, the Routing Information Base), which holds all routing information received from routing peers.

The forwarding information base contains unique paths only (i.e. does not contain secondary paths).

RFC6115

Section 1.3 Abbreviations

FIB Forwarding Information Base: The forwarding table, used in the data plane of routers to select the next hop for each packet.

RIB Routing Information Base. The routing table, used in the control plane of routers to exchange routing information and construct the FIB.

See also

https://en.wikipedia.org/wiki/Routing_table https://en.wikipedia.org/wiki/Forwarding_information_base

Comment on el00ruobuob's answer

Tables that map IP addresses to MAC addresses are ARP tables, not forwarding tables.

Fun fact

Routing table in Linux kernel is called "Forwarding Information Base"!

See

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.