You are not logged in.

#1 2014-09-06 04:03:09

digifuzzy
Member
Registered: 2013-12-11
Posts: 12

netctl - switching profiles/restarting networking

I used the Bridge with netctl instructions to setup a bridge/tap interface on my box. Works great locally and with virtual images in Qemu. However, I ran into a problem when I went to configure a new router for my LAN. With previous tools, this wasn't much of an issue. Maybe a couple of google searches to refresh my memory about commands were involved along the way. However...

What I could not find in the arch forums/wikis and google were the steps to manage the networking hardware in netctl. I could find lots of references to setup ("do this, that, then these and you're done"), but no real helpful references to turn off/restart an interface. I ended up creating a static ip profile in netctl, enabling it, disable the bridge profile then reboot. But this seems so wrong on so many levels.

After a half-dozen reboots and almost two hours of frustration, I just stepped away from my box and went to do the configuration on my wife's mac. The process of configuring a router should not be a painful exercise.

So, questions...
1) If you have a netctl profile enabled to start at boot, is there a mechanism to turn that profile off?
2) What is the easiest way to switch to a static ip from a running netctl profile?
3) Every time there is a change to the netctl settings - is there a way to restart networking without having to reboot?

Help please?

Offline

#2 2014-09-07 18:54:50

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: netctl - switching profiles/restarting networking

What previous tools do you mean? Netcfg? Please explain what you want to achieve, then I'll try to help you. And of course,  RTFM.

As for your questions:
1. Yes: "netctl disable <profile>", "systemctl disable netclt@<profile>", manually removing the corresponding symlink from /etc/systemd/system/<default.target> .wants
2. ??? "netctl stop <profile>"... then do your statis IP magic.
3. Yes: "netctl reenable <profile> && netctl restart <profile>.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#3 2014-09-07 19:12:43

digifuzzy
Member
Registered: 2013-12-11
Posts: 12

Re: netctl - switching profiles/restarting networking

There was network manager or ifup/ifdown scripts (see Quick HOWTO : Ch03 : Linux Networking. These were the formative tools that I used in first using linux. This was all before netcfg/netctl/systemd. What previous tools is not really important.

@Leonid.I - RTFM? If there was a reasonably written manual to follow an understand, I would be happy to read. However, the manual ( Network Configure and others) was of little help to me in this instance.

I had tried the steps suggested to no avail. disable/stop/enable and ip commands where unsuccessful as the NIC retained some settings with bridging/bonding. The only way I could resolve was to create/enable static profile and reboot.

I am beginning to think there may be some missing description from the instructions for bridging in the link I provided above that I have missed and its tripping me up in this scenario.

For information, my profiles for bridging:
/etc/netctl/tuntap

Description='tuntap connection'
Interface=tap0
Connection=tuntap
Mode='tun'
User='nobody'
Group='nobody'

/etc/netctl/bridge

Description="Bridge connection"
Interface=br0
Connection=bridge
BindsToInterfaces=(enp4s0 tap0)
IP=dhcp

Offline

#4 2014-09-07 20:42:22

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: netctl - switching profiles/restarting networking

digifuzzy wrote:

@Leonid.I - RTFM? If there was a reasonably written manual to follow an understand, I would be happy to read. However, the manual ( Network Configure and others) was of little help to me in this instance.

Yes, read the manual:

$ pacman -Ql netctl | grep \.gz
netctl /usr/share/man/man1/netctl-auto.1.gz
netctl /usr/share/man/man1/netctl.1.gz
netctl /usr/share/man/man5/netctl.profile.5.gz
netctl /usr/share/man/man7/netctl.special.7.gz
digifuzzy wrote:

I had tried the steps suggested to no avail. disable/stop/enable and ip commands where unsuccessful as the NIC retained some settings with bridging/bonding. The only way I could resolve was to create/enable static profile and reboot.

I am beginning to think there may be some missing description from the instructions for bridging in the link I provided above that I have missed and its tripping me up in this scenario.

The instructions you are referring to are wiki. They are never entirely correct, nor complete simply because they are often not updated frequently enough. Moreover, some people (myself included) on purpose write wiki articles in a way to discourage readers from blindly following them and encourage thinking. So, if you need some sort of a "step-by-step guide", then ArchLinux is not a system for you because these steps will frequently change. Use Debian or something.

And by the way, you still haven't explained exactly what you are trying to do. You mentioned "router", but provided no details. With the current amount of information that you offered, I can do little more than direct you to manpages. Sorry.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#5 2014-09-07 22:54:57

digifuzzy
Member
Registered: 2013-12-11
Posts: 12

Re: netctl - switching profiles/restarting networking

Leonid.I wrote:

And by the way, you still haven't explained exactly what you are trying to do. You mentioned "router", but provided no details. With the current amount of information that you offered, I can do little more than direct you to manpages. Sorry.

Fair enough - reading though my original post I realize my "intentions" were not exactly clear. With an existing Arch install using netctl, I wanted to change my networking (disable/stop profile) so as to plug the network cable into a router. I needed to change the factory default settings of the router. Part of this had been covered with the previous questions/answers given above. Sure, with GUI tools this should be a rather easy affair, but I do not use those GUI tools (seem to get in the way for some reason).

Changing network settings to plug into and configure a router should not be that difficult. Don't mean to pour frustrations out in a forum, but configuring a router from its default/factory settings was turning into an ugly mess on my box.

Leonid.I wrote:

The instructions you are referring to are wiki. They are never entirely correct, nor complete simply because they are often not updated frequently enough. Moreover, some people (myself included) on purpose write wiki articles in a way to discourage readers from blindly following them and encourage thinking.

What originally motivated me to move from Debian to Arch a couple of years ago was the wiki pages. Any time I did a web search to solve a problem, it was usually an Arch wiki page that came up on top of my search results. Between that, having a sensible packaging scheme/methodology to add unpackage software and having access to the latest-greatest software and I was sold.

I had another issue to solve and the smart wiki page was extremely well written with useful information. I mention this because I would use that page as an example of how good the wiki can be. Simple. Clear. Sane defaults as a starting point. Service management. Other references. Wiki Awesomeness :-)

Wiki pages on networking do not seem to be there yet. Just a little to spread out. My bias (that showed through here) was my reluctance to read the man page. I have found some man pages to be painful reading experiences. They detail every possible, conceivable permutation of configuration switch/option - but not always a "start here" point. I'll get over this in time.

Leonid.I wrote:

So, if you need some sort of a "step-by-step guide", then ArchLinux is not a system for you because these steps will frequently change. Use Debian or something.

I don't think we've talked much - but for you to make that observation speaks volumes to me. I get it. Using netctl should not be this hard. And maybe for you this topic is frustrating to revisit with users over-and-over-and-over... . There are missing steps on my side. Fair enough. Its unfair to make comparisons to past toolsets where there are YEARS worth of wikis/blogs et al to guide the user yet netctl has only a man page.

I'll revisit my setup and netctl usage.

Offline

Board footer

Powered by FluxBB