Sie sind auf Seite 1von 3

Notes on Ip, Subnet masking etc.

these notes are in "not sorted form".

A MAC or media access control or hardware address is a 48 bit number (expressed in


12 Hex form) comprising of (0-9,a-f.) used to communicate within network.

An IP address is an address used in order to uniquely identify a device on an IP


network. The
address is made up of 32 binary bits, which can be divisible into a network portion
and host portion
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.
In short an IP address is a 32 bits number consisting of 4 octets.
in IPv4, the 192.168.1.0 = 11000000.10101000.00000001.0000000

Subnet mask is a 32 bit number describing the size of the local network, usually
expressed in 4 octet (decimal) numbers. only certan digits are available in each
octet, i.e. 0, 128, 192, 224, 240, 248, 252, 254, 255.

Default Gateway is the IP address of the router that provides the exit point of
local net.

N.B. There are 5 classes of net work fro A to E


A, B C, will be considered only, (4get about D, E).
note that in industry, Due to CIDR these classes have become obsolete.

Class A : 001.0.0.0 - 127.255.255.255.


Class B : 128.0.0.0 - 191.255.255.255
Class C : 192.0.0.0 - 223.255.255.255
Class D : 224.0.0.0 - 239.255.255.255
Class E : 240.0.0.0 - 255.255.255.255

Host IDs of all zeros or all ones are not allowed. it is very important to remember
this.
Note: In the past, there were limitations to the use of a subnet 0 (all subnet bits
are set to
zero) and all ones subnet (all subnet bits set to one). Some devices would not
allow the use
of these subnets. Cisco Systems devices allow the use of these subnets when the ip
subnet
zero command is configured.
N.B. Variable Length Subnet Masks (VLSM) allows you to use different masks for each
subnet, thereby using address space efficiently.
Classless Interdomain Routing (CIDR) was introduced in order to improve both
address space
utilization and routing scalability in the Internet. It was needed because of the
rapid growth of the
Internet and growth of the IP routing tables held in the Internet routers.
CIDR moves way from the traditional IP classes (Class A, Class B, Class C, and so
on). In CIDR ,
an IP network is represented by a prefix, which is an IP address and some
indication of the length
of the mask. Length means the number of left-most contiguous mask bits that are set
to one. So
network 172.16.0.0 255.255.0.0 can be represented as 172.16.0.0/16. CIDR also
depicts a more
hierarchical Internet architecture, where each domain takes its IP addresses from a
higher level.
This allows for the summarization of the domains to be done at the higher level.
For example, if an
ISP owns network 172.16.0.0/16, then the ISP can offer 172.16.1.0/24,
172.16.2.0/24, and so on
to customers. Yet, when advertising to other providers, the ISP only needs to
advertise
172.16.0.0/16.
Network Mask.
A network mask helps you know which portion of the address identifies the network
and which
portion of the address identifies the node.
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0

Consider 192.168.1.0 /24.


The "/24" mean it has 24, "1s" in the submask, i.e.
11111111.11111111.11111111.00000000 or 255.255.255.0
i.e. 24 subnet mask digits are turned ON in this case.

what a mask means e.g. 255.255.248.0 is


11111111.11111111.11111000.00000000
has got 21 nos of "1s". so its a /21 or
192.168.1.0 /21

consider 192.168.40.55.
You are going to (use boolian) AND...
consider the .40. in the above IP address. in binary it will be
.00101000.
( now The sub mask is .248. is)
.11111000.
(upon AND the result is )
.00101000.

an other example, the CIDR in 255.255.255.192 will be /26


(CIDR = classless inter domain routing)
i.e. 26 nos of 1s in sub mask i.e.
the last .192 = 1*128 + 1*64 + 0*32+ 0*16 + 0*8 + 0*4 + 0*2 + 0*1

what is the network ID?


Now Network ID is the portion of IP address for which the sub mask is 255. e.g.
192. will be network ID (Class A) if the sub mask is 255.
192.168. will be network ID (Class B) if the sub mask is 255.255.0.0
192.168.200. will be network ID (Class C) if the sub mask is 255.255.255.0
192.168.245.180 will be network ID if the sub mask is 255.255.255.255

For a subnet mask to be valid, its leftmost bits must be set to '1'. For example,
00000000 00000000 00000000 00000000
is an invalid subnet mask because the leftmost bit is set to '0'.
Conversely, the rightmost bits in a valid subnet mask must be set to '0', not '1'.
Therefore,
11111111 11111111 11111111 11111111
is invalid.
So an IP address has 2 Parts, A Subnet (the left side), and A Host (the right
side).
2^n tell how many subnets in an IP (i.e. network identifiers)
2^n-2 tell how many Hosts in an IP, (e.g. 2^8 - 2 = 254). (used for device
identifier)

A router is very necessary for computer A to talk to computer B, and without a


router they cannt talk to each other, using just only a switch and TCP/IP
protocols.

Das könnte Ihnen auch gefallen