Choose style:

Author Topic: Network Manager wont set static IP  (Read 2286 times)

0 Members and 1 Guest are viewing this topic.

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Network Manager wont set static IP
« on: September 27, 2017, 12:59:44 am »
Hi guys

Recently I've been trying to nail down a bottleneck in my network and in doing so tried to set my PC to static IP and for some reason it wont let me, when I try to set the Netmask the input box either disappears or jumps below the line in a weird sort of way however if I just type it in and Tab to Gateway IP it looks like it's set but if I come out of NM or reboot the Netmask reverts back to 24 and the only way to get my network connection back is to set it back to DHCP.

So I installed Wicd and removed Network Manager, Wicd allows me to set a static IP but not the one I want, I set it to 192.168.0.10 but it insists on setting 192.168.0.25 in other words the properties box is saying 192.168.0.10 but connection information & ifconfig is saying 192.168.0.25

The other thing is I have the same problem with my wifes PC running PM7 so it's not isolated to my PC or PM8, so far I've left that PC using Network Manager but I've had to leave it set to DHCP

Here's my PC info

Code: [Select]
graeme@Linux1 ~ $ inxi -F
System:    Host: Linux1 Kernel: 4.10.0-35-generic x86_64 (64 bit) Desktop: N/A
           Distro: Peppermint Eight
Machine:   Mobo: Gigabyte model: H61M-S2V-B3 v: x.x
           Bios: Award v: F4 date: 05/25/2011
CPU:       Dual core Intel Core i3-2100 (-HT-MCP-) cache: 3072 KB
           clock speeds: max: 3100 MHz 1: 2088 MHz 2: 1781 MHz 3: 2062 MHz
           4: 2075 MHz
Graphics:  Card: NVIDIA GT218 [GeForce 210]
           Display Server: X.Org 1.19.3 drivers: nouveau (unloaded: fbdev,vesa)
           Resolution: 1600x900@59.98hz
           GLX Renderer: Gallium 0.4 on NVA8 GLX Version: 3.0 Mesa 17.0.2
Audio:     Card-1 NVIDIA High Definition Audio Controller driver: snd_hda_intel
           Card-2 Intel 6 Series/C200 Series Family High Definition Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.10.0-35-generic
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp3s0 state: up speed: 100 Mbps duplex: full
           mac: 50:e5:49:81:4a:ec
Drives:    HDD Total Size: 740.2GB (32.9% used)
           ID-1: /dev/sda model: Hitachi_HDS72105 size: 500.1GB
           ID-2: /dev/sdb model: V_Series_SATA_SS size: 240.1GB
Partition: ID-1: / size: 217G used: 43G (21%) fs: ext4 dev: /dev/sdb6
           ID-2: swap-1 size: 4.28GB used: 0.00GB (0%) fs: swap dev: /dev/sdb5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 46.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 205 Uptime: 7:22 Memory: 1300.8/3933.0MB
           Client: Shell (bash) inxi: 2.2.35


Any help would be greatly appreciated


Graeme

EDIT
I just tried my office PC which is on an entirely different LAN and I'm getting the same issue, the only common denominator is that I'm using homeplugs on both LANs could that be causing the problem ? anyway it would be helpful to know if anyonme else is having this problem
« Last Edit: September 27, 2017, 03:31:31 am by emegra »
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Offline perknh

  • Trusted User
  • Hero
  • *****
  • Posts: 3859
  • Karma: 303
  • Soy un huevo, nada más.
    • View Profile
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #1 on: September 27, 2017, 06:40:42 am »
Hi emegra,

Is it a problem?  Mine does something similar.

My IP address is:  192.168.1.1

I have DHCP server enabled.
My start IP is:  192.168.1.2
But my end IP address is similar to yours --192.168.1.254.

I think this is okay. ;)

perknh

We're all Peppermint users and that's what matters  ;).  -- AndyInMokum

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Re: Network Manager wont set static IP
« Reply #2 on: September 27, 2017, 07:18:14 am »
Hi perknh

Thanks for your reply

Can I ask you are you on wifi or ethernet and have you tried setting a static IP ?

You're right I may not actually have a problem because it could be that the home plugs are assigning the IP addresses in which case they could be overriding any settings I make in Network Manager but that doesn't explain why I can set a static IP with Wicd (albeit not the one I want), so I would just like it confirmed that that is the problem and not some issue with Network Manager



Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Offline perknh

  • Trusted User
  • Hero
  • *****
  • Posts: 3859
  • Karma: 303
  • Soy un huevo, nada más.
    • View Profile
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #3 on: September 27, 2017, 08:07:13 am »
Hi emegra,

As far as I know my IP is considered static --meaning I (with a lot of PCNetSpec's help) never set up a dynamic IP address.  I'm using an Ethernet connection, but Wi-Fi works for me too. :)

perknh

Here's my system info:

Spoiler (click here to view / hide)
perknh@peppermint ~ $ inxi -Fx
System:    Host: peppermint Kernel: 4.10.0-35-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: N/A Distro: Peppermint Eight
Machine:   System: TOSHIBA product: Satellite C70-A v: PSCE2U-03E00S
           Mobo: Type2 - Board Vendor Name1 model: Type2 - Board Product Name1 v: Type2 - Board Version
           Bios: Insyde v: 1.30 date: 04/18/2014
CPU:       Dual core Intel Pentium 2020M (-MCP-) cache: 2048 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9578
           clock speeds: max: 2400 MHz 1: 1206 MHz 2: 1400 MHz
Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.19.3 drivers: (unloaded: fbdev,vesa)
           Resolution: 1600x900@60.01hz
           GLX Renderer: Mesa DRI Intel Ivybridge Mobile
           GLX Version: 3.0 Mesa 17.0.2 Direct Rendering: Yes
Audio:     Card Intel 7 Series/C210 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.10.0-35-generic
Network:   Card-1: Realtek RTL8188EE Wireless Network Adapter
           driver: rtl8188ee port: 3000 bus-ID: 02:00.0
           IF: wlp2s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros AR8162 Fast Ethernet
           driver: alx port: 2000 bus-ID: 03:00.0
           IF: enp3s0 state: up speed: 100 Mbps duplex: full
           mac: <filter>
Drives:    HDD Total Size: 240.1GB (5.1% used)
           ID-1: /dev/sda model: PNY_CS1311_240GB size: 240.1GB
Partition: ID-1: / size: 215G used: 5.8G (3%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 6.33GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 44.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 243 Uptime: 1:45 Memory: 1012.4/5859.9MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35
perknh@peppermint ~ $
[close]
« Last Edit: September 27, 2017, 01:23:09 pm by PCNetSpec, Reason: mac addresses filtered out »
We're all Peppermint users and that's what matters  ;).  -- AndyInMokum

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 1990
  • Karma: 341
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: Network Manager wont set static IP
« Reply #4 on: September 27, 2017, 08:11:24 am »
Hi graeme

As far as I can remember you have to set this in config files. I've only done it on a Debian-based server but I believe it also applies to *buntus. See if this link helps you:

https://www.howtoforge.com/linux-basics-set-a-static-ip-on-ubuntu

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26128
  • Karma: 2845
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #5 on: September 27, 2017, 11:11:18 am »
You're right I may not actually have a problem because it could be that the home plugs are assigning the IP addresses in which case they could be overriding any settings I make in Network Manager but that doesn't explain why I can set a static IP with Wicd (albeit not the one I want), so I would just like it confirmed that that is the problem and not some issue with Network Manager

Nope .. the homeplugs do not dictate your IP address, that's the whole point of a STATIC IP, nothing dictates it.

Can't help you with WiCD, but I could probably have helped with networkmanager.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Re: Network Manager wont set static IP
« Reply #6 on: September 27, 2017, 11:39:37 am »
Hi murrymint
thanks for the link I'm at work just now but I'll have a look when I get home

Quote
Nope .. the homeplugs do not dictate your IP address, that's the whole point of a STATIC IP, nothing dictates it.

Can't help you with WiCD, but I could probably have helped with networkmanager.

Well I've left my wifes PC with Network Manager and I can easily put mine back to NM, I only installed WICD to see if it solved the problem



Graeme
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26128
  • Karma: 2845
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #7 on: September 27, 2017, 11:52:10 am »
Okay, on ya missus PC, what's the output from:
Code: [Select]
ls /etc/NetworkManager/system-connections
?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26128
  • Karma: 2845
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #8 on: September 27, 2017, 12:08:25 pm »
You do realise it's perfectly normal for networkmanager to display "24" as the netmask if you entered "255.255.255.0".

as it will display "16" if you entered "255.255.0.0"

See the CIDR Notation (Classless Inter-Domain Routing) section here:
https://www.digitalocean.com/community/tutorials/understanding-ip-addresses-subnets-and-cidr-notation-for-networking

What's your routers IP ?

and what static IP do you want to set for the PC ?
« Last Edit: September 27, 2017, 12:19:32 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Re: Network Manager wont set static IP
« Reply #9 on: September 27, 2017, 12:38:20 pm »
Quote
You do realise it's perfectly normal for networkmanager to display "24" as the netmask if you entered "255.255.255.0".

as it will display "16" if you entered "255.255.0.0"

No I didn't know that but I'm losing my network connection even if i leave it at 24 it will only work on DHCP

Quote
What's your routers IP ?

192.168.0.1
Quote
and what static IP do you want to set for the PC ?

192.168.0.10 on my PC  & 192.168.0.20 on the wifes PC
« Last Edit: September 27, 2017, 12:39:52 pm by emegra »
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26128
  • Karma: 2845
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #10 on: September 27, 2017, 01:07:43 pm »
Okay here's something else you need to consider...

Your router probably assigns dynamic IP's from the DHCP pool (the pool of possible IP's you've allowed it to use) starting at 192.168.0.2 and climbing from there.

So you will NOT be able to connect to your router with an IP of 192.168.0.10 if that address has already been assigned to another PC (or device) via the routers DHCP server. (ie. if that IP is already in use).

So if you don't want to limit the DHCP pool of addresses in your router to just 192.168.0.2 --> 192.168.0.9 (which would only allow 8 devicces to ever connect without static IP's) it would be a good idea to set static IP's with a higher number for the last octet such as 192.168.0.110 and 192.168.0.120

Ideally you'd set the DHCP pool in  the router to say 192.168.0.2 --> 192.168.0.99 (giving the DHCP server 97 possible addresses to assign dynamically), so it could never automatically assign IP's within the range 192.168.0.100 --> 192.168.0.255 .. then set your static IP's within that range (so dynamic and static IP's can never conflict).
But often it's enough to just set the static IP's fairly high in the range, as if you set a static IP to say 192.168.0.110 it's unlikely you'd have 107 devices connected at the same time all getting their IP's dynamically from the DCHP pool.

Did that make sense ?

So in networkmanager set:-


and on the other PC:-


and in your router, change the DHCP pool to:-
Start = 192.168.0.2
End = 192.168.0.99
« Last Edit: September 27, 2017, 01:16:29 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Re: Network Manager wont set static IP
« Reply #11 on: September 27, 2017, 02:04:47 pm »
Ok yeah that makes perfect sense,

I tried setting the wifes PC to 192.168.0.110 as you suggested and although I can access my network shares I can't connect to the internet, I can immediately connect to the internet when I set it to DHCP

Quote
and in your router, change the DHCP pool to:-
Start = 192.168.0.2
End = 192.168.0.99

I,ve checked in my router settings (VM Superhub) and the way it's configured I can only change the start value ie I can set the DHCP pool to any value up to 254 but I can't edit the end value



Below is the DHCP Reservations doesn't look like there's any conflicts



Graeme

« Last Edit: September 27, 2017, 02:09:48 pm by emegra »
If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Offline emegra

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1910
  • Karma: 412
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9 64bit
Re: Network Manager wont set static IP
« Reply #12 on: September 27, 2017, 04:24:42 pm »
Ok I seem to have got it working I set the wifes PC to 192.168.0.110 & my PC to 192.168.0.100 and the DNS to Opendns 208.67.222.222 & 208.67.220.220 and it all seems to work now so I don't really know what was wrong and I also can't explain why WICD was changing my preferred settings



Graeme

If you can keep your head while all around are losing theirs then you're not quite grasping the situation

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26128
  • Karma: 2845
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Network Manager wont set static IP
« Reply #13 on: September 27, 2017, 05:29:41 pm »
Ok yeah that makes perfect sense,

I tried setting the wifes PC to 192.168.0.110 as you suggested and although I can access my network shares I can't connect to the internet, I can immediately connect to the internet when I set it to DHCP

Quote
and in your router, change the DHCP pool to:-
Start = 192.168.0.2
End = 192.168.0.99

I,ve checked in my router settings (VM Superhub) and the way it's configured I can only change the start value ie I can set the DHCP pool to any value up to 254 but I can't edit the end value



Below is the DHCP Reservations doesn't look like there's any conflicts



Graeme

In that case (and with the IP's you've already set as static), set the start address to 192.168.0.150

Which basically means all addresses in the range 192.168.0.2 --> 192.168.0.149 (inclusive) are useable as static IP's

and addresses in the range 192.168.0.150 --> 192.168.0.254 (inclusive)  are assignable by the DHCP server

104 addresses should be plenty for DHCP, you're unlikely in a home setup to have more than 104 devices connected at the same time (and set to get their IP via DHCP)
« Last Edit: September 27, 2017, 05:32:28 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec