LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   IPv6 start up scripts (http://www.linuxquestions.org/questions/slackware-14/ipv6-start-up-scripts-4175432399/)

drlukacs 10-15-2012 11:32 PM

IPv6 start up scripts
 
I was wondering if there are any IPv6 startup scripts readily available for Slackware 14. I am looking for something similar to /etc/rc.d/rc.inet1 -- and hoping that eventually it will become part of the standard Slackware.

wildwizard 10-16-2012 03:14 AM

Quote:

Originally Posted by drlukacs (Post 4806696)
I was wondering if there are any IPv6 startup scripts readily available for Slackware 14. I am looking for something similar to /etc/rc.d/rc.inet1 -- and hoping that eventually it will become part of the standard Slackware.

As far as a client PC is concerned there is no need for anything, IPv6 has been designed from the ground up to have automatic configuration.

If you plug a Slackware 14.0 or even 13.37 (possibly several older versions as well) into an network that has been setup for IPv6 the Slackware machine will get an IPv6 address and use it without the user doing a thing.

drlukacs 10-16-2012 03:22 AM

Quote:

Originally Posted by wildwizard (Post 4806848)
As far as a client PC is concerned there is no need for anything, IPv6 has been designed from the ground up to have automatic configuration.

Stateless auto-configuration works perfectly for clients.

But what about servers, which have to have a fixed IP number (e.g., nameserver, mail server, web server, etc.)?

Thom1b 10-16-2012 03:38 AM

Quote:

Originally Posted by drlukacs (Post 4806854)
But what about servers, which have to have a fixed IP number (e.g., nameserver, mail server, web server, etc.)?

I agree with you, it could be nice to have the possibility to set manually ipv6. But auto-configuration set an ip using mac address. If you don't change it, your auto ipv6 will never change.

drlukacs 10-16-2012 03:54 AM

Quote:

Originally Posted by Thom1b (Post 4806865)
I agree with you, it could be nice to have the possibility to set manually ipv6. But auto-configuration set an ip using mac address. If you don't change it, your auto ipv6 will never change.

Yup. So, I am looking for Slackware-style init scripts to do the trick.

So far, I found only this, but it is only for connecting to a tunnel broker, and not really for configuring existing interfaces with one (or more!) IPv6 addresses.

FeyFre 10-16-2012 05:38 AM

drlukacs, there is no such init script in Slackware. I did tried to rise this question almost year ago, but without results. Then I decided it is better to create it myself and share with community later.

wildwizard 10-16-2012 05:59 AM

Quote:

Originally Posted by drlukacs (Post 4806854)
But what about servers, which have to have a fixed IP number (e.g., nameserver, mail server, web server, etc.)?

The IP is static if the hardware stays the same and the network it is connected to stays the same.

If you change the hardware it's not too hard to update the DNS records to match.

If you change the network then your static IP is just as useless as the stateless autoconfig one.

jtsn 10-16-2012 06:03 AM

Quote:

Originally Posted by drlukacs (Post 4806696)
I was wondering if there are any IPv6 startup scripts readily available for Slackware 14. I am looking for something similar to /etc/rc.d/rc.inet1 -- and hoping that eventually it will become part of the standard Slackware.

Currently you have the following options:

1. Use NetworkManager (included in Slackware 14) to statically configure IPv6
2. Install Quagga and use the zebra daemon for IPv6 configuration
3. Deploy your own scripts (using /sbin/ip).

For option 3 I would recommend to create a rc.ipv6 script and insert a call to it into rc.inet1, so it works like rc.wireless.

drlukacs 10-16-2012 10:35 AM

Quote:

Originally Posted by FeyFre (Post 4806984)
I did tried to rise this question almost year ago, but without results. Then I decided it is better to create it myself and share with community later.

Would you consider sharing the script that you created?

FeyFre 10-16-2012 11:00 AM

drlukacs, (un)fortunately IPv6 wasn't required for my work, so I did not created any suitable solution. Sorry if I gave You false hope.

drlukacs 10-16-2012 11:41 AM

Quote:

Originally Posted by jtsn (Post 4807010)
Currently you have the following options: [...]
3. Deploy your own scripts (using /sbin/ip).

For option 3 I would recommend to create a rc.ipv6 script and insert a call to it into rc.inet1, so it works like rc.wireless.

I like option 3. I have a couple of questions about your suggestion to make it work like rc.wireless:

-- Where would it make the most sense to insert such a call?
-- How would such an approach deal with adding tunnels and/or various routing policies?
-- What behaviour would you expect in terms of dhcpcd? (Does the latest version of dhcpcd support IPv6?)

jtsn 10-16-2012 12:48 PM

Quote:

Originally Posted by drlukacs (Post 4807348)
Where would it make the most sense to insert such a call?

In if_up() where the call to rc.wireless is.

Quote:

How would such an approach deal with adding tunnels and/or various routing policies?
Like PPP and VPN, this is out of the scope of rc.inet1. For complex router setups you should use quagga.

Quote:

What behaviour would you expect in terms of dhcpcd? (Does the latest version of dhcpcd support IPv6?)
It does. In Slackware 14.0 it configures IPv6 automatically, if the ipv6 module is loaded early enough (say by initrd).

drlukacs 10-19-2012 10:18 PM

IPv6 startup scripts -- comments are welcome
 
I wrote a script following the suggestions from the forum:

http://dl.dropbox.com/u/6403337/IPv6/rc.ipv6

http://dl.dropbox.com/u/6403337/IPv6/rc.inet1

http://dl.dropbox.com/u/6403337/IPv6/rc.ipv6.conf

I would definitely welcome any comments and suggestions on how to improve it. I have a couple of concrete questions:

1. Is it better to have a separate rc.ipv6.conf (following the model of rc.wireless), or would it make more sense to include the variables in
rc.inet1.conf?

2. The script rc.ipv6 assumes that it gets IFNAME from rc.inet1 (just as rc.wireless does). Is it a good assumption, or should it create IFNAME independently? In the first case, should that warning be displayed if rc.ipv6 is run from anywhere but rc.inet1?

3. I have not created stop functions, because if a device is taken down in rc.inet1, then there is no need to take it down once more in rc.ipv6. However, if rc.ipv6 is made into a more stand-alone script, then this may make sense -- one might want to just turn off IPv6 on a particular device without wanting the device to be taken down. Same thing with the default gateway.

Opinions?

leigh8904 11-21-2012 05:37 AM

Hi.

Another option is to embed static IPv6 configuration into rc.inet1 and rc.inet1.conf. To that end I have created two patches, which are available from: freeshell.de/~lwedding/slackware-14.0/.

rc.inet1.patch is a patch which can be applied to an installed system; although it may fail for rc.inet1.conf due to your local configuration, but it should be easy to manually fix.

network-scripts.patch is a patch for the source for network-scripts package (part of "n" package set).

Hope this is useful to someone.

Note: URL above is not clicky as this is my first post, and URLs are not allowed for first post.

drlukacs 11-21-2012 08:15 AM

Quote:

Originally Posted by leigh8904 (Post 4833941)
Hi.

Another option is to embed static IPv6 configuration into rc.inet1 and rc.inet1.conf. To that end I have created two patches, which are available from: freeshell.de/~lwedding/slackware-14.0/.

I like the idea of patching the network scrips, but:

1) It appears that it will work only if you do not use DHCP for IPv4. In real life, one may be using DHCP for IPv4, and static settings for IPv6.

2) The script does not allow adding multiple IPv6 addresses to the same interface.

3) The script does not add a default gateway...


All times are GMT -5. The time now is 07:55 AM.