So what is the difference between a routed protocol and a routing protocol?
Now a routed protocol carries user data, example, would be IPv4 or IPv6.
When you use a higher layer protocols such asHTTP or FTP
that protocol is using a lower layer protocols
such as IPv4 or IPv6 to carry the user data from one device to another.
So when you connect to a website
and you're viewing a webpage that would be deemed to be routed data.
Data from the web server is being routed to your PC
now the addressing scheme used by routed protocol is based on this specific protocol
such a IPv4 using a 32 bit address and IPv6 using 128 bit address.
Now how do routers know where devices are in a network?
As an example, my PC is based in the UK
but when I go to Facebook.com traffic is sent from my PC
to Facebook based in California and back again,
How does my device actually reach the facebook service
in a data center in California and how does the data get back to my PC in the UK?
How is the user data forwarded from one device to another?
Now it’s important to realize that every router
along the path between my PC in the UK and facebook.com
makes an independent routing decision.
As an example, if I trace to facebook.com
and in this case, I’m going to set the timeout
to a low value such as 50 milliseconds.
Traffic is being forwarded from my PC
on hop-by-hop bases from 1 router to the next
until it hopefully reaches facebook.com
every one of these hops is an independent router
making independent routing decisions.
Now Facebook and a lot of other big websites
will have data centers scattered around the world
so my traffic may not actually be going all the way to the US
but maybe going to a local data center in Europe
that all depends on how the network is configured.
These routing decisions made by routers
is known as the hop-by-hop routing paradigm
with unicast traffic routing is based on destination address only
not on source address
so routers decide where traffic goes based on the destination IP address
in my example it's this address and routers will decide
where to route traffic based on the destination IP address
and information stored in routing tables.
Every router along the path needs to determine
an outgoing interface to forward traffic to reach the destination IP address.
To do that routers communicate information about networks using routing protocols.
They will then determine the best path to the destination IP address
using criteria specific to that individual routing protocol.
As an example, RIP uses hop count to determine the best path.
OSPF uses the bandwidth of interfaces to determine the best path.
EIGRP uses bandwidth and delays to determine the best path.
So routing protocols are used to automatically advertise networks
between routers and that’s how routers learn
about the available networks in a topology.
It’s also important to note
that if a router doesn’t know about the destination IP address.
In other words, information about that destination IP address
is not in its routing table it will drop unicast packets.
Destination IP address is a match against networks
and subnets in the routers routing table
so if a router receives traffic going to an IP address of let say 10.1.1.1
but that IP address doesn’t match a network in the routers routing table.
The router will drop the packets because it doesn’t know where to forward them
Essentially if you tell a router send traffic to IP address 10.1.1.1
and the router doesn’t know how to get to that network or IP address.
The router will drop that traffic
if there is no matching route in the routing table traffic gets dropped.
This applies specifically to unicast packets
where we are doing routers based on destination IP address.
So in summary, routing protocols allow routers to learn about destination networks.
That facilitates the change of routed information between devices.
Routers can dynamically learn about networks in the topology
and can then make routing decisions based on different criteria
such as bandwidth hop count or delay to determine the best path.
Routers then simply choose an outgoing interface based on the routing table
and will then forward packets out of that interface to reach a destination.