Adding IP, Net Mask, Gateway

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
fjgh
Level 1
Level 1
Posts: 28
Joined: Thu Jan 26, 2017 9:59 pm

Adding IP, Net Mask, Gateway

Post by fjgh » Tue Feb 07, 2017 6:17 pm

Apparently there is a secret inputting procedure to enter the IP address, net mask, and gateway which I have not figured out in Mint 18.1 Mate or Cinnamon. I can get the computer IP address typed in, but I can not enter the net mask and gateway after the cpu IP address. The red and green bars jump back and forth and any mask or gateway that I type in over writes the cpu ip.

After clicking "add" button and typing in the cpu IP, what do I click or type next? I have been messing with this entry box for an hour and I can't get all three entries into the box. I have never had a problem typing in this stuff into a networking properties box in 25 years on servers and computers until now. What am I not doing correctly?

JeremyB
Level 19
Level 19
Posts: 9452
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB » Tue Feb 07, 2017 6:33 pm

The most commonly used net mask is 24 and that should result with 255.255.255.0 in ifconfig results

fjgh
Level 1
Level 1
Posts: 28
Joined: Thu Jan 26, 2017 9:59 pm

Re: Adding IP, Net Mask, Gateway

Post by fjgh » Tue Feb 07, 2017 6:50 pm

Unfortunately, this does not answer my question. I tried again to enter values into the box and nothing works as I would expect. This is the weirdest entry box I have ever seen. It is not worth the time to continue this. It's back to Ubuntu and Unity. I have better luck with it even though I don't like the Unity design at least I can get things to work. I am done with Mint. I don't know why programmers always have to change things that aren't broke to something impossible to use. I must not be smart enough to use Mint.

JeremyB
Level 19
Level 19
Posts: 9452
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB » Tue Feb 07, 2017 7:29 pm

Can you post a screenshot of the entry box?

I don't use 18.1 but do have LM 18 and I do use Ubuntu 16.04

fjgh
Level 1
Level 1
Posts: 28
Joined: Thu Jan 26, 2017 9:59 pm

Re: Adding IP, Net Mask, Gateway

Post by fjgh » Thu Feb 09, 2017 4:19 pm

Just for kicks I installed Mint 18.1 KDE on a test computer to look at the KDE interface. I also looked at the network setup IPV4 tab where the IP, mask, and gateway are entered and that box works normal and as expected. I can type in each entry, separated by a tab or 'enter' and the cursor moves clearly to the next position in the box.

When entering the same info into the cinnamon or mate versions, the cursor does not move cleanly and clearly to the next position. And the tail end of the IP address is covered either by '24' or 255.255.255.0 and part of the text looks mangled. The gateway entry will cover some of the mask entry. None of this happens in the KDE interface.

Part of the problem is that it wasn't clear how to move to the next position. I looked in the Ubuntu docs for 16.04, which uses an entry box similar to mint, and found out a tab or enter key is needed to move the cursor. By the way the cursor moves cleanly to the next position in the Ubuntu network setup like it does in KDE in mint.

I may install 18.1 xfce to see that interface desktop and I will look at the IPV4 address entry to see how that works.

JeremyB
Level 19
Level 19
Posts: 9452
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB » Thu Feb 09, 2017 6:27 pm

You might be able to copy the info even from an ISO of KDE, XFCE, or Ubuntu. The info should be stored in /etc/NetworkManager/system-connections/ with the file being named after you SSID. If your SSID was network you could see all settings with

Code: Select all

sudo cat /etc/NetworkManager/system-connections/network
Usually adding a static IP with net mask and gateway changes a few lines in the system-connections file, this is mine for a static IP

Code: Select all

[ipv4]
address1=192.168.1.103/24,192.168.1.1
dns=192.168.1.1;8.8.8.8;
dns-search=
method=manual
My static IP is 192.168.1.103, net mask of 255.255.255.0 and my gateway is 192.168.1.1 and I added one of googles DNS 8.8.8.8

When using DHCP for automatic IP that section looks like

Code: Select all

[ipv4]
dns-search=
method=auto

fjgh
Level 1
Level 1
Posts: 28
Joined: Thu Jan 26, 2017 9:59 pm

Re: Adding IP, Net Mask, Gateway

Post by fjgh » Sat Feb 11, 2017 10:55 am

That's what I always wanted to see in MS Windows, simple text configuration files instead of stuff hidden in non readable dll files nobody except the software can read.

akar
Level 1
Level 1
Posts: 9
Joined: Wed Mar 08, 2017 7:53 am

Re: Adding IP, Net Mask, Gateway

Post by akar » Wed Mar 08, 2017 8:24 am

Hi,
I've been using LM13 Mate for quite some time, and a few days ago, I installed LM18.1 Mate on a new computer. What an improvement, but during the installation, I did not get a chance to set a static IP addy. It automatically installed a DHCP addy.

Yesterday, I decided to set my static IP addy, and I got exactly the same problem as the original poster, fjgh.
I spent hours trying to set the IP addy but to no avail. The same problem occurs whether I start to change the setting by clicking on the connecton icon on the taskbar, or via Menu->Control Centre->Network Connections.

There was a tutorial on youtube that shows a successful static IP addy change, but that was on Cinnamon.
I've tried JeremyB's suggestions, but there are no files in /etc/NetworkManager/system-connections. Nor are there files in /etc/network/interfaces.d.

I've been using linux since 1996 :-) and I've never had problems setting up a static IP addy till now with LM18.1 Mate.

My only clue to someting being broken is that the system did not ask for my passwd (for sudo) when I opened the Network Connections...even though I am goiing to change a system setting...

Any ideas on how to proceed?

Thanks...

akar
Level 1
Level 1
Posts: 9
Joined: Wed Mar 08, 2017 7:53 am

Re: Adding IP, Net Mask, Gateway

Post by akar » Wed Mar 08, 2017 10:25 pm

Hi,
Here are some updates to this problem.....

This morning, there were updates to network-manager and network-manager-applet (to 1.2.6-0ubuntu.16.04.1). I thought this would finally solve the problem. But no joy.

The issue is not just the problem with filling in the IP details, but also, the save button becomes inactive as soon as you try to edit (setting the dropdown menu from DHCP to manual). I think this is because the system doesn't allow a normal user to make any changes, but then again the system doesn't ask for my passwd (for sudo) as is normally the case, eg. to use the software manager.....sigh :(

akar
Level 1
Level 1
Posts: 9
Joined: Wed Mar 08, 2017 7:53 am

Re: Adding IP, Net Mask, Gateway

Post by akar » Fri Mar 17, 2017 7:45 am

Hi,

OK, I've solved this problem. (I'm one of the few people in my organisation who is allowed to have static IP addresses for my servers/workstations/desktops :-) and I want to use them.

I've decided that NetworkManager on Linux Mint 18.1 Mate is horrendously broken.
I've decided to revert the network card name from enp2s0 to the good, old eth0.

1. Edit /boot/grub/grub.cfg to make the following changes (and disable ipv6 at the same time) :

GRUB_CMDLINE_LINUX="net.ifnames=0 ipv6.disable=1"

Update grub:

Code: Select all

sudo update-grub
2. Create a file /etc/network/interfaces and put in your static IP address info, like so:

--------------------------------------------------------------------------------------
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address "your static ip addy"
netmask "your netmask"
gateway "your gateway"
dns-nameservers "your dns servers"
-------------------------------------------------------------------------------------

2.1 Permissions and ownership should be like so:

-rw-r--r-- 1 root root 298 Mar 16 20:13 /etc/network/interfaces

3. Stop NetworkManager:
LM 18.1 Mate uses systemd...

Code: Select all

systemctl stop NetworkManager.service
4. Make sure NetworkManager doesn't run again on reboot:

Code: Select all

systemctl disable NetworkManager.service
5. Reboot and check your IP address.....your network interface should now be 'eth0' and have your static IP addy....enjoy :D
You won't get the 'wired connection' icon on RHS of the task bar....but who cares about NetworkManager anymore :-)

Cheers.

JeremyB
Level 19
Level 19
Posts: 9452
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB » Fri Mar 17, 2017 7:51 am

Screenshot from 2017-03-17 06-48-02.png
I didn't have issues using lm18.1 Cinnamon using wifi. I will try later using ethernet and this computer has never been hooked up to a wire

akar
Level 1
Level 1
Posts: 9
Joined: Wed Mar 08, 2017 7:53 am

Re: Adding IP, Net Mask, Gateway

Post by akar » Sun Mar 19, 2017 11:56 pm

I don't have Mint Cinnamon on my desktops as I've always preferred Mate.
I think the NetworkManager is broken on Mate only.....

tgwilt
Level 2
Level 2
Posts: 72
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: Adding IP, Net Mask, Gateway

Post by tgwilt » Wed Jul 11, 2018 6:32 pm

Jeremy, thanks for posting the method to add a static IP address for my wireless adapter. Whenever I tried using the Network icon to do this, the save button was disabled when changing the address type from dhcp to manual. That's why you gotta love command line stuff.

Post Reply

Return to “Ethernet”