Date: Fri, 18 Oct 2013 10:22:50 +0000 From: Ole Myhre <ole.myhre@dataoppdrag.no> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Interface up/down, carp and loopback route Message-ID: <C5A69C67E0D032469281F68C7CFD6AA009E03B5E@EX-MBX01.cust-d1.dataoppdrag.no>
next in thread | raw e-mail | index | archive | help
Hi, I'm seeing some inconsistent behavior with how carp handles the loopback ro= ute when it transition from MASTER to BACKUP and how the loopback route is = handled when an interface is marked down. This is currently tested on 10.0-BETA1. (fw1 and fw2 has just been booted) [root@fw1 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: MASTER vhid 1 advbase 1 advskew 0 [root@fw1 ~]# netstat -rn | grep 192.168.0.1 192.168.0.1 link#3 UHS 0 0 lo0 [root@fw1 ~]#=20 [root@fw2 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: BACKUP vhid 1 advbase 1 advskew 0 [root@fw2 ~]# netstat -rn | grep 192.168.0.1 [root@fw2 ~]# [root@fw1 ~]# ifconfig em2 vhid 1 advskew 100 [root@fw1 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: BACKUP vhid 1 advbase 1 advskew 100 [root@fw1 ~]# netstat -rn | grep 192.168.0.1 [root@fw1 ~]# [root@fw2 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: MASTER vhid 1 advbase 1 advskew 0 [root@fw2 ~]# netstat -rn | grep 192.168.0.1 192.168.0.1 link#3 UHS 0 0 lo0 [root@fw2 ~]# [root@fw2 ~]# ifconfig em2 vhid 1 advskew 200 [root@fw2 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: BACKUP vhid 1 advbase 1 advskew 200 [root@fw2 ~]# netstat -rn | grep 192.168.0.1 [root@fw2 ~]# So far, so good. The loopback route is removed when the carp interface goes= back to BACKUP, and added when it goes to MASTER. However, if I mark an interface as down: [root@fw1 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: MASTER vhid 1 advbase 1 advskew 100 [root@fw1 ~]# netstat -rn | grep 192.168.0.1 192.168.0.1 link#3 UHS 0 0 lo0 [root@fw1 ~]# ifconfig em2 down [root@fw1 ~]# ifconfig em2 | grep 'carp\|inet ' inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 vhid 1 carp: INIT vhid 1 advbase 1 advskew 100 [root@fw1 ~]# netstat -rn | grep 192.168.0.1 192.168.0.1 link#3 UHS 0 0 lo0 [root@fw1 ~]# The loopback route is not removed. The same things happen if I set any interface to down, not just interfaces = with carp enabled. Is this expected behavior, or is it a bug? Or maybe it is (or should be) a = sysctl setting? And is the loopback route really necessary at all? --=20 Ole Myhre
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C5A69C67E0D032469281F68C7CFD6AA009E03B5E>