Thursday, May 13, 2010
Fun with Procurve switches
Well, as I found out, you can have a little fun besides just learning and working.
This video was found through this blog: http://bhbodeezy.com/tag/locatorleds/
Monday, March 17, 2008
Switch Port Security
Instead of configuring port security and manually enter MAC address for the port, you could plug all your hosts in then issue the following commands:
Switch(config)#int range f0/1-xx
Switch(config-if-range)#switchport port-security
Switch(config-if-range)#switchport port-security maximum 1
Switch(config-if)#switchport port-security violation restrict
Switch(config-if-range)#switchport port-security mac-address sticky
Switch(config-if-range)#end
The first command takes you to the interface range configuration mode; the next two turn on the port security and set a maximum number of mac addresses to 1. "Violation restrict" will not allow traffic for any host whose mac address is different than what the switch has learned for the port in question. After that, the "mac-address sticky" commands instruct the switch to learn the mac address dynamically and remembers it for the each port.
Thursday, February 28, 2008
Reload
This is where the Reload command comes in handy. Before making changes to the configuration, you can enter:
Reload in 10
which will reload the device in 10 minutes. Once the command is entered, you can proceed with the configuration changes. If things go wrong and you lost connectivity to the device, try back in about 10 minutes since the device will get reloaded with the original startup-configuration and restore connectivity.
Once you confirm that your new configuration is working properly, you can issue the command:
Reload cancel
to cancel the reload. I find this trick to be very useful when I have to telnet or SSH to a remote device and hopefully you too.
Friday, February 22, 2008
Keyboard Shortcuts
Here's the shortcut list:
- Ctrl+B: Moves back one character at a time
- EscB: Moves back one word at a time
- Ctrl+A: Moves to the start of a line
- Ctrl+F: Moves forward one character at a time
- Esc+F: Moves forward one word at a time
- Ctrl+E: Moves to the end of a line
- Delete: Erases the character to the left of the cursor
- Backspace: Erases the character to the left of the cursor
- Ctrl+D: Deletes the character at the cursor
- Ctrl+K: Deletes all characters from the cursor to the end of the line
- Ctrl+U: Deletes all characters from the cursor to the beginning of the line
- Ctrl+X: Deletes all characters from the cursor to the beginning of the line
- Ctrl+W: Deletes the word to the left of the cursor
- Esc+D: Deletes from the cursor to the end of a word
If none of these commands work, enhanced editing may be turned off. You can turn on enhanced editing issuing the command at the privileged command prompt:
Router# terminal editing
Wednesday, February 13, 2008
Stop Logging Messages From Interrupting Your Work
To disable, use:
Router(config)# no logging console
or if you prefer to see what's going on with the router/switch then use the "logging synchronous" command:
Router(config)# line console 0
Router(config-line)# logging synchronous
Router(config)# line vt 0 4
Router(config-line)# logging synchronous
It would be nice if these were taken into consideration and set as default options when the IOS is built but it's not the case so until they change it, you will have to either put up with it or do a little extra work to change the default behavior.
Thursday, December 20, 2007
Protecting Your Network Edge with TTL
Fortunately, you can use TTL (Time To Live) as an additional measure to reduce such DoS attacks against BGP. The default behavior of most BGP implementations is that it will send packets to external neighbors with a TTL value of 1 and accepts packets from external neighbors with TTL of 0 or higher.
You can tighten up your network by changing this default behavior by having BGP originated packets with a TTL value of 255 and only accepting packets with TTL of 254 (measured after the local router has decremented the TTL of the packet it received) or higher.
Now even if the attackers originate packets with a maximum TTL value of 255, the packets can't get to your BGP network if the attackers are not directly connected to the target interface. This is because each router hop decrements the TTL value by 1. If they are two hops away, by the time the packets reach the port TTL will be decremented to 253 and will be rejected.
You can configure the TTL value by issuing the statement:
neighbor-address ttl-security hops 254
This will instruct your router to discard incoming BGP packets with TTL value below 254 and also set outgoing packets TTL value to 255. You will need to make sure that both neighbors are configure with the same statement.
Monday, December 17, 2007
The Day The Routers Die
Note: In the song, the performer (Gary Feldman) mentioned RIPE55 quite a few times. RIPE stands for Réseaux IP Européens (European IP Networks) which is a forum open to all parties who are interested in the technical development of internet and 55 is the meeting number during which he performed the song.
Gary sung in native English accent so it might be a bit hard to understand. Here's a to link the lyrics.
Monday, August 20, 2007
Configure Interface - Cisco vs. Procurve
With Procurve switch, you don't have the same kind of flexibility. Everytime you configure an interface, you would need to Exit out to Configuration mode before you can enter another interface.
Let look at this example on a Cisco switch:
Int g0/1
desc "IBA LAN"
Int g0/2
desc "ESV LAN"
That's perfectly legal on the Cisco IOS. Now configure that on a Procurve switch:
Int g0/1
name "IBA LAN"
exit
Int g0/2
name "ESV LAN"
If you miss Exit command, you'll received an "Invalid Input" error because you can not go to a different interface from within an interface. I never like this approach and prefer the shortcut where you enter two commands on one single line. Not only it cuts out the Exit command but keeps you in the Config mode.
Int g0/1 name "IBA LAN"
Int g0/2 name "ESV LAN"
Tuesday, July 17, 2007
Cisco Command Aliases
Alias Exec for Privileged Mode.
Alias Configure for Global Configuration Mode.
Alias Interface for Interface Configuration Mode.
Let say that you want to shorten Show Running-Configuration command to just two keystrokes, you could define it as follow:
Router(Config)# alias exec sr Show Running-config
Or if you want to use ns to perform No Shut command on an interface you could define it as:
Router(Config)# alias interface ns no shutdown
So now instead of typing out all those long commands you could type sr for show runn or ns for no shut down and still achieve the same desired effects.
Cisco IOS includes some built-in command aliases. You can view these aliases by using the "show alias" command. Here are the default command aliases:
- h - help
- lo - logout
- p - ping
- r - resume
- s - show
- u - undebug
- un - undebug
- w - where
Monday, July 16, 2007
Show Running-Configuration
Sometimes, this command yields so much output one would be overwhelm with the amount of text on the screen and have to keep pressing the space key to scroll down to see more information.
Well, if you know what you are looking for then you could add a command prefix " begin keyword" and it'll start showing the configuration from that where the keyword occurs.
SwitchA# Show runn | begin spanning-tree
In the example above, the switch will show the current configuration from the line where it finds the first occurrence of the word "spanning-tree".
Using this command can really save you all the trouble of spacing through all the text only to find that you go too fast and miss the relevant information and have to scroll back to look for it.
Tuesday, June 12, 2007
Changing IP on Cisco/ProCurve Switch
conf t
interface vlan 1
ip address 10.10.10.2 255.255.255.0
The Cisco switch will update the IP address and disconnect your session. On a ProCurve switch, if you issue the same commands it will spit out an error saying:
"The IP address (or subnet) 10.10.10.2/24 already exists."
If you were going through the console port, you can set the new IP using the following commands:
conf t
vlan 1
no ip address 10.10.10.1/24
ip address 10.10.10.2/24
However, you can't do that if you connect to the switch remotely. As soon as the "no ip address" command is received and processed by the switch, your session will be disconnected and you won't be able to get to the switch.
The trick to get around this issue is to make this IP address change through the switch's built-in menu system instead of using the plain old CLI.
1. Type "menu", hit Enter
2. Select "Switch Configuration"
3. Select "IP Configuration"
4. Navigate to Edit, hit Enter
5. Change the IP and then Save
You will be disconnected once you save it but you will be able to reconnect using the new IP.
