From owner-freebsd-net Sun Oct 27 8:51:32 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3EA737B404 for ; Sun, 27 Oct 2002 08:51:30 -0800 (PST) Received: from server0027.freedom2surf.net (server0027.freedom2surf.net [194.106.33.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E54F43EA3 for ; Sun, 27 Oct 2002 08:51:23 -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 g9RGpIG4009741 for ; Sun, 27 Oct 2002 16:51:26 GMT Reply-To: From: "Neil Doody" To: Subject: Freebsd multiple gateways Date: Sun, 27 Oct 2002 16:51:14 -0000 Message-ID: <000601c27dd9$15c0b040$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-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org *I sent this to the freebsd-questions mailing list, then realised there was a freebsd-net mailing list, my apologies if this is a repeat for you* 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-net" in the body of the message