From owner-freebsd-questions Sun Oct 27 7:42: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C2A437B401 for ; Sun, 27 Oct 2002 07:41:59 -0800 (PST) Received: from server0027.freedom2surf.net (server0027.freedom2surf.net [194.106.33.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF38343E65 for ; Sun, 27 Oct 2002 07:41:53 -0800 (PST) (envelope-from neil@mpfreescene.com) Received: from b1 ([195.137.35.72]) by server0027.freedom2surf.net (8.12.6/8.12.6/Debian-5) with ESMTP id g9RFfgG4005122 for ; Sun, 27 Oct 2002 15:41:46 GMT Reply-To: From: "Neil Doody" To: Subject: Freebsd multiple gateways Date: Sun, 27 Oct 2002 15:41:38 -0000 Message-ID: <000501c27dcf$5a2bd700$0200a8c0@b1> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG *My apologies if this mail has already gone to this list, but I didn't realise you had to subscribe first, im a newbie to mail-lists* I have a problem with having 2 nics and the need for multiple gateways for IP's that are bound to them, heres my prognosis in detail :-# Background Scenario :- I have a server that is running FREEBSD 4.7-STABLE. This server has 2 network cards. Each network card has its own pool of IP's and are on different subnets which are transported by different carriers. Details :- The servers main hostname is admin.mghost.net the IP is 66.250.145.138, the default gateway for this is 66.250.145.137, these ips are on the cogent network, all traffic in/out of the server for the ip 66.250.145.138 should be routed through the gateway 66.250.145.137. These are all on the first network card which is an realtek card. The servers second hostname is test.mghost.net the IP is 69.1.78.8, the default gateway for this is 69.1.78.1, these IP's are on the internap network, all traffic in/out of the server for the ip 69.1.78.8 should be routed through the gateway 69.1.78.1. There are all on the second network card which is an intel thing. The problem :- It appears there is no easy way to add a second default gateway, something I did, which I thought was working, is not. all inbound traffic destined for the IP 69.1.78.8 is going through the correct channels and through teh correct nic, however, outgoing traffic is being routed to the default gateway, through the first NIC, so when people connect to the IP 69.1.78.8, the traffic is being sent through the first NIC and through the gateway 66.250.145.137. The needed solution :- I need something that will allow me to make traffic that is destined for the IP 69.1.78.8 to be routed through the correct NIC and the correct router, not the default gateway, so traffic from 69.1.78.8 back out again, should go via the gateway 69.1.78.1. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message