From nobody Tue Nov 8 00:26:32 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N5pnL2dn2z4gq48 for ; Tue, 8 Nov 2022 00:26:46 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5pnK2h93z3LdD for ; Tue, 8 Nov 2022 00:26:45 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-io1-xd33.google.com with SMTP id q21so7423269iod.4 for ; Mon, 07 Nov 2022 16:26:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount.org; s=google; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=J+/oG/2IMkSogpn4/oyhujqOZoYQn4cpDiPnMRVh4PA=; b=OAzU3vbpWGofoSEm/9EsqcLTLg0jDwhzmD4Z7BQgpGnzwzt1XEBEZBAPYLbECAU7Sn 2679R8d7eCa8+PEFxUQCDVtGnm8maYUF/7eQp6/oeeWbZVD5oaJNFPo3V4eOPKM+pZY1 /X4cv2xxZlXUNX1CsP4D1pgpiB6y75qfCFUao0dqfkONluy9I8QpNbNx9evudxCtBuBp d7tn6xkh8F30RxK9erbOhFQrd3BRBvXF1uEXfEGzTakkEhrLcSi+FwzH1rEI+ThfBj1h 1o5ESfjijXMiYRmzbL2goYtAvwEW0JlAppXRBOSlkbSIxIewT2IxjNJDE0EZVjgdKChH VYQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=J+/oG/2IMkSogpn4/oyhujqOZoYQn4cpDiPnMRVh4PA=; b=rnQ4qcrIoq8nWxh9DhIBMtNHrH8MAoJ6Z0Cdg3JmMLw1ulRMDjwnNZQLwMJDh7weH7 FgsQZ8Z2mA6W4/HTQ4sXFBzLu1lnLf9yBt/CbVEtsSFsGZ2PA4eyFKuk5arf0J+PsHXD 2tqwlq0lepDVP6owZOH+1XWJfoG+PaSOPoM3MpWgLF2fNiEg54snm/2Od178rAsxHWsn trPs46b5eymZzEqeb/CsU76qwltorX5/hbplet9L9czK5FZFase6nZoXKSbctT15FYUp 3PeH/Y+I5/rWe88FFfieOPYy8nskuy4YJmWogpFVggj+tFFhNbdNYdm3oyz79dd2NgS4 Z1Mg== X-Gm-Message-State: ACrzQf3xTu/gj6UeOx9ESsSexUitpyRk2SCXmN6nST7SKaMUdReuUC/Z 5Rb238ID4MIqHs3hjgBrNR2ZsRnxyiZmA0adlTLhSabnlXOkwg== X-Google-Smtp-Source: AMsMyM5wCALhMe8toa7SA8ol993no21UPjqHbGjWOje2QC1xKFEbRs13GyKzGzGy1XJKLl+RM4l0rkkOwPhYpnrRdf0= X-Received: by 2002:a6b:e219:0:b0:6c2:13ef:10a9 with SMTP id z25-20020a6be219000000b006c213ef10a9mr32755129ioc.6.1667867203861; Mon, 07 Nov 2022 16:26:43 -0800 (PST) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 From: Mark Saad Date: Mon, 7 Nov 2022 19:26:32 -0500 Message-ID: Subject: GRE in a fib via rc.conf To: freebsd-net@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003815c005ecea98ef" X-Rspamd-Queue-Id: 4N5pnK2h93z3LdD X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=longcount.org header.s=google header.b=OAzU3vbp; dmarc=none; spf=pass (mx1.freebsd.org: domain of nonesuch@longcount.org designates 2607:f8b0:4864:20::d33 as permitted sender) smtp.mailfrom=nonesuch@longcount.org X-Spamd-Result: default: False [2.28 / 15.00]; URI_COUNT_ODD(1.00)[9]; HTTP_TO_IP(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(0.98)[0.984]; NEURAL_SPAM_LONG(0.79)[0.792]; R_DKIM_ALLOW(-0.20)[longcount.org:s=google]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d33:from]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[longcount.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[longcount.org:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000003815c005ecea98ef Content-Type: text/plain; charset="UTF-8" All I am looking for some help on if my setup makes sense. I have a vm with two interfaces. One for access to the host , we'll call this mgmt . One for routing traffic, we'll call this routing . I want to put the routing interface into a fib and to run a gre tunnel over it. Sounds simple enough. The problem I am seeing is that it looks like the tunneled traffic is leaked into the default fib and I don't see why. I am not sure if this is config nit or if this is an issue. Should the gre10 interface be in fib 1 ? See below. ### RC CONF ### ifconfig_vmx0="inet 10.23.121.253/24 description mgmt" ifconfig_vmx1="inet 100.65.101.14/28 mtu 9000 description routing fib 1" defaultrouter="10.23.121.1" static_routes="ewr10gresrc" route_ewr10gresrc=" 192.168.255.14 100.65.101.1 -fib 1" cloned_interfaces="gre10" ifconfig_gre10=" inet 100.67.103.2 100.67.103.1 netmask 255.255.255.252 tunnel 100.65.101.14 192.168.255.14 tunnelfib 1" ############### ### DEFAULT FIB ### ~ # netstat -nr4Wl Routing tables Internet: Destination Gateway Flags Nhop# Mtu Netif Expire default 10.23.121.1 UGS 6 1500 vmx0 10.23.121.0/24 link#1 U 2 1500 vmx0 10.23.121.253 link#1 UHS 3 16384 lo0 100.67.103.1 link#4 UH 4 1476 gre10 100.67.103.2 link#4 UHS 5 16384 lo0 127.0.0.1 link#3 UH 1 16384 lo0 ### FIB 1 ### # setfib 1 netstat -nr4Wl Routing tables (fib: 1) Internet: Destination Gateway Flags Nhop# Mtu Netif Expire 100.65.101.0/28 link#2 U 1 9000 vmx1 100.65.101.14 link#2 UHS 2 16384 lo0 127.0.0.1 link#3 UHS 3 16384 lo0 192.168.255.14 100.65.101.1 UGHS 4 9000 vmx1 ##### PING EXAMPLES ##### # setfib 1 ping -c 1 -t 2 100.67.103.1 PING 100.67.103.1 (100.67.103.1): 56 data bytes ping: sendto: No route to host --- 100.67.103.1 ping statistics --- 1 packets transmitted, 0 packets received, 100.0% packet loss # setfib 0 ping -c 1 -t 2 100.67.103.1 PING 100.67.103.1 (100.67.103.1): 56 data bytes 64 bytes from 100.67.103.1: icmp_seq=0 ttl=255 time=1.528 ms --- 100.67.103.1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.528/1.528/1.528/0.000 ms #### TCPDUMP #### ICMP packets are in fact sourced from the gre10 interface. The GRE packets are also only going out the routing interface. See the following pastebin for details. https://pastebin.com/n3mGXGHA -- mark saad | nonesuch@longcount.org --0000000000003815c005ecea98ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
All
=C2=A0 I am looking for some help on if= my setup makes sense.
I have a vm with two interfaces. One for access to the host , we'll call= =20 this mgmt . One for routing traffic, we'll call this routing . I want t= o put the routing interface into a fib and to run a gre tunnel over it.=20 Sounds simple enough.=C2=A0 The problem I am seeing is that it looks like t= he tunneled traffic is leaked into the default fib and I don't see why. I= =20 am not sure if this is config nit or if this is an issue. Should the=20 gre10 interface be in fib 1 ?=C2=A0 See below.

### RC CONF ###
ifconfig_vmx0=3D"inet 10.23.121.253/24 description mgmt"
ifconfig_vmx1=3D"inet 100.65.101.14/28 mtu 9000 description routing fib 1&qu= ot;
defaultrouter=3D"10.23.121.1"
static_routes=3D"ewr10gresrc"
route_ewr10gresrc=3D" 192.168.255.14 100.65.101.1 -fib 1&qu= ot;
cloned_interfaces=3D"gre10"
ifconfig_gre10=3D" inet 100.67.103.2 100.67.103.1 netmask 2= 55.255.255.252 tunnel 100.65.101.14 192.168.255.14 tunnelfib 1"
###############
=C2=A0
### DEFAULT FIB ###
~ # netstat -nr4Wl
Routing tables
=C2=A0
Internet:
Destination Gateway Flags Nhop# Mtu = Netif Expire
default 10.23.121.1 UGS 6 1500 = vmx0
10.23.121.0/= 24 link#1 U 2 1500 vmx0
10.23.121.253 link#1 UHS 3 16384 = lo0
100.67.103.1 link#4 UH 4 1476 = gre10
100.67.103.2 link#4 UHS 5 16384 = lo0
127.0.0.1 link#3 UH 1 16384 = lo0
=C2=A0
### FIB 1 ###
=C2=A0
# setfib 1 netstat -nr4Wl
Routing tables (fib: 1)
=C2=A0
Internet:
Destination Gateway Flags Nhop# Mtu = Netif Expire
100.65.101.= 0/28 link#2 U 1 9000 vmx1
100.65.101.14 link#2 UHS 2 16384 = lo0
127.0.0.1 link#3 UHS 3 16384 = lo0
192.168.255.14 100.65.101.1 UGHS 4 9000 = vmx1
=C2=A0
##### PING EXAMPLES #####
=C2=A0
# setfib 1 ping -c 1 -t 2 100.67.103.1
PING 100.67.103.1 (100.67.103.1): 56 data bytes
ping: sendto: No route to host
=C2=A0
--- 100.67.103.1 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
# setfib 0 ping -c 1 -t 2 100.67.103.1
PING 100.67.103.1 (100.67.103.1): 56 data bytes
64 bytes from = 100.67.103.1: icmp_seq=3D0 ttl=3D255 time=3D1.528 ms
=C2=A0
--- 100.67.103.1 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev =3D 1.528/1.528/1.528/0.000 ms
=C2=A0
#### TCPDUMP ####
ICMP packets are in fact sourced from the gre10 interface.=20
The GRE packets are also only going out the routing interface.
<= div>
See the following pastebin for details.
--0000000000003815c005ecea98ef--