0% found this document useful (0 votes)
236 views8 pages

IP Addressing: Format of An IP Address

An IP address is a unique number assigned to devices connected to a network that uses TCP/IP for communication. It has two main functions: identification of hosts or interfaces and location addressing. There are two main types of IP addresses: IPv4 uses 32-bit addresses and is the current standard, while IPv6 uses 128-bit addresses to accommodate more devices. IP addresses can be public, allowing devices to connect to the internet, or private for internal networks, with private addresses translated to public ones by Network Address Translation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views8 pages

IP Addressing: Format of An IP Address

An IP address is a unique number assigned to devices connected to a network that uses TCP/IP for communication. It has two main functions: identification of hosts or interfaces and location addressing. There are two main types of IP addresses: IPv4 uses 32-bit addresses and is the current standard, while IPv6 uses 128-bit addresses to accommodate more devices. IP addresses can be public, allowing devices to connect to the internet, or private for internal networks, with private addresses translated to public ones by Network Address Translation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

IP Addressing

 An Internet Protocol address (IP Address) is a numerical label assigned to each device
connected to a computer network that uses the Internet Protocol for communication.
 IP address has information about how to reach a specific host, especially outside the LAN.
 An IP address serves two principal functions
i) host or network interface identification and
ii) location addressing.
 An IP Address is a 32-bit unique address.
 An IP address always consists of 4 numbers separated by periods, with the numbers having a
possible range of 0 through 255.
 Example of IP address is 192.168.12.1

Format of an IP address
 There are two notations in which IP address is written
i) dotted decimal notation and
ii) hexadecimal notation.

Dotted Decimal Notation


 The IP address is made up of 32-bits which are divided into the network part (Network ID)
and host part (Host ID) with the help of a subnet mask.
 The 32 binary bits are broken into four octets (1 octet = 8 bits).
 Each octet is converted to decimal and separated by a period (dot).
 For this reason, an IP address is said to be expressed in dotted decimal format (for example,
172.16.81.100). The value in each octet ranges from 0 to 255 decimal, or 00000000 -
11111111 binary.

 The format of the IP address differs with the class the IP address belongs to.

Classes of networks

 IP addresses belong to five different network classes namely Class A, Class B, Class C,
Class D and Class E.
 Classes A, B and C are the most important.
 The first bits of the class determine which class an address belongs to.
 The classes differ in how much of the address is taken up with the network address and
how much with the host address.

1
Class A

 The IP address has 1 – 126 in the first octet. For example, 126.168.252.12 has 126 in
the first octet which falls in the range 1 to 126.
 The first octet (the first 8 bits) is the network portion and the Octets 2, 3, and 4 (the next
24 bits) are for the hosts.
 Class A addresses are used for networks that have more than 65,536 hosts (actually, up to
16777214 hosts!).

Class B

 The IP address has 128 - 191 in the first octet. For example, 186.234.252.12 has 186 in
the first octet which falls in the range 128 to 191.
 The first two octets (the first 16 bits) is the network portion and the Octets 3 and 4 (the
next 16bits) are for the hosts.
 Class B addresses are used for networks that have between 256 and 65534 hosts.

Class C

 The IP address has 192 - 223 in the first octet. For example, 192.168.12.2 has 192 in
the first octet which falls in the range 192 to 223.
 The first three octets are the network portion. Octet 4 (8 bits) is for local subnets and
hosts
 Class B is for networks with less than 254 hosts.

Class D

 Class D is reserved for multicasting.


 Class D is from 224 - 239 in the first octet. For example, 224.1.0.0

Class E

 Class E is reserved for future use and experimenting.


 Class E is form 225 – 255 in the first octet. For example, 225.124.134.1

CLASS IP Address Range

Class A 1.0.0.1 - 126.255.255.254

Class B 128.1.1.1 - 91.255.255.254

Class C 192.0.1.1 - 223 255.254.254

Class D 224.0.0.0 - 239.255.255.255

Class E 240.0.0.0 - 255.255.255.255

2
 For example, Class A has the first 8 bits reserved for the Network part (Net ID) and the
last 24 bits are for the hosts portion (Node ID).

Task

Find the class, network and host addresses for:

a) 4.23.145.90
b) 227.34.78.7
c) 246.7.3.8
d) 129.6.8.4
e) 198.76.9.23
Types of IP Addresses
 Two types of IP addresses are IPv4 and IPv6

IPv4 Addresses
 The version that the Internet and most routers are currently configured for is IPv4 (Internet
Protocol Version 4).

3
 IPv4 uses 32-bit addresses e.g. 12.244.233.165
 It is limited only to 4,294,967,296 possible unique addresses. This means that as many
devices are connected to the internet the addresses will soon be used up.

IPv6 Addresses
 As many devices are now connected on the internet, it means many IP addresses are required.
 IPv6 would allow IP Address allocations to networks without any foreseeable problem with
the amount of addresses available.
 IPv6 (Internet Protocol Version 6) can accommodate many addresses than the IPv4.
 IPv6 that has 128-bit addresses e.g. 2001:0db8:0000:0000:0000:ff00:0042:7879.
 However, in order to use IPv6 addresses existing routers and hardware would need to be
upgraded or configured to use this new version of IP addresses.

IPv4 and IPv6 cannot communicate with other but can exist together on the same network. This
is known as Dual Stack.

Differences between IPv4 address and IPv6 address

IPv4 address IPv6 address


32-bit address 128-bit addresses
Supports limited IP addresses Support unlimited IP addresses
It is a numeric e.g. 12.244.233.165 It is an alphanumeric address e.g.
2001:0db8:0000:0000:0000:ff00:0042:7879
Address is separated by dots (.) Address is separated by semi colons (;)
Commonly used IP address Not commonly used IP address
Easy to remember Difficulty to remember
It has checksum fields Has no checksum fields
It supports broadcasting Does not support broadcasting
Built without security in mind IPSec (Internet Protocol Security) is built into the IPv6
protocol

 There are 3 IP addresses that are reserved for special purposes.


i) 0.0.0.0 refers to the default network
ii) 255.255.255.255 is called the broadcast address.
iii) 127.0.0.1 is the loopback address, and refers to your machine.
 Whenever you click the link http:// 127.0.0.1 you are trying to connect to your own machine.
 All addresses of the form 127.xx.yy.xx are used for diagnostics

Private (Local) IP address


 Every class of IP, (A, B & C) has some addresses reserved as Private IP addresses. These IPs
can be used within a network, campus, company and are private to it.
 Private IP addresses are unique to your network provided by your router to each network
device on the network (LAN).
 Private IP addresses never leave your network and can not be routed over the internet.
 Private IP addresses within the same local network must be unique and cannot be repeated.

4
 The private addresses in a network don't have to be synchronized with the rest of the world
and internet.
 Private IP addresses are not unique throughout the world as your neighbor can use the same
Private addresses without any problem, because that's his or her network, not yours.
 Direct access to the internet using a private IP address is not possible. In this case, the
connection to the internet is via NAT (network address translation that replaces the private IP
address with a public one).

Public (Global) IP address


 These are external IP addresses provided by your Internet Service Provider (ISP) to identify
your home computer to the outside world (internet).
 Public IP addresses are routable over the internet.
 They are unique throughout the network, thus they have to be to synchronized with the rest
of the world and internet.

Important! The use of a private IP address is more secure than the use of a public IP address, as
private IP addresses are not directly visible on the internet and are behind NAT, which also
ensures the security of the home network.

5
Network Address Translation (NAT)
 NAT is a process in which a router changes a private IP Address into a public IP address
so that it can send traffic over the Internet, keeping track of the changes in the process.
 When the information comes back to your router, it reverses the change from a real IP
address into a private one and forwards the traffic back to your computer.
 In order to make sure that responses get back to the right hosts when packets are sent out into
the Internet, the router will construct a table associating outgoing packets with private IP
addresses; the address of the relevant table entry will be stored in the packet itself.

Subnet mask
 A sub mask is a 32-bit combination which helps identify which portion of the address
identifies the subnet and which portion of the address identifies the node/host.
 The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local
subnet or on a remote network.
 For example, 255.0.0.0 is the default subnet mask for Class A.

Media Access Control (MAC) / Physical Address


• MAC is a 48-bits address of the machine which can identify a node uniquely coded during
manufacturer.
• The MAC address identifies the network adapter on your machine.
• Therefore, machines on the same network can communicate to each other using MAC
addresses. The address is not send to the gateway computer (because the hosts are not
communicating on the internet)
• A bridge has MAC addresses for every device on the LAN.
• If machine need to communicate a machine outside its network or on internet, then an IP
address is required.

Differences between MAC address and IP address

IP Address MAC address


32-bits (IPv4) or 128-bits (IPv6) address 48-bits address
Set by the ISP Set during manufacture of the machine
Logical address of the computer Ensure the physical address of computer
Identifies the connection of the device on the Simply identifies the device
network.
Operates in the network layer Operates in the data link layer.
Modifies with time and environment cannot be changed with time and environment.
Can be found easily with a third party Cannot be found easily by a third party

6
Example of IP settings

Default gateways
 If a TCP/IP computer needs to communicate with a host on another network, it will usually
communicate through a device called a router.
 A router that is specified on a host, which links the host's subnet to other networks, is called a
default gateway.

Domain Name System (DNS)


 Domain names are the human-readable website addresses we use every day. For example,
Google’s domain name is google.com.
 DNS is like the internet’s phonebook which maintain a directory of domain names.
 DNS translates human readable domain names (e.g. google.com) into numeric IP addresses
(e.g. 172.217.0.142) which computers understand.
 For example, if someone types google.com into a web browser, a server behind the scenes
will map that domain name to the IP address 172.217.0.142.
 It also provides a list of mail servers which accept emails for each domain name.
 The domain name system is a hierarchical method defines how internet addresses are
constructured.
 The DNS is based on a tree structure called the domain name space. The top level domains
were assigned by organization and by country and are shown by the suffix attached to
internet domain names.
 There are more than 250 top level domains which are either generic or representing countries
or organizations. Examples of generic domains are .com, .edu, .gov etc. and those
representing countries are .zw, .uk, .za etc.

7
DNS Servers
 DNS server is a server responsible for keeping the file that contains information about
the domain name(s) and corresponding IP addresses (zone file) as well as for providing the
above-mentioned information during DNS queries.
 DNS servers are mostly provided by your Internet service provider (ISP).
 Your computer may be using the router as its DNS server, but the router is forwarding
requests to your ISP’s DNS servers.
 DNS servers match domain names to their associated IP addresses. When you type a domain
name into your browser, your computer contacts your current DNS server and asks what IP
address is associated with the domain name. Your computer then connects to the IP address
and retrieves the right web page for you.

How DNS Servers speeds up search


 To speed up DNS most name servers on the internet will cache (remember) DNS records
themselves so that they do not have to look up records each time they require them.
 When you visit a website, it is probable that your ISP’s name servers will remember the IP
address, so that the next time you (or someone else) requests that website, the IP address can
be retrieved more quickly by skipping the DNS request phase.
 In this instance, your ISP’s name server is using a cached DNS record.
 It will use this cached record for a period of time, after which it will retrieve the record
again. It will again cache the record and the cycle will repeat.

Uniform Resource Locator (URL)


 URL is a standard address used to find a webpage, webserver or other devices on the internet.

A typical address or URL is

http:// www. payne-gallway.co.uk/ computing / student_resources.html

Protocol Host Domain Name Folder Document Name

How Where what

Questions
1. Explain the format of an IP address. [2]
2. Distinguish between a MAC address and IP address. [4]
3. Explain the role of a Domain Name System [2] ZIMSEC 2019
4. Compare and contrast public IP address and private IP address. [6] ZIMSEC 2019
5. Compare the OSI model and TCP/IP models clearly showing any four differences between
the two models. [4] ZIMSEC 2019
6. Describe how Domain Name Servers (DNS servers) optimize searches on the internet. [4]

You might also like