LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware VLAN support in rc.inet1 (https://www.linuxquestions.org/questions/slackware-14/slackware-vlan-support-in-rc-inet1-4175611837/)

eyeheartpi 08-12-2017 04:24 PM

Slackware VLAN support in rc.inet1
 
Hello,

I'm working on a project to use a raspberry Pi 3 as a secondary (failover) gateway in my home network.
I installed SArPI (thanks guys for your awesome work) and proceeded to work.

Anyway, I'm currently using VLANs on my main Debian router and needed the rPi to use them as well.
I quickly found out there's no support in Slackware for VLANs - not in rc.inet1 at least - with people suggesting all kinds of useful (but unusable for me) workarounds.

Point is, I've added support for VLANs in rc.inet1 for my project and thought of sharing it with you guys as well; maybe somebody finds it useful.

As my rPi is running -current but my desktop 14.2, I saw there are some small differences between the two; I'll attach both as soon as I find out how to upload files...

Cheers

chris.willing 08-13-2017 06:19 PM

Compose a post in Advanced mode (it has a "Preview Post" button associated with it. Now from "Manage ATtachments" button further down on the left a popup widget will allow you to browse for the file(s) you want to attach. It/they need to be in an approved format (probably .txt in your case, so ensure (if necessary) you're renamed the target file(s) appropriately. When selected, press Upload button. Then send post.

chris

eyeheartpi 08-14-2017 05:54 AM

2 Attachment(s)
Cool, thanks for the info. :)
I've attached two files, one for each version.

How to use this:
The interfaces should be configured as usual, in rc.inet1.conf; for configuring a VLAN 50 (ex:) under eth0, you would add the following in rc.inet1.conf:
IFNAME[0]="eth0.50"

with the rest being the same as before.

The 8021q module should also be loaded before rc.inet1 gets executed.
I've dug around for the correct place to add this but ended up executing /etc/rc.d/rc.modules.local from within /etc/rc.d/rc.modules.

Maybe there are other, better ways of doing this.


All times are GMT -5. The time now is 12:58 AM.