Centos 7.x ad hoc network and routing configuration

Source: Internet
Author: User

Today, installing the CentOS 7.1 operating system on a virtual machine, using the minimal installation, when the installation is complete and ready to use the Ifconfig command, the Discovery command does not exist, as follows:

I'm sure it's the new CentOS system. By default, the Ifconfig command is not used, and a command should be used instead of the ifconfig.

On Baidu a check, sure enough, has used the IP command instead of ifconfig command. The following is a list of common IP command parameters, commonly used IP configuration as follows.

IP addr                                           // Display network card IP information IP link set eno16777736 up/down                   // turn on or off eno1677736 Nic 192.168. 100.2/ dev eno16777736      // set eno16777736 network card IP address 192.168.100.2  192.168. 100.2/ dev eno16777736      //Remove eno16777736 network card IP address 192.168.100.2

The usual temporary routing configuration is as follows:

IP Route List//View routing information, or you can use the IP route commandIP route add default via192.168.100.1                      //Set the default gateway, or you can add the dev eno16777736 laterIP route del Default via192.168.100.1                      //Delete the default gateway or directly write IP route del defaultIP route add192.168.123.0/ -Via192.168.123.1Dev eth0//set the gateway for the 192.168.123.0 network segment to 192.168.123.1, Data walk eth0 interface
IP route del 192.168.123.0/24//delete route for 192.168.100.123.0/24 network segment

Respect for the work of others reproduced please be sure to indicate the source: http://www.cnblogs.com/5201351/p/4661666.html

Centos 7.x ad hoc network and routing configuration

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.