Introduction To Networking

From CTWUG Wiki
Jump to: navigation, search

The IP Address

Introduction

An Internet Protocol (IP) address is a 32-bit binary number assigned to you computer on a network. For readability, the 32-bit binary IP address is usually separated by dots into four parts and each part is represented by a single decimal value. Each decimal value van range from 0 to 255, but the first number cannot be 0. In addition, all four numbers cannot be 0 (0.0.0.0) or 255 (255.255.255.255).

The Internet Protocol also has the task of routing data packets between networks, and IP addresses specify the locations of the source and destination nodes in the topology of the routing system. For this purpose, some of the bits in an IP address are used to designate a subnetwork. The number of these bits is indicated in CIDR notation, appended to the IP address, e.g. 208.77.188.166/24.

Dotted Decimal Notation

An IP address is actually a 32-bit long binary number. Because binary numbers are difficult to read IP addresses are usually displayed in dotted decimal notation rather than in binary. Dotted decimal notation breaks the 32-bit binary number up into 4 decimal numbers and then separates them with by three dots.

The Subnet Mask

Introduction

The subnet mask is a 32-bit number that is assigned to each computer to divide the 32-bit IP address into its network ID and host ID. This makes TCP/IP routable.

Why a subnet mask is required

When a computer delivers an IP packet, it uses the subnet mask to validate whether the destination is on the same network or on the remote network. If the destination is on the same network, the packet can be delivered by the computer. If the destination is on the different network, the computer must send the packet to a router for delivery.

Valid subnet mask

In a simple network, a subnet mask is composed of only 255s and 0s. Other values are not used. In addition, 255s appear at the beginning of the subnet mask and 0s appear at the end. In a valid subnet mask, 0s cannot be interspersed with 255s.

Example of a valid subnet mask:

 255.0.0.0
 255.240.0.0
 255.255.255.0

Example of an invalid subnet mask:

 0.0.255.255
 255.0.255.0
 0.255.255.0

The Default Gateway

Introduction

The default gateway is the IP address of the router that will route remote traffic from the computer’s local network to remote networks. Typically, the default gateway is the address of the router that is connected to the Internet. A computer does not need to have a default gateway address if the computer does not need to communicate with computers outside its local network. In simpler terms, if you are trying to access resources on a computer and that computer is not on your immediate local network, your traffic will be sent to the default gateway address to see if it can be routed to the correct location.

Private Nonroutable Addresses

ICANN has set aside three Nonroutable address ranges that a computer can use internally to enable their network nodes to communicate with one another using TCP/IP. When an Internet router receives a data packet bound for one of these reserved IP addresses, it recognizes the address as nonroutable and does not forward it outside the company. These private IP addresses can be used freely on internal networks; because they are not routable, they do not cause duplicate IP address conflicts on the internet.

Private IP address ranges

 10.0.0.0 - 10.255.255.255
 172.16.0.0 - 172.31.255.255
 192.168.0.0 - 192.168.255.255

How IP communication within a single network works

On a single network, each computer can deliver packets to the destination by itself. There is no need for a router to help with packet delivery. The sending computer resolved the destination IP address to a media access control (MAC) address and sends the packet on to the network.

The following steps describe how IP communication within a single network works:

1. Computer A uses its subnet mask to determine that it is on the same network as Computer B.
2. Computer A uses the Address Resolution Protocol (ARP) to resolve the IP address of Computer B to a MAC address.
3. The packet is addressed with the source IP of Computer A, destination IP of Computer B, source MAC address of Computer A and destination MAC address of Computer B.
4. The packet is delivered to Computer B

How IP communication between networks work

Packets delivered between networks use a default gateway. The default gateway moves packets from one network to another. The sending computer delivers packets to the default gateway, and the default gateway delivers the packets to the destination.

The following steps describe how IP communication between networks works:

1. Computer A uses its own subnet mask to determine that it is on a different network than Computer B.
2. Computer A uses ARP to resolve the default gateway IP address to a MAC address.
3. The packet is addressed with the source IP address of Computer A, the destination IP address of Computer B, source MAC address of Computer A and destination MAC address of the default gateway The packet is delivered to the default gateway.
4. The default gateway uses ARP to resolve the IP address of Computer B to a MAC address.
5. The packet is addressed with the source IP address of Computer A, destination IP address of Computer B, source MAC address of the default gateway and destination MAC address of Computer B. The packet is delivered to Computer B

Classless Inter Domain Routing (CIDR)

Classless Inter Domain Routing (CIDR) is a sub netting method that treats a VLSM as a 32-bit binary word. The mask bits can move in one-bit increments to provide the exact number of nodes and networks required. CIDR notation combined the network address with a single number to represent the number of one bits in the mask With CID, multiple class-based networks can be represented as a single block.

A CIDR Application

The CIDR address 192.168.12.0/23 applies the network mask 255.255.254.0 to the 192.168.0.0 network, starting at 192.168.12.0. On a VLSM-enabled router, this single routing entry can define a super net that includes the address range from 192.168.12.0 to 192.168.13.255. Compare this to traditional class-based networking, where this range of addresses would require separate routing entries for each of the two Class C networks – 192.168.12.0 and 192.168.13.0 – each using the default Class C subnet mask of 255.255.255.0. There are three common netmasks that have special names. A /8 network (with a netmask of 255.0.0.0) defines a Class A network. A /16 (255.255.0.0) is a Class B, and a /24 (255.255.255.0) is called a Class C. These names were around long before CIDR notation, but are still often used for historical reasons.