[Xorp-hackers] [Xorp-cvs] XORP cvs commit: xorp/etc/templates xorp/static_routes xorp/xrl/interfaces xorp/xrl/targets

Hasso Tepper hasso at linux.ee
Tue Jan 23 01:51:40 PST 2007


Pavlin Radoslavov wrote:
> Log message:
> 	Implement support for floating static routes (i.e., static routes
> 	for the same prefix with different next hop and metrics).
> 	
> 	A floating static route (also called "qualified" by some router
> 	vendors) can be added with a configuration like:
> 	
> 	protocols {
> 	    static {
> 	        route 10.10.0.0/16 {
> 	            next-hop: 1.1.1.1
> 	            metric: 1
> 	            qualified-next-hop 1.1.1.2 {
> 	                metric: 10
> 	            }
> 	        }
> 	        interface-route 10.30.30.0/24 {
> 	            next-hop-interface: "rl0"
> 	            next-hop-vif: "rl0"
> 	            next-hop-router: 1.2.3.4
> 	            metric: 1
> 	            qualified-next-hop-interface rl0 {
> 	                qualified-next-hop-vif rl0 {
> 	                    next-hop-router: 5.6.7.8
> 	                    metric: 10
> 	                }
> 	            }
> 	        }
> 	    }
> 	}

Why so complicated? It's already UI nightmare, you shouldn't make it
worse.

protocols {
    static {
        route 10.10.0.0/16 {
            next-hop 1.1.1.1 {
                metric: 1
            }
            next-hop 1.1.1.2 {
                metric: 10
            }
        }
        interface-route 10.30.30.0/24 {
            next-hop 1.2.3.4 {
                next-hop-interface: "rl0"
                next-hop-vif: "rl0"
                metric: 1
            }
            next-hop 5.6.7.8 {
                next-hop-interface: "rl0"
                next-hop-vif: "rl0"
                metric: 1
            }
        }
    }
}

Note, that I actually don't understand why there is separate interface
route node at all. It should be same route note just handled in the
backend - if there is interface specified, it's interface route, if there
isn't interface specified, it isn't interface route.

protocols {
    static {
        route 10.10.0.0/16 {
            next-hop 1.1.1.1 {
                metric: 1
            }
            next-hop 1.1.1.2 {
                interface "rl0" {
                    vif: "rl0"
                }
                metric: 10
            }
        }
    }
}


with my best wishes,

-- 
Hasso Tepper



More information about the Xorp-hackers mailing list