Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to avoid getting certaiIP-addresses with NetworkManager?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 588
Location: Switzerland

PostPosted: Sat Sep 04, 2010 4:10 pm    Post subject: how to avoid getting certaiIP-addresses with NetworkManager? Reply with quote

Hi
Due to a complicated setup of routers and WiFi
dhcp sometimes assigns addresses in the range 192.168.0.xxx.
If i get one of these adresses, i can't connect to the world (i would need a 192.168.1.xxx address)

Before i used NetWorkManager ans NM-Applet, i could blacklist this in /etc/conf.dnet:
Code:
dhcpcd_wlan0="-X 192.168.77.1 -X 192.168.0.1 -X 192.168.0.105"


But this does not seem to work now that i use NetworkManager.

Can anybody help here?

Thank you
jody
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16016

PostPosted: Sat Sep 04, 2010 4:36 pm    Post subject: Reply with quote

Perhaps it would be better to fix your network so that you do not have competing DHCP servers in a single segment. This is a recipe for trouble, and fixing it at the source is a better choice than asking each individual client to ignore the bogus DHCP server.
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 588
Location: Switzerland

PostPosted: Sat Sep 04, 2010 6:04 pm    Post subject: Reply with quote

I am afraid i can't change much about the network:

In one lodger's apartment there is the modem, to which a switch in the basement is connected.
This switch is connected to various apartments by cables, including mine.
Finally, i have a wifi point for the network in my apartment.

When i connect my laptop to the wifi emitter by cable, i get a good ip-address.
When i use the wireless, i get a bad address. Interestingly, we also have a windows laptop,
which has no network problems via my wifi.

Since only i seem to have a wireless problem, it would be easiest
if i could force my dhcp client to ignore certain IP-offers.

As i said before, this approach has worked well before i used NetworkManager.
Is the conf.d/net ignored when NetworkManager is running?
If yes, how can i let dhcp client know what i expect?

Thank You
Jody
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16016

PostPosted: Sat Sep 04, 2010 9:20 pm    Post subject: Reply with quote

I do not use NetworkManager. Is the same address issued to both the working and non-working laptops? Are you able to configure the wireless access point in any way? What addresses does it offer over wired and over wireless?
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 588
Location: Switzerland

PostPosted: Sun Sep 05, 2010 3:11 pm    Post subject: Reply with quote

Freshly booted,
the wired connection gets 192.168.1.47
and the wireless gets 192.168.0.105
resolv.conf is set to
Code:
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver 192.168.0.1

The working laptop gets 192.168.1.52 (with gateway 192.168.1.1)

Concerning the access point, i should be able to configure it over the address 192.168.2.1,
but it seems i can't connect to it...
I know it is neither 192.168.0.1 nor 192.168.1.1, because when i disconnect it from
the outside connection i can't connect to either of these two addresses.
I'll probably have to try to reset it to factory defaults and hope to find it at 192.168.1.1
if i want to configure it.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16016

PostPosted: Sun Sep 05, 2010 5:52 pm    Post subject: Reply with quote

jody wrote:
the wired connection gets 192.168.1.47
and the wireless gets 192.168.0.105
The working laptop gets 192.168.1.52 (with gateway 192.168.1.1)
Weird. Are you sure that both laptops are associating to the same wireless AP? Do they agree about the MAC of the AP?
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 588
Location: Switzerland

PostPosted: Sun Sep 05, 2010 9:20 pm    Post subject: Reply with quote

I haven't gotten around to checking the MAC info for the access points.
(how do i find the MAC address associated to the AP)

More weird:
The above results happened when the ethernet cable was plugged in at boot.

When i boot without the cable, my wlan0 gets a good address: 192.168.1.61
(which works well - i'm posting this message through wlan0)

Pragmatically, this issue is solved, but i would really like to understand what is going on;
whether it is a problem of my AP, or a problem of NetworkManager or...?!

Thank You

Jody
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum