Summary: -------- The -ifp option in route add default does not seem to have any effect, and it is impossible to set a default route in certain conditions.
Is there a work around for route in 4.4 ? Details -------- I have 2 interfaces (fxp0 and 1) on my FreeBSD box. Initially only one of the interfaces is UP. I am trying to write a high availability script that automatically flops over to the 2nd interface, when the active interface fails. Here is (roughly) what I am doing: # Bring failed interface down ifconfig $old_intf down # Clear ARP cache arp -a -d # Fail Over to Other Interface ifconfig $new_intf inet xx.xx.xx.xxx netmask 255.255.255.224 broadcast xx.xx.xxx.xxx # Delete old route route delete default # Bring new interface up ifconfig $new_intf up # Add new route route add -ifp $new_intf default $DEF_ROUTE <<<<<< (1) PROBLEM ------- After the interface fails over, the default route (1 above) still points out through the $old_intf. Here is a listing of netstat and ifconfig before and after the switch: before -------- Destination Gateway Flags Refs Use Netif Expire default 61.74.4.193 UGSc 4 487 fxp0 61.74.4.192/27 link#1 UC 1 0 fxp0 61.74.4.193 0:0:ac:7:ac:a4 UHLW 4 112 fxp0 955 127.0.0.1 127.0.0.1 UH 1 6 lo0 #ifconfig -a fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 61.74.4.212 netmask 0xffffffe0 broadcast 61.74.4.223 ether 00:02:b3:87:35:f2 media: Ethernet autoselect (100baseTX <full-duplex>) status: active fxp1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 inet 61.74.4.212 netmask 0xffffffe0 broadcast 61.74.4.223 ether 00:02:b3:87:35:f3 media: Ethernet autoselect (none) after ------- dell350-6# netstat -rn Destination Gateway Flags Refs Use Netif Expire default 64.74.4.193 UGSc 4 24 fxp0 <<<<< 61.74.4.192/27 link#2 UC 1 0 fxp1 61.74.4.193 0:0:c:7:ac:a4 UHLW 4 2 fxp1 1189 127.0.0.1 127.0.0.1 UH 1 6 lo0 # ifconfig -a fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 inet 61.74.4.212 netmask 0xffffffe0 broadcast 61.74.4.223 ether 00:02:b3:87:35:f2 media: Ethernet autoselect (none) status: no carrier fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 61.74.4.212 netmask 0xffffffe0 broadcast 61.74.4.223 ether 00:02:b3:87:35:f3 media: Ethernet autoselect (100baseTX <full-duplex>) status: active In the second listing notice that the default route STILL points to the fxp0 interface which is down. I googled the topic but not of much avail. Does anyone have any idea what is happening and how to set the proper route? My system is: # uname -a FreeBSD host.nyc 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Thu Apr 11 14:38:21 PDT 2002 Thanks for your time. -ansh. P.S. I am not on the list so please cc you reply. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message