Wednesday, January 25, 2012

Cisco Configuration Tip - Command Macro To Change IP Address

Network Engineer at a Bar
Remotely changing an IP address on a Cisco router or switch, or moving an IP from one interface to another can be a challenge.

Cisco allows you to use macros although I have not really worked with them. rekrowteN has a great blog post about using macros to move an IP address from one VLAN interface to another.

In a previous Configuration Tip I discussed using the reload in/at commands to prevent getting locked out of a router or switch.

In this scenario we need to move the IP Address assigned to interface VLAN 1 to VLAN 10.

For this tip start by entering reload in 15.

Next we create the macro
conf t
macro name mgmtchange
interface vlan 1
no ip address
interface vlan 10
ip address
no shutdown
The "@" signifys  at the end of the macro. To apply the macro enter:
conf t
macro global apply mgmtchange
Once the change is made and you can reconnect don't forget reload cancel.

Configuring Command Macros

Have you used macro's? What Macro scripts do you use?

Tuesday, January 24, 2012

Cisco Configuration Tip - Protect Your Tail

cisco command reload
I have long been a fan of the Cisco "reload in/at" commands. These have saved my tail a number of times. This enables a brave network engineer to schedule a device reload for either a specific amount of time from now, 15 minutes, or just a specific time such as 11:00pm.

Protect Your Tail
Network Engineer Protecting His Tail
This has saved my tail a few times when working on a remote device. When changing ACLs or firewall rules there is always the potential of getting locked out. It has also saved me when debug messages flooded a device and I could not get the telnet/ssh session to respond.

Bonus Tip: When I have to debug a router or a switch I open a second telnet/ssh window. The primary window is set to terminal monitor so I can see the messages. In the second window I type in "undebug all" but don't press enter. If the debug messages get out of hand in the primary window, I switch to the second window and hit enter.
 Before making configuration changes, do the following:
copy run start
terminal monitor (so you can see reload countdown warnings
reload in 15

You are now free to make changes. If you get locked out, sit back and wait for the reload.

When you have made changes and still have access type:
reload cancel
copy run start


Thursday, January 19, 2012

Configuration Tricks - Catalyst 4900M with CVR-X2-SFP and 1Gb SFP

Cisco Catalyst 4900M

The Cisco Catalyst 4900M is a high performance, low latency, layer-3 switch suitable for Top of Rack 10Gb link aggregation or small data centers server connectivity. eWeek testing validated 320 Gbps throughput, or 16 10G ports running at full line speed with latency of ~2.6 microseconds.

The 4900M chassis includes 8 fixed wire-speed X2 ports. Two half-card module slots can be added for additional ports. Supported modules available are:
  • WS-X4920-GB-RJ45 - 20 port 10/100/1000 RJ45
  • WS-X4904-10GE - 4 port wire speed 10GE (X2)
  • WS-X4908-10GE - 8 PORT 2:1 over subscription 10GE (X2)
  • WS-X4908-10G-RJ45 -  8 PORT 2:1 over subscription 10GbaseT
I recently had a situation were we deployed a Catalyst 4900M with the WS-X4920-GB-RJ45 and WS-X4908-10GE modules. The switch needed to connect a 1GB metro Ethernet circuit. No problem, with the 20 port 10/100/1000 module we had it covered...So I thought.

Network Engineer #SMH
The service provider handed off 1GB multi-mode fiber.

How Do I Connect 1GB Multi-Mode Fiber To This Thing?

Cisco 4900M 8port 10Gb Module
The WS-X4908-10GE offers 8 10GE ports at a 2:1 over subscribed ratio. A feature of this card is the ability to convert 10GB ports to dual-1GB ports with SFP transceivers.


The CVR-X2-SFP Cisco TwinGig Converter is installed into an X2 port and 2 SFPs are plugged into the TwinGig

(Note: The CVR-X2-SFP10G can be used to convert a 10GB X2 port into a 10GB SFP+ port)

Pre-Sales - Cisco Dynamic Configuration Tool
The first step happens in the sales process. Using the Cisco Configuration tool, you choose the WS-X4908-10GE module.

Second, click the "+" next to the 4908 part number, click the "+" next to the Port Group 1, click "SFP options" then choose the GLC part needed.

Now you can't see it, but this adds the CVR-X2-SFP TwinGig Converter Module.

Using this method, the CVR-X2-SFP is included at no-cost. Otherwise the converter sells for $195 list price.

Installation - Good 'ol CLI
The half-card slot the WS-X4908-10GE is divided into 4 port-groups. 8 ports divided by 4 port groups = 2 ports per group. A command is required to convert a port-group into 1GB ports. Since an entire port-group is converted, two of the X2 ports are switched to 1GB.

The Catalyst 4900M is based on the Catalyst 4500 family of switches. the 4900M carries over the configuration concept of modules. Module 1 is the fixed 8 ports of 10GB, module 2 is the top left slot, and module 3 is the top right slot.

To see the current port-group can be seen with:

4900# show hw-module module 3 port-group
Module Port-group Active                         Inactive
   3        1     Te3/1-2                        Gi3/9-12
   3        2     Te3/3-4                        Gi3/13-16
   3        3     Te3/5-6                        Gi3/17-20
   3        4     Te3/7-8                   Gi3/21-24

To change the configuration the command is:
4900(config)# hw-module module 3 port-group 4 select gigabitethernet

Verify the configuration with:

4900# show hw-module module 3 port-group
Module Port-group Active                         Inactive
   3        1     Te3/1-2                        Gi3/9-12
   3        2     Te3/3-4                        Gi3/13-16
   3        3     Te3/5-6                        Gi3/17-20
   3        4     Gi3/21-24                      Te3/7-8

Next a reboot is required.

We ran into a small caveat. We created interfaces G3/23 and G3/24, connected the 1GB SFP into G3/24 but the interface would not connect. We had to move the 1GB SFP to interface G3/23.