Binding application to one ethernet interface
Hello: I have a server with apache that serves pages to an intranet. Now we want to add another server application (cvs and pgsql) to another intranet. Of course we can buy a new server to do that, but i want to know if i can add a new ethernet card to the current server and force apache to serve to one intranet and cvs/pgsql to the other intranet. I think that by default, freebsd will balance the charge between both cards, is it true?? Thanks In Advance ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Binding application to one ethernet interface
Hi, I have a server with apache that serves pages to an intranet. Now we want to add another server application (cvs and pgsql) to another intranet. Of course we can buy a new server to do that, but i want to know if i can add a new ethernet card to the current server and force apache to serve to one intranet and cvs/pgsql to the other intranet. Yes, you can have several ethernet cards, each with an IP in a different subnet. You can run every application on what subnet(s) you decide, but the exact way to bind one application to one or more IP is depending on the application itself. I think that by default, freebsd will balance the charge between both cards, is it true?? No that is not true. If you have both card in the same subnet, I am not sure what would happen, but I beleive no load balancing. Bests, Olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Binding application to one ethernet interface
Eduardo Morras wrote: I have a server with apache that serves pages to an intranet. Now we want to add another server application (cvs and pgsql) to another intranet. Of course we can buy a new server to do that, but i want to know if i can add a new ethernet card to the current server and force apache to serve to one intranet and cvs/pgsql to the other intranet. I think that by default, freebsd will balance the charge between both cards, is it true?? You don't need multiple NICs if it's all going on the same subnet or lan segment. And, no, there is no balancing anyway. You can assign extra alias IP addresses to the one NIC (rc.conf option). Then tell apache to only use one, with a Listen directive in its .conf. You can also setup Apache to do virtual hosts, so one Apache serves multiple web sites. Google for that one - there are lots of tutorials out there. The best thing is to probably do is config multiple addresses on the NIC, then run each server process in its own jail so they're isolated from each other. There's a good WIkipedia article on FreeBSD jails I was reading just yesterday; it links to a couple good tutorials. -Rob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Binding application to one ethernet interface
--On Thursday, September 27, 2007 13:30:24 +0200 Eduardo Morras [EMAIL PROTECTED] wrote: Hello: I have a server with apache that serves pages to an intranet. Now we want to add another server application (cvs and pgsql) to another intranet. Of course we can buy a new server to do that, but i want to know if i can add a new ethernet card to the current server and force apache to serve to one intranet and cvs/pgsql to the other intranet. I think that by default, freebsd will balance the charge between both cards, is it true?? Most applications will listen on *all* interfaces by default. I'm not aware of an application that *cannot* be configured to only listen on one IP address, but there may be some. In the case of apache, you simply edit the Listen attribute and then restart the service. Listen x.x.x.x:80 I don't use postgres, but I'd bet it has the option as well. Mysql certainly does. You just need to read the man pages for each app (or online docs) to find out what config option you need to use and what the syntax needs to be. Or Google it. BTW, you don't really need a second nic. You can alias the first one. In /etc/rc.conf use ifconfig_interface_alias0=IP Netmask For example, from a live setup: ifconfig_bce0=inet 66.221.101.248 netmask 255.255.224.0 ifconfig_bce0_alias0=inet 66.221.101.250 netmask 255.255.255.255 ifconfig_bce0_alias1=inet 66.221.101.253 netmask 255.255.255.255 Since you would be using different subnets, you set the netmask appropriately for that subnet. When you alias on the *same* subnet, all the alias netmasks have to be non-conflicting, according to the man page, so you use the netmask I use above. -- Paul Schmehl ([EMAIL PROTECTED]) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/
Re: Binding application to one ethernet interface
to add another server application (cvs and pgsql) to another intranet. Of course we can buy a new server to do that, but i want to know if i can add a new ethernet card to the current server and force apache to serve to one intranet and cvs/pgsql to the other intranet. is it another subnet to add other card? but of course you can do that. if default scripts for pgsql etc. make running 2 instances difficult fix them or use jails. I think that by default, freebsd will balance the charge between both cards, is it true?? no ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Binding application to one ethernet interface
depending on the application itself. I think that by default, freebsd will balance the charge between both cards, is it true?? No that is not true. If you have both card in the same subnet, I am not sure what would happen, but I beleive no load balancing. it will use the first for transmission ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]