Networking Primer – Part 6.1: Data Link Layer, Ethernet and MAC

Previous:Networking Primer – Part 5.3: Network Layer – IP Routing

In previous posts we’ve covered logical addressing and moving IP packets of data across our network from source to destination. We’re now going to take a further shift towards the bits and bytes details of how that logical addressing and routing relates to the more tangible physical media that is used to transmit the data.  This is where the Data Link Layer becomes applicable.  “The Data Link Layer” is a bit of a mouthful, so this is often dropped and the OSI stack layer number is substituted, Layer 2. From this point forward I will use “Data Link Layer” and “Layer 2” as interchangeable terms which mean exactly the same thing.

The Data Link Layer breaks down into two sub-layers. Firstly, we have the upper sub-layer, called Logical Link Control (LLC) and beneath it we have the Media Access Control Layer.  The LLC Layer is responsible for establishing links (connections) between devices in the same local area. It also includes some error checking and handling. The MAC Layer encapsulates a set of protocols and rules for how those devices will gain access to the physical media in order to transmit/receive data.

Historically, there have been a number of competing protocols and topologies used at this layer.  In the 80’s and later Ethernet, FDDI and Token Ring approaches were all vying to become the standard for LAN (Local Area Network) traffic, but unquestionably due to its flexibility and reduced cost, Ethernet has won that battle.  Most LANs are built on Ethernet today, although more recently with the rise of mobile devices, it has become a shoulder to shoulder partner with the WLAN (Wireless LAN) which provides WiFi access to networks.

Ethernet

Ethernet is predicated on the concept of giving network nodes access to a shared physical media, where all nodes in the network can either send or receive data. In its original incarnation, coax (coaxial cable) was used as Ethernet’s shared physical media combined with a Bus topology. As more and more devices were added to the network, the coax based approach did not scale well and became difficult retain reliable service. The coax approach was superseded by the use non-shared physical media interconnected via network devices which we have yet to introduce such as Hubs, Bridges and Switches.  Before we get to the topologies we should look some of the other functions and terminology.

As with our upper layers, when the data is passed down to this layer we add another additional outer wrapper that includes all of the relevant metadata we need to work with Layer 2 functions. We are effectively adding some header information and may also break down our data further if that is required by the underlying devices. In the network layer, we have so far referred to our chunks of data as Packets (IP Packets), at this layer we refer to our chunks of data as Frames (Ethernet Frames). To re-iterate the clear distinction here: Network Layer = Packets, Data Link Layer = Frames. This is useful terminology to get clear.

We’re ready to send our frame out onto the physical media but how will the other nodes know whether or not they’re the intended recipient? Answer, MAC addressing.

MAC Addresses

IP Addresses are a logical constructs that can be allocated, de-allocated, moved and re-used. To physically tie our node to the network, IP addresses are not used. We have a different addressing mechanism at Layer 2, this is the MAC (Media Access Control) Address.  The physical component that interacts with the network from our node is the NIC (Network Interface Card). Historically, at the time of manufacture each NIC was allocated a unique MAC Address from a world-wide pool, so it could be differentiated on any network. The MAC Address is a 48-bit address that is most commonly displayed in hexadecimal format (e.g. 28:CF:E9:1F:B4:79). While it is not as humanly readable as an IP address is, it’s still a better representation than the underlying 48 0’s and 1’s that we’d have to remember without it.  Do the following to check your local MAC Address:

When our frame leaves our node via our NIC onto the shared media, the layer 2 wrapper includes both a source and destination MAC Address.  This is all good but there’s a problem we have missed here, we know the destination IP address, but where did we get the destination MAC address from? Well there isn’t a DNS style server that stores and provides this. As the nodes are all on the same physical media (sometimes referred to as “broadcast domain”) we can simply ask all the nodes, but we need some protocols to do that. This is where ARP (Address Resolution Protocol) joins the party.

ARP (Address Resolution Protocol)

ARP is simply a mechanism for finding and storing relationships between IP and MAC addresses.

Each node retains a local ARP table/cache which lists relationships between IP and MAC Addresses. When a frame is being sent, the sender cross references the IP address with its local ARP cache. If the IP/MAC combination isn’t listed, an ARP request is broadcast to all nodes on the network to find it. In plain English, the source node is asking “What’s the MAC for this IP address I have?”. All nodes pick this request up, and if they are the intended node, they’ll reply with a “That’s me and here’s my MAC address.” response. The response is cached for future reference.

Side note: There is also a protocol called RARP (Reverse Address Resolution Protocol) which does exactly the opposite. It was used so that nodes could find their own IP address, if they only knew their MAC. This protocol is now obsolete and has since been superseded BOOTP which was in turn superseded by DHCP functionality.

 In the same way that we can use IPCONFIG/IFCONFIG to display, alter IP configurations, we can use the ARP command to view, manipulate the ARP cache. Examples here:

The ARP cache is not always up to date, especially where IP address changes might be frequent, so it is worth familiarizing yourself with the ARP switch commands that are used to directly manipulate the cache during troubleshooting. For instance, “ARP -D” can be used to delete entries. There are also mechanisms for flushing the whole table.

Now we have all of our layer 2 addressing sorted, our frame is ready to go.

Next: Networking Primer – Part 6.2: Media Access Control – CSMA/CD, CSMA/CA

Networking Primer – Part 5.3: Network Layer – IP Routing

Previous: Networking Primer – Part 5.2: Network Layer – DNS and DHCP

Up until this point, all of the layers, addresses and other attributes we have discussed have conceptually existed inside either the source or destination node.  We now need a mechanism for physically moving the data from point A and B.  While it is possible and would provide a very simple solution to delivering data, having a single connection between each source and destination node isn’t feasible.  This might be appropriate for a test system in a lab where we could use a cross-over cable to connect two computers together, but we would face insurmountable challenges if we tried to connect the billions of devices in the world together with one-to-one connections.  We need to split down our global network into smaller interconnect pieces and it is at this point we introduce additional devices outside of the nodes that will be responsible for routing the data between source and destination. These additional devices are very aptly named “Routers”.

In reality the internet is a huge complex and organic network that spans the globe like a gigantic spiderweb. While it would be interesting to dig into the internet in great depth, we’ll stay with our theme of simplicity.

Map of The Internet

Map of the Entire Internet 2014 – Source : www.caida.org

The Default Gateway

In most small to medium-sized environments there will be a single router that is responsible for taking packets destined for external nodes and routing them accordingly. If the source and destination nodes are inside the same network, then there is no need for a router to be involved as the nodes will usually be connected to the same physical media, have access to the same broadcast domain and can communicate directly.  If the destination node is outside of my network, my source node will automatically send it to my Default Gateway, which is the router that will forward it on towards the external destination.

A Router is essentially just another computer that sits on its own IP address in the network. Rather than having a server or desktop operating system installed, it has a stripped down specialised operating that is optimised for the processes required for routing.  If you look underneath the CLI (command line interface) for the device, you will find that the operating system is most likely a descendant of UNIX or Linux, that has been tailored for this specific purpose.  Traditionally, these devices were built on custom hardware, with custom chipsets designed to perform with rapid speed in mind. This is something that is changing. With the continued exponential performance increases in commodity x86 hardware, the cost/benefit ratio of using custom hardware versus decoupled software backed by commodity x86 servers no longer stacks up in custom hardware’s favour. I’ll address this in more depth in future posts.

The nodes in our network are aware of the default gateway, as they the default gateway address is either configured manually or provided by the DHCP server at network configuration time.  On Windows, the Default Gateway can be identified using the IPCONFIG command:

Default Gateway Highlight

When the default gateway receives our packet, it examines the destination IP address, performs a lookup in it’s routing table to find where to send it and forwards the packet onward to the next router in the journey.  It’s important to note here that the Router might not necessary know the final router’s destination address, it simply knows the address of the next hop or step to take.  The same process happens at each decision point (router) in the journey, until the packet finally reaches it’s end destination. This being the router that is responsible for (has authority over) the network where the destination node is hosted.

How do Routers Know Where to Route?

While it is possible to manually edit the routing table by adding static routes for the next hop of known destinations, routers are thankfully much more intelligent. There are a number of protocols which routers can implement, so that they may automatically discover and share route information. This makes networks very flexible and also able to adapt quickly to change. These protocols are sub-divided into two groups, IGPs (Interior Gateway Protocols) and EGPs (Exterior Gateway Protocols).  IGPs are used in larger environments where an organisation might have multiple routers and many nodes with multiple geographical or logical segmentations. One such protocol is RIP (Routing Information Protocol). EGPs are used at the border between autonomous systems (i.e. at the gateway between networks that are controlled by different entities). BGP (Border Gateway Protocol) is an example of an EGP.

Additional Tags

It is worth mentioning at this point that in addition to simple packet forwarding, modern routers also give us some extra functionality. One area where we can leverage the router is to enforce a certain level of service. We are able to flag each packet with a priority, this comes in the form of a DSCP (Differentiated Service Code Point) tag that we can place in the IP packet header. This can be used by routers that support QoS (Quality of Service) operations to prioritize packets. By default, higher priority packets will be sent first, and lower one’s queued in buffer space until there is bandwidth available to send them. If the buffer capacity fills, the router will simply discard lower priority packets that won’t fit in the buffer. This might sound like a very bad thing, but that’s where TCP would step in for important packets and resend them when the notification is received from the destination that packets haven’t arrived.

The Pirate Ship: In our pirate scenario, we’ll say that the Post Master in the mailroom of my office is my Default Router.  If I wanted to send my Lego package to another room in the building, I wouldn’t bother the Post Master, I’d simply use a different mechanism to get it to the other room which we’ll discuss in future posts. In this instance, I do want to send the package to an external address so the first point it will reach is the Post Master. Before sending the package to him, I have put some additional information on it, in the form of a marking that says “1st Class”. This would be analogous in the IP world of applying QoS tags to ensure the packet receives the appropriate level of service.

He reads the marking and ensure’s the package is dealt with before other lower priority packages. He knows that it needs to be posted at the local Post Office and sends his mailroom assistant on his bicycle to do this immediately. The local post office receives the package, examines the destination address and performs another routing action. As it’s going from Manchester to London, the next hop for the package is to send it to the North West UK Distribution Centre (NWUKDC). It’s placed in a van and sent the same day. Packages aren’t delivered directly from NWUKDC to locations in the South East. They are bulk transported via truck to the South East equivalent Distribution Centre, SEUKDC. From there my package is routed and sent by van to the local London Post office and then by Post Man to Rich’s office door. At each point in the journey the package is examined and sent to the next hop.

Rich’s room will now receive the package from his Postmaster, and he’ll unwrap it accordingly. This will happen for each piece of the ship and as it arrives, it will be reassembled into the full original form.

Next: Networking Primer – Part 6.1: Data Link Layer, Ethernet and MAC

Networking Primer – Part 5.2: Network Layer – DNS and DHCP

Previous:Networking Primer – Part 5.1: Network Layer – IP Addressing

We have seen in the previous section that each node in a network requires an IP address and that four part address is considerably more human readable than the underlying binary bits that it represents. Unfortunately, our meagre human brain power still has trouble with recognising and differentiating between the addresses. For the same reason, we don’t have postal addresses like this: building 1, street 52, town 34843, city 2828, region 292, country 6, we need another method of identifying the addresses of our nodes. This is done with what’s called a Fully Qualified Domain Name (FQDN). A typical FQDN looks just like the one at the top of  you browser: www.bltbytes.com. These names are very easy for us to understand, but the underlying network components can’t understand them. We need a system or method for translating IP addresses to FQDNs and vice versa. That’s where Domain Name System (DNS) joins the party.

Domain Name System (DNS)

DNS is a simple concept. It does exactly what we highlighted above. It provides a way for us to map an FQDN to an IP Address.  The use of DNS in its simplest form involves a client (requestor) and DNS server.  Let’s say that we want to use our web browser to read an article on BLTbytes. When we enter the FQDN (www.bltbytes.com) into our browser address bar and click go, the browser becomes the client in the DNS operation. It will send a query to your local DNS server to ask what the IP Address is for that FQDN. The DNS server will look this up in its database and send it back to the browser. The DNS server then steps out of the loop and the browser will initiate a direct connection to the web server that is hosted at the IP address we have been given.  Simple right?

There is however, a much more involved multi-DNS server architecture that exists behind this process. It would be great if our DNS server could hold every FQDN and IP address in the world in its database and instantly refresh, along with everyone else’s DNS servers every time there is a change, but that would be one very huge database and there would be a massive amount of synchronisation data being transmitted across the internet at any one time. It would ultimately be ridiculously inefficient and not a sensible approach. There would also be a number of difficulties around who own’s what FQDNs and who doesn’t. I’m sure that Coca Cola wouldn’t be very happy if Pepsi decided that their website should sit at www.coca-cola.com.

DNS Tree

The naming scheme on the internet actually breaks down addresses into components that can be authoritatively controlled by those who own the addresses. Another way to refer to those components is as sub-domains or child-domains. This allows us not only to establish ownership of domain names, but also to distribute the management of those components, The data is stored and updated in a distributed manner. Behind the scenes, the naming scheme looks a little like a tree. At the top of the tree we have a root and then immediately below we have domains such as .com, .org, .net, .uk. There are actually only 13 Root DNS servers in the entire world that manage the data for where to find those top-level domains. Below those we see our organisational (or in some cases, personal) names such as “coca-cola”. Then we usually see our individual node addresses, e.g. “www” or “email”. These components make up our full address, www.coca-cola.com. When we send a DNS request to our local server, if it doesn’t own (also referred to as authoritative control) the domain name space, it will contact a root server and then be referred through an iterative process down through the branches of the tree to the DNS server that ultimately owns that name space.

Dynamic Host Configuration Protocol (DHCP)

In the early days of IP networking, all nodes on a network would be manually configured with an IP address. Addressing was not dynamic and therefore we would assign a “static” IP address to each node. Times have certainly moved on. With the explosion of devices and the requirement for mobility and flexibility (e.g. to easily attach to and detach from networks) we needed another way to assign IP addresses. This is where DHCP comes in. Using a DHCP server on our network allows us to create policies for automatically assigning and revoking IP addresses in the network. We can put controls around the types and identities of devices who have permissions to receive addresses. We can also issue a lease on each IP address so we may reclaim them after a defined period of time.

Once a device has physical (whether wired or wireless) access to the network it’s able to start the process of broadcasting requests for an address. This is a simple 4 step process that runs as follows:

DHCP Assignment Process

Once acknowledgement is received the requesting node then starts to use the assigned address in its network stack. It’s worth noting here that the DHCP isn’t giving the node anything tangible. It’s really just saying, you can use that address. It’s possible to configure the node with an address statically regardless of what the DHCP server has done and this is where IP address conflicts may occur. An IP Address conflict is where two or more nodes on the network are advertising the same address. This sort of issue needs to be resolved quickly as it can cause havoc with communications.

While sitting on a network, a DHCP server is ultimately assuming responsibility for handing out addresses and controlling the available address pool, but DHCP does a little more than just hand out IP addresses. It also configures other information on the node, like where it can find DNS and what address it should use to get to outside networks.  DHCP can be used as an attack vector, that hackers could use to gain access to a network. If the attacker gains physical access to the network, they could install their own DHCP server and that server would automatically respond to requests, thus giving the attacker the ability to control some of the network communications.  DHCP will not only provide an IP address it also tells the requesting client where the DNS server is on the network. Can you imagine the control an attacker could have if they have control of DNS? Let’s say you wanted to upload the blueprints for your super secret new game changing widget and the DNS server is telling you that the super secret file server is at one IP address when really, it’s at another. You would have no idea that you are uploading to the wrong place until you realised it wasn’t in the right place.  This has been fixed in modern networking, DHCP servers now need to authenticate with a Domain Controller before they are able to start working on the network.  DNS & DHCP security attacks are a large area to cover and outside of the scope of this primer, but hopefully the example above gives a taste of what is possible.

The Pirate Ship: For simplicity, we’ll keep DNS and DHCP out of our analogy.

Next: Networking Primer – Part 5.3: Network Layer – IP Routing

Networking Primer – Part 5.1: Network Layer – IP Addressing

Previous: Networking Primer – Part 4: Transport Layer, TCP and UDP

The clue might be in the title, but the Network Layer is one of the more important layers in the network stack.  So far we have defined high-level identities, application services and data formats. We have also established our protocols, chopped up data into smaller more manageable pieces and tagged them with a sequence number. It is at this point we need to start defining more details on where we will be sending the data and moving closer to establishing a unique address for both source and destination. We also need network components to be in place to allow us to transmit and route the data appropriately.

Image of 3D IP Address

The two core concepts at work in this layer are addressing and routing.

Addressing: Internet Protocol (IP)

The most ubiquitous protocol used for network addressing and routing is the Internet Protocol, IP (i.e. the IP from TCP/IP). As with most protocols, there have historically been alternatives such as IPX/SPX Novell Netware’s protocol, but these have mostly disappeared as IP has become the defacto standard for data communication. Again, the clue might be in the name here, but it is this protocol that underpins the internet and fundamentally enables everything we do on the internet.

The first thing we need to consider in IP, is addressing. For each node in a network (note: nodes are sometimes referred to as Hosts), we need to provide a unique IP address.  As of today, the bulk of internet communications use IP version 4 (IPv4). IPv4 defines an address as four numbers between 0 and 255, separated by periods  (For example: 135.168.0.23). The format is a little strange and this is due to the underlying need for the systems to convert the more human readable IP address to/from the more computer usable binary representation of the address.

This works very much like a postal address. In a postal address we have a house number, a street name, a city, a region, a country and a post code (USA: Zip Code).  An IP address is much simpler. That four part address is actually  made up of a Host ID (i.e. Node ID) and a Network ID. So really all we need in IP is a house number and a Post Code.  We can split the above address into two parts as follows:

Network ID: 135.168.0
Host ID: 23

For the purposes of this primer, we will keep it simple. In reality, due to the nature of the mapping between binary bits and IP address components. Splitting the address into a Host and Network ID can become much more complex and may straddle the two numbers on each side of a period. You can, for instance, have a node that sits on 135.168.10.2 and another node that sits on 135.168.10.244. One might assume that these are both on the same network (135.168.10) but they could be on different networks. For each node, we apply what’s known as a subnet mask and it is this mask that dictates which Host IDs sit in which networks. There are some moderately involved calculations that happen in the background to decide where the Host to Network split occurs in an address. If you want to do this, my best advice here is to go find a subnet mask calculator.

Networks are also defined by their size, Class A (large: up to 16,777,216 addresses), Class B (medium: up to 65,536 addresses) and Class C (small: up to 256 addresses). There is also a Class D & E but these are not related to size.

A typical subnet mask for a Class C network, looks something like this:

Subnet: 255.255.255.0

IP Network Scope: Private vs Public and NATing

It is worth understanding a little bit about scope here. A network’s scope may be restricted in an isolated room with no connectivity to the outside world. In which case, all the nodes in that room must have unique network addresses. Let’s call it Room 1. If we have another similar room (Room 2) of nodes all isolated from the outside world, those nodes could have the same addresses as those in Room 1. There is no requirement for uniqueness as the isolation of the two networks means there is never any confusion over which node has which address as they never communicate between rooms. This is most commonly referred to as a private network.

On the internet, all addresses must be unique but due to the exponential growth of the internet, public IPv4 addresses have become scarce as there simply aren’t enough of them to hand out. This has led to organisations implementing architectures where they can minimise the use of public IP addresses. An organisation might only have one public IP address, but many hundred’s of nodes inside their network. So how do all those nodes talk to the outside world? This is done through a process called NATing (NAT – Network Address Translation).  The analogy with the postal service here, is that an office building may have a front door number (Public IP Address), but lots of room numbers inside (Private IP Addresses). Different buildings will have different front door numbers, but inside their is nothing stopping them having the same room numbers (Room 1, Room 2, etc).

The NATing process is responsible for handling the conversion of private IP addresses to public ones and back again. You can think of this as a mail manager sitting at the front door. When someone from Room 1 sends something out of the building, the mail manager logs it’s destination in a table and the fact it came from Room 1. In the destination building, the receiver doesnt necessarily know it’s from Room 1, they just know that it came from that building. If they respond, the mail manager checks his table sees that the originating communication came from Room 1 and sends the reply back up to Room 1.

Public and Private IP Example

In fact, even today it is very likely that your own home uses this concept of public and private IP addressing. If you have broadband at home, the router that your ISP provided will manage a pool of internal private IP addresses that are handed out to your devices (Computers, IPads, TVs, etc) and a single public IP address that the provider uses to identify you on the internet.

Note: There is a new IP protocol which has been available for some year, IPv6. This resolves the “running out of addresses” problem, but isn’t widely deployed today.

Let’s take a look at the IP configuration on your system. Note: PC/Laptop only:

  • Go to your Start Menu and search for and run “Windows Powershell”. This may be in a slightly different location depending on your version of windows. At the Powershell prompt: Type “IPCONFIG” and see the results. You should see something like this:

    IPCONFIG Powershell Screenshot

    Some of the items listed will be recognisable, such as IPv4 address and Subnet Mask. There are also some other items like Default Gateway which we’ll cover in later posts.

  • Open up a terminal window and type IFCONFIG. On a Mac you will see a result that looks like this:

    IFCONFIG Screenshot

    I’ve highlighted some of the same information that you could also see on the Windows tab. The output here is a little more complex and has much more content. We can see our IPv4 address “inet 192.168.0.2” and also our subnet mask “netmask 0xffffff00”. You’ll notice that the subnet mask is much less recognisable and this is because it’s displayed in hexadecimal format, instead of standard IP or binary. If you convert the hexidecimal to IP, you get 255.255.255.0 which is a standard Class C network subnet mask.

    Linux produces a similar format to this with some slightly different details, but ultimately following the same approach. As you might expect Linux and Mac systems have many similarities due to their sibling nature and UNIX ancestry.

IP addresses are clearly an important factor in the network layer, but even though we have a unique network identity for both our source and destination nodes, they wouldn’t be of much use if we didn’t have a way to direct the data packets across the network from source to destination. That’s where routing comes in.

The Pirate Ship: Let’s use some of the similarities with the postal service in our analogy. Instead of an IP address we’ll have:

My node address as:  Room 62, Building 34, Legofiend Street, Manchester.
Rich’s node address as: Room 78, Building 2, Zoo Street, London.

We’re going to assume that all addresses are public and that there’s is no NATing process occuring between public and private. To align more closely with IP Addressing, let’s split our addresses into a Node and Network ID. So, in both cases the “Room” is the node and the “Building, Street, City” part of the address makes up the network ID.

To pick up where we left our transport manager earlier in the series, we need to apply more information to our packet. It currently has a TCP label and sequence number.  We’re now going to take that packet and put it inside another one, a slightly larger box. On the new package, we’re going to write the destination node address (Rich’s) and the source node address (Mine).

Next: Networking Primer – Part 5.2: Network Layer – DNS and DHCP

Networking Primer – Part 4: Transport Layer, TCP and UDP

Previous: Networking Primer – Part 3: Application, Presentation and Session Layers

The transport layer is responsible for providing reliable data transfer services to the upper layers of the OSI stack. It is at this stage that we start to consider actually sending the data. This layer also involves the segmentation/desegmentation of data into smaller chunks. It is very rare that a network will be configured to take a large payload from one source node to a destination node. This is why we will segment the overall data payload into smaller pieces. This is also the first place in the stack where we start to apply some addressing so the destination node understands which listening receiver the data is intended to reach. This address comes in the form of a port number. The destination node may be simultaneously listening for (or have the ability to connect to) different network services and the way we distinguish between these services is by giving them a different port number. For example, web server usually listen on port 80 where email servers will listen on port 25.

Connection-Orientated vs Connection-less Protocols

There are essentially two flavours of protocols that exist in this layer.  Connection-orientated protocols will involve communications that must be received without data loss with the data arriving in a certain sequence. Transmission of legal or financial documents would fit into this category. The applications at both sending and receiving end have an expectation that the documents will be received in full and with the correct format. An example of a connection orientated protocol is the TCP (Transmission Control Protocol) protocol which makes up the TCP out of the TCP/IP suite.  The TCP sender will break down data into TCP segments.  It will send each of these across what may possibly be an unreliable network. Due to the nature of packet switching networks, although each of these packets may have been sent in sequence it is possible that they may get routed differently and arrive out of sequence.  At the receiving end, the TCP receiver will take the data re-sequence it if the packets have been received in the wrong order and also send a request back to the source, if any of the packets are missing.

Connection-less protocols, such as the UDP (User Datagram Protocol) don’t have the same level of error-checking and control. In a connection-less transmission, packets are sent in sequence but they are sent with the best effort approach.  There is no checking to see if the packets were received and no resequencing of packets at the destination node.  So why use connection-less? Well, not all applications need data transmissions to be without loss. For example, if you are streaming online video and the packets for that live video are received slightly out of sequence, or the occasional packet is dropped; this doesn’t make much difference to the overall viewing experience at the destination node. A huge benefit of this approach is that the protocol is much less chatty, therefore can provide better performance with less bandwidth.

The Pirate Ship: To continue our analogy, let’s imagine that I have a transport manager in my office and Rich has a transport manager in his office. In this case my transport manager is going to use the connection-orientated TCP protocol. This is because he needs to break down the Lego bricks into segments (individual blocks) and send them reliably across to the destination.  All the blocks must be received at the other end and they must be reassembled in the right sequence in order to reconstruct the ship. To do this he takes each individual block and puts it in a small parcel, he then writes on the parcel the protocol (TCP), a port number and sequence number.  This is where the transport manager’s responsibility ends, he will  listen to find out if any segments were not received and then resend these, but for the actual movement of the parcels other entities further down the stack will take over.

Next: Networking Primer – Part 5.1: Network Layer – IP Addressing

Networking Primer – Part 3: Application, Presentation and Session Layers

Previous: Networking Primer – Part 2: Defining Networking with OSI and TCP/IP Suite

I’ve decided to group the top three layers together into one post. This is because these are more related to the data to be transmitted across the network, rather than the underlying transport mechanisms themselves. These three layers deal with the semantics of the communication, such as who the data will be sent to, the format of the data and the etiquette to be adhered too between the communicating nodes.

Lego Pirate Ship

The Pirate Ship: As with most technical concepts, analogies can help us understand the underpinning processes which are happening as part of the communication.  For this series, I’m going to use the following analogy: I work in an office in Manchester and I’d like to send a pirate ship made of Lego to a friend, Rich, who works in an office in London.  In our day to day lives, that’s a pretty simple concept that requires a couple of addresses and a postal service. Communicating data across a network can occur in much the same way. Let’s step through the network stack to see how.

Application Layer (OSI Layer 7)

The application layer is the piece of the puzzle that is going to sit closest to our end user application. It is worth mentioning here that when we are referring to the services in this layer we are not referring to the actual application being used by the end-user. To expand on this, an example application being used might be the AnyCo ERP solution. That ERP solution may provide the capability to send reports via “email”. So it’s actually the email service which fits into the application layer, not AnyCo ERP. AnyCo ERP would sit outside of the OSI stack in an upper out of scope layer.  Other application services you might find in the application layer, might be “File Transfer”, “Web Access” or “Network Management” services.

This layer is primarily responsible for determining suitable communication partner nodes and their identities. It  also responsible for ensuring that the relevant resources are available to send the transmission. It’s in this layer that the aforementioned X.400 protocol exists. Synchronisation of communication is also dealt with at this level.

The Pirate Ship: In our scenario, The Layer 7 service we want to use is Lego Sending. I have established that Rich is a suitable communication partner as he has advertised that he likes Lego and can accept that type of toy.  I’ve also established that the postal services have capacity and is suitable for sending the pirate ship.

 The Presentation Layer (OSI Layer 6)

Now that we have established a suitable place to send my data and that the relevant network resources are in place to do that. We need to look at what exactly we are going to send. The Presentation layer deals with the format of the data, it is there to abstract the meaning of the data as the application sees it into a standardised format that can be used by the underlying network layers. Where an application may be providing freeform text, the network needs a way of encoding it. An example of a protocol working at this level is XML.  Encryption may also happen at this level.

The Pirate Ship: Let’s think of the presentation of our pirate ship as a set of Lego bricks stuck together in a specific arrangement. The bricks are of standard sizes, colours and shapes. It’s those attributes that make up the format of the data.

The Session Layer (OSI Layer 5)

This is the layer responsible for setting up and tearing down the connection that will be used to transmit the data. It should be thought of as something that is more persistent than a single transmission of data. It is not responsible for actually sending the data. It simply executes the steps required to set up and maintain a connection. These steps might be simple requests for resources or handshakes between devices to be traversed. During a session, you might for example authenticate with a website and create a session. From there you may download lots of different files using the same session. For our purposes, we’ll keep it simple.

The Pirate Ship: I call my postal service to tell them I’m going to send a package to my friend. They verify my account number and then book slots for the package on all the the vehicles which will be traversed between my office and Rich’s.

Summary

So far, via analogy, we have established the objective of our application and the Layer 7 application service (Lego Sending). We have found the identities of our destination communication partner, ensure that the relevant resources are in place to send our lego and called the postal service to set-up the relevant connections to start the communication. Next well see what happens when we actually start sending the Lego.

Next: Networking Primer – Part 4: Transport Layer, TCP and UDP

Networking Primer – Part 2: Defining Networking with OSI and TCP/IP Suite

Previous: Networking Primer – Part 1: Introduction

What is a network?

This may sound like a very basic question, but I’ll assume the lowest common denominator here and define this briefly.

A network is set of two or more computing entities (nodes) that are configured to communicate with each other by passing information across an interconnecting media.

Ok, now we got that out of the way, we can talk about how exactly those nodes communicate with each other in a way that makes sense and achieves our objective of passing information between them.

A Little History

It is easy to imagine how the first baby steps of networking which occurred in the mid-20th century. As with all technology we start with the simplest goal and see how we can use what tools we available to use to achieve that goal. I’m not going to go into sending signals down telegraph wires, etc. but we can assume that the first step was to send a simple signal across a wire between to locally sited computers. Beyond this, more milestones were surpassed to enable us to send over greater distances and with more complex topologies. This resulted in the creation of a number of protocols, which specified things like how two nodes would set up a communication session and what format the data sent should be in. As technologies are researched, more often than not they diverge into multiple streams of activity with different camps developing different ideas on how to progress. This ultimately results in a bunch of disparate and non-compatible technologies.  Whereas in other areas this might be palatable, workable and have little impact.. clearly in networking this is not viable. The whole point of networking is that the entities involved can speak the same language.  There must be standardisation and the first and overarching grandfather of network standardised is the Open Systems Interconnection (OSI) model.

The OSI model

The OSI model is a set of specifications, rules, guidelines, instructions and protocols that describe how networking should work. It is important to understand how this is used today. As you might guess from the above description, the model is large, complex and in some ways all encompassing. Back in the early 80’s and 90’s many companies implemented technologies that strictly adhered to the OSI standards. In fact, I worked directly with one of those related to email messaging (the X.400 protocol suite) in a previous role.  The OSI specifications are quite complex and difficult to implement. It takes a lot of specialist knowledge and effort and as a result the detailed elements of the model were soon ditched in favour of more agile standards which could be delivered quickly with ease. For example, SMTP is now the defacto standard for email messaging and X.400 is only used in some specialist areas in the military and other area. (Read more about SMTP for military email here:  Command Email Whitepaper).

That being said, the OSI model is still widely used today. Although the detailed implementations have been ditched, the model is used at a conceptual level in day to day networking conversations. It breaks down the elements of network communication into seven logical layers, and by understanding these it is very easy for network engineers to gain a common frame of reference to quickly isolate the crux of an issue during a discussion.

The Seven OSI Layers

The seven layers of the OSI model are as follows:

OSI Stack

As we can see these are stacked one on top of another, which is why we commonly refer to the multiple layers as a “network stack”.  All of the nodes in a network will have similar stacks.  A common method to aide in remembering the (Application, Presentation, Session, Transport, Network, Data Link and Physical) sequence of the layers is to use a mnemonic. “All People Seem To Need Data Processing” is  good example of one of these, but there are many and you could make up your own.

OSITwoNode

During a network communication, we start at the top of the stack with application level semantics and gradually process down through the layers. Through each layer we use the mechanism of encapsulation, until we reach the physical layer, which is responsible for sending the actual bits and bytes from the source node across the interconnecting media to the destination node(s). At the destination node(s) the physical bits are then pushed up through the stack using decapsulation at each layer until the destination application or service receives it’s intended information.  This can be thought of like nested Russian dolls, with a different doll representing a different layer of the stack but instead of Russian dolls, it might be easier to visualise by thinking of a envelope, within an envelope, within an envelope and so on.  Well discuss these with a practical example in upcoming blogs.

The TCP/IP Suite

I’m not going to cover the TCP/IP suite in depth, but it is worth understanding what it is and how it relates to the OSI model.

TCP/IP Suite to OSI Mapping

As we saw above, although we still use the OSI model as a conceptual frame of reference. We no longer use it’s detailed implementation specifications. The TCP/IP suite was loosely developed as an alternative to the OSI model, with a view to creating a simplified four layer model and implementation mechanism. The TCP/IP suite contains a much smaller set of protocols and is actually used in the bulk of network implementations today.  We do however need to be careful in the use of our terminology. If we’re referring to layer 4 in a discussion, it is most likely that we are talking about the Transport Layer of the OSI stack and not the Application Layer of the TCP/IP suite.

Next:  Networking Primer – Part 3: Application, Presentation and Session Layers

Networking Primer – Part 1: Introduction

The world of networking has been fairly static for many years now. It’s been historically characterised by static infrastructures that require infrequent changes.  These configuration changes were performed via command line interfaces by network engineers, usually sitting with a laptop and a cable plugged directly into a piece of networking hardware. Activities were manual, repeated for every individual device and extremely error prone due to the non-human readable nature of network configuration information.

The workloads running in the modern datacenter have most definitely changed in recent years. It has become apparent that the capabilities of current networking devices and operational approaches simply cannot keep up with the pace of change.  In the modern datacenter, the rapid and overwhelming success of server virtualisation has fundamentally changed the way applications consume resources and the network has become somewhat of a bottleneck in providing agile, reliable and cost effective means of delivering new applications.   In addition to the shortcomings of existing technology, operational processes and a tendency to silo server, storage and networking departments has also become a major blocker for any significant progress in dealing with these challenges.

In the last 2-3 years, there has been industry recognition that these challenges need to be addressed and there has been a marked shift in strategy.  There has been a wide realisation that the boundaries need to break down and the silo’d teams need to converge into singular, collaborative and multi-skilled teams, delivering IT in a more integrated manner.  The technology also needed to change and the Software Defined Networking (SDN) movement is one that has been central to this shift.

Some time ago I worked in the military messaging field and have had wide exposure to networking, as it relates to battlefield communications protocols. The concepts and NATO protocols that underpin military messaging and not so different to those used in our datacenters and I have been working on understanding the datacenter networking space in the last 6 months or so. I’d like to share what I’ve learned and hopefully provide a reasonable learning resource for those administrators who are preparing themselves for the new converged infrastructure world.  I’ll be taking things right back to basics. Explaining at a beginner level what networking fundamentally is and working through to how we are addressing the key challenges that are being faced by organisations today.

Next: Networking Primer – Part 2: Defining Networking with OSI and TCP/IP Suite

 

Software Defined X – Automation: Job Stealer or Job Enabler?

I’ve had many conversations in recent weeks about the commoditization of the data center with many being concerned about the effect of the diminishing need for specialist hardware and greater automation through software. More specifically, how that might affect the job prospects of administrators and other technical roles in the modern IT environment.

We are in an era of rapid evolutionary change and this can be unsettling for many as change often is.  There seems to be a wide variety of reactions to these changes. At one end there is the complete denial and a desire to retain the status quo, with an expectation that these industry changes may never occur. In the middle, we have those that tip their hat in recognition of the general direction of the trends, but expect things to happen more gradually and then there are those that embrace it with an expectation of gaining some level of competitive advantage by being a first mover.  If there is one thing that is certain, if you find yourself at the wrong end of that spectrum, you will most definitely find yourself in difficulty.

No Change Around Here

The change is happening and happening more quickly than most expect.  The automation of data center operations and a focus on innovation is a key objective for most organisations at the moment. “Keeping the lights on” tasks are becoming less relevant in this world.

Casting Off the Shackles of Hardware

Development of custom hardware based intelligence is complex. This often involves the research and production of custom chipsets for these devices.  Due to the research, prototyping and production requirements of this type of operation.  We are usually working to a 2-3 year development and release cycle. In fact, most organisations have been used to using this kind of procurement cycle, executing a hardware refresh every 3-5 years.

This has worked historically, but today there are new kids on the block and they are eating the market with a new approach to developing and delivering services. Pioneers like Facebook, Google and Netflix have fundamentally changed how service delivery works. These operations have decoupled their software intelligence from hardware and deliver their services based on commodity inexpensive hardware. This not only reduces their capital outlay, it also provides them with a platform to rapidly deliver agile software services. In these types of environments, it is not uncommon to see software releases move from a 18-24 month cycle to a daily or weekly cycle. Strategically they can pivot at a moments notice and they can easily scale or contract operations at a very low-cost. As you might imagine, this kind of agility has become very challenging from a competitive stand point for companies like Microsoft who have had 3-4 year major release cycles baked into the fibre of their operational approach (e.g. Exchange, Windows Server, etc).

What About Automation?

The more we move towards software controlled infrastructures, the more easily they can be automated. Most solutions today are built with some kind of API (application programming interface) to enable other applications to programmatically control or manage them in someway. In this decade, the industry has moved firmly away from proprietary API technologies, towards standardised ones. More often not based on the RESTful API architecture. Alongside this we are starting to see the rise of DevOps tools such as Puppet and Chef, which help bridge the gap between IT operations and the developers actually creating the applications that organisations rely on.

So What Does This Mean For the Modern IT Professional?

As the development of these tools and API interoperability progresses, undoubtedly, IT operations roles will also have to evolve.  This does not mean that there will be fewer jobs in IT.  In fact, IT skills have become more relevant than ever, but those skills have to change a little.  It is time to start moving up the stack by putting more focus on innovation in the area of application and service, rather than keeping the lights on down in the bits and bytes of the infrastructure. By doing this, these industry changes should become a massive job and career enabler, not a cause of suspicion and concern for job security.

I had a chat with a family member this week which summed this up really well for me.  We were discussing the Luddites, a 19th century movement in my home region of the North of England. The Luddites, were a group of textile workers who protested against the mechanisation of the production of garments. They did this violently under the auspices of “those machines are taking our jobs, we’ll have nothing to do and we’ll all starve”. A couple of hundred years on, we can see that starvation didn’t happen and those same people survived by finding new ways to innovate. On a sidenote, I once received a letter from a CBE calling me a Luddite who had seen me on TV discussing an environmental issue. I found this most amusing given the industry I work in and my lust of technological progress. In the same conversation with the family member, I mentioned that I was looking forward to the introduction of robot-taxis (e.g. Self-driving Google Cars) due to the efficiencies and cost of car sharing. They replied “but that could be 20,000 taxi drivers losing their jobs in Manchester alone”. I replied “Yes, but that’s also 20,000 people who could alternatively be working on curing cancer, pioneering space travel or solving the world’s energy problems”.

Conclusion – Software Defined X – Automation: Job Stealer or Job Enabler?

For me I see it as a Job Enabler. My advice… embrace the change, relish the opportunity to innovate and change the world for the better.. one step at a time.

Help Me Choose a Charity

Due to the recent demise of my dear old car.. I’ve decided to donate the remnants of it’s existence to charity. I found a really cool way to do this via the www.giveacar.co.uk website.  They will pick the car up and then scrap or auction it to generate the largest possible donation.  There are over 800 charities registered to choose from and new additional charities can register as needed.

Hani Old Car

In this instance, I’m pretty open to where the donation goes but would like it to go to one of three areas. Charities that work with vulnerable children, cancer research or human rights organisations.  Please help me decide where to donate by voting for one of the following below:

  • UNICEF: is the world’s leading organisation working for children and their rights, with a presence in more than 190 countries and territories reaching children on a scale like no other. They work with local communities, partners and governments to ensure every child’s right to survive and thrive is upheld.
  • Cancer Research: is the world’s leading charity dedicated to beating cancer through research. They’ve saved millions of lives with our ground-breaking work into preventing, diagnosing and treating cancer.
  • Amnesty International: Amnesty is made up of ordinary people from across the world standing up for humanity and human rights. Their purpose is to protect individuals wherever justice, fairness, freedom and truth are denied.
  • ADDED:  Neuroblastoma Children’s Cancer Alliance: The Neuroblastoma Children’s Cancer Alliance helps families of children suffering from neuroblastoma through providing financial assistance for children’s treatment.

Which charity should I donate my car to?

  • Neuroblastoma Children's Cancer Alliance (46%, 24 Votes)
  • Cancer Research (33%, 17 Votes)
  • UNICEF (13%, 7 Votes)
  • Amnesty International (8%, 4 Votes)

Total Voters: 52

Loading ... Loading ...