Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How Is It Possible My Wireless NIC Is Assigned 2 IP's?
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
sk3l
n00b
n00b


Joined: 14 Jul 2012
Posts: 70
Location: CT USA

PostPosted: Tue Jan 15, 2013 8:34 pm    Post subject: How Is It Possible My Wireless NIC Is Assigned 2 IP's? Reply with quote

I have a TPILINK external USB wireless adapter hooked up to my desktop. It is the only active adapter. I'm using Network Manager to control all of my net interfaces. I have set up a connection for the TPLINK to my home wireless network that utilizes DHCP. I provision IPs for all the machines on my network using static DHCP reservations in my router, and I have one set up for my TPLINK.

HOWEVER,

  • In the client map of my router's admin page, I see another IP associated with my TPLINK other than than the one I have set up for the TLINK via DHCP reservation.
  • I can ping this ghost address from other machines in my network.
  • Network Manager doesn't show the ghost address.
  • ifconfig doesn't show it either.
  • Net.lo is the only manual interface, and everything in /etc/conf.d/net is commented out.


What the heck happened??

-sk3l
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Jan 16, 2013 1:50 pm    Post subject: Reply with quote

NICs do store more than one IP address. I am not an expert on this matters but I discovered this once I needed to change an IP when the NIC already had one. Upon deleting it ifconfig did NOT show an empty ip address but the old ip.

I assumed assigning a new IP address would 'overwrite' the old IP, effectively destroying it.

They must be stored somewhere. To completely cleanse ALL nic info unload the module and re-load it. This way you can start fresh without hidden stuff laying around.
Back to top
View user's profile Send private message
sk3l
n00b
n00b


Joined: 14 Jul 2012
Posts: 70
Location: CT USA

PostPosted: Wed Jan 16, 2013 3:42 pm    Post subject: Reply with quote

_______0 wrote:
NICs do store more than one IP address. I am not an expert on this matters but I discovered this once I needed to change an IP when the NIC already had one. Upon deleting it ifconfig did NOT show an empty ip address but the old ip.

I assumed assigning a new IP address would 'overwrite' the old IP, effectively destroying it.

They must be stored somewhere. To completely cleanse ALL nic info unload the module and re-load it. This way you can start fresh without hidden stuff laying around.


Sorry, I'm not sure what you mean by "unloading" the module. Do you mean "ifconfig <NIC> down" then "ifconfig <NIC> up"? Do you mean resetting the NIC's ID in udev and letting it get rediscovered? Surely you don't mean reloading a kernel module.

This condition has persisted across reboots, unplugging the adapter, removing & re-entering the NetworkManager profile, etc.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Wed Jan 16, 2013 4:11 pm    Post subject: Reply with quote

many usb wireless allow the adapter to work as an access point (in order for other wireless to "plug" with it and access the network the device is connect with).
so if your adapter is an AP, it could have two IP.
Back to top
View user's profile Send private message
sk3l
n00b
n00b


Joined: 14 Jul 2012
Posts: 70
Location: CT USA

PostPosted: Wed Jan 16, 2013 6:51 pm    Post subject: Reply with quote

krinn wrote:
many usb wireless allow the adapter to work as an access point (in order for other wireless to "plug" with it and access the network the device is connect with).
so if your adapter is an AP, it could have two IP.


That is certainly so. However, I only saw this phenomenon happen once I switched to Network Manager. I ran wpa_supplicant, and wicd, and this did not occur with those tools. It's almost like another service is running in parallel with NM and obtaining that IP via DHCP (w/o static reservation). Wicd has been unmerged, and I don't understand how wpa_supplicant could do anything if there are no manual interface defined (i.e. net.wifi0).

Just for my edification, is it true that NM is merely a front end tool that relies on dhcpcd and wpa_supplicant on the back end?
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1143

PostPosted: Thu Jan 17, 2013 10:25 pm    Post subject: Reply with quote

Try this:

Code:
ip addr


An interface can have aliased IPs that don't show up in ifconfig, but will show up with the ip tool.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
sk3l
n00b
n00b


Joined: 14 Jul 2012
Posts: 70
Location: CT USA

PostPosted: Fri Jan 18, 2013 11:59 am    Post subject: Reply with quote

Awesome! I didn't know their was such a tool. Sure enough, there is the "alias" IP. Now that I can see it, how do I stop the NIC from requesting it?

Code:

CHEETAH ~ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth_realtek: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1f:bc:0d:c9:9b brd ff:ff:ff:ff:ff:ff
3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
    link/sit 0.0.0.0 brd 0.0.0.0
4: wlan_tplink: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 64:70:02:17:24:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.15/24 brd 192.168.1.255 scope global wlan_tplink
    inet 192.168.1.115/24 brd 192.168.1.255 scope global secondary wlan_tplink
    inet6 fe80::6670:2ff:fe17:2460/64 scope link
       valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 52:54:00:1d:d8:3f brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr0
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
    link/ether 52:54:00:1d:d8:3f brd ff:ff:ff:ff:ff:ff
Back to top
View user's profile Send private message
sk3l
n00b
n00b


Joined: 14 Jul 2012
Posts: 70
Location: CT USA

PostPosted: Fri Jan 18, 2013 12:15 pm    Post subject: Reply with quote

So, I decided to look at some of the NetworkManager conf files in /etc, and lo and behold, this is what I found in the IPv4 Adress section:

Code:

[ipv4]
method=auto
dns=192.168.1.1;
#addresses1=192.168.1.115;24;192.168.1.1;
dhcp-client-id=CHEETAH
may-fail=false


I added the hash to comment out the secondary address, and boom, the NIC now has only the address I set up using DHCP. Cool.

Note that when I was looking at the network config in the NM GUI, I never saw the entry for the 192.168.1.115 static address, so this seems to be some type of bug.
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