[Go]ubuntu Server Internet configuration

Source: Internet
Author: User

[Go]ubuntu Server Internet configuration

Http://blog.sina.com.cn/s/blog_6c9d65a101011pyt.html

Today my Ubuntu server does not go to the net, so reconfigure it, just to tidy up a bit:

One, view network configuration status ifconfig-a Two, configure DHCP client modification:/etc/network/interface file Auto loiface lo inet loop back Auto Eth0 iface eth0 inet DHCPEth0 is the connection settings, according to the actual situation set, I do not go to the net today because Eth0 became eth1 three, configure static Ipsudo Vim/etc/network/interface auto Eth0iface eth0 inet Staticaddress 192.168.1.4netmask 255.255.255.0gateway 192.168.1.1//This is the configuration IP address, 硽 code, gateway. Iv. Configuration effective reboot the network to sudo/etc/init.d/networking Restart can also restart the NIC: sudo ifdown eth0sudo ifup eht0 If you log in from the remote, the Ifdown eth0 will break the connection. V. Temporarily change the configuration in the recovery interface after the IP address system restarts sudo ifconfig eth0 192.168.1.3 VI, set the default gateway (1) Modify the/etc/network/interface profile auto Eth0address 192.168.1.4netmask 255.255.255.0 Gateway 192.168.1.1(2) Use the command settings to delete the default gateway sudo route del default GW 192.168.1.1//192.168.1.1 is the original gateway that can route view Gateway add Gateway sudo route add default GW 192.1 68.1.2,547, modify the computer (host) name (1) view hostname (2) Modify sudo hostname newcomputername This is only temporary modification, if permanent modification can modify the configuration file sudo vim/etc/ Hostname Modify the host name inside. Eight, set the address of the DNS server Sudi vi/etc/resolv.confnameserver 202.98.5.68nameserver 202.98.0.68nameserver 192.168.1.1 a maximum of 3 DNS servers can be set

[Go]ubuntu Server Internet 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.