From owner-freebsd-questions@freebsd.org Mon Jan 7 21:15:54 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 680D1149FC3C for ; Mon, 7 Jan 2019 21:15:54 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (unknown [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E97F81895 for ; Mon, 7 Jan 2019 21:15:53 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [192.168.43.26] ([192.168.43.26]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTP id x07LFodx028180; Mon, 7 Jan 2019 16:15:51 -0500 (EST) (envelope-from mike@sentex.net) Subject: Re: FreeBSD-11.2 routing and networks To: byrnejb@harte-lyne.ca, freebsd-questions@freebsd.org References: <1a466d730772d5ceb62ddfb204c92db5.squirrel@webmail.harte-lyne.ca> From: Mike Tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; prefer-encrypt=mutual; keydata= mQENBEzcA24BCACpwI/iqOrs0GfQSfhA1v6Z8AcXVeGsRyKEKUpxoOYxXWc2z3vndbYlIP6E YJeifzKhS/9E+VjhhICaepLHfw865TDTUPr5D0Ed+edSsKjlnDtb6hfNJC00P7eoiuvi85TW F/gAxRY269A5d856bYrzLbkWp2lKUR3Bg6NnORtflGzx9ZWAltZbjYjjRqegPv0EQNYcHqWo eRpXilEo1ahT6nmOU8V7yEvT2j4wlLcQ6qg7w+N/vcBvyd/weiwHU+vTQ9mT61x5/wUrQhdw 2gJHeQXeDGMJV49RT2EEz+QVxaf477eyWsdQzPVjAKRMT3BVdK8WvpYAEfBAbXmkboOxABEB AA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arH+mj5 MEhgZPEBWkGrbDZpezl9qbFcUem/uT9x8FYT/JIztMVh9qDcdP5tzANW5J7nvgXjska+VFGY ryZK4SPDczh74mn6GI/+RBi7OUzXXPgpPBrhS5FByjwCqjjsSpTjTds+NGIY Organization: Sentex Communications Message-ID: <18cffec3-982f-08a7-dd1d-73a2572a827a@sentex.net> Date: Mon, 7 Jan 2019 16:15:50 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1a466d730772d5ceb62ddfb204c92db5.squirrel@webmail.harte-lyne.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Queue-Id: 3E97F81895 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::18 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-1.19 / 15.00]; ARC_NA(0.00)[]; RDNS_NONE(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; IP_SCORE(-1.75)[ipnet: 2607:f3e0::/32(-4.95), asn: 11647(-3.69), country: CA(-0.09)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[sentex.net]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: smtp.sentex.ca]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.68)[-0.683,0]; NEURAL_HAM_MEDIUM(-0.95)[-0.947,0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 21:15:54 -0000 On 1/7/2019 10:55 AM, James B. Byrne via freebsd-questions wrote: > I am working on a FreeBSD-11.2p17 host where I must change the IP > address and gateway frequently to carry out tests. Following making > such changes I have tried resetting the network interfaces and routing > tables by use of the command: > > service netif restart && service routing restart & > > However, I have discovered that this does not have the desired effect > and I am reduced to restarting the host system to make such changes.=20 > Is there something else I should be doing? If the two networks are on the same vlan, Its probably easier to just manually use route and ifconfig. Also, when you change the IP (assuming you dont have another nic on a connected interface that you are logging in from), your network connection via ssh will drop.=C2=A0 Remember, pack= ets always follow a more specific route.=C2=A0 So lets say under normal circumstances your machine is 10.1.1.2/24 with a gw of 10.1.1.1 and you are logged in from 172.29.13.1.= your test network is 192.168.1.2/24 with a gw of 192.168.1.1. Rather than restart the network and delete the existing IPs from the interface, just do route add 172.29.13.0/24 10.1.1.1 ifconfig 192.168.1.2/24 alias route change default 192.168.1.1 where interface is whatever your nic is (igb0,em0,re0 etc)... This way you still have a path back to your machine you are logged into, assuming 10.1.1.0/24 is still on the same vlan as your test IPs.. When you want to revert, route change default 10.1.1.1 and ifconfig 192.168.1.2/24 -alias =C2=A0=C2=A0=C2=A0 ---Mike --=20 ------------------- Mike Tancsa, tel +1 519 651 3400 x203 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada =20