Linux Local route usage

Source: Internet
Author: User

recently discovered that the machine dual-Network IP restart network card found a network card does not flow, but the outside can ping the network card, and then a variety of Google, Baidu found that the original is eth2 in the local no default route, and then all the traffic has gone eth1.
Workaround: New Add custom route table IP ro add default via [GW] dev eth2 table [1-252]
Example:
IP ro add default via 122.1.1.1 dev eth2 table 201

by the way to comb the knowledge points:
Linux related Operations Command IP:
IP Link list displays IP link status information
IP address show except show all network addresses
IP route show shows the main route table information
IP neigh show neighbor table
IP rule Show shows routing rules (matching rules are bottom-to-top by default)
How Linux looks at the routing table:
IP Route List table Table_number
IP Route List Table table_name
(whereTable_number and table_name correspondence, can be see Editor:/etc/iproute2/rt_tables )
classification of Linux routing tables:
1. Linux can be customized from 1-252 routing tables
2. The Linux system maintains 4 routing tables:
0# Table System Reservation table
253# Tables Defulte table The default routes that are not specifically specified are placed in the change table
254# Tables Main table does not indicate that all routes for the routing table are placed in the table
The 255# table locale table saves the local interface address, the broadcast address, the NAT address is maintained by the system, the user must not change

This article from the "PXE Batch system Installation" blog, declined reprint!

Linux Local route usage

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.