From: "Oleg K. Artemjev" <olli@rbauto.ru> To: community@altlinux.ru Cc: sysadmin@rbauto.ru Subject: Re: [Comm] два интерфейса в одной сети - куда правильнее прописать метрику в /etc/sysconfig ? Date: Fri, 1 Aug 2003 14:13:25 +0400 Message-ID: <20030801141325.6eec697d.olli@rbauto.ru> (raw) In-Reply-To: <20030801203344.4e1ceda4.dima@sakhalin.ru> On Fri, 1 Aug 2003 20:33:44 +1100 Dmitry Lebkov <dima@sakhalin.ru> wrote: > > Metric - The 'distance' to the target (usually counted in hops). > > It is not used by recent kernels, but may be needed by routing > > daemons. > Ядро может и не использует, но TCP/IP стек - очень даже ;) ура. :) > А попробовать установить два маршрута для одной и той же сети > с разными адресами gateway'ев и с разными метриками - и посмотреть, > как пойдут пакеты? ;) действительно, что-то я разленился и забыл про tcpdump: сделал следующий роутинг: [root@ws002 root]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.100.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.100.253 0.0.0.0 UG 0 0 0 eth1 0.0.0.0 192.168.100.253 0.0.0.0 UG 1 0 0 eth0 [root@ws002 root]# Пустил ping на шлюз: [root@ws002 root]# ping -c 5 192.168.100.253 PING 192.168.100.253 (192.168.100.253) from 192.168.100.165 : 56(84) bytes of data. 64 bytes from 192.168.100.253: icmp_seq=1 ttl=255 time=0.187 ms 64 bytes from 192.168.100.253: icmp_seq=2 ttl=255 time=0.196 ms 64 bytes from 192.168.100.253: icmp_seq=3 ttl=255 time=0.186 ms 64 bytes from 192.168.100.253: icmp_seq=4 ttl=255 time=0.180 ms 64 bytes from 192.168.100.253: icmp_seq=5 ttl=255 time=0.175 ms --- 192.168.100.253 ping statistics --- 5 packets transmitted, 5 received, 0% loss, time 4011ms rtt min/avg/max/mdev = 0.175/0.184/0.196/0.018 ms [root@ws002 root]# И в то же врем два tcpdump, по одному на интерфейс на разных консолях: [root@ws002 root]# tcpdump -i eth1 icmp tcpdump: listening on eth1 14:06:11.475619 192.168.100.165 > mail: icmp: echo request (DF) 14:06:11.475783 mail > 192.168.100.165: icmp: echo reply 14:06:12.486819 192.168.100.165 > mail: icmp: echo request (DF) 14:06:12.486983 mail > 192.168.100.165: icmp: echo reply 14:06:13.486826 192.168.100.165 > mail: icmp: echo request (DF) 14:06:13.486985 mail > 192.168.100.165: icmp: echo reply 14:06:14.486798 192.168.100.165 > mail: icmp: echo request (DF) 14:06:14.486946 mail > 192.168.100.165: icmp: echo reply 14:06:15.486939 192.168.100.165 > mail: icmp: echo request (DF) 14:06:15.487090 mail > 192.168.100.165: icmp: echo reply ^C 10 packets received by filter 0 packets dropped by kernel [root@ws002 root]# [root@ws002 root]# tcpdump -i eth0 icmp tcpdump: listening on eth0 ^C 0 packets received by filter 0 packets dropped by kernel [root@ws002 root]# Вывод говорит сам за себя. При этом роутинг я добавлял таки командой route. =) В итоге metric таки используется, независимо от способа его добавления, а тем кто писал man route надо дать по рукам чем нибудть кусачим, например крапивой... =)~ -- Bye.Olli. http://olli.digger.org.ru
next prev parent reply other threads:[~2003-08-01 10:13 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-07-31 9:07 Oleg K. Artemjev 2003-07-31 10:04 ` Maxim.Savrilov 2003-07-31 10:43 ` Oleg K. Artemjev 2003-07-31 10:57 ` Maxim.Savrilov 2003-07-31 11:35 ` Oleg K. Artemjev 2003-07-31 16:13 ` Igor Solovyov 2003-08-01 7:21 ` Oleg K. Artemjev 2003-08-01 9:33 ` Dmitry Lebkov 2003-08-01 10:13 ` Oleg K. Artemjev [this message] 2003-08-03 4:58 ` Igor Solovyov 2003-08-04 6:55 ` Oleg K. Artemjev 2003-08-04 13:42 ` Igor Solovyov 2003-07-31 21:49 ` Dmitry Lebkov 2003-08-01 15:19 ` Oleg K. Artemjev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030801141325.6eec697d.olli@rbauto.ru \ --to=olli@rbauto.ru \ --cc=community@altlinux.ru \ --cc=sysadmin@rbauto.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git