Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multihoming question (3 NICs total)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nexxai
n00b
n00b


Joined: 15 Nov 2003
Posts: 11
Location: Winnipeg MB Canada

PostPosted: Sun Aug 15, 2004 8:03 am    Post subject: Multihoming question (3 NICs total) Reply with quote

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.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Sun Aug 15, 2004 3:23 pm    Post subject: Reply with quote

You will want to check out links about policy-based routing in Linux.

http://www.unixreview.com/documents/s=1350/urm0006d/
http://snafu.freedom.org/linux2.2/docs/advanced-routing/
http://lartc.org/howto/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum