Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mr C Johnston ICT Teacher

Similar presentations


Presentation on theme: "Mr C Johnston ICT Teacher"— Presentation transcript:

1 Mr C Johnston ICT Teacher www.computechedu.co.uk
G055 - Lecture 11 Internet Protocol - In Depth!! Mr C Johnston ICT Teacher

2 Session Objectives Know the contents of an IP header
Know different types of IP address and their use Be able to convert between a numerical IP address and a binary IP address Be able to convert between a binary IP address and a numerical IP address Understand the concept of IP addressing within a network and submasking

3 IP Addressing Each computer or device connected to the internet needs a unique address to ensure its receives the data requested, When a host joins the internet its given an IP address – at home this will be provided by your internet service provider, Routers in the internet learn where a particular IP address is and the best route to get traffic to it, When using TCP/IP a special IP header is added to each data packet to assist routers in routing network traffic, There are two types of IP address used – IPv4 and IPv6.

4 IP Header Flags - these indicate if a datagram must not be divided up (fragmented) by TCP or if this is last datagram in the sequence making up a message. Offset - the position in the sequence of datagrams making up the whole message. Time To Live - the number of routers that a datagram can pass through before it is considered lost. This number is decreased by each router. If it reaches 0, the message is destroyed and will be considered to be lost. Protocol - IP works with TCP and with other protocols such as User Datagram Protocol (UOP) used on LANs using Network File System (NFS) . checksum - an error-checking value, calculated to allow each device to check that the datagram has not become corrupted on its journey. Each device will recalculate the checksum as fields such as Time To Live change.

5 IP Addresses IPv4 has four sets of 8 binary bits which are normally displayed in decimal separated by a dot e.g IPv6 has 8 sets of hexadecimal numbers between 0 and FFFF (equivalent to 16 binary bits) which are normally displayed as their HEX value separated by a colon e.g. 1050:0000:0000:0000:0005:0600:300c:326b In theory there are 2^128 addresses available with IPv6 (340,282,366,920,938,463,463,374,607,431,768,211,456) compared with only 2^32 available IPv4 addresses (4,294,967,296) IPv6 is needed because we are running out of IPv4 addresses quickly although there is worry about the slow uptake of the new standard

6 DHCP Diagram Host / Client DHCP Server
1. DHCP Discover Packet 2. DHCP Offer Packet 3. DHCP Request Packet 2. DHCP Ack Packet Host / Client Discover packet is broadcast to find the server, When a discover packet is received the DHCP server sends an offer which includes an IP address, When an offer is received the host / client then has to request to rent it, If the IP address is still free when the server receives a request it will reply with an acknowledgment confirming the host can use it.

7 DHCP in Action

8 NAT Diagram

9 NAT In Action

10 IP Addresses – The Boss?? If each host on the internet needs a unique address then who is in charge of ensuring this happens?? Addresses are assigned by regional registrars who will each have a pool of addresses to assign – they keep a database of who is assigned what to ensure there are no duplications, You may be assigned a range of address (for example an ISP) to distribute within your network, As IP addresses are distributed regionally, you can tell the origin of internet traffic – lets trace my IP…

11 IP Address Classes IP addresses are split into 5 different classes of network, Different classes use a different number of bits to identify them therefore they are capable of supporting a different number of hosts. Range Format Use A 1-128 8 bit network address 24 bit host address (123.xxx.xxx.xxx) Only 128 large networks can use this class each having 2^24 ( ) addresses available to assign to hosts / clients. B 16 bit network address 16 bit host address ( xxx.xxx) About 16,000 medium sized networks each having 2^16 (65536) addresses available to assign to hosts / clients. C 24 bit network address 8 bit host address ( xx) About 2 million Small networks each having 2^8 (256) addresses available to assign to hosts (clients) D 32 bit host address (224.xxx.xxx.xxx) Individual hosts not on networks and there are about 268 million available addresses E 255 255.xxx.xxx.xxx Experimental addresses

12 Subnet Masks Routers use masks so they only look at the required part of an IP address, On the internet a router only needs to look at the network address part of an IP address whilst a router inside a LAN only needs to look at the host part, Subnet masks can be used to mask out the bits of the IP address which is not required: A typical subnet mask on an internal Class C network would be – setting the first 3 parts to 255 will tell the router to ignore the network address part, What would be a typical mask for class A and class B networks? You can also use masks to spilt networks into different segments – by activating the first bit of the fourth byte - if a network had 2 segments then the subnet mask would be For more segments you activate the 2 bit and add this to the first and so on. 4 segments – Once the mask is added its possible to tell which segment the host is in and route traffic to the correct segment.

13 Binary IP Addresses Most IP addresses are given in a decimal format however the computers need them in binary format, For the exam you need to be able to convert a decimal IP to binary and vica-versa, Converting a binary IP address to decimal is straight – just take each set of 8 bits and place them into the table below – where there is a 1 add the corresponding decimal numbers together. e.g Use a table to calculate the rest of the IP address 128 64 32 16 8 4 2 1 = 171

14 Decimal to binary requires a little more thought – and some trial and error!
Using the same table we work from left to right placing a 1 in each box and adding it to the running total… if the value we are trying to find is exceeded we replace the 1 with a 0 and move to the next column. Convert 185 to binary 128 64 32 16 8 4 2 1 128 < 185 therefore 1 ok 128 64 32 16 8 4 2 1 = 192 > 185 therefore 0 128 64 32 16 8 4 2 1 = 160 < 185 therefore 1 ok 128 64 32 16 8 4 2 1 = 176 < 185 therefore 1 ok 128 64 32 16 8 4 2 1 = 184 < 185 therefore 1 ok 128 64 32 16 8 4 2 1 = 188 > 185 therefore 0 128 64 32 16 8 4 2 1 = 186 > 185 therefore 0 128 64 32 16 8 4 2 1 = 185 = 185 therefore 1 ok 185 in binary is

15 Topic Exercise Complete the following reading:
A2 Text Book Pages pg34-39 TCP/IP heading) Read the BBC notes on IPv6 just in case they question on it – doubt it but you never know.. Download and complete this topics exercise and past exam paper questions – complete for next lesson.


Download ppt "Mr C Johnston ICT Teacher"

Similar presentations


Ads by Google