<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script to detect Device in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-to-detect-device/m-p/85931#M20629</link>
    <description>&lt;P&gt;Good Evening, I have an X440 G2 configured in this way:&lt;/P&gt; &lt;P&gt;Port 1 → VoIP device&lt;/P&gt; &lt;P&gt;Port 3 → AP Device&lt;/P&gt; &lt;P&gt;Port 5 → TVCC&lt;/P&gt; &lt;P&gt;Port 24 → trunk to the network&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I have created 3 different Vlan&lt;/P&gt; &lt;P&gt;VoIPVLAN tag 2&lt;/P&gt; &lt;P&gt;WiFIVLAN tag 10&lt;/P&gt; &lt;P&gt;DataVLAN tag 5&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I do this:&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;→ create upm profile DETECT_DEVICE&lt;/P&gt; &lt;P&gt;set var VLAN5 DataVLAN&lt;BR /&gt; set var VLAN2 VoIPVLAN&lt;BR /&gt; set var VLAN10 WiFIVLAN&lt;BR /&gt; set var MAC1 94:e1:ac:&lt;BR /&gt; set var VENDOR1 HIKVISION&lt;BR /&gt; set var myWaitVar $TCL(after [expr 2000 * 6])&lt;BR /&gt; set var CLI.OUT ""&lt;BR /&gt; show fdb ports $EVENT.LOG_PARAM_0 | include Default&lt;BR /&gt; set var list1 $TCL(split ${CLI.OUT})&lt;BR /&gt; set var list2 $TCL(string range $(list1) 0 &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt; &lt;P&gt;if (!$match($list2, $MAC1)) then&lt;BR /&gt; configure vlan $VLAN5 add port $EVENT.LOG_PARAM_0 untag&lt;BR /&gt; create log message TVCC_was_detected_on_Port_$EVENT.LOG_PARAM_0&lt;BR /&gt; else&lt;BR /&gt; if (!$match($EVENT.NAME, DEVICE-DETECT)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (!$match($EVENT.DEVICE, GEN_TEL_PHONE)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;create log message Starting_Script_DETECT_DEVICE&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;create log message PHONE_was_detected_on_Port_$EVENT.USER_PORT&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure vlan $VLAN5 add port $EVENT.USER_PORT untag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure vlan $VLAN2 add port $EVENT.USER_PORT tag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-name&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-description&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-capabilities&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med capabilities&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med power-via-mdi&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific dot1 port-protocol-vlan-id vlan VoIPVLAN&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific dot1 vlan-name vlan VoIPVLAN&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med policy application voice vlan VoIPVLAN dscp 46&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if&amp;nbsp; (!$match($EVENT.DEVICE, WLAN_ACCESS_PT)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;create log message AP_was_detected_on_Port_$EVENT.USER_PORT&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;configure $VLAN10 add port $EVENT.USER_PORT untag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;configure $VLAN2 add port $EVENT.USER_PORT tag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;endif&lt;BR /&gt; endif&lt;BR /&gt; endif&lt;BR /&gt; endif&lt;BR /&gt; .&lt;/P&gt; &lt;P&gt;configure upm event device-detect profile DETECT_DEVICE ports 1,3,5&lt;/P&gt; &lt;P&gt;create log filter Log_PortUp&lt;BR /&gt; create log filter Log_PortDown&lt;BR /&gt; configure log filter Log_PortUp add events vlan.msgs.portLinkStateUp&lt;BR /&gt; configure log filter Log_PortDown add events vlan.msgs.portLinkStateDown&lt;BR /&gt; create log target upm DETECT_DEVICE&lt;BR /&gt; enable log target upm DETECT_DEVICE&lt;BR /&gt; configure log target upm DETECT_DEVICE filter Log_PortUp severity Info only.&lt;/P&gt; &lt;P&gt;#######################################################################&lt;/P&gt; &lt;P&gt;For port 1 and port 3 no problem, the device goes in to the correct vlan, for port 5 I can not put in the correct vlan but the UPM profile pass.&lt;/P&gt; &lt;P&gt;Anybody can help me ?&lt;/P&gt; &lt;P&gt;thanks&lt;/P&gt; &lt;P&gt;Giuseppe&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Apr 2020 03:07:09 GMT</pubDate>
    <dc:creator>Giuseppe_Montan</dc:creator>
    <dc:date>2020-04-01T03:07:09Z</dc:date>
    <item>
      <title>Script to detect Device</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-to-detect-device/m-p/85931#M20629</link>
      <description>&lt;P&gt;Good Evening, I have an X440 G2 configured in this way:&lt;/P&gt; &lt;P&gt;Port 1 → VoIP device&lt;/P&gt; &lt;P&gt;Port 3 → AP Device&lt;/P&gt; &lt;P&gt;Port 5 → TVCC&lt;/P&gt; &lt;P&gt;Port 24 → trunk to the network&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I have created 3 different Vlan&lt;/P&gt; &lt;P&gt;VoIPVLAN tag 2&lt;/P&gt; &lt;P&gt;WiFIVLAN tag 10&lt;/P&gt; &lt;P&gt;DataVLAN tag 5&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I do this:&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;→ create upm profile DETECT_DEVICE&lt;/P&gt; &lt;P&gt;set var VLAN5 DataVLAN&lt;BR /&gt; set var VLAN2 VoIPVLAN&lt;BR /&gt; set var VLAN10 WiFIVLAN&lt;BR /&gt; set var MAC1 94:e1:ac:&lt;BR /&gt; set var VENDOR1 HIKVISION&lt;BR /&gt; set var myWaitVar $TCL(after [expr 2000 * 6])&lt;BR /&gt; set var CLI.OUT ""&lt;BR /&gt; show fdb ports $EVENT.LOG_PARAM_0 | include Default&lt;BR /&gt; set var list1 $TCL(split ${CLI.OUT})&lt;BR /&gt; set var list2 $TCL(string range $(list1) 0 &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt; &lt;P&gt;if (!$match($list2, $MAC1)) then&lt;BR /&gt; configure vlan $VLAN5 add port $EVENT.LOG_PARAM_0 untag&lt;BR /&gt; create log message TVCC_was_detected_on_Port_$EVENT.LOG_PARAM_0&lt;BR /&gt; else&lt;BR /&gt; if (!$match($EVENT.NAME, DEVICE-DETECT)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (!$match($EVENT.DEVICE, GEN_TEL_PHONE)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;create log message Starting_Script_DETECT_DEVICE&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;create log message PHONE_was_detected_on_Port_$EVENT.USER_PORT&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure vlan $VLAN5 add port $EVENT.USER_PORT untag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure vlan $VLAN2 add port $EVENT.USER_PORT tag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-name&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-description&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise system-capabilities&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med capabilities&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med power-via-mdi&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific dot1 port-protocol-vlan-id vlan VoIPVLAN&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific dot1 vlan-name vlan VoIPVLAN&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;configure lldp port $EVENT.USER_PORT advertise vendor-specific med policy application voice vlan VoIPVLAN dscp 46&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if&amp;nbsp; (!$match($EVENT.DEVICE, WLAN_ACCESS_PT)) then&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;create log message AP_was_detected_on_Port_$EVENT.USER_PORT&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;configure $VLAN10 add port $EVENT.USER_PORT untag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;configure $VLAN2 add port $EVENT.USER_PORT tag&lt;BR /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;endif&lt;BR /&gt; endif&lt;BR /&gt; endif&lt;BR /&gt; endif&lt;BR /&gt; .&lt;/P&gt; &lt;P&gt;configure upm event device-detect profile DETECT_DEVICE ports 1,3,5&lt;/P&gt; &lt;P&gt;create log filter Log_PortUp&lt;BR /&gt; create log filter Log_PortDown&lt;BR /&gt; configure log filter Log_PortUp add events vlan.msgs.portLinkStateUp&lt;BR /&gt; configure log filter Log_PortDown add events vlan.msgs.portLinkStateDown&lt;BR /&gt; create log target upm DETECT_DEVICE&lt;BR /&gt; enable log target upm DETECT_DEVICE&lt;BR /&gt; configure log target upm DETECT_DEVICE filter Log_PortUp severity Info only.&lt;/P&gt; &lt;P&gt;#######################################################################&lt;/P&gt; &lt;P&gt;For port 1 and port 3 no problem, the device goes in to the correct vlan, for port 5 I can not put in the correct vlan but the UPM profile pass.&lt;/P&gt; &lt;P&gt;Anybody can help me ?&lt;/P&gt; &lt;P&gt;thanks&lt;/P&gt; &lt;P&gt;Giuseppe&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 03:07:09 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-to-detect-device/m-p/85931#M20629</guid>
      <dc:creator>Giuseppe_Montan</dc:creator>
      <dc:date>2020-04-01T03:07:09Z</dc:date>
    </item>
  </channel>
</rss>

