Switches, Linux hosts and Windwos hosts on the road table view

Source: Internet
Author: User
Tags switches

Sometimes, network failure, network is not through, in part because the routing information is incorrect. In order to troubleshoot the routing information, we need to learn to view the information on the routing table. On Huawei switches, the view and display of routing tables is not the same on Linux servers and Windows servers

Routing Basic Concepts

Routing is the path of the message from the source end to the destination. When there are multiple routes from the router to the destination segment, the router can be forwarded according to the best route in the routing table. The selection of the best route is related to the priority of the routing protocol that discovers this route, and the metric of the route. When the protocol priority of multiple routes is the same as the route metric, load sharing and network pressure can be realized, and when the protocol priority of multiple routes is not the same as the route metric, it can make the routing backup and improve the network reliability.

Priority of the routing protocol

Different routing protocols (including static routes) may find different routes for the same destination, but these routes are not always optimal. In fact, at some point, the current route to a destination can only be determined by a unique routing protocol. To determine the optimal route, each routing protocol (including static routing) is given a priority, and when there are multiple routing information sources, routing protocols with higher priority (smaller values) will become the optimal route and put the optimal route into the local routing table.

Metrics for routes

The metric of the route indicates the cost of the route to the specified destination address, usually following factors that affect the route's metrics.

Path length

Path length is the most common factor that affects route metrics. The link state routing protocol can set a link cost for each link to indicate the path length of the link. In this case, the path length refers to the sum of the link costs of all the links passing through. The distance vector routing protocol uses a hop count to indicate the path length. Hop count refers to the number of devices that data passes from the source to the destination. For example, a router to a network that is directly connected to it has a hop count of 0, the number of hops through a router can be 1, the rest and so on.

Network bandwidth

Network bandwidth is the actual transmission capability of a link. For example, a 10,000-gigabit link is more advantageous than a 1000-gigabit link. While bandwidth refers to the maximum transfer rate that a link can achieve, this does not mean that routing over a high-bandwidth link is more advantageous than a low-bandwidth link. For example, a high-bandwidth link is in a congested state, and the message will take more time to forward on this link.

Load

Load is the extent to which a network resource is used. The compute load method includes the CPU utilization and the number of packets it processes per second. Continuous monitoring of these parameters provides a timely understanding of how the network is being used.

Communication overhead

The communication overhead measures the operating costs of a link. Especially when it comes to operating costs rather than network performance, communication overhead becomes an important indicator.

Direct routing

Direct routing refers to the route used by routers to communicate between networks that are directly connected to each network interface. Direct routing is generated automatically after the IP address of the router network interface is configured, so if you do not have special restrictions on these interfaces, they can communicate directly between the networks they are connected to.

Default route

The default route is another special route. In simple terms, the default route is the route that is used when no matching route table entries are found in the routing table. If the destination address of the message cannot match any destination address of the routing table, then the message will be forwarded by selecting the default route. If there is no default route and the destination address of the message is not in the routing table, then the message is discarded and an ICMP (Internet Control message Protocol) message is returned to the source to report that the destination address or network is unreachable.

In the routing table, the default route appears as a route to the network 0.0.0.0 (The mask is also 0.0.0.0). You can see whether the default route is currently set by the command display IP routing-table. Typically, administrators can manually configure default static routes, but in some cases, the dynamic routing protocol can generate default routes, such as OSPF and Is-is.

Static routes

Routers forward packets based on routing, which can be generated by manually configuring and using the dynamic routing algorithm, where the routes generated by the manual configuration are static routes.

Static routing uses less bandwidth than dynamic routing, and does not consume CPU resources to calculate and analyze routing updates. However, when a network failure or topology changes, static routes are not automatically updated and must be reconfigured manually. Static routes have 5 main parameters: Destination address and mask, outbound interface, and next hop, priority.

Destination Address and mask
The destination address of the IPv4 is in dotted decimal format, which can be expressed in dotted decimal notation, or by the length of the mask (that is, the number of bits in a mask that is contiguous ' 1 '). The destination address and mask for IPV6 are described in "ipv6-Principle description-ipv6 Address" in the-IP business of feature description. When the destination address and mask are zero, the static default route is represented. Static default routing for specific applications see static default routing applications.

Out interface and Next hop address
Depending on the type of outbound interface, when you configure a static route, you can specify the interface, or you can specify the next hop address, and you can specify both the out interface and the next hop address.

For interface to point-to-type, you only need to specify the interface. Because the specified send interface implicitly specifies the next-hop address, the peer interface address that is considered to be connected to the interface is the next-hop address of the route. such as the 10GE package PPP (point-to-point Protocol) protocol, to obtain the IP address of the peer through PPP negotiation, you can not specify the next hop address.

For NBMA (Non Broadcast multiple Access) types of interfaces, such as ATM interfaces, you only need to configure the next hop. Because in addition to configuring IP routing, you need to establish a map of the IP address to the link layer address at the link layer.

For broadcast-type interfaces (such as Ethernet interfaces) and the VT (virtual-template) interface, you must specify the next-hop address to be sent through the interface. Because the Ethernet interface is an interface of the broadcast type, and the VT interface can be associated with multiple virtual access interfaces (Interface), this causes multiple next hops and cannot uniquely determine the next hop.

Static Route Priority
For different static routes, you can configure them with different priorities, and the smaller the priority number, the higher the priority level. Configure multiple static routes that reach the same destination, load sharing if you specify the same priority, and route backups if you specify different priority levels. See "Load Sharing and routing backup" for specific applications.

View the routing table on the switch view routing-table

Use display IP routing-table on the Huawei switch to view the routing table

Route Flags

Route tag:

    • R: Indicates that the route is an iterative route
    • D: Indicates that the route was issued to the FIB table

Routing Tables:public

Indicates that this routing table is a public route table, and if it is a private network, it displays the name of the private network, such as routing tables:abc

Destinations

Displays the total number of destination networks/hosts

Routes

Show total number of routes

Destination/mask

Displays the address and mask length of the destination network/host

Proto

    • Shows the routing protocol that learns this route:
    • Direct: Represents a direct-connect route.
    • Static: Represents a stationary route.
    • EBGP: Represents the EBGP route.
    • IBGP: Represents the IBGP route.
    • ISIS: Represents the Is-is route.
    • OSPF: Represents an OSPF route.
    • RIP: Represents RIP routing.
    • UNR: Represents the user network Routes.

Pre

Show priority for this route

Cost

Shows the route cost value for this route

Flags

Shows the route flag, which is the route flags for the routing table header

Nexthop

Show the next hop address for this route

Interface

Shows the outbound interface that this route next hop can reach

View Routing-table verbose

Use display routing-table verbose to view the detailed routing table

Route Flags

Route tag:

    • R: Indicates that the route is an iterative route
    • D: Indicates that the route was issued to the FIB table

Destinations

Displays the total number of destination networks/hosts

Routes

Shows the total number of active and inactive routes

Destination

Displays the address and mask length of the destination network/host for this route

Protocol

Show routing protocol for this route

Process ID

The process number that displays the routing protocol for this route

Preference

Show priority for this route

Cost

Shows the route cost value for this route

Nexthop

Show the next hop address for this route

Neighbour

The address of the neighbor that displays this route

State

Show the status of the route:

    • Active: Indicates that this route is an active route
    • Invalid: Indicates that this route is not an invalid route
    • Inactive: Indicates that this route is a non-active route
    • NOADV: Indicates that this route is a route that is not allowed to be published
    • ADV: Indicates that this route is a route that can be published
    • Del: Indicates that this route is a route that is about to be deleted
    • Relied: Indicates that this route is a route that iterates to the next hop and out interface, or iterates to the tunnel
    • Stale: Indicates that this route is a route with a Stale tag and is used in GR
    • Age

Show how long the route is alive

Tag

Displays the routing management identity. Integer form, the range of values is 0~4294967295

Priority

Show convergence priority for routes:

Low: Indicates lower route convergence priority

Medium: Indicates medium route convergence priority

High: Indicates higher route convergence priority

Critical: Indicates critical routing convergence priority

Label

Show MPLS-Assigned labels

Qosinfo

Displays the QoS information, where 0x0 indicates that the QoS information is empty

Indirectid

Show Next Hop detach keyword

Relaynexthop

Show Iteration Next hop address

Interface

Display the interface

Tunnel ID

Show Tunnel ID

Flags

Shows the route flag, which is the route flags for the routing table header

View the routing table on Linux

On a Linux host, use Route-n to view the current routing table

Output item description for the route command

Output Item Description
Destination target network segment or host
Gateway address, "*" indicates the target is the network to which this host belongs, does not require routing
Genmask Network Mask
Flags tag. Some of the possible tags are as follows:
U-Route is active
The H-Target is a host
G-Route Pointing Gateway
R-Recovery dynamic route-generated table entries
D-Install dynamically by a routed daemon
M-by-Route daemon Modification
! -Reject Route
Metric routing distance, number of relays required to reach the specified network (not used in the Linux kernel)
REF number of Route entry references (not used in Linux kernel)
The number of times the use of this route entry is routed software lookup
Iface the output interface corresponding to the route table entry

View the routing table on Windows

In cmd, enter Route print-4 to view the IPv4 routing table

routing Table Information interpretation
Noun Explanation:
Active Routes: Active routing
Network Destination: Destination network segment
Netmask: Subnet Mask
Gateway: Gateways, also known as next-hop routers. When an IP packet is sent, the gateway defines the next-hop server to which the packet is sent for a specific network destination address. If the local computer is connected directly to a network, the gateway is usually the network interface for the local computer, but the interface must be consistent with the gateway, or, in the case of a remote network or a default route, the gateway is typically a server or router on the network to which the local computer is connected.
Interface: An interface that defines the network interface that the local computer uses to send packets for a specific network destination address. The gateway must be on the same subnet as the interface (except for the default gateway), otherwise it may cause a route deadlock by invoking additional route entries when using this route entry.
Metric: Hop count, hop count is used to indicate the cost of the route, typically representing the number of hops required to reach the destination address, and a hop count represents the passing of a router. The lower the hop count, the lower the routing cost, the higher the priority.
Persistent Routes: Manually configured static-cured routes
First Routing information: default route
When the system receives a packet with a destination address that is not in the routing table, the system sends the packet through the 192.168.99.8 interface to the default gateway 192.168.99.1.
Second Routing information: local loop
When the system receives a packet destined for the target segment 127.0.0.0, the system will receive all packets sent to that segment of the network.
Third routing information: routing records for direct connected networks
When the system receives a packet destined for the destination segment 192.168.99.0/24, the system sends the packet through the 192.168.99.8 interface.
Routing information: Local host routing
When the system receives a packet with a destination IP address of the local NIC IP address, the system will accept the packet.
Routing information: Local broadcast routing
When the system receives a local broadcast packet to a direct-attached network segment, the system sends the packet from the 192.168.99.8 interface as a broadcast.
Sixth routing information: multicast routing
When a multicast packet is received by the system, the packet is sent from the 192.168.99.8 interface as a multicast.
Seven route information: Broadcast routing
When an absolute broadcast packet is received by the system, the packet is sent through the 192.168.99.8 interface.
Default Gateway (defaults)

Switches, Linux hosts and Windwos hosts on the road table view

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.