Adding IP, Net Mask, Gateway

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fjgh

Adding IP, Net Mask, Gateway

Post by fjgh »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB »

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

Re: Adding IP, Net Mask, Gateway

Post by fjgh »

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 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB »

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

Re: Adding IP, Net Mask, Gateway

Post by fjgh »

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 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB »

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

Re: Adding IP, Net Mask, Gateway

Post by fjgh »

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

Re: Adding IP, Net Mask, Gateway

Post by akar »

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

Re: Adding IP, Net Mask, Gateway

Post by akar »

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

Re: Adding IP, Net Mask, Gateway

Post by akar »

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 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Adding IP, Net Mask, Gateway

Post by JeremyB »

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

Re: Adding IP, Net Mask, Gateway

Post by akar »

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 3
Level 3
Posts: 131
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: Adding IP, Net Mask, Gateway

Post by tgwilt »

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.
yattahey

Re: Adding IP, Net Mask, Gateway

Post by yattahey »

Sorry about hitting an old link;
Had these issues when I had a wifi adapter card blow out on the desktop. On going back to cat5e cable and gigabit NIC (on board MB) I found there was no way setting my static address configurations/DNS etc as I had on the wifi adapter. The wired network connection icon in the tray/panel just would not accept an edit/apply let alone get that magic input bar address-subnet-gateway to work. Network connections/manger apparently does not work in this manner. I saw there was a command line solution here, but as I couldn't accept that it had to be that hard and the only answer.

GUI work around:
Assumed that a "wire" connection had to have at least one default, so I left the "wired" connection in an "auto-auto" default mode and let linux get something to work with. Reboot - success - got connected - got something going! Next went to the Menu>System Settings>Network. Now another network GUI opened that did not appear to be Network Manager - it might be, didn't have time to check. On the new GUI,I tried the edit wheel on the original "wire1" but it also could not accept and changes - ie no Save/Apply button. Last effort was click the "New Profile" button and create a "wire2". Under (Device) Mac address, click arrow down and choose the MAC address and connection - mine was eno1 (some people its etho, etc). You can input your static address, subnet, gateway and DNS's to your hearts content. If you want, you can do all the routing too. Save it/Apply it - reboot computer and make sure you're in "wire2" is selected in the tray/panel - you're good to go. Magic happens- Network Manager now sees it in the tray, you can even switch back to auto auto mode it you want. ifconfig - will give the correct static connect data. Your link check at sudo ethtool eno1 will give you correct links and connect speeds. On reboots it will always come up in the new static wire2 connection. Life is in harmony again! Probably should say this was on LM 18.3/Cinnamon.
Locked

Return to “Networking”