0% found this document useful (0 votes)
50 views4 pages

Why TCP/IP?: All Devices On A Same Network Must've Their Network Id Same

Lecture 4 discusses TCP/IP, the most widely used internet protocol. It covers IP addresses and their structure, including network IDs and host IDs. IP addresses are 32-bit numbers that uniquely identify devices. Subnet masks determine the network and host portions of an IP address. There are three classes of IP addresses - A, B and C - with different address ranges. Private IP addresses start with 10, 172.16, 172.31 or 192.168. Ping is used to check network connectivity between devices. Subnetting allows networks to be divided into subnetworks for better organization and prevention of conflicts when IP addresses are assigned.

Uploaded by

Eman Fatima
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)
50 views4 pages

Why TCP/IP?: All Devices On A Same Network Must've Their Network Id Same

Lecture 4 discusses TCP/IP, the most widely used internet protocol. It covers IP addresses and their structure, including network IDs and host IDs. IP addresses are 32-bit numbers that uniquely identify devices. Subnet masks determine the network and host portions of an IP address. There are three classes of IP addresses - A, B and C - with different address ranges. Private IP addresses start with 10, 172.16, 172.31 or 192.168. Ping is used to check network connectivity between devices. Subnetting allows networks to be divided into subnetworks for better organization and prevention of conflicts when IP addresses are assigned.

Uploaded by

Eman Fatima
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/ 4

Lecture 4

Our concern will be with TCP/IP.

Why TCP/IP?
Most widely/commonly used, all internet run/work on TCP/IP.

We will discuss what is TCP/IP, its addresses, classes, static/dynamic, sub netting, masking.

IP address: Any device in TCP/IP network that generates/receive/transmit data (it can be a core
device like router/gateway) is assigned a unique IP address (which is its identification in the
network). All devices (computer) in our class will come to TCP/IP network when it will be assigned
a unique IP address. IP address is of 32 bits (4 bytes), 1 byte has range between 0-255.
Standard written format

Example: 192.168.10.13 (4 bytes, there values can be between 0-255)


Smallest possible combination 0.0.0.0
Maximum possible combination 255.255.255.255

Some part of IP address show Network id (means a common id of a network, all devices on a same
network must’ve their network id same, a machine can ping to other machines if they both are in
sane network), some part show Host id(means a unique id of every system/device connected to
that network).
Example: 192.168.10.13
Let’s say yellow part is network id (means all devices on this network must have the same network
id)
Green part is host id (unique id of the system on this yellow network, we cannot assign same ip to
two different systems as there will be conflict, data packet will be confused to go on either system)

Example: 192.168.10.13 (here three bytes are used for network id, but we can also use only 2 bytes
e.g (192.168.10.13) for network id) Here is a question. How we/system come to know which part is
network id & which part is host id? This we know from subnet mask.
Practical example: When we enter IP in windows, its subnet mask automatically appears suddenly
in the below row. But we can change it if we want. It writes itself automatically on what bases & by
changing it what we can do. Discussed below

There are three classes of IP address A, B, C.


Class A: 10.1.1.190 – IP address Range: (1.0.0.1 to 126.255.255.254)
255.0.0.0 – Subnet mask used usually / (using class c we can connect maximum
254*254*254 machines)
Class B: 130.140.19.23 – IP address Range: (128.1.0.1 to 191.255.255.254)
255.255.0.0 – Subnet mask used usually / (using class c we can connect maximum
254*254 machines)
Class C: 192.168.19.10 – IP address Range: (192.0.1.1 to 254.255.255.254)
255.255.255.0 – Subnet mask used usually / (using class c we can connect maximum
254 machines)
We can assign IP by our self or a server (DHCP) can assign it automatically, so when we connect our
mobile to router. The DHCP server within router assign our phone an IP address.
Two special ranges 229-239 are reserved for multicast, 240-254 is used for R &D. So usually this
range is not used.

127 is missing in above addresses, it is used for loopback – loopback means if you will ping any
device from 127.0.0.1 it will refer to itself.

Note: we cannot use the first & last possible IP of any network. Because that is used for
broadcasting. All possible combinations minus 2 will be number of devices that be connected in the
network.
What is Ping?
Ping is a command that send a small data packet from source to destination to check if the
connection is established & second is if that machine is alive/active or not. One device can ping to
the other device. For e.g you are on 192.168.10.11 and your friend is on 192.168.10.12 so you both
can ping each other.

Two devices 192.168.15.19 (255.255.255.0) & 192.168.15.20(255.255.0.0) can’t ping each other as
they both are on different networks. Hence we can change subnet mask of the first device to bring
them on same network as below.
192.168.15.19 (255.255.0.0) & 192.168.15.20(255.255.0.0) now they both can ping each other.
That’s mean we can play with subnet mask.

Multiple switches can be part of one network. Or there can be multiple network within one switch.
All devices in class are connected to one switch now we can keep all devices in one network or in
multiple networks. (With previous reference in switches)
In our class we are using a network so every computer should’ve a unique IP address but we’ve
also to provide internet to every machine so we will use gateway. As these both are different
networks and gateway connects two networks.
Now for e.g I set an IP on my system which exists on internet already. So there will be conflict.
Hence a standard is made that we have to use only a reserved range of IP while creating a LAN.
These IPs are called private IPs.
Class A: 10.1.1.190 – IP address Range: (1.0.0.1 to 126.255.255.254)
IPs that starts with 10 are private IPs.

Class B: 130.140.19.23 – IP address Range: (128.1.0.1 to 191.255.255.254)


IPs that starts with 172.16 & 172.31 are private IPs.
Class C: 192.168.19.10 – IP address Range: (192.0.1.1 to 254.255.255.254)
IPs that starts with 192.168.0-255 are for private IPs.

We can use same private IPs in different buildings. There will be no conflict now as there will be no
connection b/w them. When there is a chance of conflict? It’s when all these systems will come to
internet. So when our systems will go to internet it’ll switch to public IP so there is no chance of
conflict. Our ISP assign IP to our gateway will be different than those from other buildings.
All public IPs are divided by ITU in all countries, Pakistan has a range of public IPs and India has its
own range. Now every country divide that range in ISPs. ISPs divide that range in their customers.
Hence there is no chance of conflict. Netting is used to handle multiple servers using one public
IP.
Sub-netting
What if I buy 5 public IPs from brainnet.

& BOP also buy 5 public IPs from brainnet. So we can ping each other as we will be sharing same
network ID. If we are on a class c network then there will be other 249 user with which we have
same network id. So they can ping us sub netting was introduced to avoid this problem.

You might also like