Route: Packets are transmitted from one computer to another. The route determines where the process starts and what computer system needs to send the packet for it to reach its destination. In computer networking, a router is a device responsible for forwarding network traffic. When datagrams arrive at a router, the router must determine the best way to route them to their destination. Route command is used to show/manipulate the IP routing table. It is primarily used to setup static routes to specific host or networks via an interface.
To display the routing table entries, use route command:
$ route
Each entry in the routing table has several fields.
Field
|
Description
|
Destination
|
Destination IP address of the route
|
Gateway
|
IP address or hostname of the gateway the route uses; * indicates no gateway is used
|
Genmask
|
The netmask for the route
|
Flags
|
Type of route; U=up, H=host, G=gateway, D=dynamic, M=modified, C=cache entry, !=reject route, R=Reinstate route for dynamic routing
|
Metric
|
Metric cost of route
|
Ref
|
Number of routes that depend on this one
|
Use
|
Number of times used
|
Iface
|
Type of interface this route uses
|
Window
|
TCP window for AX25 networks
|
Netstat: netstat ("network statistics") is a command-line tool that displays network connections (both incoming and outgoing), routing tables, and a number of network interface (network interface controller or softwaredefined network interface) and network protocol statistics.
Options of Netstat: