It depends on where the machines are. If a client sends a packet to a
another machine which is in the same IP subnet, the router is not involved
at all. The packet is delivered directly (ie "on the wire" using the
machine's hardware or MAC address). It the target machine is not in the
same IP subnet as the sender, the packet will be sent to the router which
can deliver the packet directly (because the router has an interface in the
"other" subnet).
Poppen wrote:
> Hi
> Thank you for the information. I learn that for two networks all i
> need to do is configure the two networks as 171.107.1.0 /24 and
> 171.107.2.0 /24 at the two network interfaces. I do not have to worry
> about the subnetmasks. The router would by default select the
> subnetmask, which will be the same for both the networks of /24
> subnets. That being the case (router would by default select the
> subnetmask ) .
> How would the router identify the specific network in which the client
> resides.
> For example, i send a packet to 171.107.1.1 client . How would a
> router interpret this packet. Will it take all the three octets
> 171,107,1 and route the packet or is there anything to do with
> subnet mask here.
>
>
>> Getting close, but not quite right yet. The subnet mask defines
>> how much of the address defines the network. So with a 24-bit subnet
>> mask, the first 24 bits are network definition and the remaning 8
>> define the host. So all addresses beginning with 171.107.1 are in
>> the same subnet, and you can have 254 of them from 1 to 254 . Zero
>> and 255 are reserved. Zero is used to define the subnet itself and
>> 255 is a broadcast address.
>>
>> To have two subnets of 254 hosts starting with 171.107, the
>> third octet would need to be different. For example you could use 1
>> and 2. Subnet one would be the subnet 171.107.1 0/24 containing the
>> host addresses 171.107.1.1 through 171.107.1.254 . The second subnet
>> would be 171.107.2.0/24, containing 171.107.2.1 to 171.107.2.254 .
>>
>> Poppen wrote:
>>> HI
>>> I have an academic question related to subnet masking. I
>>> understand that the individual subnets are diffrentiated with the
>>> aid of subnet masks. So when you do a subnetting of 171.107.1.0 /24
>>> . The networks are 171.107.1.0 , 171.107.1.1 till 171.107.1.255 .
>>> The sunet mask for these n/w will be 255.255.255.0 .
>>> I want to configure 2 subnets , lets say 171.107.1.1 and
>>> 171.107.1.2 . I am not sure how will I give the subnetmasks at the
>>> router for these networks.
|