From owner-freebsd-questions@FreeBSD.ORG Fri Aug 24 07:21:59 2007 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1704116A418 for ; Fri, 24 Aug 2007 07:21:59 +0000 (UTC) (envelope-from myronn@seed.net.tw) Received: from seed.net.tw (sn14.seed.net.tw [139.175.54.14]) by mx1.freebsd.org (Postfix) with ESMTP id D543013C442 for ; Fri, 24 Aug 2007 07:21:58 +0000 (UTC) (envelope-from myronn@seed.net.tw) Received: from [139.175.54.127] (port=3088 helo=wm7.seed.net.tw) by seed.net.tw with esmtp (Seednet 4.67:1) id 1IOSw0-0008bv-Id for freebsd-questions@FreeBSD.org; Fri, 24 Aug 2007 14:46:20 +0800 Message-ID: <11635695.14361187937980559.JavaMail.root@wm7.seed.net.tw> Date: Fri, 24 Aug 2007 14:46:20 +0800 (CST) From: myronn@seed.net.tw To: freebsd-questions@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain;charset=Big5 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 24 Aug 2007 12:06:36 +0000 Cc: Subject: [multiple NIC issue] two NICs in the same subnet problem. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 07:21:59 -0000 Hi, I found an issue for a long time. For test requirement without any switch/hub: One host has two NICs and with the same subnet setting. (local)NIC1: 10.0.0.1/8 (local)NIC2: 10.0.0.2/8 (direct connect peer) 10.0.0.10/8 (direct connect peer) 10.0.0.20/8 ping command: #ping 10.0.0.10 -c 5 -S 10.0.0.1 In Linux, while I assign source interface and IP address, ex. ping 10.0.0.10 -I eth0 ......packet will be sent by NIC1 ping 10.0.0.20 -I eth1 ......packet will be sent by NIC2 In BSD, while I assign source interface/IP address, packet always be sent by NIC1. The NIC2 looks like dead. Until I set "#ifconfig eth0 down" and NIC2 would be got up. So the ping command parameter "-S" would be broke down in this case. The packets format maybe is correct but NIC2 couldn't work. If this is NOT a BUG, please tell me BSD is followed which standard? Or what the purpose of BSD to define this behavior? Thanks & Regards Myron