AIX route settings command

Source: Internet
Author: User


About the AIX Route settings command to view and configure the Route list, for example, the query command is: # netstat-rnRouting tables Destination Gateway Flags Refs Use If PMTU Exp Groups Route Tree for Protocol Family 2 (Internet ): default 10.0.100.250 UGc 0 0 en0---10.0.100.0 10.0.100.150 UHSb 0 0 en0---=> 10.0.100/24 10.0.100.150 U 2 2 en0---1_10.0.100.150 UHSb 0 3 en0 --- 127/8 127.0.0.1 U 0 353 lo0---Route Tree for Protocol Family 24 (Intern Et v6): 1: 1 UH 0 0 lo0 16896-the red part indicates the default route, that is, the gateway address. You can use the following command to add a default route: # route add default 10.0.100.250 or www.2cto.com # route add 0 10.0.100.250
It indicates that the IP address is not specified, or the target path is 0, that is, all addresses, using the route 10.0.100.250. In fact, this IP address is the gateway. However, the added route is added to the routing table (Dynamic Routing) instead of the ODM database. If you want to write it in the ODM database, you can simply use # smit route, or a similar command # chdev-l inet0-a route = "net,-encrypted count, 0, 0, 10.0.100.250" is the same as the above, indicating that the target address is 0, the route 10.0.100.250 is used as the default route. The added route is a static route. The following is an example of adding a dynamic route and deleting a dynamic route. The following shows that route 10.0.100.htm is used for the target subnet 10. 10. *. */24, where/24 indicates the subnet mask.
# Route add-net 10.10.0.0-netmask route 255.255.0 10.0.100.htm you can see the following information from netstat-rn. 10.10/24 10.0.100.20.ug 0 0 en4-if you want to delete this dynamic route, run the following command # route delete 10.10.0.0 10.0.100.htm. Below is an example of adding a static route and deleting a static route, this time, we only use the route 10.0.100.htm for the host 10.10.10.100 instead of for the network segment.
# Chdev-l inet0-a route = "host,-route count, 0, 10.10.10.100, 10.0.100.251 "on netstat-rn, you can see the following information: www.2cto.com 10.10.10.100 10.0.100.ugh UGH 0 0 en4 --
You can also use the following command to delete the static route # chdev-l inet0-a delroute = "host, 10.10.10.100, 10.0.100.0000". If you want to clear all route tables or refresh the route table, you can use the following command. Note: This command only refreshes (actually clears) The current route table and does not clear static routes in the ODM database. Therefore, the static routes written in the ODM database will continue to take effect after being restarted.
In addition, do not execute this command easily, because if you connect to the machine using different network segments, you can immediately disconnect your network by clearing the route table. # Route-fdefault 10.0.100.250 done dbtest loopback done # netstat-rnRouting tables Destination Gateway Flags Refs Use If Exp Groups www.2cto.com Route Tree for Protocol Family 2 (Internet ): 10.0.100.0 10.0.100.150 UHSb 0 0 en0---=> 10.0.100/24 10.0.100.150 U 2 2 en0--201710.0.100.150 UHSb 0 3 en0---127/8 127.0.0.1 U 0 353 lo0 --- route Tree for Protocol Family 24 (Internet v 6): 1: 1 UH 0 0 lo0--correct use of routing can reduce network jumps, or even greatly improve network access speed.
 

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.