vlan


/* * Copyright (c) 2002, 2003 by cisco Systems, Inc. * All rights reserved. */ function getSubVlanList(showRun) { var etherResults, radioResults, count; var i = 0; var etherPattern = "![\\r\\n]+interface FastEthernet(\\d)\\.(\\d+)[\\r\\n]+ encapsulation dot1Q (\\d+ native|\\d+)[\\r\\n]+( [^\\r\\n]+[\\r\\n]+)* bridge-group (\\d+)[\\r\\n]+"; var radioPattern; var vlanArray = new Array(); var vlanNb; etherResults = showRun.match(etherPattern); while (etherResults) { var subIf = new Array(); count = 0; subIf[count++] = "FastEthernet" + etherResults[1] + "." + etherResults[2]; radioPattern = "![\\r\\n]+interface (Dot11Radio\\d\\.\\d+)[\\r\\n]+ encapsulation dot1Q " + etherResults[3] + "[\\r\\n]+( [^\\r\\n]+[\\r\\n]+)* bridge-group " + etherResults[5] + "[\\r\\n]+"; radioResults = showRun.match(radioPattern); while (radioResults) { subIf[count++] = radioResults[1]; radioResults = radioResults.input.substring(radioResults[0].length + radioResults.index).match(radioPattern); } vlanNb = etherResults[3].match(/\d+/) vlanArray[i++] = new vlanObject("VLAN " + vlanNb[0], vlanNb[0], etherResults[5], subIf); delete subIf; etherResults = etherResults.input.substring(etherResults[0].length + etherResults.index).match(etherPattern); } return vlanArray; } function getShowVlanList(showVlan) { var i = 0; var vlanIdPattern = "Virtual LAN ID:\\s+(\\d+) \\(IEEE 802.1Q Encapsulation\\)[\\r\\n]+[\\r\\n]+\\s+vLAN Trunk Interfaces:\\s+(Dot11Radio|FastEthernet)\\d\\.\\d+" var showVlanArray = new Array(); vlanResults = showVlan.match(vlanIdPattern); while (vlanResults) { showVlanArray[i++] = vlanResults[1]; vlanResults = vlanResults.input.substring(vlanResults[0].length + vlanResults.index).match(vlanIdPattern); } return showVlanArray; }



Wyszukiwarka

Podobne podstrony:
4a 5 1 2 4 Lab Konfiguracja rutingu pomiędzy sieciami VLAN
2a 3 2 2 5 Lab Konfiguracja VLAN i protokołu trankingowego
Konfiguracja VLAN na przelacznikach serii 00,000 i@00
TI1 VLAN 2
Mikrotik Vlan
Cisco VLAN Trunking Protocol
VLAN uniwersalny
vlan
Vlan Vpn
VLAN Instrukcja dodatek
filter vlan
MikroTik i VLAN
2b 3 3 2 2 Lab Wdrożenie zabezpieczenia VLAN
Sieci VLAN Nieznany
2c 3 2 4 9 Lab Rozwiązywanie problemów z konfiguracja sieci VLAN
Konfigurowanie sieci VLAN
787 W12 VLAN, VPN

więcej podobnych podstron