Configure IP addresses in Ubuntu7.10

Source: Internet
Author: User
Today, I entered the Ubuntu7.10 system and found that the network cannot be connected. In fact, I first thought of this problem. I used to use Netcom, and there was a modem, and the system would automatically obtain the IP address. However, I switched to the campus network a few days ago, and the school gave a fixed ip address, which was bound to the NIC physical address (mac address. After a while, I finally solved the problem. The method is as follows: 1. Open the terminal and execute the command: sudogedit/etc/network/interfaces

Today, I entered the Ubuntu 7.10 system and found that I cannot connect to the network. In fact, I first thought of this problem. I used to use Netcom, and there was a modem, and the system would automatically obtain the IP address. However, I switched to the campus network a few days ago, and the school gave a fixed ip address, which was bound to the NIC physical address (mac address. After a while, I finally solved the problem. The method is as follows:

1. Open the terminal and execute the command: sudo gedit/etc/network/interfaces

2. comment out the first two lines with "#". You can also delete them, but it is best not to delete them. Then add the following lines of code below: iface eth0 inet static

Address ***. *** (here is your IP address)

Netmask 255.255.255.0

Gateway ***. *** (here is your gateway)

Save the settings. (Sorry, there is a problem in step 2. Do not comment out the first two lines. Otherwise, it will cause a very serious problem: the mysql database cannot be started, and the re-installation will also cause a dependency problem and cannot be installed .)

3. Run sudo gedit/etc/resolv. conf on the terminal.

Change the nameserver to your DNS. If there are two DNS servers, add another one.

4. Run the following command: sudo/etc/init. d/networking restart.

Then everything is done. Haha --

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.