So an IP Address consists of 2 main portions
we have the Network Address Portion also known as the Network ID
this identifies a specific network, routers maintain routing
tables that contain Network Addresses it's important to realize
that routers build their routing tables based on the Network
Address and not on the host address, so they do not route packets
from 1 interface to another interface based on IP Addresses
they do their routing based on Network Addresses, so they will
look at the destination IP Address in a packet and match that
to a Network Address in their routing table to determine how
traffic is routed. So an IP Address consist of the Network
portion as well as the host portion which is also called
the Host ID, this identifies specific end point on a Network
such as a server, a printer, a PC, an iPhone, an iPad or some
other type of device including IP Phones, these are essentially
devices that need to communicate with each other, so PC may be
communicating with the server, you may be using your iPad to read
the news, so you'll be surfing to cnn.com or usatoday.com
or the BBC, so your iPad is sending traffic to that server and
the server is returning traffic to your iPad, so the iPad and
the server will have a TCP session established at Layer 4 but for
the iPad to communicate with the server, routers need to route
traffic to the server and back again
So here's an analogy to explain Network and host
in cities throughout the world you have streets, so as an
example we have Oxford St., on the street we have multiple houses
or multiple offices but in my example let's assume we have houses
on the street, each house has an individual house number
so we have in this example 1 Oxford St. 2 Oxford St.
3 Oxford St., 4 Oxford St., 5 Oxford St. and so forth and so on
each house number uniquely identifies that specific house on
this street, now you wouldn't have 2 houses with the same number
on the same street, that would be very confusing because perhaps
you want to meet your friends, the Joneses at #1 Oxford St.
but you may end up spending your day with the totally
different group of people if you have 2 houses with the same
number, in this example we have 2 #1 Oxford St. houses
Which house is the correct house?
Now that's not desirable, when you go to 1 Oxford St. you want
to make sure that you are going to the right house to meet
your friends, rather than going to some other house and hence
house numbers need to be unique on a street
in a City, in the World. Now continuing with our analogy
when working out how to get to remote destination
in the physical world, let's say you want to go to Oxford St.
in London, in the UK and you've never been before
you may use a mapping technologies such as Google Maps to find
out how to get to that specific street, now when you're doing
this you don't look at individual house numbers but rather look
at street names to determine your way to get to that destination
So if you're in different part of London, you may use the street
name to work out how to get from you current street to Oxford St.
and when you get to the destination street then you're able to
look at house numbers to determine which house number to go to
technologies such as Google Maps are obviously really intelligent
and know the house numbers and will guide you to the right
part of the street, but for this analogy thinks of how routers
route, they will route traffic to a destination Network and when
traffic gets to that destination Network then house number are
used or IP Addresses are used to determine which host
to forward the traffic to
Now in a similar way, the Network address in this case 10.1.1.0
identifies a specific network somewhere in the World
Host Addresses such as 1 in this example identify individual
devices on that network, so 1 identifies this PC
on Network 10.1.1.0, each device
on this network has a unique number, so in this example we have
5 unique devices in the same way that in our previous analogy
we had 5 houses on Oxford St. now in the same way
you wouldn't configure multiple PCs or multiple devices with
the same IP Address as that would cause confusion and conflicts
So as an example, if another device wants to communicate with
10.1.1.1 which PC would it send the traffic to?
If PC 5 wants to communicate with this host 10.1.1.1
there are 2 hosts with the same IP Address which device should
PC 5 communicates with? So devices on a Network or subnet
which we'll talk more about in a moment have a unique IP Address
in the same way that a house has a unique house number
on a specific street, so in the same way
that we use street names when going from A to B
routers look at Network Addresses to determine how to get
to a remote destination, other protocols such as
Address Resolution Protocol or ARP are used to find
the house number or host number for a host on a specific street
or network, so in this analogy we're going from Queen Anne St.
to Oxford St. and we would use street names for our directions
as per this example, but once we get to this street in this case
Oxford St. we would look for the specific house by looking at
house numbers in the physical world or in the Network world
we would use a protocol such as ARP to find the specific host
on that Network, routers do not make routing decisions
based on IP Addresses and make it based on Network Addresses
A routers routing table is not populated with IP Addresses
it's populated with Network Addresses, the destination
IP Address in a packet is then matched to the routing table
populated with Network Addresses and then a determination
is made to decide out of which port or interface on
the router the packet should be forwarded