So guys going forward
Now next we will going to understand
the concept of local subnet and remote subnets
It is very important to understand what our local subnet and what our remote subnets in order to understand routing.
So remember point-to-point links there are always two devices in a point-to-point link and those two devices
Forms exactly one subnet that I have already explained in the previous slide.
So you can see that there are two point-to-point links and
Each point to point link forms one subnet. So let us call this as subnet A
and the other subnet as subnet B
Now let us read, so a set of interface of devices
Interconnected with one another and has IP address configured such that all of them falls (in the same subnet),
have same network ID forms one subnet.
so let us analyze what this definition is saying this definition has two parts that
A set of interfaces of the devices are interconnected with one another
This is part one and the part two Is that those?
Interfaces are assigned an IP address such that all those IP addresses falls
In the same network ID. This is the second part so both
parts, that is part one and part two is
Necessary and sufficient condition for the two machines or two
interfaces of two different machines to fall in one subnet
Let us try to apply this definition in our topology
So a set of interface of devices so we have two devices VM 2 and VM 1
VM 1 has an interface, Let's say the interface is IF 1 and VM 2 has an interface
Let's say the interfaces IF 2
Now these interfaces are
Interconnected using wire this is wire, which we call it as point-to-point link
so the condition one is satisfied that there are two devices and
the interfaces of the two devices are interconnected by
wire
Second condition is that
The interfaces should be assigned an IP address such that
both falls in the same network ID
So as I have already explained if you apply the subnet mask value 24 on an IP address of the interface
You will get the network ID
which is
192.168.1.0/24. similarly if we apply the subnet mask value 24 on an IP address 192.168.1.1
Which is an IP address of interface IF 1 you will again get the same network ID
So the condition 2 is also satisfied
That is the IP address of all the interfaces which are interconnected
Falls in the same subnet computes the same network ID and therefore falls in the same subnet
So when the condition 1 and the condition 2 is
Satisfied we say that the device VM 2 and VM 1 are in same subnet
Why they are in the same subnet because
they have at least one interface which are connected by a wire and
The IP address and mask value assigned to those interfaces are such that
Same network ID is computed by applying the mask on those IP addresses.
Now going forward a
Subnet can be local or remote but relative to a given router
So no subnet is absolute local or remote. Every subnet is either local or remote
Relative to a given router. So let us try to understand what this mean.
now let us go through the definition of remote subnets. A
Subnet A.B.C.D/M where M is the mask value
Is set to be the remote subnet relative to router X
if none of the local interface of router X
Has IP address configured which falls in
Subnet A.B.C.D/M
Right. So this is the definition of remote subnet
Let us try to apply this definition
to our topology
as
I said let this is the subnet A and
This one is the subnet B. subnet A is a remote subnet
for router VM and
Subnet B is a remote subnet for router vm2
Now why? let us apply this definition and you will get your answer.
so subnet A is a remote subnet for router vm. Why? because
Router VM has no interface on which IP address and mask value are configured such that
after applying the mask value on an IP address
The network ID A is not obtained
so in our topology
Router VM has only one interface Ethernet 2 and which is assigned the IP address 192.168.4.2/24
and if you apply the mask value 24 on this IP address you will get the subnet ID B
so
were you able to get network ID A
From any of the local interface of router VM?
The answer is no and that is the reason that subnet A is a remote subnet for router VM
Let us consider a scenario
suppose router VM had another interface and
the IP address configured on that interface is
192.168.1.10/24
let us assume. now
Is subnet A still remote subnet for router VM?
The answer is no the subnet A is no more a remote subnet to router VM
the reason is that the router VM has at least one local interface on which
IP address and mask value are configured such that if we apply the mask value on an IP address
It will give you the network ID
192.168.1.0 which is network ID of subnet A and therefore we will say that
Subnet A is now a local subnet to router VM and
No more a remote subnet
So I hope you understand the definition of remote subnet clearly
Now let us try to understand the definition of local subnet. A
subnet A.B.C.D/M is said to be local subnet relative to router X. if
At least one of the local interface of router X has an IP address
Configured which falls in A.B.C.D/M subnet. So that is very easy. So
The router VM has a local subnet
B why
Because router VM has at least one local interface
Which has IP address and mask value configured such that if you apply the mask value on that IP address
You will get the network ID of subnet B
So we say that the subnet B is a local subnet to router VM
similarly subnet A is a local subnet to router vm2 and
Subnet A and subnet B both are local subnet to router VM 1
why? just apply the definition and you will get your answer
both subnets A and B are local subnet to router VM 1
so it is very important that you understand how to
Identify a given subnet as local subnet or remote subnet with respect to a given router or given machine
This will lay the foundation of your understanding of your L2 and L3 concepts
So let us see in this table for a router VM
What is the local subnet?
The local subnet is the subnet B and what is the remote subnet the remote subnet is the subnet A and
For the router vm 1, What is the local subnet? both A and B are local subnet and
there is no remote subnet and
For the router VM 2 the local subnet is the subnet A and the remote subnet is the subnet B
So this is how we identify the local subnet and remote subnets with respect to a given router.
Now let us try to understand how to identify the local and remote subnets in case of a broadcast link.
Now, what is broadcast link? a broadcast link is a wire
Through which more than two machines are connected
So how many machines are connected through this wire machine A B C D as well as the router itself
So such a wire is called broadcast link
On a link when there are only two
Machines are connected on either end of the link such a link is called point-to-point link which we discussed in the previous slide
So you can see that in this diagram each
Machine that is machine A machine B machine C machine D
are
Connected to the broadcast link through their respective interfaces
Which have the MAC address MA, MB,
MC and MD
Right
So what is the network ID of this broadcast link?
to calculate the network ID of this broadcast link just pick up any machine, which is connected to this broadcast link and
Apply the mask value to the IP address of the interface through which the machine is connected
so let us pick up the Machine A
So machine A is assigned the IP address 11.1.1.2/24
just apply at the mask value 24 on this IP address. You will get the subnet ID. The subnet ID is
11.1.1.0/24
Now if you are facing a difficulty that how to apply a subnet mask value on an IP address
Again, we will discuss the IP address mathematics in detail. for now just understand that if you apply the mask value on an IP address
Of an interface you will get the network ID.
So for machine B machine C and machine D
If we apply the mask value on their respective IP addresses, you will get the same network ID
And this is true for the router interface also
so the network ID of this subnet is 11.1.1.0/24
Is
there any other subnet in this diagram?
Yes, the another subnet is
This I have not shown you the rest of the topology on this side
But you can see that the router has another interface IF 1 which has MAC address m1 and has IP address
10.1.1.1/24. if you apply this mask value on this IP address you will get
10.1.1.0/24 which is that subnet ID or network ID of this link
So things to note here, is that for a router each interface
Lies in different subnet
So for a router the interface, IF 2 lies in
11.1.1.0/24
subnet and the interface IF 1 lies in
10.1.1.0/24 subnet
So for l3 router, this is l3 router
Each interface of an l3 router always lies in a different subnet
This is mis configuration if two or more than two interfaces of the same router falls in the same subnet
This is mis configuration