Unsolved
This post is more than 5 years old
3 Posts
0
12080
September 16th, 2007 20:00
[Help]can't get to internet from ubuntu
hello! I have a dell optiplex 320, with both winXP and Ubuntu Feisty Fawn. I link to internet via LAN of my university. I have my IP (but not a public IP) assigned by DHCP. The problem is I can access to internet when I work in WinXP, but I can't do so in Unbuntu. I do get an IP in ubuntu, which is different to the one I get in winXP. Then I tried use static IP, I entered the IP whic I got from winXP, and this time it works! But I won't use static IP for long. Because webmaster will block me if he knows I'm using static IP. So, can someone help me fix the problem? Thanks very much! P.S. I was very frustrated from the very beginning when I decided to install Ubuntu on this machine. At first I can't install it correctly. Then I solved it with wubi. Then I can't access to internet. And I can't use the beatiful desktop effect! But I can run Ubuntu perfectly on my old Dell D600 laptop! Somebody said optiplex 320 is a little strange. I think I agree with him...



ieee488
4 Operator
•
11.1K Posts
0
September 16th, 2007 22:00
If that doesn't work, the folks over at www.ubuntuforums.org are very helpful.
slash28
24 Posts
0
September 16th, 2007 23:00
Just taking a guess here, but if the IP you get while booted to Ubuntu is 169.254.x.x, then you aren't really getting an IP. That is the auto-assigned IP when DHCP doesn't work. Regardless, here are the steps you should take to troubleshoot DHCP:
Listening on LPF/eth1/00:04:75:d0:d5:37
Sending on LPF/eth1/00:04:75:d0:d5:37
Sending on Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.27 -- renewal in 35970 seconds.
The IP above in red is the DHCP server ACKing the request, and the IP on the line below is the one assigned to your machine. On the other hand, several lines of DHCPREQUEST and DHCPDISCOVER, followed No DHCPOFFERS received means your DHCP server isn't responding to the Ubuntu queries.
Let us know how it works out.
kafe
3 Posts
0
September 17th, 2007 14:00
kefei@kefei-office-ubuntu:~$ sudo ifconfig -a
Password:
eth0 Link encap:Ethernet HWaddr 00:1A:A0:0B:24:64
inet6 addr: fe80::21a:a0ff:fe0b:2464/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29599 errors:0 dropped:0 overruns:0 frame:0
TX packets:299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2440735 (2.3 MiB) TX bytes:22774 (22.2 KiB)
Interrupt:21
// don't know what's eth0:avah
eth0:avah Link encap:Ethernet HWaddr 00:1A:A0:0B:24:64
inet addr:169.254.4.0 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:21
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:152 errors:0 dropped:0 overruns:0 frame:0
TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14276 (13.9 KiB) TX bytes:14276 (13.9 KiB)
There is already a pid file /var/run/dhclient.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Sending on LPF/eth0/00:1a:a0:0b:24:64
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 129.171.217.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 129.171.217.254
SIOCADDRT: Network is unreachable
bound to 129.171.57.24 -- renewal in 206083 seconds.
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
SIOCSIFFLAGS: Cannot assign requested address
Bind socket to interface: No such device
kefei@kefei-office-ubuntu:~$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1A:A0:0B:24:64
inet addr:129.171.57.24 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::21a:a0ff:fe0b:2464/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62838 errors:0 dropped:0 overruns:0 frame:0
TX packets:339 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14927801 (14.2 MiB) TX bytes:31718 (30.9 KiB)
Interrupt:21
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:156 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14676 (14.3 KiB) TX bytes:14676 (14.3 KiB)
slash28
24 Posts
0
September 18th, 2007 02:00
First step...
grep eth0 /etc/network/interfaces
You should only have these two lines (order doesn't matter)...
iface eth0 inet dhcp
auto eth0
If that first line says static instead of dhcp, you need to change that, preferably in the Network Manager GUI.
Next...
sudo ifdown eth0
cat /var/run/dhclient.eth0.pid
The PID file should be empty at this point. If not, sudo rm it.
sudo ifup eth0
Hopefully you won't get the error this time. If you do, or if you still can't get to the Internet, please post from XP: the IP/mask/gateway; from Ubuntu: the IP/mask plus the output of netstat -rn.
How is the weather in Miami?
Message Edited by slash28 on 09-17-2007 11:09 PM
kafe
3 Posts
0
September 18th, 2007 14:00
Hi,
The weather's pretty. No hurricanes, luckily:)
Unfortunately it still doesn't work. Here's the results. Oh, BTW, I know there's an Optiplex 320 in the same place as mine, running the same Ubuntu as mine. That one can access to internet with DHCP :(
********* Ubuntu **********
kefei@ubuntu:~$ grep eth0 /etc/network/interfaces
iface eth0 inet dhcp
auto eth0
kefei@ubuntu:~$ sudo ifdown eth0
Password:
There is already a pid file /var/run/dhclient.eth0.pid with pid 6254
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/00:1a:a0:0b:24:64
Sending on LPF/eth0/00:1a:a0:0b:24:64
Sending on Socket/fallback
DHCPRELEASE on eth0 to 129.171.37.60 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
kefei@ubuntu:~$ cat /var/run/dhclient.eth0.pid
kefei@ubuntu:~$ sudo ifup eth0
There is already a pid file /var/run/dhclient.eth0.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/00:1a:a0:0b:24:64
Sending on LPF/eth0/00:1a:a0:0b:24:64
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
kefei@ubuntu:~$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
********* WINDOWS *********
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : eng.miami.edu
Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controller
Physical Address. . . . . . . . . : 00-1A-A0-0B-24-64
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 129.171.217.153
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 129.171.217.254
DHCP Server . . . . . . . . . . . : 129.171.37.60
DNS Servers . . . . . . . . . . . : 129.171.37.60
129.171.97.1
Primary WINS Server . . . . . . . : 129.171.46.10
Secondary WINS Server . . . . . . : 129.171.46.11
Lease Obtained. . . . . . . . . . : Tuesday, September 18, 2007 11:00:28 AM
Lease Expires . . . . . . . . . . : Sunday, September 23, 2007 11:00:28
Message Edited by kafe on 09-18-2007 10:51 AM