0% found this document useful (0 votes)
3 views

IPv4 and Subnetting

Uploaded by

RHAVA EROZIAN
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

IPv4 and Subnetting

Uploaded by

RHAVA EROZIAN
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

2.5 hrs - 4.

5 hrs
Start at 7:30

1.Brief History of IPv4


- The very first network were point to point only.
- There was no concept of LANs or broadcast domains.
- TCP/IP came out before LANs.
- IMPs - Internet Messaging Processors, Mainframe connected to IMP and this IMP had
an address
such that IMPs could communicate with each other. IMPs performed the function of
routing data,
early routers.
- TCP/IPs was required to connect more than two mainframes such that the mainframes
knew
to whom the recieved data was intended for or to use intermediate mainframes to
get to
destination mainframes.
- Initially TCP/IP addresses was 32 bits long and the first 25% (8bits) represented
the network
and the remaining bits would address the IMP's address. You only had 256 networks
to connect to.
- 00000000 (default route) and 11111111(broadcast, send to everybody) were
unusable.
- Dividing addresses into networking bits and host bits set the stage for LANs and
ethernets.

- Ethernet and Token Rings were competing Layer 2 protocols (data link layer) that
were both
founded on the idea that a bunch of devices all connected to some common network
media
and able to communicate with each other.
- A broadcast domain is a collection of devices connected to a common network
media. If one
of the device starts transmitting voltage all the other devices in that media are
privy to that.
- The devices connected to a broadcast domain could see the unicast, multicast or
broadcast addresses
of any frame.
- Now we also needed the addresses because of multiple recievers. This led to
unique MAC addresses
being built which was a layer 2 address into the ethernet. MAC is 48 bits.
- Ethernet can carry hundreds of different protocols not just IPs.

2. Communications within Broadcast Domains

- Within a broadcast domain, communications are three types. Broadcast (needs no


address,
host bits are all 1's), Unicast (requires MAC, any other patterns except
00000000),
Multicast (requires MAC with special format, first four 4 bits are 1100).
- In a broadcast domain both Layer 3 IPs and Layer 2 MAC addresses are used.
- Unicast needed source IP, source MAC, destination IP and destination MAC
- In case of Multicast although everyone sees the data in a broadcast domain, the
question
is what group of people will ignore it and which group of people will process it.

- ARP = Address resolution protocol


- Network Software Applications fall into two categories, one that communicates
only within
its broadcast domain and others that talk to other domains as well
- IP address != Broadcast Domain Address. IP address may take the form of a
broadcast domain
when using an ethernet but it can also be a point to point newtork.
- IP address = Network / Broadcast Domain address + Unique Host address within that
broadcast
domain
- When sending to a remote host, we don't need to know their L2 address. The L2
address will
be the address of the deafult gateway in that broadcast domain.
- Packet is addressed to remote host's IP address
- Frame is addressed to gateway's L2 address.

3. Identifying classes and types of IPv4 Addresses:

- IPv4 addresses are comprised of 4 octets. Because we can't remember a raw binary
string,
we cut it into 4 parts, convert them into decimals and seperate them by .'s This
is the
dotted decimal notation.
- An 8 bit network address was not able to accomodate the increasing number of
networks
hence the IPv4 addresses were split into classes.
- To indentify classes, the device looked into the starting bits of a 32 bit binary
number.

- For unicast devices:


If it starts with a 0, it's a class A address (8 bit Network address, 254
network, 16M
devices) - 1.x.x.x through 126.x.x.x
If it starts with a 10, it's a class B address (16 bit Network address, 65k
network, 65k
devices) - 128.x.x.x through 191.x.x.x
If it starts with a 110, it's a class C address (24 bit Network addresss, 16M
network, 254
devices) - 192.x.x.x through 223.x.x.x
- 127 is also reserved for loopback, a packet with address of 127 never leaves the
device
usable for finding bugs.

- Class D address are reserved for multicast, starts with 1110 - 224.x.x.x through
239.x.x.x
- Class E address are experimental, starts with 11110 - 240.x.x.x through
255.x.x.x, will
never utilized.

- For two devices to be in the same network, for class A inital number is same, for
class B
two initial numbers are same etc. For example, 192.102.23.4 is a class C address
so for a
device to be in the same network as it, it would have to have an IPv4 of
192.102.23.x

4. IPv4 governing bodies:

- As networks have grown and grown, we need a high level governing body that
allocates IPv4s
to organizations such that there is no conflict and each organization is
allocated a unique
IP address.

- Food Chain of governing bodies:


- IANA = Internet Assigned Numbers Authority allocates IPv4s and currently IPv6s.
Also
regulates and allocates TCP and UDP port numbers.
- RIRs = Regional Internet Registries, AFriNIC, APNIC, RIPE NCC, ARIN, LACNIC
- ISPs = Internet Service Providers
- End users can either get networks from either ISPs or RIRS. Provider Independent
Addressing
means you get networks from RIRs.

5. Private vs Public Addresses:

- IP addresses "leased" to a corporation (by an ISP or an RIR) are known as public


IP address.
- IP addresses that are unregistered and may overlap from one company to next are
known as
private IP addresses. Private IP addresses are not allowed to send packets to or
recieve
packets from the global internet.
- 10.x.x.x (Class-A), 172.16.x.x to 172.31.x.x(Class-B) and 192.168.x.x(Class-C)
are reserved
for private networks
- For a network of private addresses, it is common to have a device with a public
address
(router), if a private device sends a packet, the private ip is stripped off and
replaced
with a public address, (Network Address Translation)
- Some network addresses are neither public nor private eg: 127.x.x.x, 169.x.x.x.
If something
utilizes DHCP to dynamically discover what IP address it should use, sometimes it
fails.
When it fails, it provisions itself with 169.x.x.x. Getting a 169 is bad!

6. IPv4 Subnet Masks:

- Even the classfull networks were found to be not enough to fulfill the growing
demand for
networks
- ISPs don't care what you do with your host bits, but you are not allowed to
modify your
network bits.
- Subnetting is taking one network and dividing into many networks keeping the
original bit
pattern of the original network same. Certain host bits are changed into subnet
bits which
work as "network" bits.
- Given an Ipv4 and a subnet mask, the number of 1s in the subnet mask correspond
to the
number of bits that should be unchanged. The remaining bits are either set to 0
(for
network) or 1 (for broadcast)
- /x represents that x digits in the ipv4 address is to be unchanged. (Short
notation)

7. Same-length Subnetting:
- For every host bit you convert to a subnet bit, you get two subnets.
- 2 ^ (subnet_bits) >= # Networks required
- (2 ^ (host_bits)) - 2 = # Hosts available per subnet
- Each network utilizes the same mask
- Subnet mask is constant for all subnets.

8. Variable-length Subnetting:

- What if some subnets require more hosts than other subnets? Same-length
subnetting ignores
host requirements which is why the need of variable-length subnetting arises.
- VLSM = Variable-length Subnet Masking - creating subnet masks on variable sizes
that are
finely tuned based on host requirements and NOT quantity of networks required
- Start with the largest host required. find subnet mask for that subnet (/x) and
repeat
for the subnets in descending order.
- Subnet mask may be variable depending on the host requirements.
- CIDR = Classless Interdomain Routing, Classful networks are irrelevant and the
subnet
mask is responsible for separating the IPv4 into network bits and host bits.

9. IPv4 Summarization and Supernetting


- IPv4 summarization (aggregation) is the process of combining multiple subnetworks
into a
single network advertisement, efficient in large networks, provides addressing
hierarchy.
- Supernetting differs from summarizaion as it does not break classfull boundaries.

You might also like