Recently, as part of a larger Perl application, I had to get all the files and sub-directories of the working directory. Using the built-in ‘glob’ function, I was able to quickly implement a subroutine to do this and also differentiate a file from a directory. In a list context, as demonstrated below, the ‘glob’ function returns a list of file/directory names that match the pattern. I then loop through this list and differentiate a file from a directory and store it in its respective array. Pretty quick and simple! Continue reading
Perl – Get files and directories with the glob function
Setup Telnet Access on Cisco Switches
This quick lab assumes you already have an IP address for telnet assigned on the Cisco switch. Once that is setup and you are able to ping the IP address, you can setup telnet access on the Cisco switch with the following commands: Continue reading
Possible Reasons for LAN Traffic Congestion
If you are experiencing slowness on your LAN here are some possible reasons that you can investigate:
Continue reading
Useful FTOS “show” commands
There are several FTOS “show” commands that can provide very useful information regarding Force10 Networks switches/routers. I have outlined a number of these very useful commands with a short description of each below. However, keep in mind that although most of the commands I reference below are available on all Force10 platforms some of the commands may only pertain to specific Force10 platforms such as the C-Series or E-Series. Continue reading
Use Perl’s regex to count the # of words in a file
In the below code I use Perl’s regex capabilites to count the # of words in a file. Notice I used “\s” in the regex expression to account for not only spaces but also tab and new line characters. In addition, it is important to account for whitespace characters at the start of a sentence, because the “split” function would end up counting the starting whitespace as a valid entry. Continue reading
Port Monitoring on Force10 Switches
In this lab I will demonstrate how to do port monitoring on Force10 switches and capture the packets using a network protocol analyzer (Wireshark in this case). Port monitoring allows the copying of all incoming/outgoing packets on a specific port to be mirrored/forwarded to another port where a network protocol analyzer is attached to analyze the traffic. Port monitoring is sometimes also referred to as packet sniffing, and, as you have probably guessed, packet sniffing can be used for malicious purposes. For the majority though port monitoring or packet sniffing is used for a variety of troubleshooting, security, and reporting tasks. Continue reading
Setup VRRP with Force10 Switches
In this lab I setup Force10 switches with Virtual Router Redundancy Protocol (VRRP). VRRP is a redundancy protocol used to eliminate a single point of failure between a gateway and its respective hosts within the same subnet. I use three different Force10 switches: E1200 [FTOS 8.4.2.1], S60 [FTOS 8.3.3.4], and S55 [FTOS 8.3.5.0]. Below is a diagram of the network and the commands I used to configure VRRP. Continue reading
Setting up Cisco EtherChannels – Static, PAgP, and LACP
In this lab I used a Cisco Catalyst WS-C3750G-24TS switch [IOS 12.2(25)SEE3] and a Cisco Catalyst WS-C3560G-24TS switch [IOS 12.2(40)SE]. I also physically connected GigabitEthernet 1/0/17 on the Catalyst 3750G to GigabitEthernet 0/17 on the Catalyst 3560G; I did the same for GigabitEthernet 1/0/18 and GigabitEthernet 0/18 respectively. At this point I have two GigabitEthernet connections between the switches. Continue reading