Network addressing

Issues related to configuring your network
Post Reply
KenP
Posts: 3
Joined: 2019/04/16 17:39:36

Network addressing

Post by KenP » 2019/04/18 15:17:28

New installation of CentOS 7.6
At home, on a router with a DHCP server (192.168.1...), ISP assigned address is 72.85.3 subnet

Using nmtui to set up the inferface, I could not choose a static IP, It would not connect to the network.
Selecting "automatic", which I assume to be DHCP, the system was assigned an address of 172.17.202.60 and does connect and function normally.

When I execute ip ro, I see:
default via 172.17.202.49 dev eth0 proto dhcp metric 100
172.17.202.48/28 dev eth0 proto kernel scope link src 172.17.202.60 metric 100

I haven't used CentOS since release 5.
Can anyone explain how I got this address and what the ip route is telling me?

Thx
KenP

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network addressing

Post by TrevorH » 2019/04/18 15:57:04

I suspect it means that you didn't get your ip address from the DHCP server that you think you did! You should be able to run (as root) grep DHCP /var/log/messages and see which server sent you that ip address.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

KenP
Posts: 3
Joined: 2019/04/16 17:39:36

Re: Network addressing

Post by KenP » 2019/04/18 16:51:53

Thanks for the quick response.
That was my suspension as well. I just don't know how it happened.

messages
Apr 16 20:18:48 localhost NetworkManager[3778]: <info> [1555460328.9398] dhcp-init: Using DHCP client 'dhclient'
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.3841] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.4022] dhcp4 (eth0): dhclient started with pid 14219
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5537] dhcp4 (eth0): address 172.17.202.60
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5538] dhcp4 (eth0): plen 28 (255.255.255.240)
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5538] dhcp4 (eth0): gateway 172.17.202.49
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5539] dhcp4 (eth0): lease time 86400
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5539] dhcp4 (eth0): nameserver '172.17.202.49'
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5539] dhcp4 (eth0): domain name 'mshome.net'
Apr 16 20:19:43 localhost NetworkManager[3778]: <info> [1555460383.5539] dhcp4 (eth0): state changed unknown -> bound
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5050] dhcp4 (eth0): address 172.17.202.60
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5057] dhcp4 (eth0): plen 28 (255.255.255.240)
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5058] dhcp4 (eth0): gateway 172.17.202.49
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5058] dhcp4 (eth0): lease time 86400
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5058] dhcp4 (eth0): nameserver '172.17.202.49'
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5058] dhcp4 (eth0): domain name 'mshome.net'
Apr 16 20:24:31 localhost NetworkManager[3778]: <info> [1555460671.5059] dhcp4 (eth0): state changed bound -> bound
Apr 16 20:24:31 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (4 scripts)
Apr 16 20:24:31 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4787] dhcp4 (eth0): address 172.17.202.60
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4793] dhcp4 (eth0): plen 28 (255.255.255.240)
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4794] dhcp4 (eth0): gateway 172.17.202.49
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4794] dhcp4 (eth0): lease time 86400
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4794] dhcp4 (eth0): nameserver '172.17.202.49'
Apr 16 20:28:35 localhost NetworkManager[3778]: <info> [1555460915.4794] dhcp4 (eth0): domain name 'mshome.net'

I'm still confused by the address, gateway, etc..

I've seen posts online from people having issues with static IP and one person says they resolved it by using a netmask 255.255.255.255
Are there issues in this release with static addressing?

Thx

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network addressing

Post by TrevorH » 2019/04/18 18:27:22

Are there issues in this release with static addressing?
No. I don't know the posts that you've read but setting a netmask of 255.255.255.255 is pretty useless.

If you run nmcli c sh then grab the uuid out of that output and plug it into nmcli c sh $uuid and scroll through, you should have a line line

DHCP4.OPTION[4]: dhcp_server_identifier = 192.168.1.6

that tells you which DHCP server it is using for this. From the domain name of 'mshome.net' I'm going to guess it's some sort of Windows system.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

KenP
Posts: 3
Joined: 2019/04/16 17:39:36

Re: Network addressing

Post by KenP » 2019/04/19 15:50:28

FYI
I'm running this system in a VM on WIN10 Hyper-V.
I accepted the default config which uses Hyper-V "default switch" for network.
Little did I know that the Hyper-V manager will serve dhcp addresses in this config.
I have to create a virtual switch in Hyper-V.

I appologize for wasting your time, I should have provided this info in the beginning.
It won't happen again.

Thx

Post Reply