[nycbug-talk] Two nic cards, separate vlans

Okan Demirmen okan
Tue Mar 15 11:28:48 EST 2005


On Tue 2005.03.15 at 10:50 -0500, steverieger wrote:
> 
> On 3/14/05 10:47 PM, "Okan Demirmen" <okan at demirmen.com> wrote:
> 
> > On Mon 2005.03.14 at 22:17 -0500, Steve Rieger wrote:
> >> i meant, 
> >> i have a box with two nic's, can i put i know that i can put sepereate ips
> >> one for each card, but my question is. can i make it that these two i[p's are
> >> on different vlans. ie
> >> 
> >> nic1    -   192.168.1.19
> >> nic2   -    10.20.2.19
> >> 
> On the primary ip (192.168.1.19) apache. Mysql, and ssh listen. The second
> ip addy is just so that this server can talk to that subnet. The 192 network
> does not have any access to the 10 network, but I would like to have this
> server poll various hardware in the 10 network via snmp, that's all
> 
> So if I were to ping a host on the 10 network it will go out via the 10 nic
> card, and if I were to ping a host on the 192 network it goes out on the 192
> nic.
> 
> 
> Hope I am making myself clear here.

yup. so you are close. assign ip's as you have them, then just add
your default route, which is somewhere in the 192.168.1/24 block.
everything is already taken care of - connections to your 10.20.2/24
would go out that the 10.20.2.19 interface, everything else is out
the 192.168.1.19 interface.

if you are curious, netstat -rnfinet or route get x.x.x.x to see what
the routing table will do.

cheers,
okan

-- 
Okan Demirmen <okan at demirmen.com>
PGP-Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB3670934
PGP-Fingerprint: 226D B4AE 78A9 7F4E CD2B 1B44 C281 AF18 B367 0934




More information about the talk mailing list