Is VyOs able to force all traffic to physical port?

Hi,

I get to know VyOS 5 min ago. Feel excited about what this project is offering.

As post title indicated, my first question is: is VyOS able to force all the traffic (except to localhost port 127.0.0.1) onto physical port?

For example, if the computer has eth0 and eth1 with mac/ip address of Mac1/IP1 and Mac2/IP2 correspondingly. On regular computer/linux, when I send a packet from eth1 port (using IP1 address) to IP2 address, it’ll be routed internally without the packet going onto the physical eth0/eth1 port. What I want is all the packets/traffic can be sent out onto physical ports no matter it’s internally routed or not.

Thanks for any reply/explanation!
James

Can you put this into context?

[quote=“microlinux, post:2, topic:515”][php][/php]
Can you put this into context?
[/quote]

I have eth0 as 10.10.1.1/24 and eth1 as 10.10.2.2/24 in the same box using static ip. Eth0 and eth1 direct connect back-to-back. On regular linux i.e, centos or debian, if my application create a socket using eth0’s ip as source IP and set destination ip as eth1’s ip address, Linux kernel won’t send the packet off the box. There will be no real packet transmitted over the Ethernet cable.

My question was asking in my above situation, is vyos able to send packets onto the real Ethernet cable?

Thanks!

Do the packets need to to be exclusively transmitted on physical port?

What do you mean by “exclusively”? Can you please explain a bit. Thanks!

Do you want the packets to only be transmitted on the physical port, or also transmitted on the physical port.

It does not matter as long as it can be transmitted on the physical port.
It’ll be perfect if it’s configurable.
I understand I’m dealing with application level problem. After some thinking, I realize the problem can be described this way:

  1. assign 10.10.1.1/24 to physical port eth0
  2. assign 10.10.2.2/24 to physical port eth1
  3. create a virtual ip 10.10.1.100 from eth0, let’s call eth0:0
  4. create a virtual ip 10.10.2.200 from eth1, let’s call eth1:0
  5. use physical ethernet cable directly connect physical port eth0 and physical port eth1
  6. create static route with : destination network 10.10.1.0/24 (using) device eth0
  7. create state route with : destination network 10.10.2.0/24 (using) device eth1
  8. i create a client socket application, let’s call it client_app
  9. create a server socket application, let’s call it server_app
  10. server_app listens to 10.10.2.200:xxx tcp port
  11. client_app create a tcp client socket using 10.10.1.100 as the socket’s source ip and yyy as client socket’s port number.
  12. client_app send the packet out
  13. Here comes the problem on the regular linux : the packet will never ride onto the physical ethernet cable — the packet will be internally routed by linux kernel without bothering to do real io operation to network card.
  14. I want the packet go out onto the physical cable. This makes the x86 vyos box behave as a real router. Also since it’s based on debian, I believe I would be able to migrate my application to vyos.

Thanks!
James

Can I ask why you need to do this? It may help come up with a solution.