So now the actual forwarding that's occurring and going on with these routers.
the forwarding method implements the routing policy.
so and this is done one hop at a time right.
So the basic idea is that when a packet arrives at
a router's input ports, it's going to examine the destination IP in
the packet and it may only look at the prefix, it
depends where you are in the overall in the scheme of things.
If you're really close, if you're already within the subnet, then you're going
to look at the host ID as well.
But you may only be looking at the prefix, and then the routing
table is going to tell us which port to send the packet out, right.
So routers have a number of ports right?
So if something comes into port two for instance,
and it has an IP address, we'll say 10.1.2.300.
then the router's going to look up, and it's going to
say okay, well I have a match for 10.1.2.
Alright, so I'm only looking
at the first three decimal numbers, or the first 24 bits in IPV4.
And then I'm going to say, okay 10.1.2 matches out to
port three, so that would be sent out to port three.
Or if it was 10.8.4.something it would get out port one as well,
so it's going to search and it's going to look and see the match.
And again, it's only going to try to match the
amount of digits that it has in here that it's storing.
The zero indicate like a,
really like a don't care, not looking at that bit.
So the best way to think about this is to think about the way the mail system works.
The zip code is what you use to get to the town.
And we said this before, but let's just
highlight, the zip code is like the prefix, and
that's what we use to get to the specific town in question which is like the subnet.
A subnet is just a group of devices, just like
a town could be a group of houses we'll say.
Then the house address, or the host ID is used
to get to the final destination, or the end host.
Just to highlight again, the router needs to do
this function as quick as possible, right, because you could
hit tens or dozens of routers on the path between
where you are and where your packets has to go.
So router really need, they need to be designed to be able to
do this look up as quick as possible and, to be able to have
the electronics within them, that they can send out to
the, the right alpha port just as fast as possible.
And, so, there's, there's lots of issues and things
with router design In terms of what components to use.
That's a whole abundant field that we won't look into
here, but just suffice it to say that routers have
routing tables, and it uses the routing table to look
up and figure out which port to send off next.
And we will look at how routing tables
became popular to some extent, in trying to figure out
the shortest path distance between routers, or from a router to
a destination and that will drive, basically, where things get
forwarded next when they want to go to a specific destination.
So, basically look at, we'll say, okay, for
one destination, in the example in this book.
If everyone is trying to go to one destination, then we'll say, okay.
Well, how are we going to determine which alpha port to send this out.
And we'll look at that in a few minutes.