EthernetKRL with multiple IP address

  • Hello


    I have some problems with configuring EthernetKrl option.


    KRC4

    KSS-8.6.9

    EthernetKRL version 3.1.1


    I set controller as Client,PC as Server,Transfer type binary stream.and it works well.

    Client(controller virtual5) IP:192.168.1.120

    Server(PC) IP:192.168.1.100

    Subnet mask:255.255.0.0


    And now , I need 2 or more Client IP address to communicate with serveral PCs.

    E.g. Program1: Client 192.168.1.120 --> Server 192.168.1.100

    Program2: Client 192.168.1.121--> Server 192.168.1.101

    ...


    I have no idea with setting multiple IP address to Ethernetkrl Client.

    I tried to add network interface(virtual 6),but I don't know how to relate this interface to Ethernetkrl.

    Is there someone know how to solve this problem?


    Thanks in advance.

  • Place your Ad here!
  • I have no idea with setting multiple IP address to Ethernetkrl Client.

    Why do you want to have multiple IPs on the KRC?


    EKI can support up to three simultaneous connections with unique EKI Channel files. As hermann said, it's much simpler to use separate ports on the same IP address.

  • Sorry for my unclear description.


    My application is robot with two 3Dvisions which controlled by a software(what I call "Relay" ) on PC side.


    Why do you want to have multiple IPs on the KRC?

    When robot triggers one of these visions, Robot send string ”trigger“ to "Relay", and "Relay" decides that which vision should be triggered according to predefined configuration. Matching rule of "Relay" is like {Source IP X.X.X.X --> Vision 1 , Source IP Y.Y.Y.Y-->Vision 2 , Source IP Z.Z.Z.Z--> Vision 3 ,...}.


    I know the main problem is that strange matching rule, but the whole vision system is supported by a third-paty company who refused to update "Relay" for me. :loudly_crying_face:


    Now Im trying to find a way to multiboxing "Relay",Maybe I should use virtual machine.


    Thank you guys. :thumbs_up:

  • Matching rule of "Relay" is like {Source IP X.X.X.X --> Vision 1 , Source IP Y.Y.Y.Y-->Vision 2 , Source IP Z.Z.Z.Z--> Vision 3 ,...}.

    Hmm... that's a hard one. I can't say I've ever worked on a KRC4 that had more than one IP address -- I honestly don't know if it's possible. I may have a chance to experiment with a KRC4 next week, but that depends a lot on events outside my control. Have you contacted KUKA tech support?


    How many quads of the IP does the matching rule require to be different? Would it accept 192.168.1.1 and 192.168.1.2 as X and Y, or would it require different subnets?

  • If it is possible at all, to use two different ip addresses, then you must use addresses from different subnets.

    Two ip addresses on one physical interface, in one subnet don't work if you don't use also different ports for each ip address.

    May be you can use a NAT router to split the different ip addresses of your relay into different ports on your robot.

  • pretty sure you can forget about multiple IP addresses on KRC side.


    Still not sure about your architecture, info you shared does not match up:


    in post1 you stated you have a single KRC that communicates with multiple nodes (multiple PCs).


    in post4 you stated you have a "Relay" ( a single node) that receives requests from multiple IPs (multiple KRCs).


    what does the "Relay" do beside forwarding trigger to one of two vision systems?

    why not bypass "Relay" and talk to each vision systems directly?

    and if a "Relay" is central node between one or more KRCs and one or more Vision Systems, then message sent to vision system must support a way to state which exact vision system is to to be triggered/used. could it be that you are not using proper (full format) message? are you letting "Relay" pick one vision system for you (a default one).

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • So... on a typical computer, assigning multiple NICs with separate IPs to a single physical NIC is possible. For a KRC4 with EKI, the first question is, is this possible in KSS? I'm inclined to say no, but can't rule it out entirely.


    The second question is: can EKI make use of the two different IPs? On a typical computer, the destination IP is used to determine which NIC to send a request through. So, if you have two NICs on 192.168.1.1 and 192.168.2.1, a Ping command to 192.168.1.* will be automatically routed through the first NIC, and any request to 192.168.2.* through the second NIC.


    Looking at some of my old EKI file, and the EKI manual, there doesn't appear to be any way to tell EKI to use one NIC or another, you only have the IP of the remote server.

    Code
    <ETHERNETKRL>
        <CONFIGURATION>
            <EXTERNAL>
                <IP>172.20.1.61</IP>
                <PORT>59152</PORT>
            </EXTERNAL>

    So, if it's possible to set up two different virtual NICs with different-subnet IPs on the KLI port, setting the different External IPs in the EKI config files might get automatically routed, since KSS is built atop VxWorks, which itself is a modified version of Linux.


    But I don't see anything in the docs that says anything about this kind of scenario either way. The simplest test might be to create two virtual NICs on the KLI port, and try a Ping command from inside the KRC.


    The alternate route I can see would be to use an intermediary computer where you could create any and all virtual NICs and IP aliasing you might need, and put that between the KRC and the "Relay". It would require creating some iptables routing rules, but if (for example) each EKI channel used a different port, it should be possible to have the intermediary computer re-route incoming traffic for each port to the correct port on the Relay, while masquerading as a different IP address. This would be a question for an IT or network tech, though.

  • It does not need to be a separate computer. One could write small program that runs on same computer that runs "Relay" and/or vision systems.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Well, I got a chance to use my OfficePC (KSS 8.3) for a bit this morning. I was able to create two different Virtual interfaces with separate IPs, and ping them both from my remote computer. However, I found that I could only have one interface with the "Windows Interface" box checked. And I could only ping out from the KRC, or get an RDP connection to the KRC, over the interface with Windows Interface checked.


    So, the next question would be if EKI needs to operate through the Windows Interface. My guess would be "yes", but the EKI manuals don't seem to indicate either way.

  • the path to setup multiple IP addresses on KLI is just absurd. The last thing you want to try making something custom in a system that is proprietary and so complex. It is just so FAR more practical to do it externally, using other hardware or software, specially when low cost, ready to use solutions exist, including open source. I do not see topic starter chiming in so I am done with this thread.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners