Professional Documents
Culture Documents
Submitted by
Guided by
Harsh kumar kandra
Prof. Anjum Khan, Asst. Prof Roll no. 301602219019
Department of Computer
Science
ACKNOWLEDGEMENT
The beatitude, bliss and euphoria that accompany the successful competition of any task
would not be completed without the expression of appreciation of simple virtues to the
people who made it possible. So with reverence, veneration and honor. I acknowledge all
those whose guidance and encouragement has helped me to complete this project.
First I would like to express my gratitude to Prof. Anjum Khan. For her valuable
guidance encouragement during the completion of training. He was a major support to me
throughout my training, being available with his ideas, inspiration and encouragement.
It is through their masterful guidance that I have been able to complete my practical
training. This section is a vote of thanks and gratitude all those persons who have directly
or indirectly contributed in their own special way towards the completion of this
dissertation.
index
1. Introduction
2. IP addresses
• IPv4
• IP address classes
• Unicast addressing mode
• Broadcast addressing mode
• Multicast addressing mode
4. Training task
5. Methodology
6. Code for the task
7. Result
8. Conclusion
9. Future scope
10. Certificates
introduction
The internet as we see today is a network of networks, a virtual world where any computer on
internet appears to be connected to every other computer present on Internet.
The glue that holds the internet together is the IP (Internet Protocol). It was designed from
beginning with internetworking in mind. Its job is to provide is to provide best-efforts way to
transport datagrams from source to destination, without regard to whether these machines are on
the same network or whether there are other networks in between them.
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.
The above window is used to manually configure the IP Address of any PC running Microsoft
Windows. In this the first half is used to configure IP Address and the second half is used to
configure the DNS server.
When the Obtain an IP address automatically is checked the computer itself finds a DHCP server
in the network and obtains an IP address dynamically from it.
When the Use the following IP address is checked we can manually assign an IP address to
the current Network Interface. It has 3 entries:
• IP address: The IP address to be assigned to current Network Interface.
• Subnet Mask: This entry is done automatically by the computer seeing the IP address
assigned. It can also be assigned manually.
• Default Gateway: This entry is the IP address of the Gateway through which the
computer can connect to other networks.
IP Address
An Internet Protocol (IP) address is a numerical identification and logical address that is
assigned to devices participating in a computer network utilizing the Internet Protocol for
communication between its nodes. Although IP addresses are stored as binary numbers, they are
usually displayed in human-readable notations, such as 208.77.188.166 (for IPv4), and
2001:db8:0:1234:0:567:1:1 (for IPv6).
IPv4:
IP version 4 (IPv4) addresses, which uniquely identify a device on an IP network, are 32 bits in
length and are typically communicated in a format known as dotted decimal. The 32 binary bits
are:
• Broken into four octets (1 octet = 8 bits). Each octet can be converted to binary. Consider
this IP address, which is presented in dotted decimal: 10.10.16.1.
The value in each octet ranges from 0 to 255 decimal, or 00000000– 11111111 binary.
Network address:
First address of a network is network address. It is obtained by ANDing the mask with the IP
address (Both in binary form). Another method is to set last 32-n bits of the IP address to 0.
Broadcast address:
Last address of a network is broadcast address. It is obtained by ORing the complement mask
with the IP address (Both in binary form). Another method is to set last 32-n bits of the IP
address to 1.
Default Mask:
An address mask determines which portion of an IP address represents network number and
which part represents host number, e.g., IP address, the mask has four octets. If a given bit of
the mask is 1, the corresponding bit of the IP address is in network portion and if given bit of
mask 0, the corresponding bit of IP address is in host portion.
IP Address Classes
IP addresses are split up into several different categories, including Class A, B, C, D (Multicast),
and E (Reserved). Address classes are defined, in part, based on the number of bits that make up
the network portion of the address, and in turn, on how many are left for the definition of
individual host addresses.
Figure shows how the network and host IDs are different for each class of IP addresses
.
Class A has 3 octets for the host portion of the address. Deployed as is, a Class A address
represents a very inefficient use of address space, since available Layer 2 technologies cannot
easily support this many hosts on a single subnet. Subnetting uses this address space efficiently.
192.168.5.0 - 11000000.10101000.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
------------------------------------------[sub]-------------------------------
The address on the left is in dotted decimal notation, and the binary representation is on the
right. When planning IP subnetting, sometimes it is easier to visualize the different portions of
the network address when looking at the binary format. The subnet mask is also represented in
dotted decimal and binary. Any address bits that have corresponding mask bits set to 1 represent
the network ID. Any address bits that have corresponding mask bits set to 0 represent the host
ID. By extending the mask to be 255.255.255.224, you’ve taken three bits (indicated by sub)
from the original host portion of the address and used them to make subnets. With these three
bits, you can create eight subnets. With the remaining five host ID bits, each subnet can have up
to 32 host addresses. A single subnet can be split up into eight 32-host subnets. Eight 32-host
subnets, however, may not be flexible enough. For example:
• Since you are using three bits more than the originally specified 255.255.255.0 mask, the mask
is now 255.255.255.224.
• The mask can also be denoted as /27 as there are 27 bits that are set in the mask. The mask is
denoted with the notation prefix/length. For example: 192.168.5.32/27 denotes the network
192.168.5.32 with a mask of 255.255.255.224.
Subnet Mask Number of Supported Hosts per
Network
Class A 255.0.0.0 Over 16 million
Class B 255.255.0.0 Over 16 thousand
Class C 255.255.255.0 254
Process
Step 1: User needs to enter IP address of form (x.y.z.t/n) that is in CIDR format.
a = stoi(str[0]);
b = stoi(str[1]);
c = stoi(str[2]);
d = stoi(str[3]);
return (re);
}
vector<int> arr(4,0);
int a, b, c, d, i, j;
a = b = c = d = 0;
j = 7;
j = 7;
for (i = 8; i < 16; i++) {
j = 7;
for (i = 16; i < 24; i++) {
j = 7;
for (i = 24; i < 32; i++) {
arr[0] = a;
arr[1] = b;
arr[2] = c;
arr[3] = d;
return arr;
}
int main()
{
string ipr ;
cout<<"Please enter address in CIDR formate ";
cin>>ipr;
string temp;
int n = tr.size();
for(int i = 0; i < n; i++){
if(tr[i] >= 48 && tr[i] <= 57)
temp +=tr[i];
else{
str.push_back(temp);
temp = "";
}
}
str.push_back(temp);
//cout<<str[0]<<endl<<str[1]<<endl<<str[2]<<endl<<str[3]<<endl;
vector<int> b;
cout<<endl;
// Convert IP address to binary form
b = bina(str);
n = stoi(str2);
vector<int> ntwk(32,0);
vector<int> brd(32,0);
int t = 32 - n;
ntwk[i] = b[i];
brd[i] = b[i];
}
ntwk[i] = 0;
}
brd[i] = 1;
}
result
conclusion
Computer Networking is a very fast project in the present developing era of electronics and
communication. Now days, computers are used in a wider range. All the organization are using
multiple computers within their departments to perform their day to day work . Computer
network allows the user to share data, share folders and files with others users connected in a
network. Computers Networking has bound the world in a very small area with it wide
networking processes like LAN, MAN, WAN. Networking inside your organization is valuable
also, In larger companies, many people never meet others in the organization that can facilitate
solving problems or getting resources. This project is forward compatible as we can add more
branches at low cost and high efficiency with effective communication between head office and
various branches of an organization
5. Ease administration
Are you a network admin? Then subnetting is a no-brainer because it can make your job a lot
easier. By subnetting, you can create networks that have more logical host limits, as opposed
to the limitations of IP addressing classes: Eight bits for Class A, 16 bits for Class B, and 24
bits for Class C. Think about it this way, if the internet was limited to only those three
classes, every network would have only 254, 64,000, or 16 million IP addresses for host
devices. Subnetting also is an effective way to keep tabs on the machines on your network,
which in turn can help you determine which machines need attention should problems arise.
So while they take careful planning and implementation, subnetted networks generally are
easier to manage and troubleshoot.
Future scope
Computer Networking is a huge domain. Scope for research in Computer Networking is quite
large. Networking is the backbone of Digital world. Network Security, Network
Performance, Network Model are some of the areas which are still evolving and have lot of
opportunities for research. I have did a small research work on Intrusion Detection, which is a
part of N/W security for Cloud. Computer networking is the backbone of the most important
thing known as 'Internet'. IT- infrastructure and IT- Software go hand in hand. both are
equally important for making our lives easy. As far as future scope is concerned what I feel is
we need to get ready to handle huge amount of data flowing over the internet
certificate
P a g e 23 | 23