RSS

Debunking the IPv6 Has More Security and QoS Myths

I thought that in the year 2011 …when the we’ve had so much talk about IPv6, lots of the smoke about what IPv6 is capable of and what it isn’t capable of would have cleared. Unfortunately not.

Today I read this piece from CNET and I went “really? in this age, some major tech website still writes this kind of thing?”. Here are some of the claims they make about the new IPv6 ready DLink routers:

 

[a] “Enhanced network security: Plug in an IPv6-enabled D-Link router and the new security feature is automatically turned on.”

Exactly what new security feature are we talking about here? Just to clarify what has been done several times allover the web, even though implementation of IPsec is mandatory for IPv6, its usage is NOT and so IPv6 does not yield any new security benefits over IPv4. In fact, poorly managed, IPv6 is a security risk as it could completely bybass all that air-tight security you did for IPv4 on your network edge.

[b] “Increased network speeds and accessibility: As Web sites start to offer content over IPv6 and ISPs deploy IPv6 service, an IPv6-compliant router offers faster connection speeds and provides access to Web sites and applications that have transitioned. With its better design, IPv6 has integrated quality of service, so traffic is classified by voice, video, and data, and transported accordingly, resulting in faster network speeds.”

Puff!!!! Again, IPv6 doesn’t currently offer anything in QoS that IPv4 does not. And sorry to break it to you, but your connection speed is still going to depend upon how much bandwidth you have and not the IP version you are using.

To understand the source of this myth, look at the figure below which show the IPv4 header next to an IPv6 one. With respect to QoS, notice that:

  • The field responsible for QoS (specifically enables a packet to be marked for special treatment) in IPv4 was “ToS” ie Type of Service. This field is 8 bits long. In v6, the field was renamed to the more appropriate “Traffic Class” but same size and brings nothing new.
  • In IPv6, there is one new field … the “Flow Label” which is the source of this myth. The flow label in theory is meant to identify upper layer flows so that a router can identify upper layer flows without having to look beyong layer 3 (which could be time-consuming and slower). In reality, that field’s usage has not been defined and so it is currently unused. Therefore …right now, IPv6 offers nothing new to QoS that IPv4, thus making the assertion that IPv6 is faster false.

IPv4 and IPv6 Headers Compaged

Even I used to propagate these myths which are based off of the original intentions of the IPv6 designers …but as time has gone on, we must do a reality check …the major benefit of IPv6 today is more address space and with that …maybe a return to the original end-to-end model of the Internet. Who know what cool innovations will result from that?

 

 


 

 
3 Comments

Posted by on May 16, 2011 in Ubuntu

 

Tags: , , ,

IPv6 Subnetting Made Easy

Introduction

Call it emotional attachment to IPv4 or whatever you like, but recently I have become more and more interested in finding and easy way to subnet IPv6 prefixes in my head like we are used to doing in IPv4. This post expands on an idea I picked off of the NANOG mailing list.

The method presented here is for the quick subnetting in your head, which you should get by practice. So it works well for a small number of subnets (16 max) but can be expanded for any number of subnets. However if you have to deal with more than 16 subnets, it is certainly more efficient to use any of the several IPv6 calculators out there (my favourite is sipcalc – a command line tool).

This method helps you answer the question: “Given the prefix PPPP/Y, what are the sub-prefixes of length /Z (where Z > Y) that can be gotten from it?“

I assume that you understand the fundamentals of IPv6 addressing, very basic binary and hex math. I also assume that you know how to arrive at the value Z from an analysis of your network design or requirements.

Definitions

  • Hexit – a single hexadecimal digit (0 – 9 , a – e). A hexit is made up of 4 bits.
  • Hex grouping – each of the groups of hexits of an IPv6 address that are separated by colons.
  • Defining hexit – the hexits that change for each subnet but stays the same for the same subnet. Think ‘interesting octet’ from IPv4 subnetting days. You could simply look it up from the following table.

The bit ranges that define various IPv6 hexits

  • Parent prefix – the original prefix to be subnetted in prefix/length format.
  • Y = prefix length of original prefix
  • Z = prefix length of subnets of original prefix

The Procedure

Calculate the following parameters

  1. Number of subnetting bits:  x = Z – Y

  2. Number of subnets possible with x bits: S = 2^x

  3. Number of hexits represented by the x bits: h = x/4 (this should be rounded up to the next integer)

For a given number of subnet bits (x), the defining hexit for each subnet will increase in value according to the increment, from hexadecimal zero (0) to “e” as shown in the table below. Note that the ‘definining’ hexit(s) is simply the one after the boundary hexit (that defined by original prefix length Y.

IPv6 Quick Subnetting Reference

IPv6 Quick Subnetting Reference

 

Examples

[a] Subnet 2001:db8::/32 into /36s

  • Subnetting bits (x) = 36 – 32 = 4 (these will give us 16 [i.e. 2^4] subnets.

  • Number of hexits represented by 4 bits = 4/4 = 1

  • From the table, the defining hexit should increment by 1 with discrete hex values 0 – e.

  • Thus our subnets are:

2001:db8:0000::/36
2001:db8:1000::/36
2001:db8:2000::/36
2001:db8:3000::/36
2001:db8:4000::/36
2001:db8:5000::/36
2001:db8:6000::/36
2001:db8:7000::/36
2001:db8:8000::/36
2001:db8:a000::/36
2001:db8:b000::/36
2001:db8:c000::/36
2001:db8:d000::/36
2001:db8:e000::/36

[b] As a small end site, you received the 2001:db8:c001:ba00::/56 assignment from your ISP, and you have 3 main office locations you want to divide this block between. Find these 3 subnets.

  • Number of subnets required = 3

  • Subnetting bits (x) such that (2^x) >=3 , x = 2 (this will actually give us 4 subnets of equal prefix length). Also the prefix length of our subnets will be 58 (56+2)

  • Number of hexits represented by 2 bits = 1

  • From the table, the defining hexit should increment by 4 with discrete hex values 0, 4, 8, c.

  • Thus our subnets are:

2001:db8:c001:ba00::/58
2001:db8:c001:ba40::/58
2001:db8:c001:ba80::/58
2001:db8:c001:bac0::/58
Please drop me a comment if you have suggestions of how to make this even easier and happy v6 subnetting …in your head.
 
10 Comments

Posted by on May 9, 2011 in Networking

 

Tags: , , ,

Ubuntu Idyll Cisco Study Environment

I have written a few posts in which I mentioned the amazing GNS3/Dynamips/Dynagen set of tools that enable you emulate a Cisco network …. also a great too used to prepare for the Cisco CCIE lab exam [Professor of Internetworking]

Here are a couple of things I have used that make creating and using labs a nirvana experience in Ubuntu … [constant flow for those who understand Emotional Intelligence]
1. Because I hate having multiple console windows open, one for each router which is the default behaviour of GNS3, I wrote the script [tamonet.sh] in the previous post that essentially takes as an arguement your topology (.net) file and then opens each router console in a separate tab in gnome-terminal.
2. I modified my gnome-terminal profile so that my background is translucent. That way, I can have a document (e.g a workbook) I refer to in the background and read instructions or make references without having to switch windows.
3. Initially, to launch my lab with my tamonet.sh script, I would open up either a terminal or the RUN application box [Alt-F2] and issue the command …. that is until I discovered awn-terminal. Boy! …. first of all, AWN is a cool dock application for Ubuntu and one of its applets is a nifty cool terminal that you just click and it pops up a next-gen-like translucent terminal. You just type in your command and as soon as u move focus from it, it automatically closes … no clutter on your desktop!!
4. And finally … when I am doing such work, I play music. Mozart is ideal for me but I generally prefer any kind of music without vocals. It is the vocals I find distracting. So for me, to complete the ensemble, it is Mozart, Beethoven, Tchaikovsky or soundtrack music [Prison Break, Stargate etc]

Given what I mostly do these days [putting in my 10000 hours to master my craft as a network engineer] and my passion for Ubuntu … I enjoy every single moment I spend building and executing scenarios and everyday, I say thank you to the guys who selflessly make all this possible …and it reminds me to keep sharing what little I know. Happy Valentines day guys and babes … do spend vals with someone real … far away from your laptop ok?

 
5 Comments

Posted by on February 9, 2009 in CCIE, Dynamips/GNS3, Linux, Ubuntu

 

Tags: , , , , ,

Open GNS3 Router Consoles in Multiple Tabs in a Single Window [GNOME]

As a follow up to my previous post of the above topic, I finally put together a script. I have two scripts, one specifically written for the Internetworkexpert Dynamips topology. The second one can will log into any topology – it takes the name of the .net file as an argument for example
$./tamonet.sh BGPlab.net
Just copy this code, put them in a file with the .sh extension and  make then run them from a command line AFTER you have started your routers in GNS3

<———————————————————————————————————————->

#!/bin/bash

#tamonet.sh

# The purpose of this scrip is to launch all running Dynamips router consoles in such a way that all consoles exist
# as tabs in a single terminal windows, rather than the
#default behavior to open multiple windows that just clutters the desktop.
#Script written by Mukom Akong TAMON [mukom to tamon at gmail dot com] …..
#Use and distribute freely …. just give me credit for creating it ok? … ;-)
#Save this with an sh extension, make it executable and then you can run either from
#inside an existing terminal or you press ALT+F2 and then run it. You must pass it the name of the .net file of your current lab
#e.g ./tamonet.sh BGP-Lab01.net
#It is best if you copy the script so it is in the same directory as the directory in which the .net file is.
#Obviously, this script only works for Linux distributions that are using GNOME eg Ubuntu.
PORTS=/tmp/ports
NAMES=/tmp/devicenames
TELNETCMDS=/tmp/telnetcmds
TELNETTABNAME1=/tmp/telnettabname1 #Initial set of command arguments for gnome terminal
TELNETTABNAME2=/tmp/telnettabname2 #Strip away the tab from the commands — just in case
TELNETTABNAME=/tmp/telnettabname #the commands sorted so we have things sequentially
LASTCMD=/tmp/lastcmd.sh

#First delete the files if they exit
rm -f $PORTS
rm -f $NAMES
rm -f $TELNETTABNAME
rm -f $TELNETCMDS
rm -f $TELNETTABNAME1
rm -f $TELNETTABNAME2
rm -f $LASTCMD

#Xtract the ports from .net file and put them into ports file in /tmp
grep -E console $1 | sed s/console\ =\ // | tr -d [] | tr -s ‘[:blank:]‘ >> $PORTS

#Create corresponding file that containts the names
#grep -E ROUTER $1 | sed s/ROUTER\ // | tr -d [] | tr -s ‘[:blank:]‘ >> $NAMES
grep -E ‘\[\[ROUTER' $1 | sed s/ROUTER\ // | tr -d [] | tr -s ‘[:blank:]‘ >> $NAMES

#This block constructs the telnet commands for each router and writes them to $TELNETTABNAME
#inst=0
for i in $( cat $PORTS ); do
# let inst=inst+1
#echo >> $TELNETCMDS “telnet localhost $i -t”
# echo >> $TELNETCMDS “\”telnet localhost $i\” -t”
echo >> $TELNETCMDS “\”telnet localhost” “$i\”" ‘ -t’

done

#Combine the telnet command with the device name on same line
paste $TELNETCMDS $NAMES>>$TELNETTABNAME1

#replace all tabs with a single space.
expand -t 1 $TELNETTABNAME1>>$TELNETTABNAME2
#cat $TELNETTABNAME #| tr ‘\t’ ‘” -t “‘

#Now sort the file
sort $TELNETTABNAME2>>$TELNETTABNAME

#how many lines [routers] in the file?
routers=`wc -l $TELNETTABNAME` #count lines in the file and set result as variable routers.
routers=${routers%$TELNETTABNAME} #Make the routers variable an integer?
echo “There are $routers Routers in this topology”
let “routers = $routers+1″
#declare -i routers #This seems not to serve any useful purpose that I know of
echo “I now start with a router count of $routers”

#This block reads in the commands from a file and assign each line to a dimensioned variable R[x]
{
counter=0
while [ "$counter" -lt "$routers" ]
do
read R[$counter]
let “counter=$counter+1″
done
} < $TELNETTABNAME

#This block just prints out the contents of the dimension – I want to be sure I read the right things into the variables
counter=0
while [ "$counter" -lt "$routers" ]
do
echo ${R[$counter]}
let “counter=$counter+1″
done

#Build the gnome-terminal command and options from the contents of the R[x] dimension
counter=0
let “routers=$routers-2″ #One main window and then the -2 so we cover just the right number of tabbed auxilliary windows
command=”gnome-terminal –window –maximize -e ${R[$counter]}”
#command=”gnome-terminal –window –maximize -e “${R[$counter]}”"
while [ "$counter" -lt "$routers" ]
do
let “counter=$counter+1″
command=”$command –tab -e ${R[$counter]}”
#echo $command
done
echo >>$LASTCMD $command
chmod 777 $LASTCMD
$LASTCMD

<———————————————————————————————————————->

I appreciate any modifications …. and this works for me … so I don’t have to get KDEbase libararies just for konsole4KDE. I hope u enjoy it.

The second script I developed from ideas i saw online …. you really shouldn’t need it cos it only works for the Internetworkexpert .net files.

<———————————————————————————————————————->

#!/bin/bash
#This script enables me login to all routers in the Internetworkexpert Dynamips standard lab
#in such a way that all consoles exist as tabs in a single terminal windows, rather than the
#default behavior to open multiple windows that just clutters the desktop.
#Script written by Mukom Akong TAMON [mukom to tamon at gmail dot com] …..
#Use and distribute freely …. just give me credit for creating it ok? … ;-)
#Save this with an sh extension, make it executable and then you can run either from
#inside an existing terminal or you press ALT+F2 and then run it.
#Obviously, this script only works for Linux distributions that are using GNOME eg Ubuntu.

# — start multi-tabbed telnet session
r1=”telnet localhost 2001″
r2=”telnet localhost 2002″
r3=”telnet localhost 2003″
r4=”telnet localhost 2004″
r5=”telnet localhost 2005″
r6=”telnet localhost 2006″
sw1=”telnet localhost 2007″
sw2=”telnet localhost 2008″
sw3=”telnet localhost 2009″
sw4=”telnet localhost 2010″
bb1=”telnet localhost 2011″
bb2=”telnet localhost 2012″
bb3=”telnet localhost 2013″
gnome-terminal \
–window –maximize -e “$r1″ -t R1 \
–tab -e “$r2″ -t R2 \
–tab -e “$r3″ -t R3 \
–tab -e “$r4″ -t R4 \
–tab -e “$r5″ -t R5 \
–tab -e “$r6″ -t R6 \
–tab -e “$sw1″ -t SW1 \
–tab -e “$sw2″ -t SW2 \
–tab -e “$sw3″ -t SW3 \
–tab -e “$sw4″ -t SW4 \
–tab -e “$bb1″ -t BB1 \
–tab -e “$bb2″ -t BB2 \
–tab -e “$bb3″ -t BB3

<———————————————————————————————————————->

 
5 Comments

Posted by on January 15, 2009 in CCIE, Dynamips/GNS3, Linux, Open Source

 

Tags: , ,

Making GNS3 Routers Open in Tabs in Ubuntu

If you use GNS3 network emulator with a significant number or routers, each usually opens up in its own terminal window which just makes your workspace a mess.

While I know I can install konsole-for-KDE4 in Ubuntu to sort out the clutter, I don´t like to have to download more than 30MB extra software [KDE base libraries and other dependencies] so I opt to create this scrip which I can easily edit.

Just download the script, make it executable and after running the your lab from GNS3, rather than use the toolbar button to log into to all consoles, instead press ALT+F2 and type in the path to the script [do remember to make it executable] and voila!!!

On Vista, I use Teraterm for my console and so the above problem does not exist. If you use the default Vista command prompt you will run into the same problem. I read a nice GNS3 tutorial that suggested a free Windows utililty called Wintabber to tame those multiple windows.

If your Linux distribution uses KDE, install konsole-for-KDE4 and use it as your terminal program in GNS3 to get the same results.

I am working on some scripts to automate the process for Ubuntu and gnome-terminal — I don’t want to install all the KDE base packages just to get konsole-for-KDE … will post the scripts [bash] when I am done.

 
2 Comments

Posted by on January 5, 2009 in CCIE, Dynamips/GNS3, Linux, Open Source

 

Fixing the Menu Editor in Ubuntu

I had my shiny new 64-bit Ubuntu 8.10 up and running and then decided to do some arrangements on my menus  and behold … I would right-click on the Ubuntu icon and select Edit Menus but nothing would happen. Even a trip to Preferences->Main Menu was unresponsive. Well, I know that the program that does menu editing in Gnome is called alacarte, so I decided to run alacarte from the command line and that is where I discovered the source of the problems. U see during setup, when u choose you language and country, Ubuntu setup uses them to decide your locale, so in my case my locale turned out to be en_NG (Nigerian English) and that was just not an acceptable locale to Python (the programming language in which alacarte is written). So how do you fix it? … simple, just set your locale to one of the mainstream (whoever decides that, I don´t know) ones, in my case, since we actually use British English.

Go to Settings.Adminstration.Language Support. In the Default Language section, choose English UK, or English US.
I suspect that French France, Spannish Spain etc would work for the other major languages.

With those settings, just log off and log back in (or better still just reboot) and your menu editing woes will be over.

For the curious, with my choice, my locale became en_GB (or is it en_UK?) which was an acceptable locale to Python.

 
Leave a comment

Posted by on January 2, 2009 in Ubuntu

 

Saving Router Configurations Across GNS3 Sessions

For those who use GNS3 to emulate Cisco networks, sooner you get to a point where you would love to save the configuration and pick off from where you left. Uptill recently, I used the crude method of exporting my configuration files and then manually setting them as the startup config for each router. I however found a better way of recent … just save your lab as a GNS3 Project. Here is the procedure:
1. Lay out your lab: U know, place devices, connect them, configure switches and even default router configs (if you have a default config you typically use eg aliases, idlepcs and logging synchronous)
2. Run your lab (click Start/Resume all IOS)
3. Telnet into each of the routers and configure it to your heart´s desire. Make sure you do a copy run start or a write terminal after you finish configuring each router.
4. With your lab still running, switch back to the GNS3 window and click File->New Project. Type in a name for the project and be sure to check the ¨Export router configuration files¨ option.

5.
Click Ok and GNS3 will ask whether you want to apply the project settings to which you say yes.
6. GNS3 will extract the config from your routers and save them for you and automatically set them as startup config for the next time.
If you look in the directory where you saved the project, you will find that GNS3 creates the following:

  • A project file eg lab.net
  • A directory to store config files with the same name as the .net file of your project eg lab01_configs. In it you will find files with the name of your routers and the .cfg extension eg (R1.cfg, R2.cfg etc)
  • If you selected the option in the New Project dialog box, a working directory folder is also created eg lab01_working.

Next time, you can just open your lab, launch right in and start having fun.

 
2 Comments

Posted by on December 30, 2008 in CCIE, Dynamips/GNS3, Linux, Networking

 

Simulating a Host in Dynamips/GNS3

For those who don’t know what Dynamips is …. aaaaaaaahhh … it is a very cool piece of software that allows us to emulate any Cisco router and even the PIX. It is a very useful tool for experimenting with Cisco-based networks and one of the cheapest ways to prepare for the CCIE lab. I use it for the later purpose and also to get some hands-on practice with various networking technologies. GNS3 is a very cute graphical front-end to Dynamips which is more suited for adhoc experimentation due to the simply way you can create any topology by dropping devices and connecting them. I was watching a video class on IPv6 when something the instructor said hit me “… without the ipv6 unicast-routing command, this router will not function as a router”! …. immediately I fired up my copy of GNS3 and to simulate a host, I added a router and proceded thus to make it a ‘host’ 1. Disabled routing [no ip routing in global config mode] 2. Configured and IP address and subnet mask on an interface and enabled the interface. 3. Gave the router a default gateway by typing ip default network a.b.c.d where a.b.c.d is the IP address of the router to which this ‘host’ is connected. An viola! I had a host I could ping from. This enables me to simulate a LAN connected to the router … definitely a more elegant way that using loopback addresses which is what I was using until now. So experiment away and drop me any suggestions.

 
4 Comments

Posted by on November 10, 2008 in CCIE, Dynamips/GNS3

 

Tags: , , ,

Dumping Ntop Data

One of the most common questions people as is how to dump ntop data into a database. Well there are scripts to do that for a MySQL database on sourceforge.net.

However, within ntop, just click Utils|Data Dump to show the following dialog box:

You can dump data about different objects into different formats – see the ntop guide for the formats. Some of these formats are importable into a spreedsheet and from there you can unleash the full power of Open Office Calc or Excel unto your traffic data.

 
1 Comment

Posted by on October 16, 2008 in Linux

 

Tags: , ,

Displaying a Host’s Active TCP/UDP Sessions

Ok, suppose your sleuthing aroung with ntop finally identifies a particular host as the major consumer of bandwidth, what if you want to find out just what exactly s/he is doing online that is consuming so much bandwidth? Here is how ntop can help:

1. Identify the host you are interested in [one way is to sort on the Data for Network Traffic stats for local hosts.

2. Click on that host to bring up the Info about xxxxx page where xxxx is the name or IP address of the host you are interested in.

3. Scroll down to the bottom of the page to the Active TCP/UDP Sessions table. A screenshot is shown which "lays it all out for you". It almost something like you'd get running netstat on the host albeit cuter?

 

Active TCP/UDP Sessions for a Host

Active TCP/UDP Sessions for a Host

 
3 Comments

Posted by on September 10, 2008 in Linux, Network Monitoring, Open Source, Ubuntu

 

Tags: , , ,

 
Follow

Get every new post delivered to your Inbox.