Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Networkmanager (plasma-nm) creating temporary static ips?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Tue Apr 14, 2015 12:53 am    Post subject: Networkmanager (plasma-nm) creating temporary static ips? Reply with quote

Hi this is probably a bit of a longshot here since I'm guessing most probably do not use NM but here is the situation. I had a router get semi-bricked so I have to access the cfe miniwebserver to attempt to upload some firmware to try to recover it. The way you do this on this model is by pressing reset on the router for some seconds and trying to access the cfe at 192.168.2.1. In order to do this though you need to set your computer to a static ip with 192.168.2.1 set as the gateway. There is no dhcp automatically set.

So to do this I switched from my old config which was working fine otherwise because it wasn't able to handle switching the connection gracefully. I figured network manager would be a good bet providing something like what I remember on Windows in the XP days where I could temporarily set up a static connection without having to tear apart my whole setup. So now I have networkmanager and plasma-nm working well with my regular connection under kde 4.

The issue is how on Earth do you properly set up a wired manual ipv4 connection using plasma-nm? I see the options and what appears to be correct but I am not certain I am doing this correctly.

1. Open plasma-nm
2. Create manual connection
3. under ipv4 tab set:

method manual

click ADD

then:

192.168.2.8
netmask 255.255.255.0
gateway 192.168.2.1

and then I have "ipv4 is required for this connection" unchecked.

Nothing added to routes. Then I disconnect from the regular auto connection, unplug the physical ethernet connection, plug it back in, do what I need to on the router, connect to the new static connection within plasma-nm

Would this be correct?

A Google search as you can imagine yields a huge mess of advice for different versions which aren't applicable. Trying to access the CFE on a semi-bricked router is already difficult enough but doing so without knowing your other config is absolutely correct makes it exponentially more difficult. Note this is just a temporary connection. It's probably about a 80% chance the router is gone anyway. So I'm not looking to set up a permanent static ip here.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 618

PostPosted: Tue Apr 14, 2015 2:59 am    Post subject: Reply with quote

I know you asked how to do it through NetworkManager, but for something like this temporary thing I would just use a shell command.
Something like this would make it an alias on your existing eth0:

Code:
ip addr add 192.168.2.8 dev eth0 label eth0:100


This would not add the gateway, just the static IP.

Not sure why you would leave the ipv4 option unchecked, by the way.


HTH
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Tue Apr 14, 2015 8:34 pm    Post subject: Reply with quote

Hmmm. I will try checking that box and giving it a shot. I don't see why it shouldn't be checked either. I had just assumed it was primarily used for overriding ipv6 which I mostly have disabled.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1631
Location: United Kingdom

PostPosted: Tue Apr 14, 2015 8:57 pm    Post subject: Reply with quote

If you don't tick the box 'IPv4 is required for this connection' then you don't get 'may-fail=false' in the '[ipv4]' section in the file /etc/NetworkManager/system-connections/<connection name>, which means that an IPv4 connection is not mandatory. From 'man nm-settings':

Code:
      Table 13. ipv4 setting
       ┌───────────────────┬──────────────────────────┬───────────────┬───────────────────────────────────┐
       │Key Name           │ Value Type               │ Default Value │ Value Description                 │
       ├───────────────────┼──────────────────────────┼───────────────┼───────────────────────────────────┤
       │may-fail           │ boolean                  │ TRUE          │ If TRUE, allow overall network    │
       │                   │                          │               │ configuration to proceed even if  │
       │                   │                          │               │ the configuration specified by    │
       │                   │                          │               │ this property times out.  Note    │
       │                   │                          │               │ that at least one IP              │
       │                   │                          │               │ configuration must succeed or     │
       │                   │                          │               │ overall network configuration     │
       │                   │                          │               │ will still fail.  For example, in │
       │                   │                          │               │ IPv6-only networks, setting this  │
       │                   │                          │               │ property to TRUE on the           │
       │                   │                          │               │ NMSettingIP4Config allows the     │
       │                   │                          │               │ overall network configuration to  │
       │                   │                          │               │ succeed if IPv4 configuration     │
       │                   │                          │               │ fails but IPv6 configuration      │
       │                   │                          │               │ completes successfully.           │

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Wed Apr 15, 2015 6:27 pm    Post subject: Reply with quote

Fitzcarraldo, thanks I will give it another shot and see if I can get it going with that set to true.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum