Design an IP address scheme according to organisational requirements

What is a protocol?

Why protocols are used in networking

Examples of different protocols

The ISO/OSI reference model

The seven layers explained

Introduction to TCP/IP

How TCP/IP works

What is an IP address?

Components of an IP address

Classes of IP addresses

Subnet masks

Binary and decimal conversion

Subnetting

Routing

Routing tables

IP Version 6 (IPv6)

Summary

Check your progress

What is a protocol?

For communication to occur there has to be some form of common language and some guidelines that are used to manage the communication process. With respect to computers and information technology, a protocol is a standard framework, which dictates how two or more computers communicate with each other and share information over a particular data link.

Why protocols are used in networking

Protocols define the rules or standards for communication between network devices. A printer cannot interpret signals sent by other devices, such as a workstation or file server, unless there is a common protocol. Protocols enable data to be sent between two devices in sequence and without errors.

Examples of protocols used on networks include:

  • Transmission Control Protocol/Internet Protocol (TCP/IP)
  • Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX)
  • NetBIOS (Network Basic Input Output System)
  • NetBIOS Enhanced User Interface (NetBEUI)
  • AppleTalk.

Protocols need to be installed and configured on both devices before communication can take place between those devices, eg a workstation and a file server.

With respect to networking, the term ‘protocol’ actually refers to a group or suite of individual protocols that work together. Different tasks are assigned to protocols within a suite, such as data translation, data handling, addressing or error checking.

There are many factors that determine which protocol (protocol suite) you may use on a network. Factors include:

  • the error rate on the data link
  • whether Internet access is required (this is important as some protocols are not routable)
  • the network operating system being used
  • how much network security will be required
  • the speed requirements of the network.

Examples of different protocols

Below you will find some examples of the different protocols with a brief explanation for each.

Internet Packet Exchange (IPX) and Sequenced Packet Exchange (SPX)

This is a suite of protocols, made up of many protocols, not just IPX and SPX. It was originally developed by Xerox and adopted by Novell in the 1980s.

Novell’s NetWare clients and servers use this suite of protocols. It is routable, meaning that it can cross many LAN segments. IPX works at the network layer and is connectionless, that is the protocol does not guarantee delivery of data.

The IPX protocol is responsible for addressing. SPX is responsible for ensuring that data is received in sequence and error free.

NetBIOS and NetBEUI

The Network Basic Input Output System (NetBIOS) was originally developed by IBM and later adopted by Microsoft to be used in small local area networks.

NetBEUI (NetBIOS Enhanced User Interface) is a fast and efficient protocol that is still used on small networks.

However, this protocol is not routable, that is it cannot span the Internet. However, many systems still require the presence of the NetBIOS protocol services to function correctly. The NetBIOS protocol services can be implemented on routed networks by ‘riding’ on TCP/IP through the routers, that is TCP/IP encapsulates NetBIOS.

AppleTalk

This protocol was developed to interconnect Apple Macintosh computers. This is a routable protocol.

To find out more information on these and other protocols, you can follow the links in the Research section of this Learning Pack.

The ISO/OSI reference model

In the early 1980s the International Standards Organisation (ISO) developed a model or theoretical representation of what happens between two computers on a network. The model known as the Open Systems Interconnection (OSI) is the blueprint that has helped networking specialists to understand and develop computer-to-computer communications.

The goal of establishing the reference model was to allow different computers from different manufacturers, running different operating systems to communicate with each other, so long as each system conformed to the OSI reference model.

The model has seven layers:

1application

2presentation

3session

4transport

4network

6data link

7physical.

Each layer of the OSI model has its own function and interacts with the layers directly above and below it.

Figure 1 below shows information going down the seven layers from one device across intermediate devices, and then up through the seven layers on the destination device. These devices can be any type of network equipment such as networked computers, printers and internetworking devices such as routers and switches.

Sending deviceReceiving device

Figure 1: The ISO/OSI reference model showing communication between two devices

Here is a simple mnemonic to help you remember the order of the seven layers of the OSI model:

All / Application / 7
People / Presentation / 6
Seem / Session / 5
To / Transport / 4
Need / Network / 3
Data / Data Link / 2
Processing / Physical / 1

Figure 2: Remembering the seven layers of the OSI model

The seven layers explained

Physical layer

The physical layer is the bottom layer of the OSI model. Its function is to simply:

  • Transmit bits over the network media. This layer contains the physical networking media such as cabling, connectors and repeaters.
  • Specifythe mechanical, electrical and functional means of establishing and maintaining the physical connections. That is, how the electrical signals are amplified and transmitted over the wire. The layer sets the data transmission rate and monitors data error rates, although it does not provide for error correction — which is done at another level.

The physical layer thus activates and deactivates the physical connection. A severed wire or a NIC (network interface card) not seated deeply enough are some of the network problems that can be experienced at the physical layer.

Data link layer

The second layer of the OSI model is the data link layer. Its primary purpose is to provide a reliable method of transmitting data across the physical media.

The data link layer divides data it receives from the network layer into frames that can then be transmitted by the physical layer. A header and trailer are added to the frames. These allow the destination device to see when a frame begins or ends on the physical media.

The frames are then transmitted sequentially, and the sender’s data link layer waits for an acknowledgement from the receiver that data was received correctly. If the sender does not get this acknowledgment, its data link layer gives instructions to retransmit the information. The data link layer is divided into two sub-layers — the Media Access Control (MAC) sub-layer and the Logical Link Control (LLC) sub-layer.

Media Access Control (MAC)

The MAC sub-layer is responsible for the physical addressing of devices on the network and how these devices gain access to the network media. The physical addressing at the data link layer is called a physical address, because this address is hard-coded into the network interface card by the manufacturer. The address is also known as the MAC layer address. Each device has a unique address that provides the necessary information to direct data to and from devices on the local network.

Logical Link Control (LLC)

The LLC sub-layer is responsible for flow control and error correction at this layer and provides two service types:

The unacknowledged connectionless service is unreliable as data is transferred with no error checking. The Connection-oriented service — is slower than the connectionless service, as data is checked for errors using Cyclic Redundancy Checks (CRC). CRC is one method of detecting errors in transmitted data. Before the data is sent, a CRC number is calculated by running the data through an algorithm, which produces a unique number. The data is run through the same algorithm again at the receiving end. If the numbers are the same, the data was then sent error free. The number generated by the algorithm is called a checksum.

Flow control is important not only at the LLC sub-layer but also at all layers of the OSI model. It’s important to make sure that the transmitter doesn’t flood the receiver with data resulting in buffer overflow and lost data.

Network layer

The network layer is responsible for routing information from the sender to the receiver. It accepts messages from the transport layer, converts them into packets and ensures that the packets are directed towards their destination. The network layer determines the best path that the packets should take from point A on one network to point B on another network. It does this by checking to see if the destination device is on another network.

Transport layer

The prime responsibility of the transport layer is to ensure that the data transferred from point A to point B is reliable, in the correct sequence and without errors. The transport layer accepts the data from the session layer and splits it up, if required. It then forwards the data to the network layer and checks that the data has arrived successfully on the destination device — this is a connection-oriented service. If an acknowledgement is not received within a specified period of time, the data is re-sent by the sending device. Acknowledgements are used to control the flow of data.

Session layer

The session layer allows users to establish a connection — a session. Once the session has been established the session layer maintains and co-ordinates the communication. For the user to establish a session, they need to provide a remote address. The address can be a domain name such as or the NetBIOS name of the computer, for example, Serv007.

Presentation layer

The presentation layer is responsible for translating data into a format that can be understood by each computer. The important task at this layer is code translation. For example an IBM mainframe may transmit a message in EBCDIC format to a PC that uses ASCII format. Despite the coding differences, data can still be displayed on the receiving device, the PC.

ASCII, EBCDIC, BMP, WAV and UNICODE are examples of presentation layer code translations. (Refer to Terms for definitions of these.) The presentation layer is also responsible for data encryption and foreign language translations.

Application layer

The application layer is the seventh and last layer of the model. It is the only level at which the user has direct contact with the model. This layer starts a network application, such as transferring files, or provides access to the Internet. Do not confuse the application layer with software such as word processing or spreadsheet applications. The application layer makes network services such as file, print, message, application and database services available to a computer’s local operating system.

The application layer determines the quality of service at the lower layers. If a problem occurs at a lower layer, the application layer provides a means of notifying the user that there is a problem. The notification is usually in the form of an error message, for example, host not reachable, printing device not connected, etc.

Introduction to TCP/IP

TCP/IP stands for Transmission Control Protocol/Internet Protocol. It is the basic protocol of the Internet. It is a scalable protocol, which can be used on a small private network, such as your home network or a company’s private Intranet, or it can be used on a large company network like the one at Forth Management Associates.

TCP/IP has become the de-facto standard for Internet communications. There are many reasons for this:

  • TCP/IP has been accepted as the industry standard protocol.
  • It is a routable protocol suite.
  • Almost all computer operating systems support the TCP/IP protocol.
  • It allows computers using different operating systems to connect to each other (such as a UNIX computer to a Windows XP computer).
  • It is an open standard — no company has control over the protocol. Anyone is allowed to use it and develop applications based on it.
  • It is a well-designed protocol.

How TCP/IP works

TCP/IP is not just two protocols, but a suite of which includes TCP, IP, UDP, ARP, ICMP and other sub-protocols. The suite of protocols can be divided into four layers that roughly correspond to the seven layers of the OSI model, as shown in Figure 3.

Application / Application
Presentation
Session
Transport / Transport
Network / Internet
Data link / Network interface
Physical

Figure 3: Approximate correspondence of four layers of TCP/IP to OSI model

TCP/IP is a multiple-layer protocol, which provides an application service as well as a network service, as can be seen in Figure 4 below.

Figure 4: TCP/IP application and network services

TCP and IP are the core protocols in the suite, and along with UDP, ICMP, ARP and other sub-protocols provide a network service.

Internet Protocol (IP)

The Internet Protocol belongs to the Internet Layer of the TCP/IP model. It provides information on how and where data is to be delivered — a key feature of Internetworking. For this reason the TCP/IP protocol is able to span more than one LAN segment, usually through a router.

The IP portion of the data frame is called an IP datagram. The datagram contains information for routers so that data can be transferred between individual networks.

IP is a connectionless protocol. This means that it does not guarantee delivery of data. Higher-level protocols use IP information to ensure that data packets are delivered to the right address.

Transmission Control Protocol (TCP)

TCP belongs to the transport layer of the TCP/IP suite. It provides a reliable data delivery service known as a connection-oriented service — this means that a connection must be established between two devices before TCP will transmit data. TCP provides checksum, flow control and sequencing information, which ensures that the data is reassembled in the correct order.

User Datagram Protocol (UDP)

UDP belongs to the transport layer of the TCP/IP suite. It is a connectionless service — it does not guarantee that the packets will be received in the correct order and provides no error checking or sequencing. UDP is used when data needs to be transferred quickly, for example, in live audio or video transmissions over the Internet.

Internet Control Message Protocol (ICMP)

ICMP belongs to the Internet layer of the TCP/IP suite. It is responsible for notifying the sending device of a problem with transmission, for example, when packets are not delivered. It provides a message to the sending device, such as ‘Host unreachable’ (how many times have you seen this?). ICMP is used by diagnostic utilities, such as PING.

Address Resolution Protocol (ARP)

ARP also belongs to the Internet layer of the TCP/IP suite. ARP is used to determine an unknown MAC address of a remote device to which a packet is to be sent. The header of an IP packet contains the MAC and IP address of the source and the MAC and IP address of the destination. The resulting IP/MAC address information is held on the sending machine in an ARP table.

Application service

The TCP/IP suite also provides an application service with the protocols:

  • Hypertext Transfer Protocol (HTTP)
/
  • Telnet

  • Hypertext Transfer Protocol security (HTTPs)
/
  • File Transfer Protocol (FTP)

  • Simple Network Management Protocol (SNMP)
/
  • Simple Mail Transfer Protocol (SMTP)

What is an IP address?

Every device on a network (printer, workstation, server, etc) requires a unique identifier. If all the devices are on the same local area network, then only a physical (MAC) address is required. This is the same as saying that all we need to uniquely identify any house in the same street is to have its house number. However, if the destination device is on a different network then a logical address is also required. This is the same as saying that all we need to uniquely identify any house in NSW is to have its house number, its street name and its town name. The IP address is the logical address that allows data to be sent to devices on different networks. Logical addresses must conform to the standards and rules of the protocol, thus IP addresses are assigned according to specific rules and standards and are configured by the network administrator.

Components of an IP address

An IP address is a 32-bit binary number, for example:

11001011 00111100 00000001 00000010

For ease of use, this is normally represented in a dotted decimal format, eg:

203.60.1.2.

Each 8-bit octet is represented by a whole number between 0 and 255. Each IP address consists of two fields:

  • a net IDfield that is the logical network address of the device
  • a host ID field, which is the logical device’s address that uniquely identifies each device on the network.

Together, the net ID and the host ID provide each device on a network with a unique IP address.

Classes of IP addresses

There are five classes of IP addresses, however only three classes are commonly used. Table 1 below shows the commonly used TCP/IP classes.

Table 1: Commonly used TCP/IP classes if IP addresses

Class / First Octet / Number of Networks / Number of addresses per network
A / 1 – 126 / 126 / 16, 777, 214
B / 128 – 191 / 16, 384 / 65, 534
C / 192 – 223 / 2, 097, 154 / 254

Note: Class D and E are not available for standard network addressing.

You can identify the class of an IP address by examining the first octet.

All nodes in a Class A network share the first octet of their IP address. Class A addresses range between 1 and 126. An example of a Class A address is 125.10.15.1. The net ID portion of the IP address is 125 and the host ID portion of the IP address is 10.15.1.