Solution for linux gateway and IP address not in one CIDR block

Source: Internet
Author: User
Because the company's intranet gateway and intranet IP address is not in a network segment, linux can not connect to the Internet, the solution is as follows: 1.vim/ etc/rc. local2. add the following two routeadd-host192.168.100.254deveth0routeadddefaultgw192.168.100.254...

Because the company's intranet gateway and intranet IP address are not in the same CIDR block, linux cannot connect to the internet. the solution is as follows:
1. vim/etc/rc. local
2. add the following two sentences:
Route add-host 192.168.100.254 dev eth0
Route add default gw 192.168.100.254 dev eth0
Note: 192.168.100.254 is the gateway IP address and the Machine IP address is 192.168.101.97.
This article is from the "peach blossom" blog

Related Article

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.