From owner-freebsd-questions@FreeBSD.ORG Thu Feb 5 06:58:59 2004 Return-Path: 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 90BC316A4CE for ; Thu, 5 Feb 2004 06:58:59 -0800 (PST) Received: from mbox.techno-link.com (fatboy.spnet.net [212.50.0.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 72CEC43D41 for ; Thu, 5 Feb 2004 06:58:55 -0800 (PST) (envelope-from alexb@mail.bg) Received: (qmail 30110 invoked by uid 64014); 5 Feb 2004 14:58:52 -0000 Received: from alexb@mail.bg by weber by uid 64011 with qmail-scanner-1.20rc1 ( Clear:RC:1:. Processed in 0.047427 secs); 05 Feb 2004 14:58:52 -0000 Received: from unknown (HELO vovin.spnet.net) (212.50.0.9) by weber.techno-link.com with SMTP; 5 Feb 2004 14:58:51 -0000 Received: (qmail 1289 invoked from network); 5 Feb 2004 14:58:51 -0000 Received: from unknown (HELO telcom-t2d1w7kn) (195.149.250.81) by vovin.spnet.net with SMTP; 5 Feb 2004 14:58:51 -0000 Received: from 195-149-253-172.PPPoE-dynamic.HomeLan.bg ([195.149.253.172]) by telcom-t2d1w7kn (602Pro LAN SUITE 2003) id 303f59c9 for freebsd-questions@freebsd.org; Thu, 5 Feb 2004 16:59:54 +0200 Message-ID: <00a301c3ebf8$bd939b50$0200a8c0@ALIENX> From: "Alexander Botov" To: Date: Thu, 5 Feb 2004 17:00:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: RE: forwarding with ttl=1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 14:58:59 -0000 > > The problem is that the ISP's > > gateway returns every time packets with ttl=1 which makes > > further forwarding impossible . My gateway returns icmp error > > mesage "time exceeded" and discards packets . > > TTL (Time To Live) is a counter value in an IP packet that gets > decremented > by every "hop" (router). When it reaches a value of zero, the packet is > discarded. > > Using a TTL of 1 isn't going to be very useful as your packets will all be > discarded at the first router. This is working as intended. > That's what I mean . The incoming packets are with TTL=1 and my gateway cannot forward them to the local network . Probably the reason is that the ISP doesn't want from his clients to share one Internet connection between different machines in the local network . I dont have problem with outgoing packets . here is the code fragment from ip_forward() in ip_input.c /usr/src/sys/netinet/ip_input.c : if (ip->ip_ttl <= IPTTLDEC) { //Yes !!! the TTL == 1 icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS,0, 0); return; } and further: ip->ip_ttl -= IPTTLDEC; when i execute netstat -s there is a big number of icmp time exceed errors indicating that the packets are discarded because of TTL expiration I need a way to avoid this . Thanks