Pages

Sunday, March 13, 2016

Nexus 5548UP Firmware Upgrade with Dual-Homes FEXes

We have dual-homed our FEX for about 2 years now. Until recently, I have been told by lots of Cisco SEs that Cisco do not recommend dual-homed FEX, for various reason, including complexity.
We dual-home our fexes for a very specific reason, and I would still continue to do it for our 1GE FEX. Anyway, it's not the point of this post.

I have always been so worried about firmware upgrade the Nexus since the dual-home FEX is like an unknown area for me. Also, I know that our Nexus Environment do not qualify for ISSU since we have other switches downstream from the Nexus, that means we have to do DISRUPTIVE upgrade.

Today, I just went through the upgrade, from 6.0(2)N2(4) to 7.0(7)N1(1).

Before the upgrade, I found 2 articles from Cisco. One show how to do firmware upgrade on Dual-home FEX situation on 4.x, and the 7.x document that don't even mention about dual-home fex.

5.0(3)N1(1)
http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/upgrade/503_N1_1/n5k_upgrade_downgrade_503.html

7.0(5)N1(1)
http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5500/sw/upgrade/705_N1_1/n5500_upgrade_downgrade_700.html#pgfId-641650

The #1 concern for me is that Disruptive Upgrade will reboot all FEX at once. The instruction is to upgrade Primary switch, FEX will  get new firmware, but stay operation and not-yet-upgraded after Switch1 upgrades. After Secondary switch upgrades, all FEX will reboot at once and get new firmware. I don't like that at all. But I spotted on the early document that after Primary Switch is upgrade, the FEX will be "unrecognized" by Primary, but still fully operational under Secondary switch, which means I can manual reload the FEX, and when it comes back, it will be "online" with Switch-1, and "offline" with Switch-2 until Switch-2 upgrade. I couldn't get TAC to confirm my theory, so I bid the bullet and went through the upgrade. It went well, really well with no hiccup.

Below was the procedure, step by step.
1. Upgrade Primary vPC switch using "install all" command. Do not use "force" switch.
2. Once Primary is upgrade, it will also "upload" the new firmware to all FEXes, but the FEX will not be upgraded.
3. Wait 10 minutes after the Primary fully-operate after reboot, do "show fex". You will see that the Primary Switch now see all FEX with "AA .... not matching".
4. Connect to Switch-2 console, do "show fex" and all FEX are online.
5. Under Switch-2 console, do "reload fex xxx", one fex at a time. Switch-2 will state that FEX is down.
6. Connect to Switch-1 console, wait for roughly 3 to 4 minutes, the reloaded FEX will start communicate with Switch-1 (which is now in newer firmware). Wait until Switch-1 reports FEX is online, then repeat step [5 to 6] for the rest of the FEX.
7. After all FEX are upgraded and "online" with Switch-1, upgrade Switch-2 with "install all...." command.

That should wrap up the firmware upgrade process.

Thursday, February 18, 2016

Access-list Fun - CCIE R&S Preparation

I'm a few weeks away from my 1st attempt to CCIE Route & Switch Lab exam. In our study group, we call this period "Beast Mode". We lab daily, nightly, and try to all all day on the weekends.
Anyway, it's not the point of this post. As I lab through various workbooks, I always found myself stumble on getting odd Filtering task using Access-list. For some odd reason, wildcard always cause trouble in my head. 10 out of 10 times, I will figure it out correctly, but it takes me a while to get the calculation together. This time, I will write it in here. Again, I love disclaimer, and here is it again
"This is how my head agree on doing access-list with wildcard mask calculation. I believe everyone has a different way to accomplish the same task. If my method confuse you on step 2, stop and figure out your own way. The answer key is at the bottom of the post, as long as you can get to the correct answer (all the time), that's all that matter."

Assume we are running some routing protocol between R6 and R8.
R8 has a list of Loopback Interfaces.


You are tasked to ensure that R6 only see the ODD third-octet of that network ranges, means R6 should only see

There are several ways to do it. Like I stated above, my head hate wildcard, so I always start with regular subnet mask.

Method 1 - Be as specific as possible
Let's break it down. We don't care about 1st octet "192" and 2nd octet "168". Also the 4th octet "0" is typical. Using my windows calculator, I converted my 3rd octet to Binary
  • 210 = 1101  0010
  • 211 = 1101  0011
  • 212 = 1101  0100
  • 213 = 1101  0101
  • 214 = 1101  0110
  • 215 = 1101  0111
  • 216 = 1101  1000
  • 217 = 1101  1001
  • 218 = 1101  1010
  • 219 = 1101  1011
we need to filter all EVEN number, so that our final result should look like below in Binary

  • 211 = 1101  0011
  • 213 = 1101  0101
  • 215 = 1101  0111
  • 217 = 1101  1001
  • 219 = 1101  1011
Looking at the binary, the below bit are the same
  • 211 = 1101  0011
  • 213 = 1101  0101
  • 215 = 1101  0111
  • 217 = 1101  1001
  • 219 = 1101  1011
I will convert "1101 0001" back to decimal, which is "209". So our network will be 192.168.209.0.
Let's move on to the subnet-mask. The rule of subnet-mask is, "unchanged bit = 1" and "change bit = 0", so the subnet-mask for the ODD range, the 3rd octet subnet-mask is "1111 0001", which is "241" in decimal. The entire subnet-mask can be written as:
  • Binary:  1111 1111 . 1111 1111 . 1111 0001 . 0000 0000
  • Decimal: 255.255.241.0
The network we choose will be: 192.168.209.0/255.255.241.0
Now writing the ACL is easy
  • access-list 10 permit 192.168.209.0  0.0.14.255
Method 2 - Be as broad as possible.
This method rely on the fact that the set of networks in R8 are limited to the range listed above. In another word, there is no 192.168.220.0/24, or even 100.5.27.0/24, basically those networks are the only network show up in R8 routing table. 
1st and 2nd octet has no restriction, same as 4th octet. That's why instead of writing "192.168.x.0", we can write "0.0.x.0"
Now the "x" will be interesting. At the list below
  • 211 = 1101  0011
  • 213 = 1101  0101
  • 215 = 1101  0111
  • 217 = 1101  1001
  • 219 = 1101  1011
That's all we need to worry about for Broad matching. We need ODD number, and if the 1st bit is "1", for sure we will yield ODD number, ranging from [1-255]. Again, our actual range in the router is [210-219], so even if our Access-List's matching range is super wide, we will still see the same matching as Method 1. Let's write out the network first: "0.0.1.0"
Applying the same concept as method one to this subnet-mask calculation, "unchange bit = 1", "change bit = 0", the subnet mask will be 
  • Binary:  0000 0000 . 0000 0000 . 0000 0001 . 0000 0000
  • Decimal: 0.0.1.0
Yes, it looks like the network, no, they do not always match like this. The network we choose will be: 0.0.1.0/0.0.1.0.
If you put it into the ACL with wildcard mask instead, we will have
  • access-list 10 permit 0.0.1.0 255.255.254.255
Conclusion
. This is strictly for CCIE Lab preparation. If you have to do this in actual network, you have too much fun. ;)
- Lot of workbooks, and practice lab or mock-lab's answer keys love method 2. I guess since it's broader, it will be safer if later tasks in the lab ask you to add more network into the Permit/Deny access-list. For me, first method works out better in my head. 
- That's all I have for tonight. It's said that I only finished half of what I was planning to do tonight, but... I got to write another blog.

Good luck on your study! I hope you don't land on this particular post while searching solution for Production environment.

Thursday, February 5, 2015

TCLSH scripting for CCIE Study

I learned this from INE training videos, taught by Brian McGahan. A lot of people already share this out publicly. I mainly post this here to serve as my permanent notebook for my study


In a lab where I have 10 IPs I need to ping from 10 different routers, a tclsh script really speed up the process. I created the below script in Notepad

tclsh
foreach var {
192.1.1.1
192.1.1.2
192.1.1.3
192.1.1.4
192.1.1.5
192.1.1.6
192.1.1.7
192.1.1.8
192.1.1.9
192.1.1.10
} {ping $var
}

You can replace "ping" with "traceroute". Remember to enter "tclquit" once you're done.

Another note, notice the location of the brackets, this is the only syntax that actually works for me.

Have fun! 

Tuesday, June 24, 2014

Policing Traffic per VLAN Interface (SVI) on Catalyst 6880-X


My first official technical post. Unfortunately, it is not about Data Center. My work has been dragging me into dealing with the new Catalyst 6880-X, so I have to delay my post on Data Center study.

In this blog post, I will share with you the configuration that I am currently using to apply Bandwidth throttling on VLAN interface using policing.

To understand Policing, and also burst rate, I would recommend the below 2 blog posts:
  - QoS Traffic Policing Explain by Rene Molenaar: http://networklessons.com/quality-of-service/qos-traffic-policing-explained/
  - The meaning of Burst Rate (BC) with Traffic Policing by Petr Lapukhov: http://blog.ine.com/2009/12/12/the-meaning-of-bc-with-traffic-policing/

For my configuration, I stick with the formula
   bc = 1.5 * CIR
where bc is the burst rate, 1.5 is a golden value of token refresh rate (tc) and CIR is the Committed Rate.

Interface Te5/1/5 is a trunk port connect directly to the firewall, which will carry all 4 VLANs.

The goal is to policing incoming and outgoing traffic of on each vlan. VLAN71 will have full 10Mbps (CIR), allow to burst up to 15 Mbps (bc) (bc=1.5*10Mbps), same as VLAN81. With the same calculation, VLAN72 and VLAN82 will have 25Mbps CIR, and bc = 37.5Mbps.

A note from IOS CLI is that CIR's unit is bps (bit per second), and increment of 1000 (not 1024). BC's unit, however, is Bps (byte per second). So, the above number will turn out to be
  - CIR = 10Mbps = 10,000,000 bps
     BC = 15Mbps = 15,000,000 bps = 1,875,000 Bps
  - CIR = 25Mbps = 25,000,000 bps
     BC = 37.5Mbps = 37,500,000 bps = 4,687,500 Bps

Here is my config
1.) Enable QoS Police on the platform

2.) Create class-map to match traffic. I created two separate ones, although they are exactly the same. You can create just one if you like

3.) Create policy-map to police the traffic. In my example, I also use PIR (peak rate, in bps)

4.) Enable VLAN-BASED QoS to the physical/trunk interface. The interface is actually Te1/5/5. I made a typo in my visio diagram above


5.) And finally, apply it to the SVI that I want to.


I hope this is helpful to anyone who land on my blog. It took me a while to finally get the config to work correctly. TC value is very important. Changing TC value will control the actual amount of bandwidth the interface allows.

One draw back on my post is that I haven't completely understand Policing yet. There are values and concept that for now, I'm taking it as it is. Eventually, I will follow-up with another post where I will take on QoS Policing and BC with my own understanding.

Thank you for reading.