You are not logged in.

#1 2018-07-23 13:00:07

foreverdante
Member
Registered: 2016-11-23
Posts: 25

Multiple IP addresses on one NIC

After installing Arch Linux on my work computer, every time I reboot my computer my NIC picks up 3 IP addresses. I only have one NIC and this is a desktop computer, so no wireless. I wrote up a quick bash script to remove the additional IP addresses, but this is only a bandaid. After a random amount of time, the DHCP lease renews and I get my wonderful IP addresses back. Below is the output of

ip a

eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 11:22:33:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet x.x.x.177/22 brd x.x.x.255 scope global noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet x.x.x.161/22 brd x.x.x.255 scope global secondary noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet x.x.x.196/22 brd x.x.x.255 scope global secondary noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet6 abcd:efgh:ijkl:mnop/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

My IP address should be the x.x.x.177. How can I go about removing the other 2 IP addresses (161, 196)?

Thank you!!

Offline

#2 2018-07-23 13:52:46

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Multiple IP addresses on one NIC

As these are /22 networks which use 10 bits for host address, we need atleast the 3rd number to be sure which networks are used.

If the addresses are in the 10.x.x.x  , 172.16.x.x upto 172.31.x.x , 192.168.x.x ranges they are not accessible from outside your work environment and you can post the full addresses .
If they are in other ranges, blanking the first 2 numbers should be enough to protect your employer identity.

Last edited by Lone_Wolf (2018-07-23 13:53:39)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2018-07-23 14:05:55

foreverdante
Member
Registered: 2016-11-23
Posts: 25

Re: Multiple IP addresses on one NIC

The IP addresses are:
10.0.3.177
10.0.3.161
10.0.3.196

Offline

#4 2018-07-23 14:36:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Multiple IP addresses on one NIC

Those addresses are in the same network .

Does your work computer have multiple OSes and/or is used in a company LAN AND from home through a VPN connection ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2018-07-23 15:12:22

foreverdante
Member
Registered: 2016-11-23
Posts: 25

Re: Multiple IP addresses on one NIC

Nope. It only has Arch on it. We are using a DHCP server, however, I looked in the server and there is only 1 IP address assigned to my specific MAC. This issue started from a brand new install. I didn't even have a DM installed yet.

Offline

#6 2018-07-23 23:52:48

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Multiple IP addresses on one NIC

"noprefixroute" is an odd flag to have against the address. How did you configure your network? What DHCP Client(s) are you using?

Offline

#7 2018-07-24 12:17:59

foreverdante
Member
Registered: 2016-11-23
Posts: 25

Re: Multiple IP addresses on one NIC

I didn't setup our network, I just came into this mess. However, we were using a local Red Hat DHCP server, but now we have Cisco ISE that is pushing out the IP address(es)

Offline

#8 2018-07-24 13:30:18

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Multiple IP addresses on one NIC

Try getting info about the leases through your dhcp client, then release them one by one.

for dhcpcd the options --dumplease and --release should be useful, for other clients check their man pages.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2018-07-24 22:44:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Multiple IP addresses on one NIC

fukawi2 wrote:

What DHCP Client(s) are you using?

Offline

#10 2018-08-04 19:19:55

newsboost
Member
Registered: 2016-07-24
Posts: 157

Re: Multiple IP addresses on one NIC

foreverdante wrote:

After installing Arch Linux on my work computer, every time I reboot my computer my NIC picks up 3 IP addresses. I only have one NIC and this is a desktop computer, so no wireless. I wrote up a quick bash script to remove the additional IP addresses, but this is only a bandaid. After a random amount of time, the DHCP lease renews and I get my wonderful IP addresses back. Below is the output of

ip a

eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 11:22:33:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet x.x.x.177/22 brd x.x.x.255 scope global noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet x.x.x.161/22 brd x.x.x.255 scope global secondary noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet x.x.x.196/22 brd x.x.x.255 scope global secondary noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet6 abcd:efgh:ijkl:mnop/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

My IP address should be the x.x.x.177. How can I go about removing the other 2 IP addresses (161, 196)?

Thank you!!

Hello dude,

I just learned this today (in the thread "[SOLVED] Confused about DHCPCD - not renewing lease "two IP addresses""). This is what you should do, I'm almost 100% sure this solution works for you (it did for me):

ip addr change x.x.x.161/22 dev eno1 valid_lft 1 preferred_lft 1
ip addr change x.x.x.196/22 dev eno1 valid_lft 1 preferred_lft 1

By setting valid_lft and preffered_lft to 1 second (maybe also 0 seconds), those IP addresses will timeout before you blink and next you only have the x.x.x.177-IP address you wanted. That's as simple as that!

EDIT: I think your problem is that you have several DHCP-servers handing out IP addresses? I've never tried that, so I would be worried if you with the solution I presented with setting the IP address lifetime to e.g. 1 second, would come in the situation that after a short while your NIC again picks up new leases. I recommend look at your DHCP-server, maybe ban the NIC mac-address, so you don't even have the problem in the first place... I don't understand how your NIC picks up 3 IP addresses, you didn't describe that. In my case, I changed dnsmasq on my router and just didn't want to reboot. In this case I discovered setting IP lifetime to a few seconds solved my problem...

Last edited by newsboost (2018-08-04 19:36:53)

Offline

Board footer

Powered by FluxBB