Static network configuration and troubleshooting in Linux

Source: Internet
Author: User
Linux static network configuration and troubleshooting after starting the Linux system, first view the network configuration of the machine: 1. ifconfig to learn about the network card information, view ethX2, sudovim/etc/network/interfaces and configure network parameters, for example, autoloifaceloinetloopbac... linux static network configuration and troubleshooting after starting the Linux system, first view the network configuration of the machine: 1. ifconfig to learn about the network card information, view ethX 2, sudo vim/etc/network/interfaces and configure network parameters, for example, auto lo iface lo inet loopback auto eth0 iface eth0 inet static address (IP address) netmask (subnet mask) geteway (Gateway) 3. configure DNS: sudo vim/etc/resolv. conf 4. restart the network creation: Sudo/etc/init. d/networking restart after restart, if you cannot access the Internet, you need to add the Gateway 5, sudo route add default gw 172.16.6.1. if you copy other virtual machines for direct use, the Internet will fail, you cannot ping any IP address. This is because the directly copied virtual machine also copies its mac address, and thus cannot be used in the new virtual machine. Solution: 1. delete/etc/udev/rules. d/70-persistent-net.rules 2. restart the virtual machine. the file is automatically generated in linux, and then you can access the Internet by configuring the network.
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.