New school Ubuntu Internet access settings Guide

Source: Internet
Author: User
I don't know what operations I have done, so Ubuntu cannot access the Internet. Alas, it's so annoying! I checked it for a long time and did not know what was going on. After hitting it by mistake, I finally configured it. The steps are as follows:

I don't know what operations I have done, so Ubuntu cannot access the Internet. Alas, it's so annoying!

I checked it for a long time and did not know what was going on. I finally configured it by mistake. The steps are as follows:

Sudo ifconfig eth1 down

Sudo ifconfig eth1 192.168.0.105 broadcast 192.168.0.255 netmask 255.255.255.0
Sudo ifconfig eth1 up

Ifconfg eth1

The result is:

Eth1 Link encap: Ethernet hardware address 00: 0c: 29: cf: 54: 46
Inet address: 192.168.0.105 broadcast: 192.168.0.255 mask: 255.255.255.0
Inet6 address: fe80: 20c: 29ff: fecf: 5446/64 Scope: Link
Up broadcast running multicast mtu: 1500 hops: 1
Received data packet: 3671 error: 0 discard: 0 overload: 0 frames: 0
Send data packets: 1709 error: 0 discard: 0 overload: 0 carrier: 0
Collision: 0 sending queue length: 1000
Received byte: 380672 (371.7 KB) sent byte: 185600 (181.2 KB)
Interrupt: 16 base address: 0x1424

You can access the Intranet, but you still cannot access the Intranet:

Route
The result is: The target gateway subnet mask indicates the interface used by the vertex reference.
192.168.0.0*255.255.255.0 U 0 0 0 eth1

If the gateway is not correct, set it:

Sudo route add default gw 192.168.0.1

After these settings, you can finally access the internet! Sign!

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.