Minecraft – a great way to learn networking

At our Saturday Raspberry Pi club, James and I keep the format pretty open – partly because it’s an experiment to see what the kids get up to if left to their own devices, but also because we all learn new and exciting things that we wouldn’t learn with a more rigid structure. The adults of the group just hover and dip-in when help or advice is needed.

A couple of weeks ago, one of the lads had spotted that Minecraft had just been released for the Pi, and was one of the first to download it and get it working. “Great”, we said, “Well done for finding something fun to do”. I was a little wary that we might end up with a gaming club, but asked the kids to explain a bit about what you could do with Minecraft.

It soon transpired that Minecraft has a multi player mode that works across the local network, but they couldn’t seem to get it to work. Here was a great learning opportunity! I’m a bit of a network geek myself, having written a few network stacks and web servers in my time, and often getting roped into fixing a few thorny network configuration problems.

Actually, it was surprising how much you can talk about networks when you want to get two computers to work together to play a game – IP addresses need to be understood, the netmask and node addresses need to be on the same subnet, you need to know if you need a straight or crossover cable, what’s a static IP address, where you go in the files to configure a static IP address, using ping to check connectivity and ifconfig to double check the address, and countless other bits of terminology.

Soon the kids had two PI’s connected with a cable and the multi player game working – I’m not sure what they were most pleased with, the fact that they got the multiplayer mode working, or the fact that for the first time, all the LEDs on the Pi were alight!

But, with this solution came another problem – wiring two Pi’s together with a cable and using a static address, meant they couldn’t get onto the internet to download new files. Again, another great learning opportunity, what does a router do, how do IP addresses get assigned when you plug multiple devices into a router, what is DHCP and what does it do, how to confirm your IP address with ifconfig.

A final conversation lead into how to access files over the internet – again, interesting terminology such as firewalls, NAT address translation, public-side IP address, non-routable IP addresses, and port forwards.

I’d hazard a guess that a number of home broadband routers have now been recently reconfigured as a result!

 

This entry was posted in Saturday Club. Bookmark the permalink.

Comments are closed.