Implementing VLANs...

Discussion in 'General' started by Ryan Carver, Jun 27, 2008.

  1. Ryan Carver

    Joined:
    Jun 26, 2008
    Messages:
    6
    Likes Received:
    0
    My networks all use VLANs for QoS. Unfortunately, Elastix does not have vconfig installed so there is no turnkey support for VLANs. However, it is a quick fix which takes about 5 minutes to remedy. *****Make sure your switches/routers support and are configured for VLAN tagging, or this will NEVER work for you.***** Here's the scoop:

    //PRODUCT SPECIFICS
    Summary: Linux 802.1q VLAN configuration utility
    Version: 1.9
    Size: 49371
    License: LGPL
    Packager: Comodo Trustix


    //INSTALL INSTRUCTIONS
    First we need to change to a temporary storage location for our RPM...
    cd /tmp

    Now we will snag the RPM from the web...
    wget ftp://ftp.trustix.org/pub/trustix/relea ... r.i586.rpm

    Finally we need to install the RPM...
    rpm -ivh vconfig-1.9-2tr.i586.rpm

    That's all!!!


    //SIMPLE VLAN SETUP (This is just a sample, as always YMMV)
    Down interface and reset IP...
    ifconfig eth0 down
    ifconfig eth0 0.0.0.0 up

    Add the 8021q module to the kernel...
    modprobe 8021q

    Add your VLAN(s)...
    vconfig add eth0 10
    or
    vconfig add eth0 <YOUR VLAN HERE>

    Configure VLAN(s)...
    ifconfig eth0.10 192.168.1.12 netmask 255.255.255.0 broadcast
    192.168.1.255 up
    or
    ifconfig eth0.<YOUR VLAN HERE> 192.168.1.12 netmask 255.255.255.0 broadcast
    192.168.1.255 up


    Ping out to test ...done.
     
  2. howlym

    Joined:
    Sep 23, 2008
    Messages:
    13
    Likes Received:
    0
    why do we need vlan config on the elastix server? I thought all these can be done on a vlan switch. What's the big deal to config vlan on elastix server? Thanks
     
  3. Ryan Carver

    Joined:
    Jun 26, 2008
    Messages:
    6
    Likes Received:
    0
    Some switches do not support QoS over untagged VLANs.
     
  4. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    Cool.

    Very interesting :)
     
  5. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    The other easy way..

    Add the yum repo of cento's

    Install the vconfig tool with:

    yum install vconfig


    Create the device file, vlan1 and the ip/netmask is arbitrary.

    /etc/sysconfig/network-scripts/ifcfg-vlan1

    The content of the file

    VLAN=yes
    VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
    DEVICE=vlan1
    PHYSDEV=eth0
    BOOTPROTO=static
    ONBOOT=yes
    TYPE=Ethernet
    IPADDR=10.254.5.254
    NETMASK=255.255.255.0

    restart the network

    service network restart

    Done ;)
     
  6. ElasMex

    Joined:
    Oct 22, 2007
    Messages:
    493
    Likes Received:
    0
    Hello Gwayne

    With that runs switches and network cards that are required?

    How to configure a VPN server / client with OpenVPN?

    Greetings
     
  7. bizarreb

    Joined:
    Sep 11, 2008
    Messages:
    3
    Likes Received:
    0
    thank mate ,

    i was looking for same, my cisco 3560 switch not allowing me to pass packets b/w phone and pbx bcoz of untaged vlan.

    thank u one again !
     
  8. Ryan Carver

    Joined:
    Jun 26, 2008
    Messages:
    6
    Likes Received:
    0
    @ElasMex-
    There are many network cards that support VLANs - too many to even list! You just have to pick one and try. For testing, try an old-school Intel PRO/100B. You should be able to find many VLAN capable switches on the market. If you are buying new, Google up the spec's. From experience, you can get ahold of an older Cisco 2900XL series switch (FYI: 4mb flashes DO NOT support VLAN capabilities) for about $50. VPN configuration/implementation, however, is a whole different issue.

    @bizarreb-
    No worries. The reason I post here is because others may have the same issues I have had. If that doesn't reinforce the success in Success Stories, I don't know what does.


    Regards,

    Ryan Carver-
     
  9. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    Ok first VLAN is network card independent ;)

    Its in the TCPIP stack.

    We use linksys or cisco POE switches and they all support vlan.

    About openvpn, well I implement on all Elastix boxes a openvpn client so I can make a call to the box and get a vpn ;)
     
  10. ElasMex

    Joined:
    Oct 22, 2007
    Messages:
    493
    Likes Received:
    0
    Hello

    What helps me in the VLAN Elastix my PBX?
     
  11. ElasMex

    Joined:
    Oct 22, 2007
    Messages:
    493
    Likes Received:
    0
    Hello

    Already I could make the VPN with OpenVPN but I have a detail ..

    How can I do for the customer to see the entire range of IP that is on the server?

    Greetings
     
  12. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    Executing a script and add the routes ?
     
  13. bobweiss

    Joined:
    Feb 23, 2009
    Messages:
    4
    Likes Received:
    0
    Do You happen to know how to keep the Vlan configuration on reboot. I keep losing my vlans on reboot and have to reload vconfig for each interface.
     
  14. bobweiss

    Joined:
    Feb 23, 2009
    Messages:
    4
    Likes Received:
    0
    How do I add this to my start up scripts in elastix
     
  15. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    You can only do that by creating a vlan config in the network directory

    /etc/sysconfig/network-scripts/

    create there a ifcfg-vlan10 file

    With contents..

    LAN=yes
    VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
    DEVICE=vlan10
    PHYSDEV=eth0
    BOOTPROTO=none
    ONBOOT=yes
    TYPE=Ethernet
    IPADDR=10.100.10.253
    NETMASK=255.255.255.0
    HWADDR=00:1c:c0:6f:ce:01

    Greets..
     
  16. bobweiss

    Joined:
    Feb 23, 2009
    Messages:
    4
    Likes Received:
    0
    Thanks But.

    When I reboot the system the 2 vlan interfaced fail. I then have to "modprobe 8021q" again and rerun "vconfig add eth0 2"

    how do I avoid this?
     
  17. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    Version of elastix ?

    Because it seems that the module is not loaded to start.
     
  18. bobweiss

    Joined:
    Feb 23, 2009
    Messages:
    4
    Likes Received:
    0
    I am running elastix 1.3-2

    thanks
     
  19. Gwayne

    Joined:
    Jul 31, 2008
    Messages:
    19
    Likes Received:
    0
    I have the same version here and that works fine odd.
     

Share This Page