Linux command----network address

Source: Internet
Author: User

    • IP Immediate effect (failed after reboot):
      ifconfig eth0 192.168.1.102 netmask 255.255.255.0  route add default GW 192.168.1.1&nbs p; ////Add IP address   Add gateway
    • IP boot takes effect:
      vim/etc/sysconfig/network-scripts/ifcfg-eth0    (Some versions may not have vim in this editor such as CentOS, you may replace with VI)
    • ipaddr=192.168.1.102 //Add IP address
      netmask= 255.255.255.0//Mask
      gateway=192.168.1.1//Add Gateway

      The final result is as follows:
      Device=eth0
      bootproto=static
      ipaddr= 192.168.1.102
      netmask=255.255.255.0
      geteway=192.168.1.1
      Onboot=yes
      Type=ethernet
      Note: Bootproto can only use the IP information set in static (static) mode

      actual experience:
      CentOS 6.5 64-bit
      IP immediate effect  
      IP start Active: x
    • Modify DNS
    • vim/etc/resolv.conf  ;    

Join Nameserver= ***.***.***.***

      //modified to take effect immediately, start the same effective
      The
        above excerpt: Linux configuration NIC IP address command detailed introduction and some common network configuration commands

    Linux command----network address

    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.