Two IP addresses on one device

So, there I was, messing with some router settings (nothing out of the ordinary, just some port forwarding) when suddenly, I notice that my laptop shows up twice on the devices list. Odd, that. So I popped open a terminal and ran hostname -I, and what did I see? Two different IP addresses. It doesn’t seem to have given me any trouble yet, but it’s annoying.
Most of what I’ve been able to find on the web involves setting up two IP addresses, not removing one. How would I remove one of these addresses?
For reference, I did not see this until after I plugged a USB wifi card into my laptop. However, removing it did not solve the issue.
Thanks,
Leoj03

hostname -i shows both your private and public IP.

Do you have libvirt installed/enabled/running?

The second IP address indicated by hostname -I refers to my virtual network interface.

What output does ip add provide you?

Thank you.

I don’t have libvirt installed, as far as I’m aware.
Output of ip add:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:8c:fa:7d:62:b5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.253/24 brd 192.168.1.255 scope global dynamic noprefixroute enp1s0
       valid_lft 78391sec preferred_lft 78391sec
    inet6 fe80::eca7:769a:3a88:331c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether a4:db:30:69:d0:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.249/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0
       valid_lft 78392sec preferred_lft 78392sec
    inet6 fe80::102f:44d7:a889:abe0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
1 Like

Looks like you have one IP for a wired connection and 2nd IP for a wireless connection.

2 Likes

A little extra info:

wlan0 became wlp2s0 and eth0 became enp1s0.

They changed the naming because the numbers were arbitrarily based on timing. Now they include a code after “wl” and “en” related to how they’re physically placed.

PredictableNetworkInterfaceNames
networking - Why is my interface now wlp2s0 instead of wlan0? - Ask Ubuntu

1 Like

Unplugging my wired connection seemed to solve the issue. Thanks, everyone!

2 Likes