IP Addressing in Depth | Network Fundamentals Part 5
Summary
TLDRThis video script delves into advanced IP networking concepts, focusing on Classless Inter-Domain Routing (CIDR) and Variable Length Subnet Masking (VLSM) for efficient IP address conservation. It explains unicast and broadcast traffic, the significance of network and broadcast addresses, and introduces special addresses like the default gateway and the use of 255.255.255.255 for universal broadcasts. The script also touches on multicasting, the management of IP addresses by organizations like the Internet Assigned Numbers Authority (IANA), and the distinction between public and private IP addresses. It further discusses methods of IP address assignment, including static, DHCP, and APIPA, and concludes with an overview of the IP header and the TCP/IP model.
Takeaways
- 📚 The video continues to build on the concepts introduced in Part 1, focusing on advanced networking topics while still using IPv4.
- 🔍 Variable Length Subnet Mask (VLSM) is introduced as a way to conserve IP addresses by creating subnets of different sizes within a network.
- 🏢 The example of a 172.16.0.0/16 network being broken into smaller subnets like /24 and /30 is used to illustrate how VLSM can be applied in practice.
- 📈 VLSM allows for more efficient use of IP addresses by accommodating networks of varying sizes, including those with minimal hosts like router links.
- 💬 Unicast traffic is explained as traffic between two devices, while broadcast traffic is described as messages sent to all devices in a local network.
- 📡 The special IP address for broadcast traffic is highlighted, with the last IP in a subnet being used for this purpose, and the network address being the opposite, with all host bits set to 0.
- 🔢 The concept of the 'magic number' method is introduced to help calculate network and broadcast addresses in more complex subnetting scenarios.
- 🚀 The importance of the Default Gateway in routing traffic is discussed, emphasizing its role as the first point of contact for devices needing to send traffic outside their local network.
- 🌐 The limitations and downsides of broadcasting are discussed, including the potential for network flooding and the inability of routers to forward broadcast messages.
- 🌐 Multicast is introduced as an alternative to broadcast, allowing devices to opt-in to receive specific types of traffic, with routers able to forward multicast traffic to intended networks.
- 🏷️ The video concludes with a discussion on the management of IP addresses, including the role of the Internet Assigned Numbers Authority (IANA) and the use of RFC 1918 for defining private IP address ranges.
Q & A
What is Classless Inter-Domain Routing (CIDR)?
-CIDR is a method used in networking to allocate IP addresses and IP routing. It uses a subnet mask to break a network into smaller, more efficient subnetworks, which helps conserve IP addresses.
What is Variable Length Subnet Mask (VLSM) and how does it help conserve IP addresses?
-VLSM is a concept that allows for the creation of subnets of different sizes within the same network. This helps to conserve IP addresses by using only the necessary number of addresses for each subnet, rather than using a fixed subnet size.
How many IP addresses are in a /30 network?
-A /30 network uses 30 bits for the network and 2 bits for the host, resulting in 4 IP addresses in each network.
What is the purpose of the broadcast IP address?
-The broadcast IP address is used to send a message to all devices within a local network. It is the last IP address in the local network, with all host bits turned on.
Why can't the broadcast IP address be assigned to a device?
-The broadcast IP address cannot be assigned to a device because it is a special address used for sending messages to all devices in the local network. Assigning it to a device would interfere with this broadcasting function.
What is the purpose of the network address in an IP network?
-The network address is used to identify the network itself. It is the first IP address in the range and is formed when all the host bits are set to 0.
What is the 'magic number' method for determining network and broadcast addresses?
-The 'magic number' method is a technique used to quickly determine the network and broadcast addresses in a subnet. It involves working with the subnet mask and the IP address to find the boundaries of the network and the broadcast address.
What is the default gateway and why is it important?
-The default gateway is the IP address of the local router. It is important because it is the address that a device sends traffic to when it cannot send the traffic directly to the destination on its own.
Why do routers not forward broadcast messages?
-Routers do not forward broadcast messages to prevent flooding the larger network with these messages and to avoid potential loops where broadcast messages are continuously forwarded between routers.
What is multicast and how does it differ from broadcast?
-Multicast is a method of sending data to a group of devices that have opted to receive it, using special multicast IP addresses. Unlike broadcast, which sends data to all devices, multicast is more targeted and efficient, and routers can forward multicast traffic to reach the intended networks.
What are the three special types of IP addresses mentioned in the script?
-The three special types of IP addresses mentioned are the broadcast IP, the network address, and the private IP addresses as defined by RFC 1918.
What is the role of the Internet Assigned Numbers Authority (IANA) in managing IP addresses?
-IANA is responsible for managing and allocating IP addresses. They give large blocks of addresses to regional internet registries (RIRs), which in turn assign blocks to customers or internet service providers (ISPs), who then allocate addresses to end users.
What is the purpose of RFC 1918 and what private address ranges does it define?
-RFC 1918 defines a set of private IP address ranges that can be used within local networks without the need for global uniqueness. The ranges defined are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
What are the three methods of assigning IP addresses to devices?
-The three methods are static IP addressing, where an address is manually configured and does not change; dynamic IP addressing using DHCP, where an address is assigned from a pool by a DHCP server; and Automatic Private IP Addressing (APIPA), where a device assigns itself an address from a reserved range if a DHCP server is not available.
What is the significance of the Time-To-Live (TTL) field in an IP header?
-The TTL field in an IP header is used to prevent packets from looping indefinitely in the network. Each time a packet passes through a router, the TTL value is decremented. If the TTL reaches zero, the packet is dropped.
Outlines
📚 Introduction to Advanced IPv4 Concepts
In this part, we build on what was learned in part one by delving into advanced IPv4 concepts. The focus remains on IPv4, discussing classless inter-domain routing (CIDR) and introducing variable length subnet mask (VLSM) to conserve IP addresses more efficiently. Examples illustrate breaking down networks into smaller subnets, like /24 networks into /30s, and understanding unicast and broadcast traffic.
🧩 Detailed Breakdown of Network and Broadcast Addresses
This section explains how to calculate network and broadcast addresses using subnet masks. An example with a /24 network is given to illustrate finding these special addresses. The concept of using a /30 network for inter-office links is revisited, highlighting the importance of network and broadcast addresses, and the calculation of usable IP addresses in different network sizes is discussed.
🔢 Advanced Subnetting and the Magic Number Method
Focusing on a more complex subnetting example, this paragraph introduces the 'magic number' method to simplify subnet calculations. Using a /22 subnet, the process of determining network and broadcast addresses and the number of usable IP addresses is explained. The importance of routers in forwarding traffic and how devices find the router using the default gateway is also discussed.
🌐 IP Addressing, NAT, and Private vs Public IPs
The difference between public and private IP addresses is covered, including the role of the Internet Assigned Numbers Authority (IANA) and regional internet registries (RIRs). The RFC 1918 standard for private IP spaces is introduced, explaining how NAT (Network Address Translation) allows devices with private addresses to communicate over the internet. The section concludes with a mention of RFCs and their significance.
⚙️ Static and Dynamic IP Address Assignment
Methods of assigning IP addresses are explored: static assignment, where addresses are manually configured, and dynamic assignment using DHCP servers, which provide IPs from a pool. The less common Automatic Private IP Addressing (APIPA) used by Windows is also explained. The section ends with a brief introduction to IP packet headers, fragmentation, and the time-to-live (TTL) field to prevent infinite loops in routing.
🔍 Understanding IP Packet Headers and Conclusion
An overview of IP packet headers is provided, explaining key fields like source and destination addresses, version, fragment offset, and TTL. The importance of these fields in ensuring proper data delivery and preventing network errors is highlighted. The video concludes with a teaser for the next topic, the TCP/IP model, and encourages viewers to share their thoughts and subscribe for more content.
Mindmap
Keywords
💡Classless Inter-Domain Routing (CIDR)
💡Variable Length Subnet Mask (VLSM)
💡Subnet Mask
💡Broadcast Traffic
💡Broadcast IP
💡Network Address
💡Unicast Traffic
💡Default Gateway
💡Multicast
💡Private IP Addresses
💡Static IP Address
💡DHCP Server
💡APIPA (Automatic Private IP Addressing)
💡IP Fragmentation
💡Time-to-Live (TTL)
Highlights
Introduction to advanced concepts building on part one, focusing on IPv4.
Explanation of Classless Inter-Domain Routing (CIDR) and its use in conserving IP addresses.
Introduction to Variable Length Subnet Masking (VLSM) for more efficient IP address conservation.
Example of breaking a /16 network into /24 and /30 networks to accommodate various office sizes.
Explanation of network links and the waste of IP addresses with /24 networks for small links.
Detailed example of using /30 networks to minimize wasted IP addresses between routers.
Concept of network and broadcast addresses and their significance in IP addressing.
Explanation of unicast, broadcast, and multicast traffic in networking.
Description of broadcast IP address and its role in sending messages to all devices in a network.
Introduction to the 'magic number' method for calculating network addresses.
Example calculation using a /20 network to determine network and broadcast addresses.
Discussion on the importance of default gateways in directing traffic to routers.
Explanation of special IP address 255.255.255.255 for broadcasting across all networks.
Introduction to the Internet Assigned Numbers Authority (IANA) and its role in managing IP addresses.
Explanation of private and public IP addresses and their uses within and outside local networks.
Brief overview of Network Address Translation (NAT) for connecting private networks to the internet.
Explanation of dynamic and static IP address assignment methods, including DHCP.
Introduction to automatic private IP addressing (APIPA) used by Windows.
Overview of the IP header fields, including source, destination, version, fragmentation, and TTL.
Introduction to the TCP/IP model and its comparison to the OSI model.
Transcripts
thank you for coming back to part two we're going to take what you
learned in part one and build on it with some more advanced
concepts we're still going to stick with ipv4 only throughout this video
at the end of part 1 we talked about classless inter-domain routing or cider that's where we
use a subnet mask to break a network into smaller better sized sub networks this helps
us to conserve IP addresses we can build on this by introducing to you a concept called
variable length subnet mask or vlsm this helps us to conserve even more IP addresses let's take our
1 7 to 1600 / 16 network as an example again we previously spoke about breaking it up into 256
/ 24 networks we did this because we had several smaller offices rather than one large one now we
have 256 IPS in each Network but we also have links between our offices these are also a kind
of network they may be very small though with only a router at each end no printers workstations or
anything like that if these networks are all slash 24s we're wasting over 200 IP addresses
per link what we can do instead is choose one of our slash 24 networks and break it up even
further maybe we could break it into slash 30s a slash 30 network uses 30 bits for the network and
2 bits for the host that's 4 IP addresses in each network this allows for our two routers with two
IPS to spare I'll talk about why we're keeping to spare a little later on now our original network 1
7 - 1600 slash 16 has been broken into subnets of different sizes some are slash twenty fours
and others are slash 30 and that's all vlsm is it's creating subnets of different sizes
all the IP addresses that we have spoken about so far are addresses that are assigned to devices as
you know these are also called host addresses often our devices only want to send traffic to
one other device at a time this is called unicast traffic you can think of this as being in a room
full of people and you single one of them out and you have a conversation with only one person and
ignore everyone else but that's just common sense right is in traffic always between two devices
no not always sometimes the device will want to send a message to every other device in the local
network this may happen if it want a particular resource but it doesn't know where it is it may
broadcast a message asking who owns this resource or where can I find this as I've just hinted this
is called broadcast traffic imagine you're back in that room full of people and someone gets up
to the microphone and makes an announcement they're sending a message to everyone at once
to broadcast to every device we have a special IP address I'm sure you won't be surprised to
find that it's called the broadcast IP so which IP is the broadcast IP it is the very last IP in the
local network always the last IP address is the IP where all host bits are turned on taking the
172 16 2.0 / 24 network as an example the last IP is 170 216 to 255 so as this is special you
can never configure a device with a broadcast IP and what we're talking about addresses that
you can't allocate to devices there's another one and that's called the network address the
network address is kind of the opposite to the broadcast address it is when all the host bits
are set to 0 so 172 16.2 dot 0/24 is a network address remember just a few minutes ago when we
said we can use a slash 30 Network between our offices I said that we would need two addresses
to spare that's because of the network and the broadcast addresses a skill you will want to
develop is working out what these addresses are in any network as well as how many dresses you
can actually use let's take an example you have a device with the IP 1 7 2 16 0 10 / 24 from the
/ 24 we can see that the first three octet are the network and the last octet are the host bits if we
set all host bits to 0 we have 1 7 to 1600 that's the network address if all the host bits are set
to 1 we have 1 7 to 16 0 255 that's the broadcast address 8 host bits mean there is a maximum of 256
addresses we subtract our two special addresses and find that we have 254 useable IPS on this
network now that's not too hard to work out on a / 24 network but when vlsm enters the picture
it can get a little more complicated imagine that a device has an IP of 10.40 2.37 dot 12/20 - this
is a much more complicated example while you can sit down and work out all the different ones and
zeros there's another method that many people find easier and it's called the magic number
method we start with our IP address and we work out the subnet mask a slash 22 has 22 ones so
we get to a subnet mask of 255 255 - 5 - 0 now I'll find the octet in the subnet mask that we
need to work with it's going to be the one that's got a mixture of ones and zeros so the third octet
in our case subtract this value from 256 for us 256 - 252 is 4 now we need to know the value of
the third octet in our IP that's 37 in our case we count by four until we find the numbers that
are next to the value of the third octet in our IP that means we want the numbers immediately smaller
and larger than 37 if we count by four that's 36 and 40 36 is the start of the network that gives
us the network address 40 is the start of the next network so we can go back one IP and that
gives us the broadcast we know there are 10 host bits that gives us 1,024 IP addresses subtract our
two special addresses and we have 1022 usable IPS on this network now that is a lot to take
in go over it a few times and practice in fact try a few right now see if you can work out the
network address the broadcast address and the number of usable IPs for these networks here we
know that the router helps to get traffic from one network to another we also discussed how a device
knows when to ask the router for help but how do devices find the router how do they know where
to send their traffic when they need help when we configure an IP address on a say a Windows machine
we will also configure a default gateway this is the local routers IP address so when a host has no
way of sending traffic to this destination on its own it will forward it to the default gateway some
device is called the default gateway the Gateway of last resort I kind of like this term because
it really shows us what this IP address is for if a host runs out of options to handle their data
itself as a last resort it sends it to the local router let's go back to broadcast traffic for a
moment I said earlier that the last IP address in the subnet is the broadcast IP it's not the only
one there's another special IP used for broadcasts its 255 255 255 255 it's different in that it
doesn't care what the local subnet is it basically says I don't care what network you're on send this
traffic everywhere there are times when this is useful one case is when a host is starting up and
it doesn't have an IP address yet we'll get into this a bit more later but one option is to use a
special server to give the host an IP address but the host doesn't know where the server is yet so
it sends out a broadcast to 255 255 255 255 asking for an IP so while it's useful there are also some
downsides to broadcasting around like this routers are made to forward traffic between networks so
what would happen if they received a broadcast well the larger network could get flooded with
broadcast messages also if a broadcast message gets forwarded from one router to another router
it may get stuck in a loop the simple solution to this is routers never forward broadcast messages
all IP broadcast messages stay within the local network that makes us wonder then what if we
do need to announce something to other parts of our network an example of this might be a server
that's sending a video stream several devices in the network wanted to Union and watch this video
stream one option is perhaps we could send video traffic to each device individually that's the
unicast traffic we discussed before unfortunately that's inefficient because we would need to
duplicate this traffic for every single recipient broadcasting is no good for two reasons first
not all devices want to receive the stream I mean what would a printer do with a video stream second
broadcast don't get passed the router so other subnets would not be able to receive the traffic
the way we make this work is with a technology called multicast multicast uses special IP
addresses we mentioned this back in the last video we spoke about Class D these addresses range from
2 to 4 0 0 0 to 239 255 255 255 we won't get into much detail here but basically multicast is a way
for devices to opt-in to receiving certain traffic the video server sends traffic to a multicast IP
and other hosts look for traffic sent to that IP routers also forward multicast so the traffic can
reach the networks it needs to get to so imagine you back in that room full of people if all of you
broke out into small groups and you spoke to your small group while ignoring everyone else then your
multi casting this is a lot of information to take in so see if you got it all we just
spoke about three different special address types can you remember what they are and how they work
IP addresses need to be unique if they are to work properly it's like your home address
if someone somewhere else in the country has exactly same address as you your mail might
end up their place or their mail may end up at yours so how do we make sure that the IP
addresses in your network are unique what's to stop someone else in another company using the
same addresses that you have IP addresses are managed by an organization called the internet
assigned numbers Authority they give large blocks of addresses to sub organizations around the world
called regional internet registries each RIR has a different name the one that we use here
in Australia is called the asia-pacific network information center or AP Nick the our IRS then
assign blocks of RP space either directly to you if you're a large enough customer or they'll also
assign blocks to internet providers then ISPs the internet providers will give some of their space
to the smaller customers while this process is a necessity there are some problems we'll face if
you want to create a new network you may need to get more IP space and that can really slow
you down also we use up IP space very quickly as we have already seen we run into problems when
we run low on IP addresses so to address these issues in the mid-1990s a standard called RFC
1918 was released if you're not familiar with RFC's their standards that describe how certain
internet technologies work I'll include a link to one of them if you're interested but be warned
they're very detailed and sometimes quite complex so don't feel obligated to hub have a read anyway
this particular RFC says that some IP spaces are now reserved for private use you can use these
IPS in any way that you see fit within your local network all other IP s these are the ones that are
assigned to you or to the ISP are called public IPs remember these IPS the ones you see on your
screen here you will see them a lot in your daily life but there's something interesting about these
addresses they are not allowed on the internet why well this prevents us from overlapping with
any other company that is using the same addresses it also conserves IP addresses as we don't need
to use so many public IP addresses anymore but if they're not allowed on the internet how do
you get access to the Internet even with private addressing you still use some public addressing
at the very least your internet provider will give you one public address let's say you have
a device in your network with the IP 170 to 1601 when it sends a message to the Internet
the internet router will alter this message to use a public IP address this is a process called
NAT or network address translation it's a topic all of its own so I won't go into any more detail
on this right now we'll cover that in another video some other time let me propose the simple
question which RFC defines private addresses which private address ranges does it define
we'll now take a moment to talk about how devices get addresses there are two main ways and one less
common way first you can login to a device and configure an address this is called a static
address as it doesn't change unless you manually reconfigure it when you assign an IP address this
way you need to choose the address and you need to make sure it's unique if two devices end up
with the same address will have an IP conflict which causes us all sorts of problems you will
commonly use this method for devices like routers and some servers devices whose addresses should
never change the second method is to set addresses dynamically with a DHCP server a dhcp server has
a pool of IP addresses available to it when a device starts up it broadcasts a message
around the local network to find the DHCP server the server then gives it an IP address from its
pool the server makes sure that it doesn't give the same IP address to more than one device also
there's no guarantee that the device will get the same IP address each time that's part of
what makes this process dynamic this is good news for workstations laptops phones and tablets these
are devices that may be mobile and will need to get a new address whenever they move to a
new network there's also a lot of these devices so it's an easier method than logging into every
single device and configuring them manually now the third method it's a little unusual
it's called automatic private IP addressing and as far as I can tell only Windows uses it the basic
idea is you don't statically set an IP address on this machine the workstation starts and sends a
broadcast message to find a DHCP server however it doesn't find one this is when ap IP a let me did I
get that correct apipa yep that's right now that is when apipa kicks in it picks a random IP from
the 169.254 dot 0 0 / 16 space and assigns that to the workstation this kinda has its uses perhaps
on a small network if the DHCP server fails then devices can still reach each other they won't know
what the default gateway should be so they won't be able to reach other networks on the internet
but at least they can reach each other personally I would not recommend relying on this method
when we looked at the OSI model we learned how extra headers are added to the data before it is
sent this adds information needed for delivery is like writing an address on an envelope IP is
no exception to this it adds the header that you see here not all the details that you will see
will make a lot of sense right now we'll cover a few of the fields but we won't get into a lot
of detail for now the two important parts that you need to know are the source and destination fields
and they're pretty self-explanatory the version field is also easy it's either for ipv4 or ipv6
now this is where it gets interesting sometimes a packet is too large for a particular device so the
device will break the packet into smaller packets and send each of them individually this is called
fragmentation so this field here the fragment offset tracks the order of these fragments so
they can be reassembled in the right order at the destination but sometimes we decide we want
to prevent fragmentation altogether and we can do that by using the flags field he's another
interesting one remember earlier I said that broadcast could go round and round and round
in the circles if routers didn't stop them well the same could happen to other kinds of traffic so
to deal with is we have this time-to-live field the device sending the packet sets a value in
this field every time the packet passes through a router the TTL value is lowered by one if it gets
all the way to zero the packet is dropped this is how we prevent a packet from looping forever
if there is some sort of error in the network next up we're going to look at the tcp/ip model
this is somewhat like the OSI model but it has a bit of a different approach let me know what
you thought of this video in the comments and subscribe if you don't want to miss anything new
5.0 / 5 (0 votes)