Echola FC811 Скачать руководство пользователя страница 14

14 

 

 

 

 
 
In order to automate Echola’s Layer 1 switches you would need to write Tcl/Expect based scripts 
or Perl/Xml based scripts (both example scripts are given below)

. The tcl and expect scripting 

languages are easy to learn. We have given an example script written for fc811/FC811 at the end 
which you can modify to suit your need. There are tons of online sources for learning tcl & expect. 
The following provides quick high level overview of tcl and expect 
http://cplug.org/t/uploads/2009/02/tcl-expect.pdf. There is a good book from O’Reilly which 
provides great insight into expect language itself: “Exploring Expect: A Tcl-based Toolkit for 
Automating Interactive Programs (Nutshell Handbooks)”.  
 

Running scripts from Unix/Linux systems 

 
If you want to run the script from a Unix/Linux based machines then there is possibility that you may 
be already having these tools on your system. Check if it’s already been installed by typing “expect” 
from Unix/Linux prompt. If it is not then you will have to install it using package install tool for that 
particular flavor of Unix/Linux. For instance, on Fedore core Linux, you can use “yum install tcl 
expect” to install tcl and expect.  
 

Running scripts from Windows 

 
For windows based systems you can install windows free community version of ActiveTcl from 
Activestate http://www.activestate.com/activetcl/downloads. The expect is not available yet for 
64bit version of Windows 7/Vista. So you will need to download 32bit version for ActiveTcl first and 
then make sure to install “expect” using command “teacup install Expect”.  
Also you need to enable “telnet” client on Windows before running any scripts. In order to enable 
telnet on Windows follow these steps 
 

 

Start 

 

Control Panel 

 

Programs And Features 

 

Turn Windows features on or off 

 

Check Telnet Client 

 

Hit OK 

 
After that you can start Telnet via Command Prompt to check if it works.  
 
The following sample script actually login into FC811/fc811 switch and issue a switch command then 
check whether the switch command was successful and return the result before terminating the 
telnet session. This script takes argument (port number and state of the port (on/off)) from 
commands line argument. Cut and Paste the following script on to any editor and save as “rosctl”. 
Then you can run the script by issuing rosctl -p <port#> on|off.  For instance, to switch port 2 to ON, 
you can call script as rosctl -p 2 on. Make sure you have proper path set for expect on first line 
“#!/usr/bin/expect” for Unix/Linux based systems. For windows you will have to uncomment ‘ exec’ 

Automating Echola’s Optical Switches 

Содержание FC811

Страница 1: ...________________________________________ ________________________________________________________________________________ Installation Operating Guide Echola Systems L L C 1161 Ringwood Ct Ste 100 San...

Страница 2: ...single fibers or 4 duplex fibers Tx Rx combo to simulate fiber cut scenarios Connecting test equipment to FC811 Suppose if you want to simulate fiber cut scenario between 2 optical devices Duplex Fibe...

Страница 3: ...tion ring testing may require 2 FC811 ports while 4F BLSR might require 4 ports Configuring FC811 FC811 provides a serial RS232 and an Ethernet 10 100 port connectivity for management Serial port is o...

Страница 4: ...s configured from a PC or a Laptop using Ethernet or serial port you can then connect FC811 to your network and access it using telnet or ssh Configuring Dynamic IP If you have a DHCP server running o...

Страница 5: ...2 0 and above osctl S 192 168 1 200 Version Info The following command shows hardware and software versions and serial number of the switch osctl v Other Administrative commands Most of other administ...

Страница 6: ...server to receive FC811 s events osctl S syslog_server_ip For details refer to installation section as these are explained in that section In order to switch ON or OFF particular a port or ports or a...

Страница 7: ...t with c option as explained in Group Management section osctl p 2 off t 120 switch port 2 to OFF after 120 secs delayed switching osctl p 2 off T 120 switch port 2 to OFF gradually with in 120 millis...

Страница 8: ...lls you which ports are part of a group All Ports Status Port Port Status 1 off 2 off 3 off 4 off 5 on 6 on 7 on 8 on Group Status Group Name Port Status gp1 off Group s Port Details GroupName gp1 Por...

Страница 9: ...osctl l port_group in_port For example osctl c gp1 1 3 4 creates group named gp1 with ports 1 3 and 4 The double quotes around space separated port numbers are required Note that when you create a gr...

Страница 10: ...10 delete all groups in the database...

Страница 11: ...s IP address in URL address bar of the web browser The web interface is included in software version 2 2 and above The first page you will see is the management page where you control all ports Follow...

Страница 12: ...12...

Страница 13: ...enu and then Update button to switch corresponding port to ON or OFF Setup page Setup page allows you to change Hostname Static IP address configuration and Dynamic IP DHCP Initially it shows the curr...

Страница 14: ...pts from Windows For windows based systems you can install windows free community version of ActiveTcl from Activestate http www activestate com activetcl downloads The expect is not available yet for...

Страница 15: ...15 and package commands as mentioned in the script All comments inside provide more info on what the script is doing...

Страница 16: ...e password and other parameters modify these to reflect your setup set hostname 192 168 2 20 set username osctl set password osctl set prompt osctl set port lindex argv 1 set status lindex argv 2 set...

Страница 17: ...check status expect re prompt Issue osctl command to check status send commandstatus r Discard echoed command we need only the status expect commandstatus r Discard unwanted prompt as well expect re...

Страница 18: ...18 Terminate telnet send exit r...

Страница 19: ...status on off REQUEST IPADDR xmlapi setstatus php port PORT status STAT print REQUEST REQUEST n req HTTP Request new GET REQUEST req header Cookie test quest res ua request req check status REQUEST IP...

Страница 20: ...works normal All the group information is stored in a hidden XML database file If for some reason this file is corrupted the system will recover from this error by trying to copy the backup database...

Страница 21: ...Typical 0 8 Max without connectors Switching Time ms 10 Crosstalk dB 80 Repeatability dB 0 1 Optical Specification for VFC Series SM Connectivity 16 duplex LC connectors Data rate Any data rate Physi...

Страница 22: ...ny technical questions and need help you can send email to support echola com or call us at 408 321 9663 ext 2 You can also download latest documents and software from our website www echola com optic...

Отзывы: