Network routing.
Ethernet requires the all nodes to be directly connected to the same local network.
This requirement is a major limitation for a truly global network because it's not practical to physically
connect every node to every other node.
Rather than require that all nodes to be directly connected.
The source and destination addresses allow the data to be routed over different networks until the data
reaches to the desired destination node as shown here.
In this diagram, you are seeing two Ethernet networks, each with separate IP address ranges.
Here in this lecture, I will explain how the IP uses this model to send the data from the node at one
network.
Number one.
Who?
Network number two.
The operating system network Stack node.
Here.
Encapsulates the application and transport layer data, and it builds an IP packet with a source address
of 192 point.
168 .0. 101.
And the destination address of.
20 .0. 1.45.
Then, as a step to the network, stack needs to send an Ethernet frame.
But because the destination IP address is not exist on any Ethernet network that the node is connected
to The network Stack consults an operating system routing table.
In this example, the routing table contains an entry for the IP address.
20.0 .1. 50 or 45.
The entry indicates that a router on the IP address
192.168
.0. 101.
Knows how to get that destination address.
And then the operating system uses ARP address resolution protocol to look up the Router's Mac address
at this 100.
92.168 .0. 101.
And the original IP packet is encapsulated within the Ethernet frame with the MAC address.
The router receives the internet frame and unpacks.
The IP packet.
When the router checks the destination IP address, it determines that the IP packet is not designed
for the router or destined for the router, but for a different node on another connected network.
The router looks up the MAC address of this IP address 20 .0. 1.45 encapsulates the original IP packet
into new Ethernet frame and sends it onto network number two.
The destination node receives the Ethernet frame, unpacks the IP packet and process its contents.
And this routing process might be repeated multiple times.
For example, if the router was not directly connected to the network containing the node of 20 .0.
1.45, it will consult its own routing table and determine the next router.
It could send the IP packet, though clearly it wouldn't.
It would be impractical for every node on the network to know how to get to every other node on the
internet.
If there is no explicit routing entry for the destination, the operating system provides a default
routing table entry, and this is called the default Gateway, which contains the IP address of a router
that can forward IP packets to their destinations.