Switching

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.  shutting ports on ex2200

    Posted 07-05-2015 23:41

    Is there a command line way of shutting down particular ports on an Ex2200 running 12.3? Sure i can disable ports via a config change. But thats a slow process.



  • 2.  RE: shutting ports on ex2200

    Posted 07-05-2015 23:46

    Use "# set interface <interface-name> disable " to disable ports

     

    And for deactivating use " #deactivate interface <interface-name> 



  • 3.  RE: shutting ports on ex2200

    Posted 07-06-2015 13:45

    I've only ever done it with the disable command.  Does deactivate leave the link up but stops it from passing traffic?



  • 4.  RE: shutting ports on ex2200

    Posted 07-06-2015 15:20

    The behavior is as you describe.  Deactivate will allow link to come up.  But there is no configuration on the port so no traffic will pass.

     

    Deactivate turns off the configuration at the point in the hierarchy that you use the command so none of that configuration will apply.  But it wlll all still be present so it is easy to turn it back on.  this is convenient for temporary sitatuations where you want to toggle a configuraiton section.

     

    Disable brings down that physical port.

     

    your other option is to delete the interface configuration.  This will also allow the link to come up but no traffic will pass and there will be no saved configuration on the port.



  • 5.  RE: shutting ports on ex2200

    Posted 07-06-2015 19:41

    Using 'set interface XXX disable' is a config command that requires committing.

    I was hoping for a run time command which can be used on the fly



  • 6.  RE: shutting ports on ex2200
    Best Answer

     
    Posted 07-06-2015 23:27

    Use ifconfig from shell as root:

     

    {master:0}
    lab@ex2200> show interfaces ge-0/0/1
    Physical interface: ge-0/0/1, Enabled, Physical link is Up
      Interface index: 130, SNMP ifIndex: 506
      Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled,
      Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online, Media type: Copper
      Device flags   : Present Running
      Interface flags: SNMP-Traps Internal: 0x4000
      Link flags     : None
      CoS queues     : 8 supported, 8 maximum usable queues
      Current address: 2c:6b:f5:97:27:c4, Hardware address: 2c:6b:f5:97:27:c4
      Last flapped   : 2015-06-30 12:05:56 CEST (6d 20:19 ago)
      Input rate     : 527984 bps (999 pps)
      Output rate    : 527984 bps (999 pps)
      Active alarms  : None
      Active defects : None
      Interface transmit statistics: Disabled

      Logical interface ge-0/0/1.0 (Index 70) (SNMP ifIndex 507)
        Flags: SNMP-Traps 0x4000 Encapsulation: ENET2
        Input packets : 86354
        Output packets: 43255
        Protocol eth-switch
          Flags: None

    {master:0}
    lab@ex2200> start shell user root
    Password:
    root@ex2200:RE:0% ifconfig ge-0/0/1
    ge-0/0/1:    encaps: ether; framing: ether
        flags=0x3/0xc000 <PRESENT|RUNNING>
        curr media: i802 2c:6b:f5:97:27:c4
    ge-0/0/1.0:    flags=0xc000 <UP|MULTICAST>
        <unknown> mtu 0
    root@ex2200:RE:0% ifconfig ge-0/0/1 down
    root@ex2200:RE:0% cli -c "show interfaces ge-0/0/1"
    Physical interface: ge-0/0/1, Administratively down, Physical link is Down
      Interface index: 130, SNMP ifIndex: 506
      Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, Duplex: Full-Duplex, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,
      Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online, Media type: Copper
      Device flags   : Present Running Down
      Interface flags: Hardware-Down Down SNMP-Traps Internal: 0x4000
      Link flags     : None
      CoS queues     : 8 supported, 8 maximum usable queues
      Current address: 2c:6b:f5:97:27:c4, Hardware address: 2c:6b:f5:97:27:c4
      Last flapped   : 2015-07-07 08:25:21 CEST (00:00:10 ago)
      Input rate     : 0 bps (0 pps)
      Output rate    : 0 bps (0 pps)
      Active alarms  : LINK
      Active defects : LINK
      Interface transmit statistics: Disabled

      Logical interface ge-0/0/1.0 (Index 70) (SNMP ifIndex 507)
        Flags: Device-Down SNMP-Traps 0x4000 Encapsulation: ENET2
        Input packets : 86356
        Output packets: 43256
        Protocol eth-switch
          Flags: None
    root@ex2200:RE:0% ifconfig ge-0/0/1 up
    root@ex2200:RE:0% cli -c "show interfaces ge-0/0/1"
    Physical interface: ge-0/0/1, Enabled, Physical link is Up
      Interface index: 130, SNMP ifIndex: 506
      Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, Duplex: Full-Duplex, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,
      Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online, Media type: Copper
      Device flags   : Present Running
      Interface flags: SNMP-Traps Internal: 0x4000
      Link flags     : None
      CoS queues     : 8 supported, 8 maximum usable queues
      Current address: 2c:6b:f5:97:27:c4, Hardware address: 2c:6b:f5:97:27:c4
      Last flapped   : 2015-07-07 08:25:47 CEST (00:00:01 ago)
      Input rate     : 66000 bps (122 pps)
      Output rate    : 0 bps (0 pps)
      Active alarms  : None
      Active defects : None
      Interface transmit statistics: Disabled

      Logical interface ge-0/0/1.0 (Index 70) (SNMP ifIndex 507)
        Flags: SNMP-Traps 0x4000 Encapsulation: ENET2
        Input packets : 86356
        Output packets: 43258
        Protocol eth-switch
          Flags: None
    root@ex2200:RE:0%


    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.



  • 7.  RE: shutting ports on ex2200

    Posted 07-07-2015 12:35

    That's a neat trick using the shell.  Thanks for sharing that.  I'm assuming that will still journal a entry in the log that the port was shutdown correct?