Sie sind auf Seite 1von 17

IPv4 is a connectionless protocol for use on packet-switched Link Layer networks

(e.g., Ethernet). It operates on a delivery model, in that it does not guarantee


delivery, nor does it assure proper sequencing or avoidance of duplicate delivery.
These aspects, including data integrity, are addressed by an upper layer transport
protocol, such as the Transmission Control Protocol (TCP).
IPv4 Address Classes IP addresses are split up into several different categories,
including Class A, B, C, D , and E. Address classes are defined, in part, based on the
number of bits that make up the network portion of the address. Each IP address
includes a network ID and a host ID.
The network ID (also known as a network address ) identifies the systems that are
located on the same physical network bounded by IP routers. All systems on the
same physical network must have the same network ID. The network ID must be
unique to the internetwork.
The host ID (also known as a host address) identifies a workstation, server,
router, or other TCP/IP host within a network. The address for each host must be
unique to the network ID.
Class A addresses are assigned to networks with a very large number of hosts.
The high-order bit in a class A address is always set to zero. The next seven bits
(completing the first octet) complete the network ID. The remaining 24 bits (the
last three octets) represent the host ID. This allows for 126 networks and
16,777,214 hosts per network.
Class B addresses are assigned to medium-sized to large-sized networks. The two
high-order bits in a class B address are always set to binary 1 0. The next 14 bits
(completing the first two octets) complete the network ID. The remaining 16 bits
(last two octets) represent the host ID. This allows for 16,384 networks and
65,534 hosts per network.
Class C addresses are used for small networks. The three high-order bits in a class
C address are always set to binary 1 1 0. The next 21 bits (completing the first

three octets) complete the network ID. The remaining 8 bits (last octet) represent
the host ID. This allows for 2,097,152 networks and 254 hosts per network.
Class DClass D addresses are reserved for IPv4 multicast addresses. class D
addresses 224.0.0.0/4 (or 224.0.0.0, 239.255.255.255).
Class EClass E addresses are reserved for experimental use class E addresses
240.0.0.0/4 (or 240.0.0.0, 255.255.255.255)

Subnet Mask
TCP/IP is unique among most layer 3 addressing schemes. When dealing with
TCP/IP addresses, each address actually has three components: a network
component, a host component, and a subnet mask. The function of the subnet
mask is to differentiate among the network address, the host addresses, and the
directed broadcast address. Like an IP address, a subnet mask is 32 bits long. In
binary, a 1 in a bit position in the subnet mask represents a network component
and a 0 in a bit position represents a host component.
You can actually use four methods to represent a subnet mask. Here is a list with
a demonstration using a Class C network:
Dotted-decimal 192.168.1.0 255.255.255.0
Number of networking bits 192.168.1.0/24 ( CIDR notation )
Hexadecimal 192.168.1.0 0xFFFFFF00
Binary 192.168.1.0 11111111111111111111111100000000
The most common of these formats is the dotted-decimal and the number of
networking bits used (the first two listed above). Hexadecimal and binary are
rarely used.
Subnet Mask for Class A Network For a Class A network, the default subnet mask
is 255.0.0.0: the first octet (byte) is the network number and the last three octets
are the host numbers.
Subnet Mask for Class B Network For a Class B network, the default subnet mask
is 255.255.0.0: the first two octets are the network number and the last two
octets are the host numbers.
Subnet Mask for Class C Network For a Class C network, the default subnet mask
is 255.255.255.0: the first three octets are the network numbers and the last
octet is the host number.

Public and Private Addresses


Any device that connects to the Internet needs a unique IP address known as a
public address. Private addresses are reserved IP addresses that are to be used
only internally within a companys network, not on the Internet. Private addresses
must therefore be mapped to a companys external registered address when
sending anything on the Internet. Public IP addresses are provided for external
communication. In most cases, enterprises and consumers obtain their addresses
from their Internet service providers (ISPs), which gets their allocation from the
regional registry. administrators should use addresses from the following three
blocks which are reserved for private networks.Public IP addresses- Useable on
the internet and Private networksPrivate IP address- Useable only in Private
networks .
- have three ranges :
Class A : 10.0.0.0 to 10.255.255.255
Class B : 172.16.0.0 to 172.31.255.255
Class c : 192.168.0.0 to 192.168.255.255
- 0.0.0.0 Default route only can be used as source from host , and
255.255.255.255 is broadcast.
- loopback range ( used for testing ) 127.x.x.x
-Auto configuration range 169.254.x.x

Types of IPv4 Addresses


Unicast Most network traffic is unicast in nature, meaning that traffic travels from
a single source device to a single destination device.

Broadcast Broadcast traffic travels from a single source to all destinations on a


network (that is, a broadcast domain).

Multicast
Multicast technology provides an efficient mechanism for a single host to send
traffic to multiple, yet specific, destinations. For example, imagine a network with

100 users. Twenty of those users want to receive a video stream from a video
server.
With a unicast solution, the video server would have to send 20 individual
streams, one stream for each recipient. Such a solution could consume a
significant amount of network bandwidth and put a heavy processor burden on
the video server.
With a broadcast solution, the video server would only have to send the video
stream once; however, it would be received by every device on the local subnet,
even devices not wanting to receive the video stream. Even though those devices
do not want to receive the video stream, they still have to pause what they are
doing and take time to check each of these unwanted packets.
As shown in Figure , multicast offers a compromise, allowing the video server to
send the video stream only once, and only sending the video stream to devices on
the network that wants to receive the stream. What makes this possible is the use
of a Class D address. A Class D address, such as 239.1.2.3, represents the address
of a multicast group. The video server could, in this example, send a single copy of
each video stream packet destined for 239.1.2.3. Devices wanting to receive the
video stream can join the multicast group. Based on the device request, switches
and rout-ers in the topology can then dynamically determine out of which ports
the video stream should be forwarded.

Subnetting
Subnetting allows you to create multiple logical networks that exist within a single
Class A, B, or C network. If you do not subnet, you can only use one network from
your Class A, B, or C network, which is simply unrealistic.
Subnetting allows you to take some of the higher-order host bits in a network
number and use them to create more networks. In the process of creating more
networks, each of these additional networks has a lesser number of hosts. These
smaller networks are commonly called subnets.
What are 2 of the major reasons for subnetting or segmenting your network?
- To divide a large network into smaller segments to reduce traffic and speed
up the sections of your network.
- To connect networks across geographical areas.
IP addressing rules group addresses into groups called subnets. The rules are as
follows:
Addresses in the same subnet are not separated by a router.
Addresses in different subnets are separated by at least one router.
Figure shows the general concept, with hosts A and B in one subnet, and host C in
another. In particular, note that hosts A and B are not separated from each other
by any routers. However, host C, separated from A and B by at least one router,
must be in a different subnet.

Talking Binary
Easiest way to convert decimal to binary is to understand the following
scheme
2^9
512

2^8
256

2^7
128

2^6
64

2^5
32

2^4
16

2^3
8

2^2
4

2^1
2

2^0
1

converting Decimal to binary Examples :


- convert the number (20) into binary format :
2^9

2^8

2^7

2^6

2^5

2^4

2^3

2^2

2^1

2^0

512

256

128

64

32

16

20 = 10100= 5bits
- convert the number (140) into binary format :
2^9

2^8

2^7

2^6

2^5

2^4

2^3

2^2

2^1

2^0

512

256

128

64

32

16

140 = 10001100= 8 bits

- convert the number (127) into binary format :


2^9

2^8

2^7

2^6

2^5

2^4

2^3

2^2

2^1

2^0

512

256

128

64

32

16

127 = 1111111= 7 bits


- convert the number (255) into binary format :
2^9

2^8

2^7

2^6

2^5

2^4

2^3

2^2

2^1

2^0

512

256

128

64

32

16

255 = 11111111= 8 bits

- convert the number (248) into binary format :


2^9

2^8

2^7

2^6

2^5

2^4

2^3

2^2

2^1

2^0

512

256

128

64

32

16

248 = 11111000= 8 bits

1) Subnetting when given a required number of networks


Example :
A service provider has given you the Class C network range 209.50.1.0.
Your company must break the network into 20 separate subnets.
Step 1) Determine the number of subnets and convert to binary
- In this example, the binary representation of 20 = 00010100.
Step 2) Reserve required bits in subnet mask and find incremental value
- The binary value of 20 subnets tells us that we need at least 5 network
bits to satisfy this requirement (since you cannot get the number 20
with any less than 5 bits 10100)
- Our original subnet mask is 255.255.255.0 (Class C subnet)
- The full binary representation of the subnet mask is as follows:
255.255.255.0 = 11111111.11111111.11111111.00000000
- We must convert 5 of the client bits (0) to network bits (1) in order
to satisfy the requirements:New Mask =
11111111.11111111.11111111.11111000
- If we convert the mask back to decimal, we now have the subnet mask
that will be used on all the new networks
255.255.255.248 OR /29 (CIDR notation )

- Our increment bit is the last possible network bit, converted back to a
binary number:
New Mask = 11111111.11111111.11111111.1111(1)000 bit with the
parenthesis is your increment bit.
If you convert this bit to a decimal number, it becomes the number 8
- calculating number of subnets : to verify your answer and find out
how many subnets you got , use this formula :
find the number of ( 1s) added to the default
default subnet mask is
255.255.255.0 = 11111111.11111111.11111111.00000000
New subnet mask
255.255.255.248 = 11111111.11111111.11111111.(11111)000
Number of added (1s) = 5
Then the number of subnets = 2^5 =32 (subnets )
- calculating the number of hosts in each subnet : to find out how
many hosts in each subnets you need to find how many ( 0s )
remaining in the new subnet mask
New subnet mask
255.255.255.248 = 11111111.11111111.11111111.11111(000)
Number of ( 0s ) = 3
Then the number of hosts in each subnet = 2^3 2 = 6

Step 3) Use increment to find network ranges


- Start with your given network address and add your increment to the
subnetted octet:
209.50.1.0
209.50.1.8
209.50.1.16etc
- You can now fill in your end ranges, which is the last possible IP
address before you start the next range
209.50.1.0 209.50.1.7
209.50.1.8 209.50.1.15
209.50.1.16 209.50.1.23etc
- You can then assign these ranges to your networks! Remember the
first and last address from each range (network / broadcast IP) are
unusable
2) Subnetting when given a required number of Hosts
Example : A service provider has given you the Class C network range
209.50.1.0. Your company must break the network into as many
subnets as possible as long as there are at least 50 Hosts per network.
Step 1) Determine the number of Hosts and convert to binary
- In this example, the binary representation of 50 = 00110010

Step 2) Reserve required bits in subnet mask and find incremental value
- The binary value of 50 Hosts tells us that we need at least 6 Host bits
to satisfy this requirement (since you cannot get the number 50 with
any less than 6 bits 110010)
- Our original subnet mask is 255.255.255.0 (Class C subnet)
- The full binary representation of the subnet mask is as follows:
255.255.255.0 = 11111111.11111111.11111111.00000000
- We must ensure 6 of the Hosts bits (0) remain client bits (save the
Hosts!) in order to satisfy the requirements.
All other bits can become network bits:
New Mask = 11111111.11111111.11111111.11 000000
note the 6 Host bits that we have saved
- If we convert the mask back to decimal, we now have the subnet mask
that will be used on all the new networks
255.255.255.192 OR /26 (CIDR notation )
- Our increment bit is the last possible network bit, converted back to a
binary number:
New Mask = 11111111.11111111.11111111.1(1)000000
bit with the parenthesis is your increment bit.
If you convert this bit to a decimal number, it becomes the number
64

-calculating number of subnets : to verify your answer and find out how
many subnets you got , use this formula :
find the number of ( 1s) added to the default
default subnet mask is
255.255.255.0 = 11111111.11111111.11111111.00000000
New subnet mask
255.255.255.248 = 11111111.11111111.11111111.(11)00000
Number of added (1s) = 2
Then the number of subnets = 2^2 =4 (subnets )
calculating the number of hosts in each subnet : to find out how
many hosts in each subnets you need to find how many ( 0s ) remaining
in the new subnet mask
New subnet mask
255.255.255.192 = 11111111.11111111.11111111.11 (000000)
Number of ( 0s ) = 6
Then the number of hosts in each subnet = 2^6 2 = 62
Step 3) Use increment to find network ranges
- Start with your given network address and add your increment to the
subnetted octet:
209.50.1.0
209.50.1.64

209.50.1.128
209.50.1.192
- You can now fill in your end ranges, which is the last possible IP
address before you start the next range
209.50.1.0 209.50.1.63
209.50.1.64 209.50.1.127
209.50.1.128 209.50.1.191
209.50.1.192 209.50.1.255
- You can then assign these ranges to your networks! Remember the
first and last address from each range (network / broadcast IP) are
unusable
- Given an IP address & Subnet Mask, find original network range

(reverse engineering a subnet problem)


You are given the following IP address and subnet mask:
192.168.1.58
255.255.255.240
Identify the original range of addresses (the subnet) that this IP address
belongs to
- When reverse engineering a problem, all you need to do is break the
subnet mask back into binary and find the increment that was used
255.255.255.240 = 11111111.11111111.11111111.11110000

- As before, the last possible network bit is your increment. In this case,
the increment is 16
- Use this increment to find the network ranges until you pass the given
IP address:
192.168.1.0
192.168.1.16
192.168.1.32
192.168.1.48
192.168.1.64 (passed given IP address 192.168.1.58)
- Now, fill in the end ranges to find the answer to the scenario:
192.168.1.0 192.168.1.15
192.168.1.16 192.168.1.31
192.168.1.32 192.168.1.47
192.168.1.48 192.168.1.63 (IP address 192.168.1.58 belongs to this
range)

Great Exception
for the required number of networks , if the required number match
the standard numbers ( 1 2 4 8 16 32 64 128 256
512 1024 etc. )

subtract (1) and design , means if you been asked to design 8 netwroks
subtract (1) from 8 and design for 7 , if you been asked to design 16
netwroks subtract (1) from 16 and design for 15 , if you been asked to
design 32 netwroks subtract (1) from 32 and design for 31 and so on.
For the required number of hosts , if the required number of host is less
than the standard by ( 1 ) add to the required number (1 ) and design ,
it means if you were asked to design for ( 3 7 15 31 63 127 255
511 1023 ) add ( 1) for those numbers and design , means if you been
asked to design 7 hosts add (1) to 7 and design for 8 , means if you
been asked to design 15 hosts add (1) to 15 and design for 16 , means
if you been asked to design 31 hosts add (1) to 31 and design for 32
And so on..

Das könnte Ihnen auch gefallen