LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem with assignment of Dynamic IP in Ubuntu 12.04 (https://www.linuxquestions.org/questions/linux-networking-3/problem-with-assignment-of-dynamic-ip-in-ubuntu-12-04-a-4175415482/)

ravikanth1988 07-07-2012 08:36 PM

Problem with assignment of Dynamic IP in Ubuntu 12.04
 
I have a dual boot- Windows 7 and ubuntu 12.04. My internet works perfectly fine on windows. Internet does not get connected on ubuntu 12.04 half the time. I have tried using a live CD for 11.10 and the same problem persists. I have been working on this problem for over 14 days trying to get a solution.

Here are some diagnostics of my laptop when the ethernet is not working

http://paste.ubuntu.com/1077338/

http://paste.ubuntu.com/1077744/

http://paste.ubuntu.com/1077850/

The problem seems to be that(after a lot of IRC chats and discussions on ubuntuforums.org) dynamic IP assignment fails on occasions. Is there a work around for this? Some have suggested using a router. Currently I have direct cable line.

About My internet connection:
I dont have a router. It is wireless based ethernet service. i have a small box at the top of my house. This gets connected to something in the nearby tower. The box on top of my house comes down(through a wire). There is a little box near my computer with RJ-45 pin(connects to my computer) and ODU pin( connects to the top of my house) and that is it. I dont know what ODU pin is but it looks very similar to RJ-45. The support guy said I should not be reversing the connections under any cirucmstances and that is it !

An IP gets assigned everytime I power on the Ethernet service. This IP does not get assigned to my computer when I use ubuntu 12.04(Only sometimes)

nikmit 07-09-2012 09:56 AM

It is a bit of a shot in the dark, but check your kern.log for martian packets.
I am using a debian box as my home router, and it always has trouble getting the initial IP assignment. Virgin use a DHCP server in the 10.0.0.0/8 address space for some reason, and the kernel picks up packets from it as 'martian' and drops them. A windows box swallows the same packets happily, and for a while my workaround was to initially connect a windows machine directly and then spoof the MAC on the Debian router.

To check if your system is logging martians:
Code:

cat /proc/sys/net/ipv4/conf/all/log_martians
or
/proc/sys/net/ipv4/conf/eth0/log_martians

The 'all' setting covers all interfaces, but can be overriden (i think) by a more specific per interface configuration, hence the eth0 check. If your interface is called something else, you will obviously have to change that :)

If this proves to be the problem, you can try disabling rp_forward with
Code:

echo 0 > /proc/sys/net/ipv4/conf/all/rp_forward
rp_forward controls whether the kernel does reverse path forwarding checks. If you don't have a route out eth0 for network 10.0.0.0/8, any packets with a source from that network arriving on eth0 will be logged as martians and dropped or dropped silently if log_martians is disabled.

michaelk 07-09-2012 10:58 AM

The box on your roof is the antenna and transceiver. In a nutshell like a high power wireless distribution unit. I assume that electrical power for the box on the roof is over the ethernet cable that comes out the ODU (outdoor unit?) port of the box next to your computer which is why you do not want to reverse the connections.

It does look like your connection is intermittent. In addition to the above you could also try disabling IPV6.

ravikanth1988 07-09-2012 07:34 PM

Thanks for your help.Since I am a new member it took 2 days for my post to be approved. A guy(ActionParsnip) in IRC gave me a simple work around. I just looked up the IP, gateway subnetmask and DNS from windows and copied it into linux. It works like a charm. Now It appears as if there is a router in built on to the box on top of my house since I am not changing my Ip at all.


All times are GMT -5. The time now is 08:19 PM.