How to make use of 2 NICs on server instead of 1

Andreas Ericsson ae at op5.se
Wed Mar 31 11:36:17 CEST 2004


emily zhou wrote:
> For sure, if I'll use 2 Nic, they'll be connected to
> different networks, in our case is in different VLAN. The issue is that
> I have to manually setup routing table (static path) instead of simply 
> using defaut gateway, which means forcing the Nagios server goes to one 
> Nic for checking one group of hosts; goes to another Nic when checking 
> another group of hosts. Is that correct?

In short;
If by 'group of hosts' you mean 'hosts on one of the targeted networks', 
then yes, that is correct.

It works like this (sorry if I'm being too obvious here).
Say you have nic0 with ip 192.168.0.100 and nic1 with 10.0.0.100, both 
with netmask 255.255.255.0.
When the system needs to send packets to 192.168.0.*, it goes through nic0.
If it needs to access 10.0.0.*, it goes through nic1.

If you want to access hosts outside of these two ranges, the gateway is 
used. This means you only have to define a gateway if either network is 
larger than what fits in your netmask.

If you have several gateways, you can specify a netmask for each of 
them, forcing the system to use one or the other. While using the above 
example and considering nic0 to be part of a larger (/16, class B) local 
area network and nic1 being the default internet accessing interface, 
settings could be something like this.

nic0:
destination netmask 255.255.0.0 (traffic from and to 192.168.*.*)
gateway IP address 192.168.0.1 (anything on 192.168.0.* works)

nic1:
destination network address 0.0.0.0 (any traffic not matching any other 
netmask)
gateway IP address 10.0.0.1 (anything on 10.0.0.* works)

Since each gateway must be within one of the nic's address range the 
system is properly forced to use the correct nic to access each address. 
If you have several gateways on one subnet you should try and make sure 
that each gateway targets a unique network (unless you are really sure 
of what you're doing).

Use traceroute command if you're unsure of what's going on.

-- 
Mvh / Best Regards
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list