[j-nsp] Good practice for EX-series interface config management

Chuck Anderson cra at WPI.EDU
Tue Nov 2 17:46:51 EDT 2010


On Wed, Nov 03, 2010 at 08:31:27AM +1100, Dale Shaw wrote:
> Direct application of config to interfaces, while precise, kind of
> feels 'wrong' as JUNOS provides more elegant ways to achieve the same
> end result. Maybe in carefully planned, static environments where
> access port VLAN assignments and other port specific configs rarely
> change, interface-ranges are more workable. Or maybe we're just doing
> it wrong.
> 
> I'm hoping that this sparks some discussion. What works best for you?

I avoid interface-ranges because it is too error-prone as you mention.  
What JUNOS really needs is a way to expand a list of interface ranges 
when you type CLI commands, without storing that range in the 
candidate or commited configuration.  E.g.:

set interfaces {ge-0/0/0-ge-0/0/3,ge-0/0/5-ge-0/0/7} unit 0 family ethernet-switching vlan members 10

would create the following expanded candidate configuration:

ge-0/0/0 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/1 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/2 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/3 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/5 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/6 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}
ge-0/0/7 {
    unit 0 {
        family ethernet-switching {
            vlan {
                members 10;
            }
        }
    }
}


More information about the juniper-nsp mailing list