VLAN configuring
Hi!
I was wondering what is the proper way to set up interface in Slackware to use VLANs. I do it by writing necessary commands in rc.local, but is there way to use inet1.conf? |
Not sure.
Unfortunately, using this setting does not work : # Config information for eth1:1: IPADDR[1:1]="10.0.0.99" NETMASK[1:1]="" USE_DHCP[1:1]="" DHCP_HOSTNAME[1:1]="" Maybe someone will enhance this. |
The way linux.tar.gz tried does indeed not work: the part between the square brackets is parsed in a integer-increment loop.
I think the original script uses values 0-4, but I'm too lazy to check, you may have to increase the value, or use a [2] or [3] instead of where I used [5]. I think the below may work (not tested): Code:
IFNAME[5]="eth1:1" |
Well done, sir !
It works, although some errors (in french) i'm too lazy to translate ;^) |
probably the netmask, which was not set in the example configuration. But I am curious to the errors you get. The solution was done completely from the top of my head, coz I have never had to use this style :-)
|
I put a 255.255.255.0 netmask.
Here i am : USAGE: ipmask <decimal netmask> <decimal IP address> netmask: Unknown host |
Oop, made a mistake.
I don't understand why it worked, because it won't anymore :/ I got : SIOCSIFNETMASK: Ne peut attribuer l'adresse demandée "can't give wanted adress" |
Here's a snippet from /etc/rc.d/rc.inet1.conf I just created to try it out:
Code:
# Config information for eth0: and then check out ifconfig: Code:
ifconfig |
Actually, that's aliases and it works that way, but vlans are something else. I guess that inet1 doesn't know how to work with them. It should first load 8021q module if there is some vlans in configuration (or let rc.modules to handle that); then add specified vlans to desired interface using vconfig; bring up interface; and last thing inet1 knows how to do - set IP address, netmask and default route. I'll just keep using rc.local for this, but it would be nice to have Slackware take care of it in it's own way properly.
|
Oops :^)
So you have to tweak other init files, which is, imho, not a good idea. rc.local is for custom configs, and it's exactly what you do. If it works as is, use your time to do other things ^^. |
All times are GMT -5. The time now is 05:55 AM. |