Date: Wed, 18 May 2011 00:19:38 -0700 From: Rudy <crapsh@monkeybrains.net> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: request: have ifconfig purge routes that are being added via ifconfig Message-ID: <4DD3730A.7090106@monkeybrains.net>
index | next in thread | raw e-mail
Summary: * ifconfig FAILs if route exists when adding an alias * ifconfig SILENTLY adds the IP even when route exists when creating virtual interaces * DESIRED functionality: purge routes to make way for IPs with ifconfig * Less desired: stop the SILENT adding of IPs as that makes for a bogus network Background: OSPF adds route, eg 1.2.3.0/24, into the kernel If I try to add 1.2.3.4/24 to my router, it fails as that route already exists. Workaround: route del 1.2.3.0/14 && ifconfig igb0 alias 1.2.3.4/24 However, if I can create a vlan with an IP that conflicts with an existing route. Add this to rc.conf: ifconfig_vlan2="1.2.3.4/24 vlan 2 vlandev igb0 then ifconfig vlan2 create Voila: you get a static route to 1.2.3.0/24 to your other router AND the local IP. Makes for a very messed up routing siltation. Workaround: route del 1.2.3.0/14 && ifconfig vlan2 create Proposal: Change the way ifconfig works. [1] Optimally, automatically do the 'route del' first [2] Otherwise, bring these two methods of adding IPs into sync and have the 'ifconfig vlan2 create' NOT add the IP when an existing route exists. Rudyhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DD3730A.7090106>
