From owner-freebsd-net@FreeBSD.ORG Sun Jul 22 15:44:18 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0B1116A419 for ; Sun, 22 Jul 2007 15:44:18 +0000 (UTC) (envelope-from freebsd-net@dino.sk) Received: from bsd.dino.sk (bsd.dino.sk [213.215.72.60]) by mx1.freebsd.org (Postfix) with ESMTP id 5269613C459 for ; Sun, 22 Jul 2007 15:44:18 +0000 (UTC) (envelope-from freebsd-net@dino.sk) Received: from fox.dino.sk (home.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by bsd.dino.sk with esmtp; Sun, 22 Jul 2007 17:46:11 +0200 id 00000038.46A37BC3.0000C003 From: Milan Obuch To: freebsd-net@freebsd.org Date: Sun, 22 Jul 2007 17:44:10 +0200 User-Agent: KMail/1.9.6 References: <51976.10.23.23.1.1185116844.squirrel@mail.weirdwire.ru> In-Reply-To: <51976.10.23.23.1.1185116844.squirrel@mail.weirdwire.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707221744.11119.freebsd-net@dino.sk> Subject: Re: Policy-based routing for packets originating from local machine ('reinject' packets back into kernel?) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2007 15:44:18 -0000 On Sunday 22 July 2007, m_wlist@weirdwire.ru wrote: > Hello. > ... > > At the moment I'm trying to get that working with netgraph's ngeth > interfaces. But they seem to behave in some really weird way. > Details: > # ifconfig ngeth0 10.42.42.1 netmask 255.255.255.250 Netmask 255.255.255.250 looks weird to me. Something like this is really unusual. What does ifconfig ngeth0 show? > # ngctl connect ngeth0: ngeth1: lower upper > # ngctl connect ngeth1: ngeth0: lower upper > ('tcpdump -ni ngeth0' on other terminal for great justice) > # ping 10.42.42.2 > (here after some delay I get 'host is down' messages with no output from > tcpdump). > # ping 10.42.42.5 > (broadcast address, gives nothing from ping, and 'blal blah 10.42.42.1 > > 10.42.42.5: ICMP echo request, blah' from tcpdump) > (here i change tcpdump from ngeth0 to ngeth1) > # ping 10.42.42.2 and # ping 10.42.42.3 > give 'host is down' from ping and nothing from tcpdump > # ping 10.42.42.4 > (LOL WUT!) still gives 'host is down' from ping, but tcpdump -ni ngeth1 > gives 'arp who-has 10.42.42.4 tell 10.42.42.1'! > > That raises two questins: > 1) Wtf is going on? > 2) How to make ngeth just send ip packet, avoiding that arp stuff (or is > there any other virtual interface devices available that do that)? > I can't comment on these question, but my recommendation would be to choose more usual mask - if it's not a typo, this could cause various interesting errors. Regards, Milan -- This address is used only for mailing list response. Do not send any personal messages to it, use milan in address instead.