Port Trunking (Link Aggregation) on Netgear GS748T Switches

Port Trunking (Link Aggregation) on Netgear GS748T Switches

Port Trunking/Link Aggregation allows you to combine multiple switch ports into one. For example, you may combine 8x 1gbit ports into a single 8gbit port to allow a higher throughput rate.

As managed switches go, Netgear GS748Ts are pretty shoddy. For starters, there’s a bunch of hardware revisions which have resulted in very different switches being given the same model number. The difference between V1 and V3 of this switch is such that it looks and functions completely differently… god knows why Netgear didn’t give them different version numbers. Anyway… I digress.

In this blog post I plan to show you how to setup Port Trunking (Link Aggregation) between two GS748T switches. One switch is hardware revision 1 and the other hardware revision 3. My earlier rant and the reason I’m calling it both Port Trunking and Link Aggregation is the former is the terminology used by V1 of this switch and the latter by V3. In the world of Cisco, Port Trunking is related to 802.1Q VLAN Tagging – so you can see why Netgear changed their terminology.

First thing to note is that the Netgear documentation is shocking. The terminology is different and poorly described on each switch. Various bits of documentation will tell you that V3 only supports a maximum of 4 ports in a group and that they need to be in their own VLAN. The web interface is also extremely difficult to use and very cantankerous. This is looking like it’ll be fun, eh?

The case is actually as such:

  • GS748T V3 does not seem to have a limit on the size or mapping of a link aggregation port group
  • GS748T V1 has a limit of 8 ports for ports 1-8 and 9-16 and a limit of 4 ports for the remainder
  • GS748T V1 does not support LACP whereas GS748T V3 does
  • A link aggregation group applies to the VLAN the ports are in – i.e. if your devices are all in VLAN1, your aggregation ports need to be in this VLAN also
  • The trunk group/LAG ID should be the same as the VLAN ID.
  • The web interface for V1 works best in Safari whereas V3 works best in Chrome.

To set this up, do the following:

  1. First ensure that the ports you wish to aggregate are all running at the same speed. The easiest way to ensure this is to set the port speed to auto and disconnect all devices from the ports.
  2. On the V1 switch, go to the ‘Trunking’ menu and enable group ID 01. Now enable as many ports in that group as you require. I did all 8 ports.
  3. Click Apply on this screen.
  4. On the V3 switch, go to the Switching menu and click LAG.
  5. Go to LAG membership and select LAG ID 1 and click the dropdown. Assign as many ports as required to the LAG. This must obviously correspond to the selection you made on the other switch.
  6. Click Apply on this screen.
  7. Go to the LAG Configuration menu and tick LAG ID 01. Enabled Admin Mode and give the LAG a description. Leave LACP turned off as the V1 device does not support this.
  8. Click Apply on this screen.
  9. Connect the ports on the two switches and run some tests to ensure devices on the network can communicate.

Some images of the config are below:

GS748T V1 Trunking Config

GS748T V3 LAG Membership Config

 

 

GS748T V3 LAG Config

 

 

 

PHP: Find the last day of the month

In PHP you can pass the t format character to the date() function in order to get the number of days in the month. Since this number also happens to be the date of the last day of the month, you can use this to your advantage:

Get the last day of the current month:

  1. <?php
  2. echo date('t F Y'); // e.g. 31 December 2011
  3. ?>

Get the last day of the month a timestamp falls in:

  1. <?php
  2. echo date('t F Y', 132456628); // e.g. 31 March 1974
  3. ?>

Netgear GS748T Heatsink Pins – Design Flaw

Netgear GS748T Heatsink Pins – Design Flaw

We have had, in the office, a NetgearWikipedia: Netgear Inc. (stylized, trademarked, and marketed as NETGEAR) is an American global networking company that delivers products to consumers, businesses, and service providers. The company operates in t... GS748T for a while now. This is a mid-range 48 port managed GigabitWikipedia: In computer networking, Gigabit Ethernet (GbE or 1 GigE) is a term describing various technologies for transmitting Ethernet frames at a rate of a gigabit per second (1,000,000,000 bits per second), a... switch which retails at between £350 and £400. We have recently exceeded the capacity of this switch and purchased a second one. We bought this second hand for about £320. The first unit that arrived blew the fuse in its plug on installation and subsequently failed to power up. We returned this for a replacement which, on installation, tripped the RCDWikipedia: These electrical wiring devices are designed to quickly and automatically disconnect a circuit when it detects that the electric current is not balanced between the energized (line) conductor(s) and t... that protected the ring main it was connected to.

There was a rattle inside the unit when it was shaken so we took the case off and discovered 2 missing plastic heat sinkWikipedia: A heat sink (also commonly spelled heatsink[1]) is a passive heat exchanger that transfers the heat generated by an electronic or a mechanical device to a fluid medium, often air or a liquid coolant, ... pins as well as their metal springs. One of the springs was discovered wedged between the case and the main circuit board in the switch and the other wedged firmly between the power supply and the case.

Having Googled this we found this to be a common issue with these switches. These 3 quotes show this:

“I have a netgear gs748t which had a broken heatsink mounting or two. I thought I had recovered all the broken parts when I took out the mainboard but there was still a spring under the psu which shorted when the unit was moved whilst on.”

“Over time, plastic fatigue causes spring loaded pins to pop off and heatsinks will no …”

“I opened it up and found two of the metal springs freely exposed to mainboard … More troubling is that three heatsink pins are unaccounted for and *must* have …”

If you have one of these switches, check if you’re missing any heat sink pins. If you are, their springs are undoubtedly inside the unit somewhere. You may need to remove the main circuit board or the PSU to find them.

We’ve opted to liberally apply glue gun glue to the pins such that if they do break, the springs will stay fairly self contained.

Using ImageMagick to create thumbnails for the web

You can use ImageMagick’s convert tool to resize images on the command line in a Linux, BSD or Windows environment.

The syntax is thus:

  1. convert "/path/to/original.jpeg" -scale 150x150\> -quality 50% -unsharp 1x3+1+.1 -sampling-factor 1x1 -strip "/path/to/new.jpeg"

This breaks down as follows:

  • -scale Resize the image to 150×150 pixels if the image is already larger than that size (as signified by the >). This will not distort the image – rather scale it such that at least one side is 150px.
  • -quality Decrease the JPEG quality by 50% of the original to reduce the file size
  • -unsharp Sharpen the image after resize
  • -strip Strip the profile information. This is important if you don’t require this info in the resized image as I have seen it reduce a 500KB image to 8KB.

Here’s an example of using this to recursively resize all of the images in a directory:

  1. cd /path/to/original/dir; find | grep -i jpg$ | while read line
  2. do
  3. if [ ! -d "`dirname "../JJ-products-2011-12-19-thumbs/$line"`" ] ; then
  4. mkdir -p "/path/to/new/dir/`dirname "$line"`";
  5. fi;
  6.  
  7. convert "$line" -scale 150x150\> -quality 50% -unsharp 1x3+1+.1 -sampling-factor 1x1 -strip "/path/to/new/dir/`dirname "$line"`/`basename "$line"`";
  8. done

The full manual is available here: http://www.imagemagick.org/script/command-line-options.php#profile and here: http://www.imagemagick.org/Usage/resize/#scale

ImageMagick does an awful lot more than this, so check out the manual.

Kwik Fit Rugby: Avoid at all costs

The Short Story

Kwik-Fit have featured on more episodes of WatchdogWikipedia: Watchdog may refer to: than I care to count. They have been criticized for inflated prices and selling work that does not need to be done. The Rugby (Warwickshire, UK) branch is no exception. Avoid it at all costs.

For tyres, I highly recommend BT Tyres in Rugby. For all manner of repair work, services and MOTs, TW Tyres are honest, reliable and competitively priced. TW Tyres, perhaps not suggested by the name, have a full blown repair garage capable of doing simple and advanced repair work. Guaranteed it’ll be cheaper and less hassle than Kwik-Fit.

The Longer Story

There’s nothing quicker than a Kwik Fit Fitter… at trying to pull a fast one in getting you to pay for car work which you simply don’t require. The opening sentence of this blog post bares such a close resemblance to an episode of WatchdogWikipedia: Watchdog is a BBC television series that investigates viewers' reports of problematic experiences with traders, retailers, and other companies around the UK. It has had great success in changing the a... that you should read the rest of it aloud; whilst doing a poor impersonation of Anne RobinsonWikipedia: Anne Josephine Robinson (born 26 September 1944) is an English television presenter and journalist, known for her acerbic style of presenting. She was one of the presenters on the long-running British....

I recently got a puncture in one of my car tyres and, being busy at work, took the car into the Rugby branch of Kwik FitWikipedia: Kwik Fit is a car servicing and repair company in the United Kingdom, specialising in tyres, brakes, exhausts, MOT testing, car servicing, air conditioning recharge, oil changes and windscreen repair.... for a repair. A few minutes after dropping the car off, I got a call from the branch with some bad news. The tyre that was punctured was un-repairable, the front tyre on the other side of the car also needed replacing and they would have to do wheal alignment also. The total cost of this was set to be £245.

I didn’t, for one minute, question the legitimacy of these claims but didn’t like the thought of shelling out £245 because of a single flat tyre. I instead opted to phone around and see if there was a cheaper deal to be had elsewhere. I was informed by the fitter on the phone that the prices Kwik Fit offered were already discounted as they were having a tyre sale, and that I wouldn’t find cheaper elsewhere. After a single phone call to a tyre fitter in Rugby (BT Tyres), I found the same tyres Kwik Fit were selling for £70 each. This would have reduced my cost for 2 tyres and wheal realignment to £165.

I subsequently called Kwik Fit and asked them to match this price. They noted they had a price match promise and that all I needed to do was bring a written quotation from BT Tyres. The logic of this didn’t stack up as I would have had to drive to BT Tyres, get the quotation and then drive back in order to get the same price as I would if I simply got BT Tyres to fit the tyres. I opted for the sensible option and took the car over to BT Tyres to have the work done.

BT Tyres assessed the car and noted that the Kwik Fit fitter was correct in his analysis of the puncture and that tyre did indeed need to be replaced. The assessment of the other tyre, that Kwik Fit noted should be replaced, was that it in fact had another 1500 miles left on it and it shouldn’t be replaced at this time. BT Tyres also noted that the ware on the tyres was so close to the centre that wheal realignment would be pointless.

All in all, the cost was £70 for a single tyre replacement – vastly less than Kwik Fit quoted.

My major objections and the reason that you, the one doing the amusing Anne Robinson impression, shouldn’t take your car to Kwik Fit are thus:

  • The replacement tyre quote was based on using high performance BridgestoneWikipedia: Bridgestone Corporation (株式会社ブリヂストン?, Kabushiki-gaisha Burijisuton) (TYO: 5108, OTC Pink: BRDCY) is a multinational auto and truck parts manufacturer founded in 1931 by Shojiro Ish... tyres. Only after prompting was a lower price alternative even offered.
  • A large establishment such as Kwik Fit should have no reason to invent work or con the customer. The car needed neither a replacement front offside tyre nor wheal re-alignment.
  • The price quoted for the tyres was nearly 60% more than a small tyre shop sold the tyres for – yet Kwik Fit still maintained that they had a sale on and the tyres wouldn’t be obtained cheaper elsewhere. Kwik Fit take advantage of bulk buying but do not pass this on to the customer.

I admire the professional honesty of BT Tyres who could easily have taken a similarly dishonest stance to Kwik Fit.

To summarise, be wary of Kwik Fit… and badgers.