This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Multiple IP adresses NDK

Other Parts Discussed in Thread: AM3359

Hi,

we are currently trying to use multiple IPs on the same Interface.

After reading multiple threads in this forum we are now aware that NDK does not support multiple IPs on a single interface (unless using different subnets) as of today.

We are using the ethernetip_adapter example from the sdk package (version 1.1.0.5). In this example the part of the cfg-script for NDK is bypassed with the line

"Global.stackThreadUser = "&NDKACD_stackThread";"

Even after multiple attempts (using different interfaces, subnets, add CFG_ADDMODE_DUPLICATE as mode attribute etc.) it was not possible to get 2 different IPs running. Only the first IP is working.

This is the current attempt to get 2 IPs running:

CfgAddEntry(hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0,
strlen(ti_ndk_config_Global_HostName),
(UINT8 *)ti_ndk_config_Global_HostName, 0);

/* Configure IP address manually on interface 1 */
bzero(&NA, sizeof(NA));

NA.IPAddr = htonl(eipDevInitConfig.tcpipConfig.deviceIP);
NA.IPMask = htonl(eipDevInitConfig.tcpipConfig.networkMask);
strcpy(NA.Domain, DomainName);
NA.NetType = 0;
CfgAddEntry(hCfg, CFGTAG_IPNET, 1, CFG_ADDMODE_DUPLICATE,
sizeof(CI_IPNET), (UINT8 *)&NA, 0);

bzero(&RT, sizeof(RT));
RT.IPDestAddr = 0;
RT.IPDestMask = 0;
RT.IPGateAddr = htonl(0xC0A80201);

CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, CFG_ADDMODE_DUPLICATE,
sizeof(CI_ROUTE), (UINT8 *)&RT, 0);

/* Configure IP address manually on interface 2 */
NA.IPAddr = htonl(0xC0A8218A);

u = CfgAddEntry(hCfg, CFGTAG_IPNET, 2, CFG_ADDMODE_DUPLICATE,
sizeof(CI_IPNET), (UINT8 *)&NA, 0);


RT.IPGateAddr = htonl(0xC0A80101);

a = CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, CFG_ADDMODE_DUPLICATE,
sizeof(CI_ROUTE), (UINT8 *)&RT, 0);

a and u are integers to fetch the errors returned from the last two CfgAddEntry functions.

Both return -101.

Not many more changes were made (except for adding a HTTP server). So, it's basically the same as the source file "eip_ndk.c" from the ethernetip_adapter example.

So it would be nice to get it running with any constellation and if there are any updates on multiple IPs on the same interface (IP aliasing).

Thanks in advance for any help provided.

Regards,

Timo

  • Hello,

    I'm not sure if you are using CPSW or ICSS based implementation. Either ways, the driver currently does NOT support dual mac. You will have to modify the os_drivers to adapt the driver for dual mac functionality.

    Regards,
    Vinesh

  • Hello,

    thanks for the fast reply. The ICSS implementation is used (the board is an ICE Am3359 v1).

    So is it currently the only way to modify the os_drivers?

    If so, could you please provide some help on which files we have to edit and could you (roughly) describe what changes are necessary?

    Regards,

    Timo

  • Timo,

    For an ICSS based implementation, I'm afraid it would require firmware changes too.

    Regards,
    Vinesh

  • Hi

    just a small question: Have you any plans to implement this feature in the forseeable future?

    (I think it is a necessary feature for Ethernet/IP (with CIP Safety) because it is not really possible to configure a safe and unsafe device with only one IP address. RSlogix needs a unique IP address for both devices.)

    Regards,

    Timo

  • Hi Timo,

    Can you tell me about your exact requirement here ? Do you need two IP's with two MAC addresses which is a classical two MAC configuration or do you need two IP addresses with a single MAC address (Aliasing).

    We currently do not support two MAC id's for the switch. That would require a design change in firmware. We are exploring that option at the moment but there is nothing concrete in our plans.

    Regards

    Vineet

  • Hi,

    we would actually prefer one single MAC address but two would be okay aswell.

    To further explain our problem:

    Ethernet/IP with CIP Safety is used in our project. 

    As RSLogix (Rockwell) does not support the same IP for safe and unsafe data, two IPs are needed to differentiate between those two data transfers.

    Thanks for your help so far.

    Regards,

    Timo