Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just started my adventure with Linux. obviously had many issues already, but get to manage it. one that bother me a little though I have found the temporary workoround is my network connection. my topology is: NAT->modem->router(NetGear 192.168.1.1)->TPLink(192.168.0.1) TPLink gives me the wireless network at home. but I have also ubuntu 12.10 connected to TPLink through wire.

other machines (wireless) have IP addresses like 192.168.0.100, ubuntu (wire) has eth0 configured as address 192.168.0.101 netmask 255.255.255.0 gw 192.168.0.1 it works fine, but after restart or shutdown of system I get disconnected. ping 192.168.0.1 gives "no network" error I can get connected again if I get wire off, wait a while and plug it again. sometimes it works instantaneously, but sometimes not, sometimes I get IP 192.168.1.5 as if the ubuntu was connected directly to the router (NetGear .1.1) but it is connected to the TPLink(.0.1) -> how is this possible???

I have seen a post suggesting it might be dhcp, so installed dhcpcd. Here is the result of running it while being disconected.

[sudo] password for user: 
info, eth0: dhcpcd 3.2.3 starting
info, eth0: hardware address = d4:3d:7e:4b:47:dc
info, eth0: DUID = 00:01:00:01:18:ab:f5:fd:d4:3d:7e:4b:47:dc
info, eth0: broadcasting for a lease
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: waiting for 20 seconds
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
debug, eth0: sending DHCP_DISCOVER with xid 0x105db75d
err, eth0: timed out
info, eth0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-eth0.info'
info, eth0: probing for an IPV4LL address
debug, eth0: sending ARP probe #1
debug, eth0: sending ARP probe #2
debug, eth0: sending ARP probe #3
debug, eth0: sending ARP claim #1
debug, eth0: sending ARP claim #2
warn, eth0: using IPV4LL address 169.254.146.212
info, eth0: adding IP address 169.254.146.212/16
debug, eth0: no dns information to write
debug, eth0: writing /var/lib/dhcpcd/dhcpcd-eth0.info
debug, eth0: exec "/etc/dhcpcd.sh" "/var/lib/dhcpcd/dhcpcd-eth0.info" "new"
debug, eth0: forking to background
info, eth0: exiting
user@cmp:~$ dhcpcd.sh: interface eth0 has been configured with new IP=169.254.146.212

it didn't work, I was given the IP 169.254.146.212 (ifconfig, below) but had no network connection. again, I connected again by taking wire off, wait a while and plug it again.

ifconfig
eth0      Link encap:Ethernet  HWaddr b4:1u:2b:4b:41:c7  
          inet addr:169.254.146.212  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe91::d62d:7eff:ft4b:54hc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:35345 (35.3 KB)

lo        Link encap:Local Loopback  
          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:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6432 (6.4 KB)  TX bytes:6432 (6.4 KB)

has anyone experienced such a thing?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

I think thisis related to fact that my machine (Ubuntu 12.10) cannot find DHCP server which is my TP-LINK.

The foundation for UPnP networking is IP addressing. Each device must implement a DHCP client and search for a DHCP server when the device is first connected to the network. If no DHCP server is available, the device must assign itself an address. The process by which a UPnP device assigns itself an address is known within the UPnP Device Architecture as AutoIP. In UPnP Device Architecture Version 1.0,[6] AutoIP is defined within the specification itself; in UPnP Device Architecture Version 1.1,[7] AutoIP references IETF RFC 3927.[8] If during the DHCP transaction, the device obtains a domain name, for example, through a DNS server or via DNS forwarding, the device should use that name in subsequent network operations; otherwise, the device should use its IP address.

I've found at least temporary workoround: kill dhcp process

root@ubuntu:/home/user# dhcpcd eth0
err, eth0: dhcpcd already running on pid 2186 (/var/run/dhcpcd-eth0.pid)
root@ubuntu:/home/user# kill -9 2186
root@ubuntu:/home/user# ifconfig
eth0      Link encap:Ethernet  HWaddr b4:1u:2b:4b:41:c7  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe91::d62d:7eff:ft4b:54hc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8729693 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7491675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4836487722 (4.8 GB)  TX bytes:720522105 (720.5 MB)

lo        Link encap:Local Loopback  
          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:51131 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51131 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5025732 (5.0 MB)  TX bytes:5025732 (5.0 MB)

put off the wire and plug it again, then dhcp service has to be turned on again:

root@ubuntu:/home/user# dhcpcd eth0
root@ubuntu:/home/user# dhcpcd.sh: interface eth0 has been configured with new IP=192.168.0.100

root@ubuntu:/home/user# 

and should work ; )

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.