AnsweredAssumed Answered

MQX RTCS with TWR-SER2, routing between interfaces

Question asked by igor-imx on Nov 8, 2014
Latest reply on Nov 12, 2014 by alejandrolozano

Hi Everyone

I have a TWR-VF65GS10 + TWR-SER2 running MQX 4.1.1

Im trying to accomplish the following scenario but im not sure if RTCS can actually do this.

 

TWR-SER2 has w ethernet interfaces, MQX BSP for Vybrid supports using both.

 

I assigned interface 0 the following IP settings:

 

IP address: 192.168.1.200

Mask:         255.255.255.0

Default Gateway: 0

 

Interface 1 has the following settings:

 

IP address: 192.168.2.200

Mask:         255.255.255.0

Default Gateway: 0

 

Interface 0 is sitting on my home subnet, which is 192.168.1.0/24 and the default gateway for this subnet is my home router with ip 192.168.1.254

Interface 1 is connected directly to the Windows laptop network card. Laptop is not connected to any other network. Laptops ip is 192.168.2.2

 

I added 2 gateways using RTCS_gate_add(server ip, network, mask) command like this:

 

RTCS_gate_add(IPADDR(192,168,1,254),IPADDR(192.168.1.0).0xFFFFFF00)

RTCS_gate_add(IPADDR(192,168,2,240),IPADDR(192.168.2.0).0xFFFFFF00)

 

Im running a basic web server demo from RTCS examples with 1 web server servicing both interfaces.

 

Here is what i can do:

 

From the windows laptop i can access demo website running on the board at both 192.168.2.200 and 192.168.1.200 ip addresses

 

Here is what im trying to accomplish.

 

I want to configure the board to be able to route traffic between interfaces. For example, i would like to be able to access another windows computer with ip address 192.168.1.100 from the windows laptop (192.168.2.2) connected to the tower board interface 1 with ip address 192.168.2.200

Is this possible? How can i accomplish this and setup RTCS to route traffic?

I have already enabled VIRTUAL_ROUTES in user_config.h as well as GATEWAYS, TCP,UDP and __IP_FORWARD=true in the demo program

 

Please help if anyone knows how to do this or if routing is possible in RTCS at all

Outcomes