Ethernet Switching
Highlighted
Ethernet Switching

Interface-range question

‎01-14-2019 03:38 PM

I have to configure a bunch of EX4200 switch ports in prepartion for IP Phones. Here are the commands for just three ports

set ethernet-switching-options voip interface ge-1/0/0 vlan PhonesDO_ECS

set ethernet-switching-options voip interface ge-1/0/0 forwarding-class assured-forwarding

set ethernet-switching-options voip interface ge-1/0/1 vlan PhonesDO_ECS

set ethernet-switching-options voip interface ge-1/0/1 forwarding-class assured-forwarding

set ethernet-switching-options voip interface ge-1/0/2 vlan PhonesDO_ECS

set ethernet-switching-options voip interface ge-1/0/2 forwarding-class assured-forwarding

 

Can I use an interface-range command to accomplish the same thing? Here are the commands I am thinking about

set interface interface-range Phones member-range ge-1/0/0 to ge-1/0/2

set ethernet-switching-options voip interface Phones vlan PhonesDO_ECS

set ethernet-switching-options voip interface Phones forwarding-class assured-forwarding

6 REPLIES 6
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-14-2019 11:14 PM

Yes your example with interface-ranges will work for the mentioned three interfaces. You can define multiple ranges for an interface-range if needed later on.


--
Best regards,

Jonas Hauge Klingenberg
Juniper Ambassador & Technology Architect, SEC DATACOM A/S (Denmark)
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-15-2019 03:07 AM

I don't think this will work.  Some quick tests in my lab show that interface range only affects properties that are set under the interface hierarchy.

 

You are trying to add interfaces and forwarding class under the ethernet-switching hierarchy.

 

Perhaps you can use the groups and apply groups functions to do this but I'm not sure about that either since the interfaces are not listed under ethernet switching by default to be expanded with group wild cards.  I get errors trying to do that.

 

Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-15-2019 05:04 AM

True, but it's the interface-range which is referred to under ethernet-switching part of the configuration. I just tested on EX3400 where it's 'switch-options' instead but it validates:

 

jh@EX3400-VC# show |compare
[edit interfaces]
+   interface-range flaf {
+       member-range ge-0/0/8 to ge-0/0/11;
+       unit 0 {
+           family ethernet-switching {
+               vlan {
+                   members v404-tosibox;
+               }
+           }
+       }
+   }
[edit]
+  switch-options {
+      voip {
+          interface flaf {
+              vlan voip-vlan;
+              forwarding-class assured-forwarding;
+          }
+      }
+  }
[edit vlans]
+   voip-vlan {
+       vlan-id 45;
+   }

{master:1}[edit]
jh@EX3400-VC# commit check
fpc1:
configuration check succeeds
fpc0:
configuration check succeeds

--
Best regards,

Jonas Hauge Klingenberg
Juniper Ambassador & Technology Architect, SEC DATACOM A/S (Denmark)
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-15-2019 06:32 AM

I experimented myself, I ran these three commands on one EX4200 and they commited fine

set interface interface-range Phones member-range ge-1/0/0 to ge-1/0/2

set ethernet-switching-options voip interface Phones vlan PhonesDO_ECS

set ethernet-switching-options voip interface Phones forwarding-class assured-forwarding

 

This resulted in this entry under interfaces

interfaces {
    interface-range Phones {
        member-range ge-1/0/0 to ge-1/0/32;
    }
 
It resulted in this entry under ethernet-switching-options
ethernet-switching-options {
    voip {
        interface Phones {
            vlan PhonesDO_ECS;
            forwarding-class assured-forwarding;
        }
    }
 
It did not change the defintion of these interfaces. Of course I could use the interface-range to set these definitions since they are the same for all of these port. This certainly would shorten the code
ge-1/0/0 {
   unit 0 {
      family ethernet-switching {
         port-mode access;
         vlan {
            members DO_ECS;
         }
      }
   }
}
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-15-2019 07:53 AM

if you define an interface which is also defined in an interface-range, then the most specific configuration is used (in this case the interface-range specifics are ignored).

 

I would recommend to define ordinary access vlan for the interfaces on the interface-range and then delete the specific interface configurations (delete interface ge-1/0/0).


--
Best regards,

Jonas Hauge Klingenberg
Juniper Ambassador & Technology Architect, SEC DATACOM A/S (Denmark)
Highlighted
Ethernet Switching

Re: Interface-range question

‎01-15-2019 08:38 AM

But in this case the interface-range defintion is only used in the ethernet-switching-option section and not the interfaces section. Shouldn't the interface section where I am defining it as an access port belonging to one vlan be separate from the ethernet-switching-options section where I am defining voip options?

 

Now, I might go ahead and use the interface section and interface-range to define these ports as access ports belonging to one vlan but even if I did not, shouldn't this all work?

Feedback