Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-05-2010, 10:47 AM
|
#1
|
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
Rep:
|
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.
|
|
|
11-05-2010, 11:25 AM
|
#2
|
LQ Newbie
Registered: Mar 2010
Distribution: Slackware
Posts: 25
Rep:
|
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.
|
|
|
11-05-2010, 11:53 AM
|
#3
|
Member
Registered: May 2010
Posts: 621
Rep:
|
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.
|
|
|
11-05-2010, 01:13 PM
|
#4
|
Senior Member
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,867
|
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.
|
|
|
11-05-2010, 02:44 PM
|
#5
|
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
Rep:
|
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.
|
|
|
11-05-2010, 03:13 PM
|
#6
|
Senior Member
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041
Rep:
|
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.
|
|
|
11-05-2010, 04:05 PM
|
#7
|
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
Rep:
|
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.
|
|
|
04-29-2014, 02:01 AM
|
#8
|
LQ Newbie
Registered: Sep 2011
Posts: 2
Rep:
|
Quote:
Originally Posted by Skaperen
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"
|
|
|
All times are GMT -5. The time now is 10:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|