Date: Wed, 13 Feb 2013 12:35:37 -0800 (PST) From: Jin Guojun <jguojun@sbcglobal.net> To: questions freebsd <questions@freebsd.org> Subject: Why ue0 do ARP on non local address when using static route? Message-ID: <1360787737.17354.YahooMailRC@web180906.mail.ne1.yahoo.com>
next in thread | raw e-mail | index | archive | help
This is 8.3-Release on a HP EliteBook 8460p (4-core i5) with an on board Intel (em0) interface. When attached a Trendent TU2-ET100 USB Ether dongle for a second interface, it has no problem to talk to the local network (10.234.37.0/24), but it has problem to talk to a remote network or host (10.227.148.0/24) via eu0 interface. When a remote host ping this host or this host ping that remote host, ARP request is always showing up. A static route is set and remote host is no part of the local sub net, why ARP is going on? Is any sysctl parameter can fix this problem? -Jin Internet: Destination Gateway Flags Refs Use Netif Expire default 10.234.16.1 UGS 0 2841993 em0 10.227.148.52 10.234.37.80 UHS 0 26 ue0 10.234.16.0/22 link#1 U 0 0 em0 10.234.17.41 link#1 UHS 0 0 lo0 10.234.37.0/24 link#8 U 0 3 ue0 10.234.37.80 link#8 UHS 0 0 lo0 127.0.0.1 link#7 UH 0 492 lo0 ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 00:50:b6:00:a4:91 inet 10.234.37.80 netmask 0xffffff00 broadcast 10.234.37.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active ping from 10.227.148.52 12:16:37.924425 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 1, length 64 12:16:37.924442 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:38.931919 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 2, length 64 12:16:38.931937 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:39.931662 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 3, length 64 12:16:39.931680 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:40.931656 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 4, length 64 12:16:40.931674 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:41.931519 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 5, length 64 12:16:41.931533 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:42.931643 IP 10.227.148.52 > 10.234.37.80: ICMP echo request, id 21002, seq 6, length 64 ping to 10.227.148.52 12:16:42.931661 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:16:59.724724 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:17:00.725715 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:17:01.725883 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:17:02.726690 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 12:17:03.727677 ARP, Request who-has 10.227.148.52 tell 10.234.37.80, length 28 ^C 45 packets captured 1557 packets received by filter From owner-freebsd-questions@FreeBSD.ORG Wed Feb 13 21:08:43 2013 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EEED5A62 for <freebsd-questions@freebsd.org>; Wed, 13 Feb 2013 21:08:43 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 6E759F5F for <freebsd-questions@freebsd.org>; Wed, 13 Feb 2013 21:08:42 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id r1DLD6DX003167; Wed, 13 Feb 2013 15:13:06 -0600 (CST) Date: Wed, 13 Feb 2013 15:13:06 -0600 (CST) From: Robert Bonomi <bonomi@mail.r-bonomi.com> Message-Id: <201302132113.r1DLD6DX003167@mail.r-bonomi.com> To: tundra@tundraware.com Subject: Re: Fun Scripting Problem In-Reply-To: <511BDB13.3060005@tundraware.com> Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 13 Feb 2013 21:08:44 -0000 > Date: Wed, 13 Feb 2013 12:27:31 -0600 > From: Tim Daneliuk <tundra@tundraware.com> > Subject: Fun Scripting Problem > > I know how to do this in Python, but I really want to do it in > straight Bourne shell. I have some ideas, but I thought I'd > give you folks a crack at this Big Fun: > > a) You have a directory of files - say they're logs - generated > at nondeterministic intervals. You may get more than one a day, > more than one a month, none, or hundreds. > > b) To conserve space, you want to keep the last file generated > in any given month (the archive goes back for an unspecified > number of years), and delete all the files generated prior to > that last file in that same month. > > c) Bonus points if the problem is solved generally for either files > or directories generated as described above. > > These are not actually logs, and no, I don't think logrotate can > do this ... or can it? here's a one-liner: rm ` \ stat -f "%SB %B %N" * \ | sort -k5nr \ | cut -c1-7,17-20,32- \ | awk 'BEGIN {a="";b=0;c=0} $1==a && $2==b && $3=c {print $4;}{a=$1;b=$2;c=$3}' \ ` This selects on creation date. change the B (both of them) in the stat call to use a different timestamp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1360787737.17354.YahooMailRC>