fwiw, one piece of fallout from listing the same address on a loopback
interface as a real iface is that ntpd 'listen on *' tries to listen to
the same address twice and fails, so you need to list the addresses
individually in ntpd.conf.

(other than that, I haven't seen any major problems, but I'd put it in
the category of "if you do this you'd better be ready to work out what's
breaking and how to fix it" and my third question definitely still
stands :)


On 2007/02/10 15:23, Stuart Henderson wrote:
> On 2007/02/07 13:36, Claudio Jeker wrote:
> > Btw. for ospfd you can use "interface lo1" to reliably redistribute the
> > loopback address.
> 
> I have configured a router with yyy.yy.yyy.247/32 on lo1 and yyy.yy.yyy.247/28
> on vlan2244. This seems attractive since BGP sessions can be bound to an 
> address
> which is available (at least over one of my metro links) whether or not OSPF
> is running - (not to mention because I am working in a fairly small PI block
> and would really like to avoid burning another /28 ;-)
> 
> The vlan already has a router acting as DR.
> 
> If I configure vlan2244 before lo1, all is well, associations are formed,
> prefixes are seen.
> 
> If I configure lo1 before vlan2244 (default order for /etc/netstart), ospfd
> doesn't act on any packets coming from the DR, it believes that it should be
> DR itself, but no outbound packets are seen by tcpdump -i vlan2244 (or -i 
> lo1).
> 
> I can work-around this at startup by altering netstart as follows,
> but I wondered:-
> 
>   1) is this an acceptable work-around?
>   2) should ospfd handle this any differently?
>   3) is it bloody stupid to be doing this?
> 
> --- netstart.orig     Wed Nov 22 20:21:41 2006
> +++ netstart  Sat Feb 10 13:32:09 2007
> @@ -289,7 +289,7 @@
>  # Configure all the non-loopback interfaces which we know about, but
>  # do not start interfaces which must be delayed.
>  # Refer to hostname.if(5) and bridgename.if(5)
> -ifmstart "" "trunk vlan carp gif gre pfsync pppoe"
> +ifmstart "" "trunk vlan carp gif gre pfsync pppoe lo"
>  
>  if [ "$ip6kernel" = "YES" -a "x$rtsolif" != "x" ]; then
>       fw=`sysctl -n net.inet6.ip6.forwarding`
> @@ -311,7 +311,7 @@
>  # The pfsync interfaces need to come up before carp.
>  # Configure all the carp interfaces which we know about.
>  # They must come up after pfsync but before default route.
> -ifmstart "trunk vlan pfsync carp"
> +ifmstart "trunk vlan pfsync carp lo"
>  
>  # /etc/mygate, if it exists, contains the name of my gateway host
>  # that name must be in /etc/hosts.
> 
> -- -- -- -- -- -- -- --
> # ls -l `which ospfd`
> -r-xr-xr-x  1 root  bin  108900 Feb  7 00:47 /usr/sbin/ospfd
> # cat /etc/ospfd.conf
> 
> router-id yyy.yy.yyy.247
> 
> auth-type crypt
> auth-md 1 YlqnfuTjFhs7v6
> auth-md-keyid 1
> 
> hello-interval 2
> router-dead-time 10
> 
> area 0.0.0.0 {
>         interface lo1
>         interface vlan2244 { metric 20 }
> }
> 
> # sh /etc/netstart lo1 vlan2244
> # ospfd -d
> startup
> orig_rtr_lsa: area 0.0.0.0
> orig_rtr_lsa: stub net, interface vlan2244
> if_fsm: event UP resulted in action START and changing state for interface 
> vlan2244 from DOWN to WAIT
> start_spf_timer: IDLE -> DELAY
> spf_calc: calculation started, area ID 0.0.0.0
> spf_calc: calculation ended, area ID 0.0.0.0
> spf_start_holdtimer: DELAY -> HOLD
> spf_timer: state HOLD -> IDLE
> if_act_elect: interface vlan2244 old dr none new dr yyy.yy.yyy.247, old bdr 
> none new bdr none
> orig_rtr_lsa: area 0.0.0.0
> orig_rtr_lsa: stub net, interface vlan2244
> orig_rtr_lsa: area 0.0.0.0
> orig_rtr_lsa: stub net, interface vlan2244
> if_fsm: event WAITTIMER resulted in action ELECT and changing state for 
> interface vlan2244 from WAIT to DR
> ^Z[1] + Suspended            ospfd -d 
> # bg
> [1] ospfd -d
> # tcpdump -nilo1
> tcpdump: listening on lo1, link-type LOOP
> ^C
> 0 packets received by filter
> 0 packets dropped by kernel
> # tcpdump -nivlan2244
> tcpdump: listening on vlan2244, link-type EN10MB
> 14:23:12.018878 SSTP STP config root=88c4.0:c:31:64:f7:0 rootcost=0 
> bridge=88c4.0:c:31:64:f7:0 port=11 ifcost=128 age=0/0 max=20/0 hello=2/0 
> fwdelay=15/0 pvid=2244
> 14:23:12.357744 yyy.yy.yyy.243 > 224.0.0.5: OSPFv2-hello 44: rtrid 
> yyy.yy.yyy.3 backbone dr yyy.yy.yyy.243 [tos 0xc0] [ttl 1]
> 14:23:14.018983 SSTP STP config root=88c4.0:c:31:64:f7:0 rootcost=0 
> bridge=88c4.0:c:31:64:f7:0 port=11 ifcost=128 age=0/0 max=20/0 hello=2/0 
> fwdelay=15/0 pvid=2244
> 14:23:14.367676 yyy.yy.yyy.243 > 224.0.0.5: OSPFv2-hello 44: rtrid 
> yyy.yy.yyy.3 backbone dr yyy.yy.yyy.243 [tos 0xc0] [ttl 1]
> 14:23:16.019399 SSTP STP config root=88c4.0:c:31:64:f7:0 rootcost=0 
> bridge=88c4.0:c:31:64:f7:0 port=11 ifcost=128 age=0/0 max=20/0 hello=2/0 
> fwdelay=15/0 pvid=2244
> 14:23:16.377767 yyy.yy.yyy.243 > 224.0.0.5: OSPFv2-hello 44: rtrid 
> yyy.yy.yyy.3 backbone dr yyy.yy.yyy.243 [tos 0xc0] [ttl 1]
> ^C
> -- -- -- -- -- -- -- --

Reply via email to