You are not logged in.
Pages: 1
This post is meant to help others with VLANs.
Ran into an issue with Arch and VLANs staying persistent across reboots. From what I read from previous posts, one needs to install vconfig to get VLANs working. From my understanding, vconfig has been deprecated and new installs should use the iproute2 package to get VLANs installed.
I did not want to write a script to make this work, because I was worried that any updates might overwrite what I was doing. Hence, I used the functions area in Arch to run shell commands, then used the natural configuration tools to configure the interfaces.
In /etc/rc.d/functions.d, I created a vlans file.
<<
vlans() {
ip link add link eth1 name eth1.1248 type vlan id 1248
ip link add link eth1 name eth1.1250 type vlan id 1250
ip link add link eth1 name eth1.1251 type vlan id 1251
ip link add link eth1 name eth1.1252 type vlan id 1252
ip link add link eth1 name eth1.1253 type vlan id 1253
ip link add link eth1 name eth1.1254 type vlan id 1254
ip link add link eth1 name eth1.1255 type vlan id 1255
ip link add link eth1 name eth1.1256 type vlan id 1256
ip link add link eth1 name eth1.1257 type vlan id 1257
}
add_hook sysinit_udevsettled vlans
>>
The add_hook section is documented in another post on this site. The sysinit_udevsetteled allowed me to add the VLAN interfaces once eth1 was loaded and settled.
And this is how it looks in the rc.conf:
eth0="dhcp"
eth1="eth1 up"
eth1_1248="eth1.1248 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth1_1250="eth1.1250 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
eth1_1251="eth1.1251 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255"
eth1_1252="eth1.1252 192.168.3.2 netmask 255.255.255.0 broadcast 192.168.3.255"
eth1_1253="eth1.1253 192.168.4.2 netmask 255.255.255.0 broadcast 192.168.4.255"
eth1_1254="eth1.1254 192.168.5.2 netmask 255.255.255.0 broadcast 192.168.5.255"
eth1_1255="eth1.1255 192.168.6.2 netmask 255.255.255.0 broadcast 192.168.6.255"
eth1_1256="eth1.1256 192.168.7.2 netmask 255.255.255.0 broadcast 192.168.7.255"
eth1_1257="eth1.1257 192.168.8.2 netmask 255.255.255.0 broadcast 192.168.8.255"
INTERFACES=( eth0 eth1 eth1_1248 eth1_1250 eth1_1251 eth1_1252 eth1_1253 eth1_1254 eth1_1255 eth1_1256 eth1_1257)
The cool thing about this is, I can use the standard up/down scripts to manage the interfaces that Arch come with.
This is probably newb for most, but I thought it was cool. Cheers! ![]()
Offline
howtos should go in the wiki ![]()
Offline
Thanks. I will post there.
Offline
(If this thread is still being subscribed to) I am creating the English VLAN page and would appreciate your input. There is already one for Русский so feel free to mix them together.
▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁
Offline
Pages: 1