Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello
I use software to simulate routers, that software creates two interfaces in system for each of two interfaces of the router.
That interfaces are routed interfaces via which i can communicate with simulated router.
Lets call that interfaces:
netio0 - linux ip address 172.16.10.1, router: 172.16.10.10
netio1 - linux ip address 172.16.11.1, router: 172.16.11.10
i wanted to send packet thru that router, but normally of course when i send packet from 172.16.10.1 to 172.16.11.1 it would never be send via any of interfaces because these are locally configured interfaces (or the response problem even for static routing entries) So i used:
echo 1 VRF1 >> /etc/iproute2/rt_tables
echo 2 VRF2 >> /etc/iproute2/rt_tables
ip route add default via 172.16.10.10 dev netio0 table VRF1
ip route add default via 172.16.11.10 dev netio1 table VRF2
And created rules which for the traffic from one side to another use specific RT_Table:
ip rule add from 172.16.10.0/24 table VRF1
ip rule add from 172.16.11.0/24 table VRF2
And it works, but only partially.
Traffic from 172.16.10.1 to 172.16.11.10 (other interface of router) works fine.
Traffic from 172.16.10.1 to 172.16.11.1 is sent through router and i can sniff it on other side (netio1), but linux system never respond to that traffic.
It looks like linux kernel limitation to me: it will discard the packet from one of it's interfaces to another.
Could you confirm ?
Do you have any way to simulate VRFs on Linux ? I need independent routing tables which are really separated (like on cisco/juniper routers which are based on ...linux).
As you see i am using ip tool to simulate VRF and it's working for me but with some limitations.
"VLAN interface " - do you mean 802.1q ?
adding 802.1q would not change anything, still i would need to accept and respond to packet from other logical interface (instead of physical interface) - and in fact i already use logical (not physical interfaces).
but why whould it respond if VLAN is used ?
It's just another interface. Right now it's also in another interface (netio interface).
And just to clarify: speaking VLAN you mean 802.1q ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.