Docsity

Network Addressing and Subnetting: A Comprehensive Guide to IP Addressing Concepts, Summaries of Computer Science

Partial preview of the text

Download Network Addressing and Subnetting: A Comprehensive Guide to IP Addressing Concepts and more Summaries Computer Science in PDF only on Docsity!

Network Addressing

IP Addressing

NETWORK LAYER

The two main functions of the network layer are:

● Network Addressing

● Routing- this path finding

IP Addressing In IP addressing you should avoid ● (^) Duplicate IP address assignments ● (^) Wasted IP address space ● (^) Unnecessary complexity There two ways to assign IPs to network devices: Static and Dynamic IP addressing

1. Static assignment - done manually by system _administrators/network Engineers

  1. Dynamic Assignment -Done by Dynamic Host Configuration_ Protocol (DHCP) server

IPV4 Addressing

  1. IPV4 address consist of 4 octets separated by decimal point (dot)
  2. Each Octet represent 1 byte and therefore IPV4 is a 32 bit address. The value of octet ranges from 0- 255 in decimal
  3. The IP address can be represented in binary or decimal format. For easy conversion from decimal to binary the table below can be used. Eg. 192.150.10.5 , same as 11000000.10010110.00001010.00000101, this is a class C IP address , Network ID is 192.150.10.0, Host IP 192.150.10. 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 192 1 0 0 1 0 1 1 0 150 0 0 0 0 1 0 1 0 10 0 0 0 0 0 1 0 1 5

IPV4 Address Categories

IP Classes Class A- The first octet identifies the network (it is the network ID). Can address a maximum of 224 -2 network nodes. Class B- the first 2 octet are used to identify the network and the remain two are used to identify network nodes. You can address a maximum of 216 -2. Less 2 addresses because first address (0) is the network and the last is for broadcast. Class C- the first 3 octets are used to identify the network and the remaining octet is used for network nodes. You can address maximum of 2 8 -2=254 nodes. It is less 2 because the first

Subnet Mask Another way of denoting network mask is use of Classless Interdomain Routing (CIDR) scheme. In this scheme the network mask is denoted as the number of 1’s in the network mask. The IP address of Host is denoted as the IP address /mask example default network mask in class is Class C 255.255.255.0 in binary is same as 11111111.11111111.11111111.00000000 or in CIDR scheme / Example in Class C network 192.168.10.5 with default subnet mask 255.255.255.0 it can be denoted as 192.168.10.5/

LOOPBACK Address In class A the IP address 127.0.0.1 is called loopback address. It is reserved for testing whether the network adapter card is properly working

Private IP Addresses Organizations are recommended to use the provided set of IP addresses inorder to avoid causing conflicts with public IP addresses. When assigning computers private IP addresses as Network Engineer you must make reference to this set provided by IANA

Network Address Translation (NAT) To allow traffic from hosts that are using private addresses to access Internet hosts using a public address, Network Address Translation (NAT) is required. NAT allows internal hosts IPs to be translated to a public address for Internet access. Public address space is difficult to get and is expensive. These public IPs are sold by ISPs such SAFARICOM, AIRTEL, TELKOM, etc

Subnetting The binary representations of network mask helps to easily visualize the network part and the host part of the network. In the subnet mask, the bits for network ID are set to 1 and those for those for host ID are set to zero In the example above the network has been divided to 2^3 ( 8) subnets and each subnet will have 2^5 (32) hosts addresses, Network Network Mask Address range for the hosts 192.168.5.0 /27 (255.255.255.224) 192.168.5.1, 192.168.5.2,....192.168.5. 192.168.5.32 /27 (255.255.255.224) 192.168.5.33,192.168.5.34,.........., 192.168.5. 192.168.5.64 /27 192.168.5.65, …..,192.168.5. …………….. ………………. …………………... 192.168.5.224 /27 192.168.5.225, 192.168.5.226, …….192.168.5.

Subnetting The mask can also be denoted as /27 (CIDR format)as there are 27 bits that are set in the mask instead of 255.255.255.224 (decimal format) Example 192.168.5.32/27 for the 192.168.5.32 network

Subnetting First host First network: 192.168.10. Second Network 192.168.10. Last host First network: 192.168.10. Second Network: 192.168.10. Valid hosts

Subnetting Example 3: for the given network address 192.168.10.0/255.255.255.224 determine: ● (^) number of subnets = 8subnets ● (^) Number of hosts per subnet= 2^5-2= ● (^) Networks, 192.168.10.0, 192.168.10.32, 192.168.10.64,192.168.10.96, 192.168.10.128, 192.168.10.160, 192.168.10.192, 192.168.10. ● (^) Broadcast address for each subnet 192.168.10.31, 192.168.10.63, 192.168.10.95, etc ● (^) Valid first host Ip and Last host IP in each subnet ● (^) 256-224=