Linux Routing and Gateway
Hi,
I am having a little bit of fun at home, I have got myself a layer2 switch and created some VLans on the switch, I have some machines on 1 vlan and some machines on another VLan, whats I would like to do is by using a machine that has two networks enabling routing between the two Vlans, I would like the machine with two network cards to act as a gateway - no tagging of packets is setup, so no need for a kernal that support vconfig. Vlan 1 is a 192.168.3.x network Vlan 2 is a 192.168.4.x network Routing machine has two network cards one with the i.p 192.168.3.1 and the other is 192.168.4.1 - how do I set up so the linux box can perform the routing? I am using ubuntu - I have been looking into the route command but not getting very far, any help greatly appreciated. Regards, Gavin |
it's just a case of enabling ip forwarding as standard (echo 1 > /proc/sys/net/ipv4/ip_forward). this will then use any known routes on the linux box to route to destinations. I hope you are aware that your use of vlans in a switch is totally irrelevant here? it's just one network to another. The linux box doesn't have any idea where those two cables go to.
|
All times are GMT -5. The time now is 06:18 PM. |