From owner-freebsd-questions@FreeBSD.ORG Wed Feb 25 20:15:50 2009 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 08416106564A for ; Wed, 25 Feb 2009 20:15:50 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id E0CCF8FC15 for ; Wed, 25 Feb 2009 20:15:49 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from [192.168.213.128] (jn@stealth.jnielsen.net [74.218.226.254]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id n1PKFlVF095296; Wed, 25 Feb 2009 15:15:48 -0500 (EST) (envelope-from lists@jnielsen.net) From: John Nielsen To: Faizan ul haq Muhammad Date: Wed, 25 Feb 2009 15:15:46 -0500 User-Agent: KMail/1.9.10 References: <200902251306.14765.lists@jnielsen.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902251515.47094.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: FreeBSD Questions Subject: Re: ping stucks/hangs on PCI 3com NIC sk0 interface but works on builtin NIC 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: Wed, 25 Feb 2009 20:15:50 -0000 On Wednesday 25 February 2009 01:11:42 pm Faizan ul haq Muhammad wrote: > > From: lists@jnielsen.net > > On Wednesday 25 February 2009 12:35:23 pm Faizan ul haq Muhammad wrote: > > > Hi > > > I have two PCI NICs and one builtin NIC on freebsd 7.0 > > > ifconfig shows information somthing like: > > > > > > bge0: flags=8843metric 0 > > > mtu 1500 options=9b > > > ether 00:13:21:f8:7e:56 > > > inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 > > > media: Ethernet autoselect (none) status: no carrier > > > > This is NIC doesn't appear to be plugged in. > > no it is not plugged into any other yet and if i plug it and ping it > from an external machine, it works That's good. > > > sk0: flags=8843metric 0 > > > mtu 1500 options=b > > > ether 00:0a:5e:1a:69:25 > > > inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255 > > > media: Ethernet autoselect (none) status: no carrier > > > > Neither is this one. > > You are right, but it does not reply to ping even if i plug this to an > external system with crossover cable and ping from that PC. Still not surprising. See below. > that is the difference in behaviour of both NICs > > > > Note: bge0 is builtin NIC > > > sk0 is 3com PCI NIC > > > > > > now after configuration of IPV4 Addresses, when i verify the > > > configuration with ping > > > > > > if i ping bge0(ping 192.168.0.1) i get the response of success > > > but when i ping sk0 (ping 192.168.0.2) Ping gets stuck and gives no > > > response, neither it gives success or host unreachable or denied > > > kinda errors.. > > > > Why do you want both interfaces to be configured on the same subnet? > > that is not required as such, I am just preparing the setup to use this > machine a bridge and configure dummynet on this machine. You might try a different configuration for your testing. I suspect if you changed the IP address of sk0 to 192.168.1.2 or similar it would behave as you are expecting. > > > it just hangs over there.. and i can juz see one line of ping > > > not proceeding anyway. and if I terminate it via CTRL C then i get > > > statistics sumthing like 3 packets sent, 0 received and 100% > > > loss... > > > > This is probably expected behavior. What does "netstat -rn" show? My > > guess is that the route for 192.168.0.0/24 is "link#1" aka bge0 and > > since it's not plugged in to anything that's as far as it gets. > > btu it does not show any other interface in netstat printout with this > -rn switch > > and can you explain, how this is the expected behavior then..? There can only be one route at any time for any given network. When you bring up bge0 with 192.168.0.1 a route is automatically created for 192.168.0.0 pointing to that interface. When you then bring up sk0 with 192.168.0.2 no additional route can be added for 192.168.0.0 since there is already one present. Therefore ALL traffic destined for the 192.168.0.0 network will go out via bge0. In order to be able to ping 192.168.0.2 _locally_ you'd either need to connect the interfaces with a crossover cable (well, crossover isn't strictly necessary since gigabit ethernet adapters can figure it out on their own..) OR plug both interfaces into a switch/hub. Ping packet goes out bge0 (according to the route), across the wire and comes in on sk0 (destination address). The response would be delivered directly to bge0 (without going over the wire). Similarly, in order to be able to ping 192.168.0.2 from a second machine all _three_ interfaces would need to be connected to the same network segment (via a switch/hub, etc). Ping packet goes out from peer, across the wire and in on sk0 (destination address). Response goes out bge0 (according to route), across the other wire and back to the peer. I hope this helps you make sense of things. JN