Date: Thu, 16 Dec 2021 13:30:32 +0300 From: KOT MATPOCKuH <matpockuh@gmail.com> To: Alan Somers <asomers@freebsd.org> Cc: freebsd-stable List <freebsd-stable@freebsd.org> Subject: Re: ping -6 ignores -e parameter Message-ID: <22748b81-2ae8-babd-d07e-752ed15dce58@GMail.Com> In-Reply-To: <CAOtMX2jUey0qA8MTmRzjVmdQJp5-JOBEeLwGtoNvrucdvwcTWQ@mail.gmail.com> References: <CALmdT0WvtUdteHKEw35tkgZyVzKW2ZT1LKmm1W62vQ_ev2QyPg@mail.gmail.com> <CAOtMX2jUey0qA8MTmRzjVmdQJp5-JOBEeLwGtoNvrucdvwcTWQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------71E341D5D02D154144AEB5F0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Alan! I'm sorry, I'm forget to add freebsd-stable@ to CC: list. Yes, I'm using FreeBSD 13: 13.0-STABLE Today I have a native IPv6 access and my inet6 routing table is: # netstat -rn6 | grep -v -e lo0 Routing tables Internet6: Destination Gateway Flags Netif Expire default fe80::206:29ff:fee9:32a9%lan0 UG lan0 fd00:dead:beef:100::/64 link#5 U lan0 fe80::%lan0/64 link#5 U lan0 fe80::%bridge0/64 link#6 U bridge0 This means my default gateway is reachable via lan0. A node which link-local address fe80::2a0:98ff:fe1d:e270 is reachable via bridge0: # ping -c 1 fe80::2a0:98ff:fe1d:e270%bridge0 PING6(56=40+8+8 bytes) fe80::5a9c:fcff:fe10:ff9e%bridge0 --> fe80::2a0:98ff:fe1d:e270%bridge0 16 bytes from fe80::2a0:98ff:fe1d:e270%bridge0, icmp_seq=0 hlim=64 time=0.804 ms But ping anyway sends packets via lan0. Also I tried to configure fd13:dead:beef::2 on bridge0, on corresponding node I configured fd13:dead:beef::1, and then run a command: ping -6 -e fd13:dead:beef::1 google.com In this way ping uses source IP address from bridge0 interface, but sends via lan0 and to next-hop fe80::206:29ff:fee9:32a9%lan0: # tcpdump -epni lan0 icmp6 12:33:23.308763 8c:ec:4b:e9:28:23 > 00:06:29:e9:32:a9, ethertype IPv6 (0x86dd), length 70: fd13:dead:beef::2 > 2a00:1450:4010:c1e::8a: ICMP6, echo request, seq 52, length 16 I'm wrote a simple script to check this problem. I checked this script on image of VM from freebsd'site which FreeBSD-13. Please see attached file. On 15/12/2021 21:32, Alan Somers wrote: > On Wed, Dec 15, 2021 at 11:16 AM KOT MATPOCKuH <matpockuh@gmail.com> wrote: >> >> Hello! >> >> In a man page for ping(8) and in it's help output I found option "-e": >> -e gateway >> Specifies to use gateway as the next hop to the destination. The >> gateway must be a neighbor of the sending node. >> >> I tried to use this argument, ping ignores this parameter and sends the packet via default gateway. >> For example I have a tun0 which has ipv6 default gw, and an established bridge0 which has available some LL addresses: >> Neighbor Linklayer Address Netif Expire S Flags >> fe80::2a0:98ff:fe1d:e270%bridge0 00:a0:98:1d:e2:70 bridge0 23h56m34s S R >> >> I tried to run: >> ping -6 -e FE80::2A0:98FF:FE1D:E270%bridge0 google.com >> But the packet was sent via tun0 interface. >> >> What is wrong with it? >> >> -- >> MATPOCKuH > > What version of FreeBSD are you using? There was a major change to > ping's code in FreeBSD 13. Please show the output of > 'freebsd-version' and 'netstat -rn'. > -Alan > --------------71E341D5D02D154144AEB5F0 Content-Type: application/x-shellscript; name="ping-e.sh" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ping-e.sh" IyEvYmluL3NoCgppZmNvbmZpZyBlcGFpcjEgcGx1bWIKaWZjb25maWcgZXBhaXIxYSB1cApp ZmNvbmZpZyBlcGFpcjIgcGx1bWIKaWZjb25maWcgZXBhaXIyYSB1cAoKaWZjb25maWcgYnJp ZGdlMSBwbHVtYiBhZGRtIGVwYWlyMWEKaWZjb25maWcgYnJpZGdlMSBpbmV0NiAtaWZkaXNh YmxlZCBmZDAwOjE6OjIvNjQgYXV0b19saW5rbG9jYWwKaWZjb25maWcgYnJpZGdlMiBwbHVt YiB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