Answer the question
In order to leave comments, you need to log in
How to get by with one network card
There are two gateways that release LAN to the Internet, external and internal. Lokalka is connected to an internal gateway, an internal gateway to an external one (two cables), an external one to two providers.
Accordingly, while everything is happening like this - a user in LAN asks for a site, the internal gateway has a table of who to let which provider. If to provider 1 - one cable, if to provider 2 - via the second cable. Accordingly, the external gateway looks at which cable the request came to it and sends it to the appropriate provider.
It would be desirable to replace two cables between gateways with one. But here a problem arises - to decide where the internal gateway should go to whom (because it has a table for whom where it is possible, and it sees the address from the local area), but the external gateway should send to the provider, and it (if there is one wire) will not know from whom it came this package - they will all be the same for him, from the internal gateway.
Actually the question is - can you somehow transfer information from the internal to the external gateway, to whom this packet is intended with one line?
linux.
Answer the question
In order to leave comments, you need to log in
Organize two VLANs on the link between the internal and external gateways and send packets that are now going on different links to different VLANs. The keywords are vconfig.
802.1q or a simple vlan will solve the problem. And why 2 gateways I don’t understand at all, why not do everything through one, which is external, just set up a routing table on it and that’s it.
If it was FreeBSD, then I would recommend you go here , but Linux is more likely to use iptables
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question