LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-09-2009, 10:04 AM   #1
Hambone_20003
Member
 
Registered: Feb 2005
Posts: 42

Rep: Reputation: 15
Slackware 12.2 and VLAN's


Hi all,

I am a bit new to the Slackware scene but so far I really like the O/S. I am just having one issue with setting up my network. I want to be able to vlan my PC. I was able to do this with vconfig and route add default gateway. Needless to say I had all of my vlans configured and working properly. I went and rebooted my PC and all of the setting were lost on restart.

Is there some way to save that config? Also I am a bit more familiar with Debian but where is the network config files. Do I need to edit the interface there? I mean I have looked into the /etc/rc.d/rc.inet1.conf I however am not to familiar with how to edit that file.

Can I build a file that looks like this

iface eth0.6 inet static
address x.x.x.x
netmask x.x.x.x
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
dns-nameservers x.x.x.x
dns-search nothing.com

I know that is debian but will slackware read it.

I guess what I am asking for is if anyone could point me in the right direction to get this setup and running properly.

I would appreciate any input.

Thank You

Brian
 
Old 04-09-2009, 01:03 PM   #2
Hambone_20003
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
I don't know if what I am trying to to is not possible. I am a bit hesitant because of the views but no response. I would still like any input that anyone has. However I have setup a solution somewhat to my problem. The only thing that is not to fun is inputting all the commands to turn up the aliases. So I just wrote a shell script that I can run at start up and all is well at the moment. I am writing this post on the machine currently.
 
Old 04-09-2009, 05:40 PM   #3
Hambone_20003
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Ok so just to sum things up here. I went ahead and just built a script to run the commands that I wanted. I put the script in /usr/bin. I then edited my rc.local file. I told it where to locate the script so it would load on boot. I then created a "rc.local_shutdown". I made this script and then went ahead and loaded the commands to tear down the vlans at shutdown.

I did run into some trouble with my default gateway but I figured out that it takes a bit of config work to build a interface under a sub interface.(ex. eth0.123:5) When I would put this into the script at first I was trying to use 0 instead of say 5. It would break the route to the default gateway because I was trying to send the data out the 123 sub interface. But using 5 instead of 0 seemed to clear this problem up for me.

I also had to edit the "rc.inet1" I had to edit out the network config file there as well.

I don't know if any of this makes sense but if anyone else comes across the problem I wanted to have my solution up here. Also I would be happy to send my script to anyone who might want to do this.
 
Old 04-09-2009, 06:04 PM   #4
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
The interfaces are usually setup in /etc/rc.d/rc.inet1 with rc.inet1.conf as the configuration file.
However, I have never tried using wireless, and as such I cannot confirm if this would be the only things you'd have to do to make this work. (Hence I have not replied since, I tend to read the threads and think "here I have some expertise, I can probably help answer") Since /etc/rc.d/rc.local is loaded last, your current scripts are probably loaded after the necessary modules are loaded to make your wireless interface work / your drivers are loaded properly in the right order in your own script.

The scripts in /etc/rc.d/ are normal shell scripts, so as such you could've made your rc.local the script you want to run to configure your wireless network.

Anyway, I do know about scripting and the boot process and a few more things, so maybe I can be of some assistance ;-)

Quote:
I then created a "rc.local_shutdown". I made this script and then went ahead and loaded the commands to tear down the vlans at shutdown.
This is a bit of a redundant step; When Slackware shutdowns it kills all processes and thus all interfaces. You could skip this part I think, unless there's some special reason why you need to tear down the vlans at shutdown?

You probably did some reading here, so I'm interested into what eth0.123:5 exactly means; I'll admit I've never seen this. What are the .123 and the :5?

You edited the rc.inet1 config file, that seems a bit strange to me that you had to edit the network config file there. It is in that config file the settings for your interface are set. Since the slackbook is a very good source of information I'll redirect you to what's written there about wireless networks: http://www.slackbook.org/html/networ...-wireless.html

For the full version of the book in the format you'd like to have it (it really is a great source of information) http://www.slackbook.org/
Slackware directs to this url from their own site, so I trust that what's written there.

I hope these worthless comments were worth something ;-) Good luck getting / keeping your configuration working! If you do it the way the book describes, I think you should not have to worry about upgrades in the future. With your current setup you may probably loose your edits on rc.inet1 (rc.local does not get updated or changed with upgrades, as the purpose is your personal boot commands, nothing from the distribution)
 
Old 04-09-2009, 07:28 PM   #5
Hambone_20003
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Hi Ramurd

Thanks for the reply back. This is actually all setup on eth0 it is not a wireless configuration at all. As far as the rc.local_shutdown is concerned you could be right that I don't need it. Like I said I am new to Slackware so I just did it as a precaution to ensure that the vlans are tore down before reboot.

I edited the rc.inet1 config file because line 13 in the file tells it to look for /etc/rc.d/interfaces(I changed it to interfaces) to get the configuration for the network. I however am not using that.

The script that I wrote just set vconfig add eth0 123, "ifconfig eth0.123 x.x.x.x netmask x.x.x.x up". So I did that for all of my interfaces. At the end of the script I put (route add default gateway x.x.x.x) just to give the traffic a route out. So hence the script turns up eth0 and then it turns up eth0.123 and sets the ip and netmask then sets the route.

As far as the eth0.123:5 goes. I am a bit more familiar with Debian. Please excuse the term sub interface opposed to alias I also work with Cisco and they call it a sub interface.

However as far as my Debian config I would set eth0.123:0 (on Debian mind you) All this accomplishes here is the eth0.123 is the public ip address of the interface. I use the :0 to essentially add another interface below to the sub interface. I do this because I have a private ip address that I want to use. I however want this private ip address when routed out to use the VID of 123.

I know it functions properly under Debian. I just can't have two eth0.123 interfaces. Even if I could which would take precedence over the other?

I don't know if this makes any sense to you but I hope it does. If you have any more thoughts on the matter I would greatly appreciate hearing them. Or if I made no sense in this post let me know and I will try to explain it better.

Thank You

Brian
 
  


Reply



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
LXer: Making Slackware and Slackware Derivative Linux Distros Speak Your Language LXer Syndicated Linux News 0 01-29-2009 12:30 AM
About Slackware 9.1 boot disk?? ftp://ftp.kpn.be/pub/linux/slackware/slackware-9.1-is AL3OMDAH Slackware 4 04-18-2007 09:54 AM
DHCP Server for many VLAN's inaki Linux - Networking 1 08-25-2005 09:07 AM

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

All times are GMT -5. The time now is 02:51 AM.

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