Перейти к содержимому
Калькуляторы

muchacho

Пользователи
  • Публикации

    62
  • Зарегистрирован

  • Посещение

Все публикации пользователя muchacho


  1. Дело не в передаче пароля. Дело в том, что accel-cmd в моём случае вобще нормально не отрабатывает, с пайпом, без пайпа - разницы нет. netcat хотябы без пайпа отрабатывает нормально. И я не могу понять в чём дело, единственное что я смог нарыть это сообщение connection reset by peer.
  2. не думаю что в этом дело. Пробовал очищать iptables полностью - всё тоже самое.
  3. А как передать пароль без пайпа? netcat без пайпа отрабатывает отлично. accel-cmd c пайпом показывает часть и вываливается с сообщением accel_read,168: Impossible to read input: read() failed: Connection reset by peer , без пайпа тоже самое, но не завершается и сообщения этого нет. Это всё нужно не для кол-ва сессий, просто кол-во сессий наглядно показывает проблему.
  4. Тут вобще мистика какая-то. Есть старые сервера, собирались примерно полгода назад. С них netcat-ом список сессий получается без проблем отовсюду. Есть новый сервер, собирался из гита на прошлой неделе. С него netcat-ом одной строкой на некоторых компах список сессий снимается нормально, на некоторых снимается только какая-то часть(обрывается резко, посреди строки, нет даже \n последнего). При этом если делать не одной строкой, а muchacho@muchacho ~ $ nc 192.168.5.24 2001 Password show sessions , то показывает все сессии нормально.
  5. Добрый день! Помогите, пожалуйста, сломал себе весь мозг уже. На некоторых компах наблюдаю такую картину: muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip,type,uptime\nexit\n" |ncat 192.168.5.24 2001 | wc -l 475 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip,type,uptime\nexit\n" |ncat 192.168.5.24 2001 | wc -l 452 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip,type,uptime\nexit\n" |ncat 192.168.5.24 2001 | wc -l 470 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.24 2001 | wc -l 690 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.24 2001 | wc -l 690 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.24 2001 | wc -l 690 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname\nexit\n" |ncat 192.168.5.24 2001 | wc -l 994 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname\nexit\n" |ncat 192.168.5.24 2001 | wc -l 993 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname\nexit\n" |ncat 192.168.5.24 2001 | wc -l 992 Такое ощущение что во что-то упирается, но при этом если смотреть телнетом, то всё отлично. На другие сервера(старые), показывает нормально: muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.23 2001 | wc -l 1040 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.23 2001 | wc -l 1040 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.23 2001 | wc -l 1040 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.6 2001 | wc -l 1174 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.6 2001 | wc -l 1174 muchacho@muchacho ~ $ echo -e "Password\nshow sessions ifname,username,ip\nexit\n" |ncat 192.168.5.6 2001 | wc -l 1174
  6. Незачто, чисто случайно получилось.
  7. Добрый день! Собрал из гита. Сервер стартует, но при попытке подключения к нему сегфолтится. Логи: [2014-01-17 14:22:02]: msg: accel-ppp version 42b8eaa35951e5381a7963d6bded7fa28b9b1713 [2014-01-17 14:22:16]: info: recv [PPPoE PADI 00:15:f2:7d:7f:c8 => ff:ff:ff:ff:ff:ff sid=0000 <Service-Name > <Host-Uniq 070000000c000000>] [2014-01-17 14:22:16]: info: send [PPPoE PADO 00:1b:21:5b:99:08 => 00:15:f2:7d:7f:c8 sid=0000 <AC-Name pppoe> <Service-Name pppoe> <Service-Name > <AC-Cookie 7a2fb87dbab7092529aa3e8b8da3bfa6bb9fdde44078329f> <Host-Uniq 070000000c000000>] [2014-01-17 14:22:16]: info: recv [PPPoE PADR 00:15:f2:7d:7f:c8 => 00:1b:21:5b:99:08 sid=0000 <Service-Name > <Host-Uniq 070000000d000000> <AC-Cookie 7a2fb87dbab7092529aa3e8b8da3bfa6bb9fdde44078329f>] [2014-01-17 14:22:16]: info: send [PPPoE PADS 00:1b:21:5b:99:08 => 00:15:f2:7d:7f:c8 sid=0001 <AC-Name pppoe> <Service-Name > <Host-Uniq 070000000d000000>] [2014-01-17 14:22:16]: info: ppp0: connect: ppp0 <--> pppoe(00:15:f2:7d:7f:c8) [2014-01-17 14:22:16]: debug: ppp0: lcp_layer_init [2014-01-17 14:22:16]: debug: ppp0: auth_layer_init [2014-01-17 14:22:16]: debug: ppp0: ccp_layer_init [2014-01-17 14:22:16]: debug: ppp0: ipcp_layer_init [2014-01-17 14:22:16]: debug: ppp0: ipv6cp_layer_init [2014-01-17 14:22:16]: debug: ppp0: ppp established gdb --args /usr/local/sbin/accel-pppd -p /var/run/accel-pppd.pid -c /etc/accel-ppp.conf GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/sbin/accel-pppd...done. (gdb) run Starting program: /usr/local/sbin/accel-pppd -p /var/run/accel-pppd.pid -c /etc/accel-ppp.conf warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff5b6a700 (LWP 21450)] [New Thread 0x7ffff7ff5700 (LWP 21451)] [New Thread 0x7ffff3022700 (LWP 21452)] [New Thread 0x7ffff2f21700 (LWP 21453)] [New Thread 0x7ffff2e20700 (LWP 21454)] [New Thread 0x7ffff2d1f700 (LWP 21455)] [New Thread 0x7ffff2c1e700 (LWP 21456)] [New Thread 0x7ffff241d700 (LWP 21457)] [Thread 0x7ffff7ff5700 (LWP 21451) exited] [New Thread 0x7ffff7ff5700 (LWP 21458)] Program received signal SIGSEGV, Segmentation fault. [switching to Thread 0x7ffff2e20700 (LWP 21454)] 0x000000000041f3cf in iplink_get_stats (ifindex=140, stats=0x7ffff2e1fc90) at /usr/src/accel-ppp.git/accel-pppd/libnetlink/iputils.c:163 163} uname -a Linux pppoe 3.12-0.bpo.1-amd64 #1 SMP Debian 3.12.6-2~bpo70+1 (2014-01-07) x86_64 GNU/Linux Методом научного тыка поменял в /usr/src/accel-ppp.git/accel-pppd/libnetlink/iputils.c Было: int __export iplink_get_stats(int ifindex, struct rtnl_link_stats *stats) { struct iplink_req { struct nlmsghdr n; struct ifinfomsg i; char buf[1024]; } req; Стало: int __export iplink_get_stats(int ifindex, struct rtnl_link_stats *stats) { struct iplink_req { struct nlmsghdr n; struct ifinfomsg i; char buf[4096]; } req; Теперь сессия подымается, с виду всё работает нормально. Посмотрите, пожалуйста, можно ли ставить в продакшн.
  8. Спасибо, вроде заработало.
  9. ifcfg добавил - ничего не изменилось. start=dhcpv4 - мне, как я понял, не подойдёт. Мне нужно без авторизации и dhcp, поэтому noauth=1 и start=up. Может быть проблема в error: ipoe0: failed to set peer IPv4 address: Cannot assign requested address ? Как я могу подебажить это? Без установленых сессий: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:15:17:94:fd:02 brd ff:ff:ff:ff:ff:ff inet хх.хх.хх.хх/24 brd хх.хх.хх.хх scope global eth0 inet6 fe80::215:17ff:fe94:fd02/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:15:17:94:fd:03 brd ff:ff:ff:ff:ff:ff inet6 fe80::215:17ff:fe94:fd03/64 scope link valid_lft forever preferred_lft forever 172: eth1.4074@eth1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:15:17:94:fd:03 brd ff:ff:ff:ff:ff:ff inet6 fe80::215:17ff:fe94:fd03/64 scope link valid_lft forever preferred_lft forever После установления сессии появляется ipoe0: 188: ipoe0: <POINTOPOINT,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100 link/ether 00:15:17:94:fd:03 peer ff:ff:ff:ff:ff:ff inet6 fe80::215:17ff:fe94:fd03/64 scope link valid_lft forever preferred_lft forever Почему он ipoe0? Насколько я понимаю должен быть eth1.4074.ipoe0?
  10. Господа помогите, сломал себе уже весь мозг. Пытаюсь настроить простенький IPoE: [ipoe] noauth=1 mode=L2 shared=1 start=up interface=eth1.4074,range=192.168.4.0/24 local-net=192.168.4.0/24 В логе получаю: [2013-10-29 16:59:27]: info: ipoe: start interface eth1.4074 (range=192.168.4.0/24) [2013-10-29 16:59:27]: msg: accel-ppp version c19c04567bbe0bcd6631485795311cf83a07e5fc [2013-10-29 16:59:28]: info: : 192.168.4.10: authentication succeeded [2013-10-29 16:59:28]: error: ipoe0: failed to set peer IPv4 address: Cannot assign requested address [2013-10-29 16:59:28]: info: ipoe0: ipoe: session started [2013-10-29 16:59:28]: info: ipoe0: pppd_compat: ip-up started (pid 32011) [2013-10-29 16:59:28]: info: ipoe0: pppd_compat: ip-up finished (0) Интерфейс ipoe0 появляется. Никакие адреса и маршруты никуда не добавляются, естественно ничего не работает. Если сделать ifconfig ipoe0 192.168.4.1/24 начинает работать.
  11. Линки есть, пути задавал, не помогает. Что-то я делаю не так. Обновился до testing, там ядро 3.9 помоему 8. Модуль собирается. Делаю: apt-get install linux-source-3.9 cd /usr/src/linux-source-3.9 make mrproper cp /boot/config-3.9-1-amd64 /usr/src/linux-source-3.9/.config make oldconfig make-kpkg clean make-kpkg --initrd --revision="123" kernel-image kernel-headers dpkg -i linux-image-3.9.8_123_amd64.deb linux-headers-3.9.8_123_amd64.deb Перезагружаюсь - модуль не собирается. Может кто-нибудь подскажет что я могу делать не так?
  12. Да, ядро собиралось. Debian 7. fakeroot make-kpkg --initrd kernel-image kernel-headers Файлика asm/linkage.h действительно нет, но в стоковом ядре его тоже нет, а модуль собирается без проблем.
  13. Этот патч я пробовал. После него получается такое: /usr/src/ipt-netflow# make all gcc -O2 -Wall -Wunused -I/lib/modules/3.9.6-custom/build/include -DIPTABLES_VERSION=\"1.4.14\" -I../iptables-1.4.14/include -fPIC -o libipt_NETFLOW_sh.o -c libipt_NETFLOW.c In file included from /usr/include/linux/posix_types.h:4:0, from /lib/modules/3.9.6-custom/build/include/uapi/linux/types.h:13, from /lib/modules/3.9.6-custom/build/include/linux/types.h:5, from ../iptables-1.4.14/include/xtables.h:17, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/stddef.h:11:2: error: expected identifier before numeric constant In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:14:26: error: conflicting types for ‘fd_set’ In file included from /usr/include/x86_64-linux-gnu/sys/types.h:220:0, from /usr/include/stdlib.h:320, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/select.h:78:5: note: previous declaration of ‘fd_set’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:15:25: error: conflicting types for ‘dev_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:61:17: note: previous declaration of ‘dev_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:19:17: error: conflicting types for ‘nlink_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:76:19: note: previous declaration of ‘nlink_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:25:26: error: conflicting types for ‘timer_t’ In file included from /usr/include/x86_64-linux-gnu/sys/types.h:133:0, from /usr/include/stdlib.h:320, from libipt_NETFLOW.c:25: /usr/include/time.h:104:19: note: previous declaration of ‘timer_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:29:17: error: two or more data types in declaration specifiers /lib/modules/3.9.6-custom/build/include/linux/types.h:29:1: warning: useless type name in empty declaration [enabled by default] /lib/modules/3.9.6-custom/build/include/linux/types.h:45:26: error: conflicting types for ‘loff_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:45:18: note: previous declaration of ‘loff_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:111:17: error: conflicting types for ‘uint64_t’ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdint.h:3:0, from /usr/include/netinet/in.h:24, from libipt_NETFLOW.c:29: /usr/include/stdint.h:56:27: note: previous declaration of ‘uint64_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:112:17: error: conflicting types for ‘u_int64_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:204:1: note: previous declaration of ‘u_int64_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:113:17: error: conflicting types for ‘int64_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:198:1: note: previous declaration of ‘int64_t’ was here In file included from ../iptables-1.4.14/include/xtables.h:17:0, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/types.h:134:23: error: conflicting types for ‘blkcnt_t’ In file included from /usr/include/stdlib.h:320:0, from libipt_NETFLOW.c:25: /usr/include/x86_64-linux-gnu/sys/types.h:236:20: note: previous declaration of ‘blkcnt_t’ was here In file included from /lib/modules/3.9.6-custom/build/include/linux/netfilter.h:4:0, from ../iptables-1.4.14/include/xtables.h:18, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/init.h:156:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘load_default_modules’ /lib/modules/3.9.6-custom/build/include/linux/init.h:256:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_param’ /lib/modules/3.9.6-custom/build/include/linux/init.h:257:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_options’ In file included from /lib/modules/3.9.6-custom/build/include/linux/kernel.h:6:0, from /lib/modules/3.9.6-custom/build/include/linux/skbuff.h:17, from /lib/modules/3.9.6-custom/build/include/linux/netfilter.h:5, from ../iptables-1.4.14/include/xtables.h:18, from ../iptables-1.4.14/include/iptables.h:5, from libipt_NETFLOW.c:36: /lib/modules/3.9.6-custom/build/include/linux/linkage.h:5:25: fatal error: asm/linkage.h: No such file or directory compilation terminated. make: *** [libipt_NETFLOW.so] Error 1
  14. У кого-нибудь получилось собрать для 3.9.6?
  15. Разобрался с большим кол-вом перрываний. Запущеный perf top и oprofile даёт такой эффект. Попробовал посмотреть oprofile, вот что получилось: root@router:/usr/lib/debug/boot# opreport Overflow stats not available CPU: Core 2, speed 2494.2 MHz (estimated) Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000 CPU_CLK_UNHALT...| samples| %| ------------------ 3688718 71.8508 vmlinux-2.6.32-5-686-bigmem 383939 7.4786 igb 284001 5.5319 nf_conntrack 231999 4.5190 cls_u32 187539 3.6530 sch_htb 72640 1.4149 ip_tables 46089 0.8977 nf_nat 41489 0.8081 bonding 41002 0.7987 ifb 33392 0.6504 ip_set_nethash 23144 0.4508 oprofiled root@router:/usr/lib/debug/boot# opreport -l vmlinux-2.6.32-5-686-bigmem CPU: Core 2, speed 2494.2 MHz (estimated) Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000 samples % symbol name 381248 10.3355 dev_queue_xmit 330145 8.9501 skb_copy_bits 243404 6.5986 __slab_alloc 164481 4.4590 sch_direct_xmit 143361 3.8865 mwait_idle 133106 3.6085 __slab_free 129585 3.5130 ip_route_input 110956 3.0080 pskb_expand_head 102707 2.7844 __copy_skb_header 92208 2.4997 netif_receive_skb 86645 2.3489 __alloc_skb 83237 2.2565 skb_release_head_state 74389 2.0167 skb_release_data 71011 1.9251 add_partial 68307 1.8518 kmem_cache_free 62780 1.7019 kmem_cache_alloc 57310 1.5537 ip_rcv 49509 1.3422 dev_get_by_index 43471 1.1785 kfree 43301 1.1739 nf_iterate 39861 1.0806 ktime_get 38992 1.0571 __kmalloc_track_caller Может это чем-то поможет. По поводу iptables - сегодня попробую совсем убрать правила из filter, если что-то изменится отпишусь.
  16. Спасибо большое, попробую. Я могу попробовать вобще убрать эти правила, но имеет ли смысл? 271K 62M mailusers tcp -- bond1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 сматчилось всего 270к пакетов за 3 дня, думаю погоды это не сделает. А как тут переделать? Я итак оставил самое нужное и если что-то переделывать, то получу только лишние правила.
  17. Есть ifb, bond, ipt_NETFLOW(но пока не используется). Сейчас в настройках коннтрака: net.ipv4.netfilter.ip_conntrack_generic_timeout = 300 net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_sent = 120 net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_sent2 = 120 net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 60 net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 14400 net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 120 net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait = 60 net.ipv4.netfilter.ip_conntrack_tcp_timeout_last_ack = 30 net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 120 net.ipv4.netfilter.ip_conntrack_tcp_timeout_close = 10 net.ipv4.netfilter.ip_conntrack_tcp_timeout_max_retrans = 300 net.ipv4.netfilter.ip_conntrack_tcp_loose = 1 net.ipv4.netfilter.ip_conntrack_tcp_be_liberal = 0 net.ipv4.netfilter.ip_conntrack_tcp_max_retrans = 3 net.ipv4.netfilter.ip_conntrack_udp_timeout = 30 net.ipv4.netfilter.ip_conntrack_udp_timeout_stream = 180 net.ipv4.netfilter.ip_conntrack_icmp_timeout = 30 net.ipv4.netfilter.ip_conntrack_max = 1048576 net.ipv4.netfilter.ip_conntrack_count = 158174 net.ipv4.netfilter.ip_conntrack_buckets = 1048576 net.ipv4.netfilter.ip_conntrack_checksum = 1 net.ipv4.netfilter.ip_conntrack_log_invalid = 0 Что можно ещё уменьшить без ущерба?
  18. А какое ядро вы порекомендуете?
  19. Debian GNU/Linux 6.0.3 (squeeze), 2.6.32-5-686-bigmem Пороюсь в коннтраке, может найду что-нибудь лишнее. С прерываниями вобще не понятно. mpstat говорит: 04:09:13 PM CPU intr/s 04:09:14 PM all 122334.00 04:09:14 PM 0 2687.00 04:09:14 PM 1 2768.00 04:09:14 PM 2 1.00 04:09:14 PM 3 3069.00 04:09:14 PM 4 3038.00 04:09:14 PM 5 3073.00 04:09:14 PM 6 3.00 04:09:14 PM 7 2911.00 Т.е. На каждом ядре около 3000, а сумма - 120к. Это как понять можно? Вот я и пытаюсь понять где оно может быть. По идее роутера должно хватать прожевать без проблем 1Г, тут на форуме показывают значительно лучше результаты, даже НАТ на 10Г был, а тут несчаснтых 800Мбит и захлёбывается.
  20. Не могу понять что такое 79924.00 - 16.9% : _spin_lock и почему он такой большой.
  21. Так и есть, сейчас нагружены 4 ядра из 8-ми, планируется добавить ещё 2 интерфейса и нагрузить остальные 4. Попробую irqbalance или добавлю ещё очередей. Debian GNU/Linux 6.0.3, ядро родное 2.6.32-5-686-bigmem. Шейпер сделан на htb с u32 хешем. Правила iptables: Chain FORWARD (policy ACCEPT 25G packets, 23T bytes) pkts bytes target prot opt in out source destination 174K 12M RETURN all -- bond1 * 0.0.0.0/0 0.0.0.0/0 match-set localnets dst 2162K 238M DROP all -- bond1 * 0.0.0.0/0 192.168.0.0/16 267K 61M mailusers tcp -- bond1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 Chain OUTPUT (policy ACCEPT 491K packets, 83M bytes) pkts bytes target prot opt in out source destination Chain mailusers (1 references) pkts bytes target prot opt in out source destination 32883 48M RETURN all -- * * 0.0.0.0/0 193.93.48.0/22 0 0 RETURN all -- * * 0.0.0.0/0 194.33.181.0/24 0 0 RETURN all -- * * 192.168.110.230 0.0.0.0/0 111 89205 RETURN all -- * * 192.168.134.52 0.0.0.0/0 0 0 RETURN all -- * * 192.168.101.90 0.0.0.0/0 0 0 RETURN all -- * * 192.168.111.110 0.0.0.0/0 0 0 RETURN all -- * * 192.168.59.16 0.0.0.0/0 0 0 RETURN all -- * * 192.168.101.227 0.0.0.0/0 0 0 RETURN all -- * * 192.168.100.50 0.0.0.0/0 0 0 RETURN all -- * * 192.168.100.100 0.0.0.0/0 0 0 RETURN all -- * * 192.168.100.150 0.0.0.0/0 0 0 RETURN all -- * * 192.168.110.118 0.0.0.0/0 0 0 RETURN all -- * * 192.168.111.110 0.0.0.0/0 0 0 RETURN all -- * * 192.168.111.128 0.0.0.0/0 0 0 RETURN all -- * * 192.168.111.229 0.0.0.0/0 0 0 RETURN all -- * * 10.35.0.56 0.0.0.0/0 60 58043 RETURN all -- * * 10.24.0.55 0.0.0.0/0 0 0 RETURN all -- * * 192.168.140.55 0.0.0.0/0 0 0 RETURN all -- * * 0.0.0.0/0 192.168.140.55 1791 1887K RETURN all -- * * 10.16.0.132 0.0.0.0/0 0 0 RETURN all -- * * 10.48.0.85 0.0.0.0/0 0 0 RETURN all -- * * 0.0.0.0/0 10.48.0.85 233K 11M DROP all -- * * 0.0.0.0/0 0.0.0.0/0 NAT: Chain PREROUTING (policy ACCEPT 579M packets, 41G bytes) num pkts bytes target prot opt in out source destination 1 11M 1079M dnat all -- * * 0.0.0.0/0 0.0.0.0/0 match-set dnat dst Chain POSTROUTING (policy ACCEPT 11M packets, 1080M bytes) num pkts bytes target prot opt in out source destination 1 807 45106 ACCEPT all -- * * 0.0.0.0/0 192.168.1.0/24 2 15M 1224M snat all -- * bond0 0.0.0.0/0 0.0.0.0/0 match-set snat src 3 11 760 SNAT all -- * bond0 192.168.5.0/24 0.0.0.0/0 to:XX.XXX.XX.1 ..... .....тут ещё 58 аналогичных правил ..... 61 630K 45M SNAT all -- * bond0 10.56.0.0/22 0.0.0.0/0 to:XX.XXX.XX.90 Chain OUTPUT (policy ACCEPT 782 packets, 40858 bytes) num pkts bytes target prot opt in out source destination Chain dnat (1 references) num pkts bytes target prot opt in out source destination 1 125K 14M DNAT all -- * * 0.0.0.0/0 ХХ.ХХХ.ХХ.1 to:192.168.130.126 ..... ..... тут 37 аналогичных правил ..... 38 27020 2116K DNAT all -- * * 0.0.0.0/0 ХХ.ХХХ.ХХ.30 to:10.52.0.94 Chain snat (1 references) num pkts bytes target prot opt in out source destination 1 274K 25M SNAT all -- * * 192.168.130.126 0.0.0.0/0 to:ХХ.ХХХ.ХХ.1 ..... ..... тут 51 аналогичное правило ..... 52 41617 2937K SNAT all -- * * 10.52.0.94 0.0.0.0/0 to:ХХ.ХХХ.ХХ.30
  22. Помогите, пожалуйста, с проблемой. Есть роутер с 2 Intel® Xeon® CPU E5420 @ 2.50GHz и 2 Intel Corporation 82576 Gigabit Network Connection. igb RSS=2,2,2,2 QueuePairs=0,0,0,0 Прерывания прибиты к ядрам. root@router:/etc# ethtool -i eth0 driver: igb version: 3.2.10 firmware-version: 1.5-1 bus-info: 0000:03:00.0 root@router:/etc# ethtool -i eth2 driver: igb version: 3.2.10 firmware-version: 1.2-1 bus-info: 0000:0a:00.0 root@router:/etc# ethtool -c eth0 Coalesce parameters for eth0: Adaptive RX: off TX: off stats-block-usecs: 0 sample-interval: 0 pkt-rate-low: 0 pkt-rate-high: 0 rx-usecs: 325 rx-frames: 0 rx-usecs-irq: 0 rx-frames-irq: 0 tx-usecs: 325 tx-frames: 0 tx-usecs-irq: 0 tx-frames-irq: 128 rx-usecs-low: 0 rx-frame-low: 0 tx-usecs-low: 0 tx-frame-low: 0 rx-usecs-high: 0 rx-frame-high: 0 tx-usecs-high: 0 tx-frame-high: 0 root@router:/etc# ethtool -c eth2 Coalesce parameters for eth2: Adaptive RX: off TX: off stats-block-usecs: 0 sample-interval: 0 pkt-rate-low: 0 pkt-rate-high: 0 rx-usecs: 325 rx-frames: 0 rx-usecs-irq: 0 rx-frames-irq: 0 tx-usecs: 325 tx-frames: 0 tx-usecs-irq: 0 tx-frames-irq: 128 rx-usecs-low: 0 rx-frame-low: 0 tx-usecs-low: 0 tx-frame-low: 0 rx-usecs-high: 0 rx-frame-high: 0 tx-usecs-high: 0 tx-frame-high: 0 root@router:/etc# ethtool -k eth0 Offload parameters for eth0: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp-segmentation-offload: off udp-fragmentation-offload: off generic-segmentation-offload: off generic-receive-offload: off large-receive-offload: off ntuple-filters: off receive-hashing: off root@router:/etc# ethtool -k eth2 Offload parameters for eth2: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp-segmentation-offload: off udp-fragmentation-offload: off generic-segmentation-offload: off generic-receive-offload: off large-receive-offload: off ntuple-filters: off receive-hashing: off root@router:/etc# ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardware settings: RX: 2048 RX Mini: 0 RX Jumbo: 0 TX: 2048 root@router:/etc# ethtool -g eth2 Ring parameters for eth2: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardware settings: RX: 2048 RX Mini: 0 RX Jumbo: 0 TX: 2048 На маршрутизаторе iptables (около 50 правил в всех таблицах), NAT (до 200к записей в пике в conntrack), ipset, шейпинг htb с хешем. Каждый интерфейс в своём bond (планируется добавить ещё по одному интерфейсу в каждый bond, чтоб пропустить 2Г), на одном из bond навешены ifb чтоб отделить трафик который нужно шейпить, от того который не нужно. Собственно проблема в очень большой нагрузке. В данный момент IN/OUT PPS - 63k/47k, IN/OUT MbitPS - 600/200, NAT - 100k. При этом: mpstat -P ALL 5 12:05:55 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 12:06:00 PM all 1.52 0.00 4.12 0.00 0.02 21.68 0.00 0.00 72.65 12:06:00 PM 0 1.79 0.00 2.79 0.00 0.00 48.41 0.00 0.00 47.01 12:06:00 PM 1 1.80 0.00 4.20 0.00 0.00 45.60 0.00 0.00 48.40 12:06:00 PM 2 1.66 0.00 5.19 0.00 0.00 5.39 0.00 0.00 87.76 12:06:00 PM 3 1.00 0.00 5.41 0.00 0.00 9.62 0.00 0.00 83.97 12:06:00 PM 4 1.80 0.00 4.41 0.00 0.00 30.66 0.00 0.00 63.13 12:06:00 PM 5 1.79 0.00 4.38 0.00 0.00 24.90 0.00 0.00 68.92 12:06:00 PM 6 1.77 0.00 3.35 0.00 0.00 4.13 0.00 0.00 90.75 12:06:00 PM 7 0.78 0.00 3.52 0.00 0.00 4.50 0.00 0.00 91.19 12:06:00 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 12:06:05 PM all 1.40 0.00 3.74 0.00 0.00 23.16 0.00 0.00 71.70 12:06:05 PM 0 1.40 0.00 4.00 0.00 0.00 49.60 0.00 0.00 45.00 12:06:05 PM 1 2.20 0.00 3.81 0.00 0.00 48.30 0.00 0.00 45.69 12:06:05 PM 2 0.83 0.00 3.73 0.00 0.00 6.00 0.00 0.00 89.44 12:06:05 PM 3 1.02 0.00 3.07 0.00 0.00 8.61 0.00 0.00 87.30 12:06:05 PM 4 0.60 0.00 3.19 0.00 0.00 32.93 0.00 0.00 63.27 12:06:05 PM 5 2.59 0.00 4.58 0.00 0.00 29.08 0.00 0.00 63.75 12:06:05 PM 6 1.57 0.00 4.91 0.00 0.00 4.91 0.00 0.00 88.61 12:06:05 PM 7 0.60 0.00 2.59 0.00 0.00 5.39 0.00 0.00 91.42 12:06:05 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 12:06:10 PM all 1.40 0.00 3.51 0.00 0.00 22.43 0.00 0.00 72.66 12:06:10 PM 0 1.40 0.00 3.59 0.00 0.00 51.70 0.00 0.00 43.31 12:06:10 PM 1 2.40 0.00 4.39 0.00 0.00 46.31 0.00 0.00 46.91 12:06:10 PM 2 1.03 0.00 3.90 0.00 0.00 6.78 0.00 0.00 88.30 12:06:10 PM 3 1.21 0.00 3.43 0.00 0.00 9.68 0.00 0.00 85.69 12:06:10 PM 4 1.80 0.00 4.00 0.00 0.00 29.60 0.00 0.00 64.60 12:06:10 PM 5 1.20 0.00 3.19 0.00 0.00 27.35 0.00 0.00 68.26 12:06:10 PM 6 1.20 0.00 2.59 0.00 0.00 3.39 0.00 0.00 92.81 12:06:10 PM 7 0.99 0.00 2.98 0.00 0.00 4.37 0.00 0.00 91.67 perf top ------------------------------------------------------------------------------ PerfTop: 19730 irqs/sec kernel:98.3% [100000 cpu-clock-msecs], (all, 8 CPUs) ------------------------------------------------------------------------------ samples pcnt kernel function _______ _____ _______________ 34536.00 - 11.8% : _spin_lock 18217.00 - 6.2% : skb_copy_bits 13841.00 - 4.7% : u32_classify [cls_u32] 13771.00 - 4.7% : _spin_unlock_irqrestore 13008.00 - 4.4% : kmem_cache_alloc 12824.00 - 4.4% : igb_poll [igb] 10780.00 - 3.7% : kmem_cache_free 8755.00 - 3.0% : ip_route_input 7649.00 - 2.6% : igb_xmit_frame_ring [igb] 6698.00 - 2.3% : dev_queue_xmit 6277.00 - 2.1% : kfree 6050.00 - 2.1% : __copy_skb_header 5731.00 - 2.0% : pskb_expand_head 5531.00 - 1.9% : __do_softirq 5017.00 - 1.7% : __alloc_skb procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 6151584 206436 1618820 0 0 0 3 13 7 0 20 80 0 1 0 0 6150872 206436 1618820 0 0 0 0 116847 34643 2 25 73 0 1 0 0 6151704 206436 1618820 0 0 0 0 118598 32630 2 24 74 0 1 0 0 6150968 206436 1618820 0 0 0 0 117567 34482 2 25 73 0 1 0 0 6151288 206436 1618820 0 0 0 0 117889 31754 1 25 74 0 1 0 0 6151316 206436 1618820 0 0 0 0 116462 35088 1 23 75 0 2 0 0 6151316 206436 1618820 0 0 0 0 117081 35311 2 25 74 0 1 0 0 6151508 206436 1618820 0 0 0 0 118049 34498 2 26 73 0 Подскажите, пожалуйста, куда копнуть и что можно крутнуть чтоб выжать побольше, ато вечерами, при трафике 800-950Мбит и, примерно, 120ппс, нагрузка на ядрах доходит до 80-90%.
  23. Добрый день! Не могу поднять l2tp тунель с TP-LINK WR1043. Во-первых проблемы с avp: l2tp: incorrect avp received (type=6, M=1, must be 0) l2tp: incorrect avp received (type=8, M=1, must be 0) Подправил словари, всеравно не подключается. В логах: : : recv [L2TP tid=0 sid=0 Ns=0 Nr=0 <Message-Type Start-Ctrl-Conn-Request> <Protocol-Version 256> <Framing-Capabilities 3> <Bearer-Capabilities 0> <Firmware-Revision 1680> <Host-Name TL-WR1043ND> <Vendor-Name xelerance.com> <Assigned-Tunnel-ID -29403> <Recv-Window-Size 4>] : : send [L2TP tid=36133 sid=0 Ns=0 Nr=1 <Message-Type Start-Ctrl-Conn-Reply> <Protocol-Version 256> <Framing-Capabilities 3> <Assigned-Tunnel-ID 1>] : : recv [L2TP tid=1 sid=0 Ns=1 Nr=1 <Message-Type Start-Ctrl-Conn-Connected>] : : recv [L2TP tid=1 sid=0 Ns=2 Nr=1 <Message-Type Incoming-Call-Request> <Assigned-Session-ID -6184> <Call-Serial-Number 1> <Bearer-Type 0>] : : send [L2TP tid=36133 sid=59352 Ns=1 Nr=3 <Message-Type Incoming-Call-Reply> <Assigned-Session-ID 1>] : : send [L2TP tid=36133 sid=59352 Ns=2 Nr=3 <Message-Type Outgoing-Call-Request> <Assigned-Session-ID 1> <Call-Serial-Number 0> <Minimum-BPS 100> <Maximum-BPS 100000> <Bearer-Type 3> <Framing-Type 3> <Called-Number >] : : recv [L2TP tid=1 sid=1 Ns=3 Nr=2 <Message-Type Incoming-Call-Connected> <TX-Speed 10000000> <Framing-Type 1> <RX-Speed 10000000>] ppp0: 0040DE0F53556379: connect: ppp0 <--> l2tp(192.168.30.17) ppp0: 0040DE0F53556379: lcp_layer_init ppp0: 0040DE0F53556379: auth_layer_init ppp0: 0040DE0F53556379: ipcp_layer_init ppp0: 0040DE0F53556379: ccp_layer_init ppp0: 0040DE0F53556379: ppp established ppp0: 0040DE0F53556379: lcp_layer_start ppp0: 0040DE0F53556379: send [LCP ConfReq id=1 <auth MSCHAP-v2> <mru 1420> <magic 4e6afb66>] ppp0: 0040DE0F53556379: send [L2TP tid=36133 sid=0 Ns=3 Nr=4] ppp0: 0040DE0F53556379: recv [L2TP tid=1 sid=1 Ns=4 Nr=3 <Message-Type Call-Disconnect-Notify> <Result-Code> <Assigned-Session-ID -6184>] ppp0: 0040DE0F53556379: ppp_terminate ppp0: 0040DE0F53556379: lcp_layer_free ppp0: 0040DE0F53556379: auth_layer_free ppp0: 0040DE0F53556379: ipcp_layer_free ppp0: 0040DE0F53556379: ccp_layer_free ppp0: 0040DE0F53556379: ppp destablished ppp0: 0040DE0F53556379: l2tp: ppp finished ppp0: 0040DE0F53556379: l2tp: terminate (0, 0) ppp0: 0040DE0F53556379: send [L2TP tid=36133 sid=0 Ns=3 Nr=5 <Message-Type Stop-Ctrl-Conn-Notify> <Assigned-Tunnel-ID 1> <Result-Code>] ppp0: 0040DE0F53556379: disconnected При этом pppoe работает без проблем и D-Link DIR-300 без проблем подключается по l2tp. Конфиг: [modules] log_file pppoe l2tp auth_mschap_v2 auth_mschap_v1 auth_chap_md5 ippool sigchld pppd_compat chap-secrets [core] log-error=/var/log/accel-ppp/core.log thread-count=4 [ppp] verbose=5 min-mtu=1000 mtu=1460 mru=1460 mppe=deny [lcp] echo-interval=30 echo-failure=3 [pptp] echo-interval=30 verbose=1 [pppoe] interface=eth1 ac-name=pppoe service-name=pppoe pado-delay=0 pado-delay=0,100:100,200:200,-1:500 ifname-in-sid=called-sid tr101=1 verbose=5 [l2tp] dictionary=/usr/local/share/accel-ppp/l2tp/dictionary verbose=5 bind=192.168.30.1 host_name=l2tp [dns] dns1=194.33.181.2 [radius] [client-ip-range] 192.168.30.0/24 [ip-pool] gw-ip-address=192.168.40.1 192.168.40.10-20 [log] log-file=/var/log/accel-ppp/accel-ppp.log log-emerg=/var/log/accel-ppp/emerg.log log-fail-file=/var/log/accel-ppp/auth-fail.log copy=1 level=5 [log-pgsql] [pppd-compat] [chap-secrets] gw-ip-address=192.168.40.1 chap-secrets=/etc/ppp/chap-secrets [tbf] [cli]
  24. Несколько дней и без объявления что 100Мбит это навсегда - не очень чистый эксперимент. Многие заметившие отсутствие шейпера ринутся качать и будут делать это круглосуточно до посинения, чтоб успеть "пока пров не заметил и не закончил халяву".
  25. Так где всётаки терминировать? В ядре - или с4500/с6500, или что-нибудь что умеет что-то типа supervlan. На агрегации - с3560 должно хватить на 1000.