Re: double vlans - once again - experiment unsucsessfull

From: Donatas (donatas_at_lrtc.net)
Date: 12/23/04

  • Next message: Jeff Behl: "RE: %cpu in system - squid performance in FreeBSD 5.3"
    To: <freebsd-net@freebsd.org>
    Date: Thu, 23 Dec 2004 10:20:41 +0200
    
    

    well, we've tired both "tunings" - the short-one suggested my M.Balikov and the longer-one, suggested by B.Davis
    in both cases - "Protocol not supported"
    how we've done this:

    on FreeBSD 5.3 stable:

    edited if_vlan.c
    then
        make buildworld
        make installworld
        mergemaster
        make clean

    the test:
    ifconfig vlan1 create
    ifconfig vlan2 create
    ifconfig vlan1 vlan 1 vlandev em0
    ifconfig vlan2 vlan 2 vlandev vlan1
    SIOCSETVLAN: "Protocol not supported"

    or maybe it's possible to use hardware and software tagging simultaneously?
    we could achieve double tagging proces by combining hardware and software tag in the ethernet packet.

    --------------------------------------------------------------------------------

    Re: double vlans - once again.
    Brooks Davis
    Mon, 20 Dec 2004 10:28:56 -0800

    On Sat, Dec 18, 2004 at 08:57:58PM +0200, Mihail Balikov wrote:
    > I have done this 2 years ago for FreeBSD 4-STABLE
    >
    > in sys/net/if_vlan.c in vlan_config(), replace
    >
    > if (p->if_data.ifi_type != IFT_ETHER)
    > return EPROTONOSUPPORT;
    >
    > with
    >
    > if (p->if_data.ifi_type != IFT_ETHER &&
    > p->if_data.ifi_type != IFT_L2VLAN)
    > return EPROTONOSUPPORT;

    Hmm, for -current this appears incomplete. I think the following is
    what is needed. Any one in a position to test this?

    -- Brooks

    Index: if_vlan.c
    ===================================================================
    RCS file: /home/ncvs/src/sys/net/if_vlan.c,v
    retrieving revision 1.73
    diff -u -p -r1.73 if_vlan.c
    --- if_vlan.c 15 Aug 2004 06:24:42 -0000 1.73
    +++ if_vlan.c 20 Dec 2004 18:25:48 -0000
    @@ -273,7 +273,8 @@ vlan_clone_match_ethertag(struct if_clon
            /* Check for <etherif>.<vlan> style interface names. */
            IFNET_RLOCK();
            TAILQ_FOREACH(ifp, &ifnet, if_link) {
    - if (ifp->if_type != IFT_ETHER)
    + if (ifp->if_type != IFT_ETHER &&
    + ifp->if_type != IFT_L2VLAN)
                            continue;
                    if (strncmp(ifp->if_xname, name, strlen(ifp->if_xname)) != 0)
                            continue;
    @@ -566,6 +567,7 @@ vlan_input(struct ifnet *ifp, struct mbu
            } else {
                    switch (ifp->if_type) {
                    case IFT_ETHER:
    + case IFT_L2VLAN:
                            if (m->m_len < sizeof(*evl) &&
                                (m = m_pullup(m, sizeof(*evl))) == NULL) {
                                    if_printf(ifp, "cannot pullup VLAN header\n");
    @@ -641,7 +643,8 @@ vlan_config(struct ifvlan *ifv, struct i
     
            VLAN_LOCK_ASSERT();
     
    - if (p->if_data.ifi_type != IFT_ETHER)
    + if (p->if_data.ifi_type != IFT_ETHER &&
    + p->if_data.ifi_type != IFT_L2VLAN)
                    return (EPROTONOSUPPORT);
            if (ifv->ifv_p)
                    return (EBUSY);
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Jeff Behl: "RE: %cpu in system - squid performance in FreeBSD 5.3"

    Relevant Pages

    • RE: VLANs confusing - Explained
      ... The password you are referring to belongs to a protocol called VTP (VLAN ... of the VTP domain and have the correct password and VTP mode (Server, ...
      (Security-Basics)
    • RE: VLANs confusing - Explained
      ... The password you are referring to belongs to a protocol called VTP (VLAN ... VTP domain password. ... EARN A MASTER OF SCIENCE IN INFORMATION ASSURANCE - ONLINE ...
      (Security-Basics)
    • Re: [Full-disclosure] 802.1q Vlan Packets
      ... yes, yersinia handles 802.1q VLAN packets, as well as builds some ... attacks upon them (Mitm over VLAN hopping) or you can just watch the ... seen some captures in which the protocol type in their ethernet ...
      (Full-Disclosure)
    • Re: multi-vendor vlan trunking
      ... in it and I need a vlan trunking protocol that will work on all these ... 802.1Q is the protocol you'll have to use. ... And probably Linksys too if it supports vlan trunks. ... Please note that on HP switches this is called VLAN tagging, and I don't think you can choose what protocol to use for VLAN's between switches. ...
      (comp.dcom.sys.cisco)
    • duplicate vlan panic
      ... Boot single user or remount readonly. ... ifconfig vlan1 create vlan 1 vlandev xl0 ...
      (freebsd-net)