Switching

 View Only
last person joined: yesterday 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Groups applying configuration to wrong interfaces

    Posted 09-23-2015 12:26

    Due to cabling reasons, I need to confgure all odd ports on an EX4300 in one vlan, and all even ports on another.

     

    Our prefered "default" configuration method is by use of groups. However when trying to apply these groups I'm getting unexpected results. 

     

     

    groups {
        group_a {
            interfaces {
                "<ge-*/0/[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46]>" {
                    unit 0 {
                        family ethernet-switching {
                            interface-mode access;
                            vlan {
                                members vlan_a;
                            }
                        }
                    }
                }
            }
        }
        group_b {
            interfaces {
                "<ge-*/0/[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47]>" {
                    unit 0 {
                        family ethernet-switching {
                            interface-mode access;
                            vlan {
                                members vlan_b;
                            }
                        }
                    }
                }
            }
        }
    }
    apply-groups [ group_a group_b ];
    interfaces {
        ge-0/0/0 {
            unit 0 {
                family ethernet-switching;
            }
        }
    
        ge-0/0/1 {
            unit 0 {
                family ethernet-switching;
            }
        }
    
    
        ge-0/0/2 {
            unit 0 {
                family ethernet-switching;
            }
        }
    }

     

    Sample results are:

     

    ge-0/0/0, vlan_a & vlan_b are both applied

    ge-0/0/1, vlan_b applied (correct)

    ge-0/0/2, vlan_a applied (correct)

    ge-0/0/3, no vlans applied

    ge-0/0/4, vlan_a & vlan_b both applied

     

     

    Has anyone run into this?

     


    #groups
    #apply-groups
    #EX4300


  • 2.  RE: Groups applying configuration to wrong interfaces
    Best Answer

     
    Posted 09-26-2015 10:11

    Unfortunately it looks like JUNOS regex does not allow multiple character classes in the group regex. I think your only option is:

     

    set groups default_vlan interfaces <ge-*/0/*> unit 0 family ethernet-switching interface-mode access
    set groups default_vlan interfaces <ge-*/0/[13579]> unit 0 family ethernet-switching vlan members vlan_a set groups default_vlan interfaces <ge-*/0/1[13579]> unit 0 family ethernet-switching vlan members vlan_a set groups default_vlan interfaces <ge-*/0/2[13579]> unit 0 family ethernet-switching vlan members vlan_a set groups default_vlan interfaces <ge-*/0/3[13579]> unit 0 family ethernet-switching vlan members vlan_a set groups default_vlan interfaces <ge-*/0/4[13579]> unit 0 family ethernet-switching vlan members vlan_a set groups default_vlan interfaces <ge-*/0/[02468]> unit 0 family ethernet-switching vlan members vlan_b set groups default_vlan interfaces <ge-*/0/1[02468]> unit 0 family ethernet-switching vlan members vlan_b set groups default_vlan interfaces <ge-*/0/2[02468]> unit 0 family ethernet-switching vlan members vlan_b set groups default_vlan interfaces <ge-*/0/3[02468]> unit 0 family ethernet-switching vlan members vlan_b set groups default_vlan interfaces <ge-*/0/4[02468]> unit 0 family ethernet-switching vlan members vlan_b

    --Paul



  • 3.  RE: Groups applying configuration to wrong interfaces

    Posted 01-05-2018 10:36

    Thanks man. I was wondering what the deal was with this. 3 years later, apparently still like this.



  • 4.  RE: Groups applying configuration to wrong interfaces

     
    Posted 01-05-2018 11:11

    Hi Folks,

    Just my 2 cents on this…

     

    If you find something is missing in Junos; and there is a real use case, Always free to open Enhancement Request (ER).

     

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB23751