nexxai n00b
Joined: 15 Nov 2003 Posts: 11 Location: Winnipeg MB Canada
|
Posted: Sun Aug 15, 2004 8:03 am Post subject: Multihoming question (3 NICs total) |
|
|
Ok, I know the title might be a bit misleading, but it's the best term I could think of for the problem I will be encountering shortly (read: tomorrow).
Basically I have 3 physical machines (one of which is also hosting a Virtual Machine with it's own IP), along with a server, 2 switches, a cable modem, and a lot of cat5e.
NOTE: I'm going to explain the situation backward, from the Internet into our network to hopefully make more sense.
- First, we have one cable modem, which is hooked up to a 10/100mbit switch (overkill, I know, but bear with me).
- From the switch we have 2 cat5e cables going into separate NICs on the Gentoo server, each getting a separate PUBLIC IP. [24.139.1.1 - eth0, 24.194.1.1 - eth1]
- From the Gentoo server, we have yet a 3rd NIC with 2 IPs bound to it, going to a 10/100/1000mbit switch [192.168.0.1, 192.168.100.1].
- From the switch we have 3 physical Windows XP machines each receiving private IPs from the DHCP server set up on the Gentoo server [192.168.0.2, 192.168.0.3, 192.168.0.4]
- On one of those Windows XP machines, VMware is hosting a Linux session, which is pulling it's OWN private IP from the DHCP daemon on the Gentoo server [192.168.100.2]
For a more visual description of our network:
[IMG="http://img11.exs.cx/img11/7488/netmap.th.jpg"]
Now, in the end, what I need to be able to do is route all traffic coming from the 192.168.0.*/24 network out through eth0, and the traffic coming from 192.168.100.2 (the Virtual Machine) out through eth1.
I know that the concept is to check the source IP and send the traffic out on the corresponding interface, however after looking at these routing table examples found on google, I can't seem to wrap my head around it.
As a sidenote, obviously the 24.*/8 IPs I posted above are not the actual IPs I've been given by the cable company, but please use them if you plan to quote any code so I can keep it straight in my head. |
|