Two or more green networks

Hello everybody

I want to split my green Network-zone in two separate networks with diffrent NIC or with two VLAN’s.
Is there any possibility how to do that.

regards
Herby

Not possible in WUI.
Found on old forum.
Not sure if this is what your looking for.

majlos
Posts: 4
Joined: September 16th, 2015, 8:43 am

Re: multiple vlans

Post by majlos » September 16th, 2015, 11:35 am
Myself reply! May be this is the solution:

  1. edit script /etc/init.d/network-vlans
    -> add the next color for interface - for example BROWN
    for interface in green0 red0 blue0 orange0 brown0; do
    case “${interface}” in
    green*)
    PARENT_DEV=${GREEN_PARENT_DEV}
    VLAN_ID=${GREEN_VLAN_ID}
    MAC_ADDRESS=${GREEN_MAC_ADDRESS}
    ;;
    red*)
    PARENT_DEV=${RED_PARENT_DEV}
    VLAN_ID=${RED_VLAN_ID}
    MAC_ADDRESS=${RED_MAC_ADDRESS}
    ;;
    blue*)
    PARENT_DEV=${BLUE_PARENT_DEV}
    VLAN_ID=${BLUE_VLAN_ID}
    MAC_ADDRESS=${BLUE_MAC_ADDRESS}
    ;;
    orange*)
    PARENT_DEV=${ORANGE_PARENT_DEV}
    VLAN_ID=${ORANGE_VLAN_ID}
    MAC_ADDRESS=${ORANGE_MAC_ADDRESS}
    ;;
    brown*)
    PARENT_DEV=${BROWN_PARENT_DEV}
    VLAN_ID=${BROWN_VLAN_ID}
    MAC_ADDRESS=${BROWN_MAC_ADDRESS}
    ;;

2.edit /var/ipfire/ethernet/vlans
ORANGE_PARENT_DEV=green0
ORANGE_VLAN_ID=100
ORANGE_MAC_ADDRESS=00:22:81:B2:2C:10
BROWN_PARENT_DEV=green0
BROWN_VLAN_ID=200
BROWN_MAC_ADDRESS=00:22:81:B2:2C:20

3.edit /var/ipfire/ethernet/setting
ORANGE_DEV=orange0
ORANGE_ADDRESS=10.0.1.1
ORANGE_NETMASK=255.255.255.0
ORANGE_NETADDRESS=10.0.1.0
ORANGE_BROADCAST=10.0.1.255
ORANGE_DESCRIPTION=’“pci: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express”’
ORANGE_DRIVER=tg3
BROWN_DEV=brown0
BROWN_ADDRESS=10.0.2.1
BROWN_NETMASK=255.255.255.0
BROWN_NETADDRESS=10.0.2.0
BROWN_BROADCAST=10.0.2.255
BROWN_DESCRIPTION=’“pci: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express”’
BROWN_DRIVER=tg3

  1. edit /etc/init.d/networking/any
    elif [ “$(basename $0)” == “brown” ]; then
    DEVICE="${BROWN_DEV}"
    ADDRESS="${BROWN_ADDRESS}"
    BROADCAST="${BROWN_BROADCAST}"
    NETADDRESS="${BROWN_NETADDRESS}"
    NETMASK="${BROWN_NETMASK}"
    DEVICE="${BROWN_DEV}"

  2. /etc/init.d/network-vlans start
    -> it make now 2 vlans interface

6.make a symlinc in /etc/init.d/networking -> ln -s any brown

7./etc/init.d/networking/brown start
/etc/init.d/networking/orange start

thats all - if you want more vlans, make this steps again with other color :slight_smile:

JUST ONE STEP - add vlans start

make a file ipfire-vlan-start in /etc/init.d with this lines
/etc/init.d/network-vlans start
/etc/init.d/networking/orange start
/etc/init.d/networking/brown start

set privileges to this files for running
chmod 700 ipfire-vlan-start

make a threee symbolic link like this:
ln -s /etc/init.d/ipfire-vlan-start /etc/rc.d/rc0.d/S95ipfire-vlan-start
ln -s /etc/init.d/ipfire-vlan-start /etc/rc.d/rc3.d/S95ipfire-vlan-start
ln -s /etc/init.d/ipfire-vlan-start /etc/rc.d/rc6.d/S95ipfire-vlan-start

thats all, now you have vlans active after reboot the server
Last edited by majlos on September 16th, 2015, 2:01 pm, edited 1 time in total.
Top

Link to old post

Hope that helps

2 Likes

Thanks Shaun, I’m also looking at doing this.

Noting that the referenced post is old and the topic doesn’t exist anymore, Step 1 mentions editing “/etc/init.d/network-vlans” but that file doesn’t exist anymore (I’m using Core Update 153). Has “network-vlans” just been renamed to “network” and is that the file which we modify?

Cheers.

Where to read which more colours are supported on the IPFire? I mean there are quite a lot of colours.

There are four – red (WAN), green (LAN), orange (DMZ), and blue (wifi).

Yeah, but Shaun mentioned BROWN as well: Two ore more green networks - #2 by hvacguy
So can I continue like purple, violet, and many more colours?

Shaun provided a guide to extend green to vlan. It does not matter what colors you select, you could have green1 (or brown), green2 (or purple) to indicate the parent lan is green0.

1 Like

Thank you Paul.
Never done this my self.
But the best info I could find on the subject.
Moved to this forum. (for future reference)
Please post your results.

Hi everbody,
I’m trying to get several VLANs running as well.
The solution of @hvacguy as mentioned above seems to be outdated, this script doesn’t exist anymore!?!
It seems to me that there’s a new script named /etc/init.d/network now.
Does anybody know what has to be changed there or has an solution to set up multiple VLANs?

Regards
Pete

Why aren’t VLANs available in the WUI? Just to keep it small and simple? Or to not encourage people to misconfigure? In that case you could make a hidden “expert settings” menu.

VLANs are available in the WUI. The problem was that @pete had three nics and set IPFire up with four zones. He found that the unassigned zone did not show up in the WUI. @arne_f indicated that the zone should be visible and that a bug should be raised.

See post https://community.ipfire.org/t/missing-old-wiki-entry/4413

It’s not very helpful to post references of references of references… Why isn’t there an IPFire wiki explaining in more detail? Like give more examples of how to configure VLANs and hopefully providing some more pictures. As of this moment I think the wiki is missing a lot of more detailed information. Because of this I need to search every forum thread and maybe search the whole internet…

If you want to configure vlans got to the wiki and look at web interface - network - zone configuration. You select the zone you want to set to a vlan, make it a vlan and define the vlan ID. It’s very simple.

But the number of zones are very limited, aren’t they?

1 Like

Yes it’s limited, unfortunately it’s not possible to configure more than 1 VLAN via the WUI.
See the notes down on the corresponding wiki page

1 Like

Yes. 1 VLAN per NIC.
Max 4 Zones.(red,green,blue,orange)
With WUI

1 Like

Thanks. In zones option I can only do GREEN native OR VLAN. GREEN is on eth1. But I would like to keep GREEN native and also add 1 or more VLANs also to eth1. Is this even possible in the WUI? My hardware got 3 NICs, but at this moment I only see 2 NICs (GREEN and RED) on the WUI. Probably a bug?

That is not possible via the WUI

Yes, it is a bug as mentioned in posting 10 of this thread. Has been raised in IPFire Bugzilla by @pete