简体   繁体   中英

How to view forwarding and routing tables in a Linux OS and differences?

Just reading about the concept of the routing table and forwarding table through the packet switching approach in Computer Networks.

The forwarding table summarizes information on the routing table, mentioning that the network is a dynamic existing.

Besides, The IP Layer suggests methods for finding the shortest path to the destination.

Routers do routing and forwarding. First, the Router route for maximum reliability in the way and finding the best path. Second, the router forwards the packet from the suitable interface via summarized routing table information.

Let's see; How do packets determine which way they should go? So there should be a routing table and forwarding table at each router.

It seems when routing is happening. A router creates a routing table with a built-in forwarding procedure. So the router sends a virtual packet (I think so, but I don't know what it is?) on each interface for finding the available paths and streams. There would be a question if the router first does routing and then forwarding? What would happen with the routing procedure (like there is implicit forwarding in the routing process)?

Does each router use the forwarding table originates from the first router, or does it change each router? If so, there should be lots of processing on each node? ( as we know, processes in the IP layer should be as light as possible, but it seems we do have lots of them )

Maybe someone could help me with that.

Thanks.

In a nutshell:

All routes (destination networks) learned from all routing protocols (EIGRP, OSPF, BGP etc.) are stored in the routing table. From these routes, the best routes are placed in the forwarding table (based first on administrative distance, then metric).

根据https://ubuntu.com/core/docs/networkmanager/routing-tables ,可以使用ip route命令查看内核路由表。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM