Solve the problem of using a router to access the Internet in Ubuntu10.04

Source: Internet
Author: User
1. configure the network interface: $ sudogedit/etc/network/interfaces # Set the NIC interface in the pop-up text and fill in the code to allocate a static IP address to eth0, as shown below: autoeth0 # enable the NIC automatically when the instance is started. # Ifaceeth1inetdhcp. But it can be left without deletion.) ifaceeth0i

1. Configure the network interface:

$ Sudo gedit/etc/network/interfaces

# In the pop-up text, set the NIC interface and enter the code for allocating a static IP address to eth0, as shown below:

Auto eth0 # enable the NIC automatically when the instance is started.

# Iface eth1 inet dhcp (if this line of code exists, add "#" in front and comment it out. Of course, ignore it. But it can be left without deletion)

Iface eth0 inet static

Address 192.168.1.123 # this IP address should be entered based on your own situation. do not conflict with others' addresses in the network. For TPlink, enter 192.168.1.168.

Netmask subnet mask 255.255.0. If it is TPlink, you do not need to change it.

Gateway 192.168.1.1 # gateway, ask the network administrator to enter or enter a vro. For TPlink, enter 192.168.1.1.

2. Configure DNS:

$ Sudo gedit/etc/resolv. conf # enter the DNS name server address in the pop-up text.

Nameserver 222.30.45.1 # the address of the preferred DNS server, which you can see in the vro directly.

Nameserver 222.30.45.1 # enter the address of the backup DNS server.

3. Restart.

$ Sudo/etc/init. d/networking restart

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.