Bug 1273432

Summary: networkmanager got wrong IP during installation
Product: [Fedora] Fedora Reporter: Łukasz Posadowski <mail>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 23CC: dcbw, jklimes, lkundrak, psimerda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-01 18:22:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Łukasz Posadowski 2015-10-20 12:44:00 UTC
Description of problem:
NetworkManager is getting (I don't know how exactly from where) wrong IP during installation. It needs to be restarted to function properly.

Version-Release number of selected component (if applicable):
Fedora 23 Workstation live DVD beta1.

How reproducible:
Always.

Steps to Reproduce:
1. Connect live system to dhcp server by ethernet cable, of wifi.
2.
3.

Actual results:
IP is wrong. In my cause it should be 192.168.111.something. If I do
# service NetworkManager restart
it starts to work properly.

Expected results:
Get 192.168.111.something right away.

Additional info:

Comment 1 Jirka Klimes 2015-10-22 08:59:55 UTC
what is the wrong IP? Can you post output of these commands (when you have the wrong IP)
$ nmcli device
$ ip addr
$ ip route

You can find what connection profile was activated in NetworkManager logs (together with IP from DHCP, if any).
$ sudo journalctl -b 0 -u NetworkManager

Comment 2 Łukasz Posadowski 2015-10-23 12:09:21 UTC
Thank for suggestions. It appears that it wasn't wrong IP. NM was wainting for DHCPv4 too long. It will be a long one. Search for line that contains "DHCPv4 request timed out.".


-------------------------------------------------------------------
[root@localhost ~]# nmcli g
STATE                   CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
connected (local only)  limited       enabled  enabled  enabled  enabled 

[root@localhost ~]# nmcli d
DEVICE      TYPE      STATE         CONNECTION 
virbr0      bridge    connected     virbr0     
virbr0-nic  tap       connected     virbr0-nic 
wlp1s0      wifi      disconnected  --         
enp2s0      ethernet  unavailable   --         
lo          loopback  unmanaged     --         
[root@localhost ~]# 

----- NOW I'M CONNECTING TO WIFI -----

[root@localhost ~]# nmcli c
NAME                UUID                                  TYPE             DEVICE     
virbr0-nic          bd96539a-43a0-431a-b2b3-ce845875d90d  generic          virbr0-nic 
virbr0              6674957b-cfe3-405a-a38c-b765dfb57991  bridge           virbr0     
Wired connection 1  ffeee582-4c13-46ec-97a7-191735ceef73  802-3-ethernet   --         
mpdj2               449f2b34-115b-4f99-8a59-840622187d27  802-11-wireless  wlp1s0     

[root@localhost ~]# nmcli d
DEVICE      TYPE      STATE        CONNECTION 
virbr0      bridge    connected    virbr0     
virbr0-nic  tap       connected    virbr0-nic 
wlp1s0      wifi      connected    mpdj2      
enp2s0      ethernet  unavailable  --         
lo          loopback  unmanaged    --         

[root@localhost ~]# ifconfig -a
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c4:54:44:3a:8c:31  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 32  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 102  bytes 8064 (7.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 102  bytes 8064 (7.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.124.1  netmask 255.255.255.0  broadcast 192.168.124.255
        ether 52:54:00:53:47:39  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0-nic: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 52:54:00:53:47:39  txqueuelen 500  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::162d:27ff:fe23:7215  prefixlen 64  scopeid 0x20<link>
        inet6 fdf7:6b81:d2ff:0:162d:27ff:fe23:7215  prefixlen 64  scopeid 0x0<global>
        ether 14:2d:27:23:72:15  txqueuelen 1000  (Ethernet)
        RX packets 3  bytes 422 (422.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 1950 (1.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]# systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2015-10-23 07:45:15 EDT; 6min ago
 Main PID: 1251 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           └─1251 /usr/sbin/NetworkManager --no-daemon

Oct 23 07:49:00 localhost NetworkManager[1251]: <info>  NetworkManager state is now CONNECTED_LOCAL
Oct 23 07:49:00 localhost NetworkManager[1251]: <info>  (wlp1s0): Activation: successful, device activated.
Oct 23 07:49:00 localhost NetworkManager[1251]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:49:04 localhost dhclient[2696]: DHCPDISCOVER on wlp1s0 to 255.255.255.255 port 67 interval 10 (xid=0x35ead53b)
Oct 23 07:49:14 localhost dhclient[2696]: DHCPDISCOVER on wlp1s0 to 255.255.255.255 port 67 interval 15 (xid=0x35ead53b)
Oct 23 07:49:29 localhost dhclient[2696]: DHCPDISCOVER on wlp1s0 to 255.255.255.255 port 67 interval 19 (xid=0x35ead53b)
Oct 23 07:49:42 localhost NetworkManager[1251]: <warn>  (wlp1s0): DHCPv4 request timed out.
Oct 23 07:49:42 localhost NetworkManager[1251]: <info>  (wlp1s0): DHCPv4 state changed unknown -> timeout
Oct 23 07:49:42 localhost NetworkManager[1251]: <info>  (wlp1s0): canceled DHCP transaction, DHCP client pid 2696
Oct 23 07:49:42 localhost NetworkManager[1251]: <info>  (wlp1s0): DHCPv4 state changed timeout -> done
Hint: Some lines were ellipsized, use -l to show in full.

----- AFTER RESTARTING NETWORKMANAGER SEVERAL TIMES -----
----- IT'S WORKING NOW -----

[root@localhost ~]# ifconfig -a
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c4:54:44:3a:8c:31  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 32  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 370  bytes 28144 (27.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 370  bytes 28144 (27.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.124.1  netmask 255.255.255.0  broadcast 192.168.124.255
        ether 52:54:00:53:47:39  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0-nic: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 52:54:00:53:47:39  txqueuelen 500  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.111.138  netmask 255.255.255.0  broadcast 192.168.111.255
        inet6 fe80::162d:27ff:fe23:7215  prefixlen 64  scopeid 0x20<link>
        inet6 fdf7:6b81:d2ff:0:162d:27ff:fe23:7215  prefixlen 64  scopeid 0x0<global>
        ether 14:2d:27:23:72:15  txqueuelen 1000  (Ethernet)
        RX packets 250  bytes 66645 (65.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 185  bytes 28907 (28.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]# systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2015-10-23 07:57:37 EDT; 3min 16s ago
 Main PID: 4835 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─4835 /usr/sbin/NetworkManager --no-daemon
           └─4968 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-wlp1s0.pid -lf /var/lib/NetworkManager/dhclient-90add...

Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  NetworkManager state is now CONNECTED_SITE
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  Policy set 'mpdj2' (wlp1s0) as default for IPv4 routing and DNS.
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  (wlp1s0): Activation: successful, device activated.
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  startup complete
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:57:52 localhost NetworkManager[4835]: <info>  connectivity: check for uri 'http://fedoraproject.org/static/hotspot.txt' failed w...ostname'
Oct 23 07:58:14 localhost NetworkManager[4835]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Hint: Some lines were ellipsized, use -l to show in full.

Comment 3 Łukasz Posadowski 2015-11-01 18:22:38 UTC
I managed to locate problem with my router, which have to be restarted when changing distro. I think it has something to do with binding ip to mac address.
It's not 100% sure, bit I'm closing a bug anyway.

Thanks Jirka.