IP configuration for Linux

Source: Internet
Author: User

Take Red Hat as an example

Related network configuration under Linux


  • The Setup tool can be used to configure, directly tap the Setup command to pop up a graphical configuration interface, but only if the installation of the Setup tool, this method is more convenient to configure, after the completion of the network service will be restarted after the effective

  • Can be configured with the Ifconfig command: ifconfig eth0 192.168.202.129 netmask 255.255.255.0

    Hit ENTER after this method is temporarily in effect, the next time the IP address back to the previous IP address

  • Using files to configure: We want to make it clear that everything is under Linux. This configuration is Permanent

    # Vi/etc/sysconfig/network-scripts/ifcfg-eth0//Enter the network card information file Device=eth0//NIC name bootproto=st       ATIC//Network IP Way, here is the static way, you can change DHCP dynamically assigned ipipaddr=192.168.1.30//Here fill in the IP address you want to modify netmask=255.255.255.0       Subnet mask hwaddr=52:54:ab:2f:cf:f0//mac address gateway=192.168.1.1//Gateway Onboot=on//network boot with service Qi Gong type=ethernet Network Type Ethernet



  • For DNS service settings: #vi/etc/resolv.conf//Enter DNS profile nameserver 192.168.202.1nameserver 192.168.202.4//You can set multiple domain names /c1>

  • To view the host information:

    Vi/etc/sysconfig/network//You can modify the hostname but this mode takes effect after reboot

    Hostname host name is also available

This article is from the "11309357" blog, please be sure to keep this source http://11319357.blog.51cto.com/11309357/1761226

IP configuration for Linux

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.