LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-05-2010, 10:47 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,842
Blog Entries: 31

Rep: Reputation: 180Reputation: 180
IPv6 on Slackware 13.1


I'm setting up a Slackware 13.1 box for IPv6. This is just IPv6 within the LAN right now, not to the internet or a tunnel. The IPv6 addresses are static (although the auto-configured link-local addresses will be used, too).

Manually configuring with "ifconfig" works fine. Now I need to make it persistent. I could script this a couple ways. I could make an rc.local to just do the commands and there I am. Or I could hack the scripts to do it "the slackware way" (e.g. so the addresses are given in the /etc/rc.d/rc.inet1.conf file). That would have to be a hack to the /etc/rc.d/rc.inet1 script.

Any suggestions on how you think it should be done?

I'm not asking how to make it work. I can do that. This question is about how I should go about making it so others can readily use what I make. So it's more like "what would you need of this if you were doing some IPv6?".

I did this in Ubuntu a few months ago by adding on a whole new script I wrote and running it from within the numbered init scripts. It used a whole new file I called "/etc/network/aliases". I'd like to avoid so much of an abrupt change in Slackware. But I am at the crossroads in the decision process, and open to influences.
 
Old 11-05-2010, 11:25 AM   #2
jovanoti
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware
Posts: 25

Rep: Reputation: 2
Well, I personally prefer not to change system scripts if they do not support given feature, IPv6 in this case. Thus they my configuration won't break when I decide to upgrade Slackware. I will make it as additional script which will add IPv6 addresses - either using ifconfig or ip.
 
Old 11-05-2010, 11:53 AM   #3
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
I was fiddling with IPv6 the other day, and when I brought it up (alongside IPv4), BIND decided to use it for lookup every now and then, and would just stop doing anything for a minute or so. But running it as /usr/sbin/named -4 worked fine.
 
Old 11-05-2010, 01:13 PM   #4
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,867

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
In my opinion, hand-editing config files or scripts IS the Slackware way. I would go with rc.local simply because its the easiest when upgrading.
 
Old 11-05-2010, 02:44 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,842

Original Poster
Blog Entries: 31

Rep: Reputation: 180Reputation: 180
Doing this in rc.local would be the "modify my system relative to Slackware way" for sure. BTDT ... often. And I've even gone to the extreme of a system with none of the Slackware scripts even there at all, replaced with ones I wrote from scratch.

But for this exercise, I'm going back to a vanilla Slackware and starting over. And for this I'm treating it NOT as a "modify my system relative to Slackware way", but rather, "explore how Slackware might do it for itself when it gets to the point where IPv6 just works out of the box". It's the kind of thing that once it works solid and stable, would be contributed back to Pat for consideration (if he likes it, it saves him work if he hasn't done it by then). I'm even using his coding style instead of my own.

What I'm trying right now is extending how rc.inet1 and rc.inet1.conf work together by adding IP6ADDR[$i] as an array variable to configure the IPv6 addresses. IPv6 uses prefix lengths exclusively (not a netmask) and ifconfig figures out the broadcast and network addresses from that automatically (ipmask not needed ... but it doesn't support IPv6 anyway). I added one touch where a ',' separates multiple IPv6 addresses.

Maybe it would be better to just support IPv4 and IPv6 in the same variable? But that would have to extend and modify how IPv4 works to do that, since IPv4 network specs are given in different variables and IPv6 doesn't do it quite that way (though it is possible to do IPv4 the IPv6 way ... it will still require some handling before it gets to ifconfig).

I'd kinda like to do a better ifconfig, but that's a bigger project.

I'd like to do a smart network manager, too. Other distros really need that (they do use network managers ... which are rather dumb and do things wrong quite often). But does not seem the Slackware way to do a network manager (a daemon that monitors and manages the network configuration constantly to try to keep it at what the administrator decided it should be, even as things go up and down, etc).

But for now, I'm basically extending /etc/rc.d/rc.inet1 to make it IPv6 aware. The only hitch I'm running into is ifconfig isn't triggering udev to load the ipv6 module. However, rc.ssh seems to be doing that ... interesting.
 
Old 11-05-2010, 03:13 PM   #6
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
straterra from ##slackware had made a patch in order to use ipv6 with dhcp instead of dhcpcd which isnt ipv6 capable yet, but was rejected by Pat a while ago. I cant find the link to it right now, maybe you could ask him to share when he gets online.
 
Old 11-05-2010, 04:05 PM   #7
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,842

Original Poster
Blog Entries: 31

Rep: Reputation: 180Reputation: 180
I have it working now, having added a conditional "modprobe ipv6" that only loads IPv6 if an interface is configured with an ipv6 address. Here is part of /etc/rc.d/rc.inet1.conf showing how to code a static IPv6 address this way:

Code:
# Config information for eth0:
IPADDR[0]="172.30.60.2"
NETMASK[0]="255.255.0.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
IP6ADDR[0]="fcca::3c02/16,fdca::3c02/16"

# Config information for eth1:
IPADDR[1]="192.168.1.240"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
IP6ADDR[1]="fc00::10f0/16,fd00::10f0/16"
Does this look simple enough for you to use? Note that this is for static IPv6 addresses, such as might be done for an IPv6 addressible server. The more common scenario will be for auto-configuration via an upstream IPv6-aware router from which the network part of the address will be obtained, and the lower 64 bits will be from the MAC address. In those cases, merely enabling IPv6 should be enough, or if not, then DHCP6 somehow. If you do IPv6 via a tunnel broker, the setup software should take care of it.

In the future, I want to add IPv6 awareness to the setup scripts for network configuration for IPv6-only networks.

The LQ upload tool didn't like the /etc/rc.d/rc.inet1 script file, so I put it over on this URL: http://slashusr.net/lq/2010-11-05/rc.inet1
You can also find the sample .conf file there by changing the name.
 
Old 04-29-2014, 02:01 AM   #8
infamy
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by Skaperen View Post
I have it working now, having added a conditional "modprobe ipv6" that only loads IPv6 if an interface is configured with an ipv6 address. Here is part of /etc/rc.d/rc.inet1.conf showing how to code a static IPv6 address this way:

Code:
# Config information for eth0:
IPADDR[0]="172.30.60.2"
NETMASK[0]="255.255.0.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
IP6ADDR[0]="fcca::3c02/16,fdca::3c02/16"

# Config information for eth1:
IPADDR[1]="192.168.1.240"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
IP6ADDR[1]="fc00::10f0/16,fd00::10f0/16"
Does this look simple enough for you to use? Note that this is for static IPv6 addresses, such as might be done for an IPv6 addressible server. The more common scenario will be for auto-configuration via an upstream IPv6-aware router from which the network part of the address will be obtained, and the lower 64 bits will be from the MAC address. In those cases, merely enabling IPv6 should be enough, or if not, then DHCP6 somehow. If you do IPv6 via a tunnel broker, the setup software should take care of it.

In the future, I want to add IPv6 awareness to the setup scripts for network configuration for IPv6-only networks.

The LQ upload tool didn't like the /etc/rc.d/rc.inet1 script file, so I put it over on this URL: http://slashusr.net/lq/2010-11-05/rc.inet1
You can also find the sample .conf file there by changing the name.

Dont forget to add this in /etc/rc.d/rc.inet1.conf for IPv6 as well.. Its obvious but some people may just not even know and just assume the above is all thats needed. If its a native IPv6 thats assigned to you, you will have to add the gateway too.

Code:
GATEWAY6="fcca::3c02:1"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND9 as forwarder, IPv6 queries from IPv6 forwarders Nonoo Linux - Server 1 11-23-2009 02:57 PM
ipv6 slackware Kowalczyk Slackware 3 10-19-2009 08:18 AM
slackware current ipv6 mattydee Slackware 3 05-24-2009 07:34 PM
Disabling IPv6 on Slackware 12 a good idea? [GOD]Anck Slackware 2 09-22-2007 05:50 AM
IPV6 slackware download iso image manolo Slackware 6 07-12-2007 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration