Haiku #129

No sooner said than

Done: That's the CS network

Subnet cmdlets.

 

A lot of people – most notably their managers – wonder what the authors of the Lync Server PowerShell blog actually do during the course of the day. Well, this morning, the author of today's haiku spent his time trying to break the world's record for text messaging. The author of today's haiku was aware that they held text messaging competitions; what he didn't know, until today, is that there is a standard phrase used in these competitions.

 

The razor-toothed piranhas of the genera Serrasalmus and Pygocentrus are the most ferocious freshwater fish in the world. In reality they seldom attack a human.

 

The current world's record for texting that message? 25.94 seconds. The author of today's haiku decided that his goal for the day was to try and break that record.

 

Note. Actually, his original goal for the day was to break the world's record in the 10,000 meter run (26:17.53). However, it was a little chilly and a little damp out there this morning, so he decided to go after the text messaging record instead.

 

Besides, breaking the world's record for the 10,000 meter run would probably mean having to actually run 10,000 meters. No human being could do that!

 

So how did he do? Well, on his first try he clocked in at 168 seconds, a mere 142.06 seconds off the world's record. (Which, had he stuck with his original plan of running the 10,000 meters, would have been pretty good.) On his second try – well, we won't talk about his second try; obviously he was still tired from his first attempt. His third try didn't go all that well either – for one thing, he spelled fish 3is4 – but on his fourth try finished his text message in just 129 seconds.

 

It's just a matter of time now.

 

Or it would be, except that, by the time he completed his fourth try, he had gotten bored with the whole thing, and so he set his sights on a new target: the world's record for fastest Lync Server daily haiku article. Hang on to your hats, folks: this is going to be a wild ride.

 

In order to give him the best possible chance to break the record, he decided not to write about the razor-toothed piranhas of the genera Serrasalmus and Pygocentrus, but to instead focus on the CsNetworkSubnet cmdlets (Get-CsNetworkSubnet, New-CsNetworkSubnet, Remove-CsNetworkSubnet, and Set-CsNetworkSubnet). Why did he choose the CsNetworkSubnet cmdlets? Two reasons. First, these cmdlets form the basis of the network configuration settings used for Call Admission Control and for the Enhanced 9-1-1 service. To configure a network for use with either of these technologies, you first create subnets, which – coincidentally enough – correspond to your real network subnets. These subnets are then associated with network sites, and those network sites are then collected into network regions. At that point, you can then start doing all sorts of fun things, like placing bandwidth limitations on the network connection between your Redmond office and your Dublin office.

 

Note. What if you don't have a Redmond office or a Dublin office? That's OK; we're pretty sure this works for other locations around the world as well.

 

The other reason he decided to go with the CsNetworkSubnet cmdlets is because there really isn't much to talk about here: these cmdlets are pretty simple and pretty straightforward. For example, here's a command that creates a new network subnet for the subnet 192.168.0.0:

 

New-CsNetworkSubnet -Identity 192.168.0.0 -MaskBits 24 -NetworkSiteID Redmond

 

Like we said, there's really nothing to this. The Identity of the subnet is simply the IP address of that subnet; the NetworkSiteID is the network site that you previously created using the New-CsNetworkSite cmdlet. You say you don't remember what sites you previously created using the New-CsNetworkSite cmdlet? That's OK; just run this command to get back information about all these sites:

 

Get-CsNetworkSite

 

Remember, too that these are network configuration sites, which are not the same thing as the Lync Server sites that get returned when you run this command:

 

Get-CsSite

 

The only other thing you need to specify is MaskBits, the bitmask for the subnet. To be honest, we don't know very much about subnet masks; about all we know is that, in an address such as 192.168.0.0/24 the bitmask part is the 24, which indicates (we think) that 24 bits (out of the 32 available bits) are allocated to network routing and the remaining 8 bits are reserved for host addresses. And what exactly does that mean? Say, did we ever tell you that the world's record for text messaging is 25.94 seconds?

 

Note. In other words, we don't know enough about networking to even pretend to explain bitmasks. But we can tell you this: the MaskBits parameter is a required parameter, and it must be an integer value between 1 and 32, inclusive.

 

That's really all there is to creating a new subnet. If you later need to make a change to one (or more) of your subnets, well, that's what the Set-CsNetworkSubnet cmdlet is for:

 

Set-CsNetworkSubnet -Identity 192.168.0.0 -MaskBits 32

 

As you can see, that command changes the bitmask for subnet 192.168.0.0 to 32. If you need to get rid of a subnet then just run the Remove-CsNetworkSubnet cmdlet:

 

Remove-CsNetworkSubnet -Identity 192.168.0.0

 

And, of course, the Get-CsNetworkSubnet cmdlet is always there to allow you to retrieve information about all your subnets:

 

Get-CsNetworkSubnet

 

And sure, you can do lots of other fun things with Get-CsNetworkSubnet. For example, this command returns all the subnets associated with the Redmond site:

 

Get-CsNetworkSubnet | Where-Object {$_.NetworkSiteID –eq "Redmond"}

 

This commands returns all the subnets on the 192.168 network segment:

 

Get-CsNetworkSubnet –Filter "192.168.*"

 

Etc, etc.

 

That's all we have for today; how long did it take to write today's article? 56 minutes and 12 seconds? Shoot: we knew it was a bad idea to go get a doughnut halfway through. Oh, well. We'll be back to try again on Monday.