From owner-freebsd-questions@FreeBSD.ORG Wed Dec 17 20:00:20 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6810010656AB for ; Wed, 17 Dec 2008 20:00:20 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id 962958FC14 for ; Wed, 17 Dec 2008 20:00:19 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from smtp14.yandex.ru (smtp14.yandex.ru [77.88.32.84]) by forwards4.yandex.ru (Yandex) with ESMTP id 210004C55F6 for ; Wed, 17 Dec 2008 23:00:17 +0300 (MSK) Received: from 242-72-113-92.pool.ukrtel.net ([92.113.72.242]:62983 "EHLO HOMEUSER" smtp-auth: "kes-kes" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S393316AbYLQUAK (ORCPT ); Wed, 17 Dec 2008 23:00:10 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp14 X-Yandex-TimeMark: 1229544010 X-BornDate: 1149541200 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 2 X-Comment: RFC 2476 MSA function at smtp14.yandex.ru logged sender identity as: kes-kes Date: Wed, 17 Dec 2008 22:00:12 +0200 From: KES X-Mailer: The Bat! (v4.0.24) Professional Organization: SaftTen X-Priority: 3 (Normal) Message-ID: <453063781.20081217220012@yandex.ru> To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Cc: Subject: can not view which fib process is using X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: KES List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2008 20:00:20 -0000 Здравствуйте, Questions. How to view which FIB process if use? I cat setfib but I can not view later which fib use my FEATURE REEQUEST: implement option to 'ps' to view which FIB process is using Actually problem is next. I use 'torrentflux' I change index.php line 88 $command = "cd " . $cfg["path"] . $owner . "; HOME=".$cfg["path"]."; export HOME;"; -$command.= "nohup " .$cfg["btphpbin"] . " ".$runtime." ".$sharekill." ".$cfg["torrent_file_path"].$alias.".stat ".$owner." --response +$command.= " setfib ". rand(0,1) ." nohup " .$cfg["btphpbin"] . " ".$runtime." 20 ".$cfg["torrent_file_path"].$alias.".stat ".$owner. Notice 'setfib'. I use setfib here to run '/usr/local/libexec/btphptornado.py' to use default route 0 or default route 1. All instances of process that are using route 1 (setfib 1) are still go through route 0. kes# ifconfig ng0 ng0: flags=88d1 metric 0 mtu 1492 inet 92.113.8.197 --> 195.5.5.202 netmask 0xffffffff kes# ifconfig ng1 ng1: flags=88d1 metric 0 mtu 1492 inet 92.113.72.242 --> 195.5.5.203 netmask 0xffffffff kes# setfib 0 netstat -nr | less Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 195.5.5.202 UGS 0 16327188 ng0 .... kes# setfib 1 netstat -nr | less Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 195.5.5.203 UGS 0 3347279 ng1 .... Packets that must go through ng1 are going through ng0 kes# tcpdump -n -i ng0 src 92.113.72.242 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ng0, link-type NULL (BSD loopback), capture size 96 bytes 21:54:42.971565 IP 92.113.72.242.33695 > 92.101.188.147.3870: R 0:0(0) ack 3977401380 win 0 21:54:43.027593 IP 92.113.72.242.40835 > 85.140.114.68.2800: R 0:0(0) ack 3996727808 win 0 21:54:43.235059 IP 92.113.72.242.40835 > 91.203.63.6.3808: R 0:0(0) ack 20527351 win 0 21:54:43.256561 IP 92.113.72.242.40835 > 193.109.129.226.2741: R 0:0(0) ack 1518499679 win 0 21:54:43.532925 IP 92.113.72.242.33718 > 94.25.61.243.50889: R 0:0(0) ack 3839853583 win 0 21:54:43.579555 IP 92.113.72.242.48509 > 82.170.130.251.59315: R 0:0(0) ack 2768802435 win 0 21:54:43.677122 IP 92.113.72.242.48509 > 212.75.197.168.1212: R 0:0(0) ack 3327449055 win 0 21:54:43.772060 IP 92.113.72.242.40835 > 80.240.220.152.53482: R 0:0(0) ack 299780238 win 0 21:54:43.774576 IP 92.113.72.242.40835 > 94.178.211.178.3358: R 0:0(0) ack 2300749243 win 0 21:54:43.884896 IP 92.113.72.242.33718 > 87.118.120.249.4667: R 0:0(0) ack 597152031 win 0 21:54:43.888057 IP 92.113.72.242.40835 > 90.189.39.28.4046: R 0:0(0) ack 407943006 win 0 And arriving through ng1 kes# tcpdump -n -i ng1 dst 92.113.72.242 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ng1, link-type NULL (BSD loopback), capture size 96 bytes 21:55:02.965381 IP 85.113.139.248.12442 > 92.113.72.242.49197: S 3784250155:3784250155(0) win 65535 21:55:03.016658 IP 78.106.238.247.33710 > 92.113.72.242.40835: UDP, length 67 21:55:03.072568 IP 91.90.15.36.2451 > 92.113.72.242.39402: S 79361479:79361479(0) win 65535 21:55:03.385356 IP 93.135.205.93.4432 > 92.113.72.242.40835: S 1774379497:1774379497(0) win 32767 21:55:03.429475 IP 69.9.105.209.50863 > 92.113.72.242.40835: S 2727062150:2727062150(0) win 65535 21:55:03.537588 IP 94.158.32.107.3004 > 92.113.72.242.48509: S 1587739071:1587739071(0) win 16384 21:55:03.853375 IP 86.57.159.146.29687 > 92.113.72.242.40835: S 426526591:426526591(0) win 65535 21:55:04.187938 IP 81.88.114.216.44433 > 92.113.72.242.40835: UDP, length 67 21:55:04.209383 IP 79.140.170.10.56778 > 92.113.72.242.40835: S 124589897:124589897(0) win 64240 21:55:04.247917 IP 193.17.174.6.3893 > 92.113.72.242.33718: S 94220847:94220847(0) win 65535 21:55:04.315516 IP 89.109.14.126.1319 > 92.113.72.242.40835: S 2033078660:2033078660(0) win 65535 21:55:04.453367 IP 194.187.50.165.1681 > 92.113.72.242.40835: S 3973432781:3973432781(0) win 65535 21:55:04.638606 IP 78.45.120.164.17477 > 92.113.72.242.48509: UDP, length 103 kes# ipfw show 00001 4008 2372149 allow ip from any to any 65535 0 0 deny ip from any to any It this BUG or I miss something? -- С уважением, KES mailto:kes-kes@yandex.ru