Reply on same interface as incoming?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reply on same interface as incoming?

1,124 Views
chris-quin
Contributor I

I have a system with two interfaces. Both interfaces are connected to the internet.

One of them is set as the default route. A side effect of this is that if a packet comes in on the non-default-route interface,

the reply is sent back through the default route interface. But i want to send it back to the incomming interface.

My Problem is, one of these interfaces is behind a router in a subnet and the router ist forwarding incomming packages to this interface.

Now, i will answer to the the same interface, but RTCS can't reach/find the incomming ip-adress and try to send it back to the defaultgateway(other interface).

Is it possible to create for each interface an extra routingtable(ipradix) or is there an simpler way to realise this problem?

I hope somebody can help me.

Labels (1)
Tags (3)
0 Kudos
6 Replies

717 Views
Ramtry
Contributor III

Hi Christian,

I have the same type of application. But i am using QT creator for handling the network related packet. Two ethernet port say eth0 and eth1 both are connected to router and port forwarding is done in eth0. Client connection and packet handling are done in QT with asyn server-client prgramming.

thanks

ram

0 Kudos

717 Views
Ramtry
Contributor III

Hi christian,

Hope you solved the problem. Congratz... well done.

thanks

ram

0 Kudos

717 Views
chris-quin
Contributor I

Hi Ram Ramasamy,

i solve/fixed the problem for me. I increased a little bit mqx.

if a new interface is added, i additional register which gateway was used and added this and the interface together. If a TCP/IP message receive and i will send a package, i am looking for the interface with the corresponding gateway and register this to the hop-destination.


greeting chris

0 Kudos

717 Views
Martin_
NXP Employee
NXP Employee

As soon as RTCS IPv4 sends a packet to a different subnet, it goes via gateway. RTCS IPv6 allows to select the interface, but not RTCS IPv4, as far as I am aware.

0 Kudos

717 Views
chris-quin
Contributor I

Hi Martin,

thanks for your reply.

Now i am able to send IPv4 packages.

I edited MQX, so now i am able to root over Interface. Everything works fine.

If somebody need a solution, i can post the modified code.

greetings chris

0 Kudos

717 Views
Martin_
NXP Employee
NXP Employee

Hi Christian, I think it would be great if you post your modifications to MQX, to get this working. There have been more users asking for this kind of functionality on this forum and seems that you have functional solution.

Thanks a lot !

Martin

0 Kudos