Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Network Principles FdSc Computing Technologies TCP-IP – Addressing & Sub-Netting Carl Smith – 2004 (Revised 2013)

Similar presentations


Presentation on theme: "1 Network Principles FdSc Computing Technologies TCP-IP – Addressing & Sub-Netting Carl Smith – 2004 (Revised 2013)"— Presentation transcript:

1 1 Network Principles FdSc Computing Technologies TCP-IP – Addressing & Sub-Netting Carl Smith – 2004 (Revised 2013)

2 2 The format of an IP address IP addresses are 32 bits long They consist of two parts :– The Network number and Host number The 4 byte value or IP number displays each byte as a decimal number (0-255) and separates each byte with a period e.g. 192.100.75.123 Each part is also called an octet of 8 bits The first octet defines the Address “Class”

3 3 Class A network - NETWORK.HOST.HOST.HOST 1.0.0.0 through to 126.0.0.0 (16.7 million possible hosts) Class B network - NETWORK.NETWORK.HOST.HOST 128.0.0.0 through to 191.255.0.0 (65,536 possible hosts) Class C network - NETWORK.NETWORK.NETWORK.HOST 192.0.0.0 through to 223.255.255.0 (256 possible hosts) Class D – start at 224.0.0.0 are used for multicasting purposes Class E – start at 240.0.0.0 are used for research purposes NOTE : 127.0.0.1 address is reserved for loopback testing IP Classes

4 4 Valid Class A addresses: 7.21.43.200 101.16.11.44 43.43.121.15 126.121.15.166 10.15.1.120 (Private) Valid Class B addresses: 147.119.66.12 144.98.120.234 Valid Class C addresses: 192.2.101.99 221.190.45.1 195.195.160.10 IP Address examples

5 5 Private Address Ranges Defined by RFC ( request for comment ) 1918 10.0.0.0 to 10.255.255.255 – Class A 172.16.0.0 to 172.31.255.255 – Class B 192.168.0.0 to 192.168.255.255 – Class C These address ranges are NOT routed by any routers on the Internet

6 6 Addressing Each device on a LAN must have a unique IP address. The address can be manually entered which can be difficult to manage in a large network Or the address can be obtained from a DHCP (Dynamic Host Configuration Protocol) server on the network

7 7 Addressing In Multi-Site networks (e.g. WAN’s or the Internet) there must be some way to define a unique Network address so that routers can find their way to the destination.

8 8 Simplified Addressing Scheme E1 E2 C1B1 A1 D1 D2 B3 A2 C3 A3 B2 C2 Network A Network C Network B Network D Network E

9 9 Addressing In this simplified addressing Scheme A, B, C, D and E define the NETWORK. The numbers 1, 2, 3 etc define the HOST. All routed protocols such as IP or IPX need to define in some way the Network and the Host part of an address

10 10 Addressing – An Analogy Victoria Street GRIMSBY NE Lincolnshire DN34 4AA 123 NETWORK ADDRESSHOST

11 11 “IP” Addressing IP addresses contain a network portion and a host portion The NETWORK portion of the address (which depends on the Class) defines the “POST CODE” area – 195.98.20.123 The HOST portion defines the actual “House” NUMBER – 195.98.20.123

12 12 IP Addressing Scheme – Class C Sub-Networks 195.98.1.1 195.98.1.2 195.98.10.1 195.98.20.1 195.98.30.1 195.98.2.1 195.98.2.2 195.98.20.2 195.98.30.2 195.98.10.3 195.98.30.3 195.98.20.3 195.98.10.2 Network 195.98.30.0 Network 195.98.20.0 Network 195.98.10.0 Network 195.98.2.0 Network 195.98.1.0

13 13 Routers and IP Routers calculate the network portion of the IP address by using a default subnet “mask” They do not care about the host address The mask is a 32 bit binary number but is written as 4 decimal octets like the IP address

14 14 The Subnet Mask Each class has its own default subnet mask CLASS A – 255.0.0.0 11111111.00000000.00000000.00000000 CLASS B – 255.255.0.0 11111111.11111111.00000000.00000000 CLASS C – 255.255.255.0 11111111.11111111.11111111.00000000

15 15 How does it use the mask? The router performs a logical AND of the IP address and the subnet mask to produce the network address i.e. IP Address 192.168.1.100 Default Mask 255.255.255.0 Now convert the IP address and mask to Binary

16 16 Binary ANDing 11000000.10101000 11111111.11111111 11000000.10101000 00000001.01100100 11111111.00000000 00000001.00000000 1921681100 The router now knows the Class C Network address is 192.168.1.0 Once the packet is delivered it is left up to the LAN to find the host MAC address using ARP

17 17 Network and Host Bits With a default subnet mask, an address using all zero bits is used to specify the actual network, whilst an address of all ones (255) is a broadcast address destined for every user on the network. NB – The number of usable hosts is two less than the total number possible because all zeros or all ones cannot be used.

18 18 Addressing – TASK 1 What are the network and broadcast addresses for the following, assume the default mask:- 201.123.99.201 10.15.1.120 195.195.16.232 101.17.21.200 148.17.22.220 201.123.99.0 / 201.123.99.255 10.0.0.0 / 10.255.255.255 195.195.16.0 / 195.195.16.255 101.0.0.0 / 101.255.255.255 148.17.0.0 / 148.17.255.255

19 19 Addressing QUESTIONS?

20 20 Addressing Problems With the advent of the Internet IPv4 addresses are running out globally. The original designers did not allow for such an “explosion” of address need IPv6 is being designed and tested which will be an 128 bit number BUT, at the present time we are left with the problem of insufficient addresses

21 21 Getting more from IP addresses We can go beyond using the default subnet mask to create additional separate but smaller (in terms of hosts) networks from a single IP address. This is often exactly what we need within a business. It is called “Sub-Netting” your network.

22 22 How does it work? Creating subnets segments a network into smaller sub-networks It works by manipulating the HOST portion of the address:-

23 23 Subnet Class C example You are given the following single class C Internet address with 254 hosts:- 195.195.100.0/24 or 255.255.255.0 (note the /24 means 24 bits are used for the network portion of the address) You have several offices which each need an address range for themselves connected via WAN links and routers

24 24 195.195.100.0 Five Subnets are Required from 195.195.100.0 Network 3 Network 4 Network 5 Network 2 195.195.100.0 Network 1

25 25 SUBNET Class C example We need to “borrow” some bits from the host portion of the address How many networks do we need? = 5 Convert that number to binary – uses 3 bits That is the number of bits we need to borrow from the host portion i.e. nnnnnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh

26 26 SUBNET Class C example Work from the end of the default mask for class C which is 255.255.255 for 3 bits nnnnnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh Work out the value of the binary mask 11100000 in decimal, 11100000 = 224 Your subnet mask is now 255.255.255.224 for ALL hosts on your network

27 27 SUBNET Class C example This will give you 2^3-2 (6) networks with 2^5-2 (30) hosts on each network It is minus two because of the network and broadcast addresses for each sub-network 2^ 8 2^ 7 2^ 6 2^ 5 2^ 4 2^ 3 2^ 2 2^ 1 2^ 0 2561286432168421

28 28 Working out the network and broadcast addresses for subnets Subtract the new mask from 256 (256-224 = 32) 32 is our FIRST network address Count in blocks of 32 to get each sub- networks network address i.e. 32, 64, 96,128,160,192 The broadcast address is one less than the following network addresses - i.e. 63, 95, 127, 159, 191, 223

29 29 Subnetting Traditionally you cannot use network 0 or 224 (in this example) so you lose the first and last network address ranges Sub-netting is very wasteful of addresses Network Number Net AddrB’cast Addr 0031 13263 26495 396127 4128159 5160191 6192223 7224255

30 30 Network 195.195.100.32 Broadcast 195.195.100.63 195.195.100.33 Network 195.195.100.64 Broadcast 195.195.100.95 Network 195.195.100.128 Broadcast 195.195.100.159 Network 195.195.100.96 Broadcast 195.195.100.127 Network 195.195.100.160 Broadcast 195.195.100.191 195.195.100.97 195.195.100.65 NOTE - Not all host addresses have been included in this diagram

31 31 SUBNETS Within Sub-Networks routers still use the same binary ANDing algorithm to calculate the network address of each network e.g. 195.195.100.33/27 255.255.255.224 11000011.11000011.01100100.00100001 11111111.11111111.11111111.11100000 11000011.11000011.01100100.00100000 = 195.195.100.32 = Network Address 11000011.11000011.01100100.00111111 = 195.195.100.63 = Broadcast Address AND Zero’s One’s

32 32 SUB-NETS QUESTIONS?

33 33 IP Addressing Summary We have covered:- IP address 32bit (4xOctet) format CLASS A,B and C Addresses IP Addressing Network and broadcast addresses Private address ranges Default Subnet Masks Sub-Netting Basics

34 34 YOUR TURN..! 1. Default masks for a range of IP addresses 2. VALID IP Addresses and which Class 3. Working out network and hosts portion when sub-netting * SEE HANDOUTS *


Download ppt "1 Network Principles FdSc Computing Technologies TCP-IP – Addressing & Sub-Netting Carl Smith – 2004 (Revised 2013)"

Similar presentations


Ads by Google