• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » Setting IP of VLAN device (NDK and DM6437)
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Setting IP of VLAN device (NDK and DM6437)

Setting IP of VLAN device (NDK and DM6437)

This question is answered
Simone Cilli
Posted by Simone Cilli
on Apr 06 2012 10:45 AM
Prodigy80 points

I'm working with a "hello world" code on DM6437. I need to create a VLAN and set an IP to this new "device". I can set the ip of eth0 and ping it.

I saw the chapter "A.16 Virtual LAN (VLAN) Support" in spru54_pg.pdf and I understand how i can create the device but I don't know how to set an IP.

I know It's possible in Linux. Is it possible in this platform? Any help?

Da Vinci 6437 CCS v3.3 dm6437 NDK 2.0 IP VLAN
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Steven Connell
    Posted by Steven Connell
    on Apr 09 2012 20:56 PM
    Mastermind20540 points

    Hi Simone Cilli,

    Which version of the NDK are you using?  Also which version of BIOS?

    Thanks,

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Simone Cilli
    Posted by Simone Cilli
    on Apr 10 2012 02:17 AM
    Prodigy80 points

    NDK 2.0 and DSP/BIOS 5.31.02.

    Simone

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 11 2012 16:47 PM
    Mastermind20540 points

    Simone,

    Have you seen the NDK Client example?

    This example has VLAN built into it.  You don't need to configure an IP address as they will just be sent via the board's IP address.  The VLAN tagged packets carry a 16-bit tag also known as the tag control information (TCI) header, which I believe is used by the stack to identify which socket data should go to.

    You can use VLAN by first telneting into the board.  The 'vlan' command allows you to add/delete and send on a VLAN device:

    >vlan

    [vlan Command]

    Use this to add/del & configure VLAN Devices

    vlan add  <srcif> <vlan_id> <default prio>   - Adds a VLAN Device
    vlan del  <vlan_id_index>                    - Deletes a VLAN Device
    vlan send <dst_ip>                           - Tests SO_PRIORITY option by sending packets
    >
    >
    >
    >vlan add 1 2 5
    Successfully created new VLAN Device 2
    >
    >
    >
    >vlan send 146.252.161.73
    TEST Case Passed: Priority 0x8 is incorrect and was detected
    Packet with priority 0 has been sent
    Packet with priority 1 has been sent
    Packet with priority 2 has been sent
    Packet with priority 3 has been sent
    Packet with priority 4 has been sent
    Packet with priority 5 has been sent
    Packet with priority 6 has been sent
    Packet with priority 7 has been sent
    Packet with default priority has been sent

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Simone Cilli
    Posted by Simone Cilli
    on Apr 12 2012 02:26 AM
    Prodigy80 points

    The problem is that my requirements said I have to use different IP for each VLAN on the same network interface....
    Can I conclude It is impossible to set different IPs on the VLANs on this board?!


    Anyway Thanks for your help!

    Simone

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Simone Cilli
    Posted by Simone Cilli
    on Apr 12 2012 05:11 AM
    Prodigy80 points

    Following the example you suggest, we tried to modify the VLAN ip.
    We obtain this error:
    "BindNew: Duplicate bindings ignored"

    This is the code we apply to the vlan project (NDK 2.0):

    File convlan.c:

    static void CmdVLANAdd(char *tok1, char *tok2, char *tok3){
    mmZeroInit (&nimu_ifreq, sizeof(NIMU_IF_REQ));
    nimu_ifreq.index = vlan_dev_index;
        
       if (NIMUIoctl (NIMU_GET_DEVICE_HANDLE, &nimu_ifreq, &hIF_vlan1, sizeof(HANDLE)) < 0){
          ConPrintf ("NIMUIoctl error\n");
          return;
       }
     
       //If-1 ip: 192.168.0.144
      //If-1 subnet_mask: 255.255.255.0
    ipn = inet_addr(vlan1_ip); //vlan1_ip: 192.168.1.144
       ipmask = inet_addr(vlan1_sm); //vlan1_subnetmask: 255.255.255.0
       BindNew(hIF_vlan1, ipn, ipmask);
       NtIPN2Str(ipn, (char *)ip_str);    
       ConPrintf ("VLAN - set ip: %s\n", ip_str);
       return;
    }
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 12 2012 19:57 PM
    Verified Answer
    Verified by David Friedland
    Mastermind20540 points

    Simone,

    I think what you need to do is first get 2 IP addresses working on a single interface.  Then, once you have that working, you should be able to configure VLAN for each one.

    Please see the following post in which a customer was able to do this, it may help you.  Note, however, that he had to make each IP address on a different sub net

    Steve

    http://e2e.ti.com/support/embedded/bios/f/355/t/168240.aspx#613886

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use