06-12-2019 04:01 PM
I have an entry level networking question. I'm working through my CCNA and came across a question that I know the answer to but do not fully understand why. I think it's a little piece that I'm missing preventing me from seeing the bigger picture.
If I want to remotely communicate to a tftp server that's on 192.168.70.0/28, but the router connected to the server is on a 192.168.80.0 /29, why can't I communicate with it if I'm on the same subnet as the router? From what I understand is that we use routers to connect different subnetworks together. But if subnets do not share the same subnet mask, then they cannot communicate? Is that correct? If that is the case then changing my server to be a /29 would enable communication?
Thank you in advance for your help :)
Solved! Go to Solution.
06-13-2019 08:53 AM
Hello Frank,
the server needs to have a default gateway and the default gateway has to be on the SAME IP subnet where the server NIC is connected to.
IF you think of ARP activity you can understand this need:
if a destination address is the same subnet the server tries to resolve it using an ARP request and the router is not involved in the communication.
If the destination address is in a different subnet the server needs to send the packet to a default gateway that is a device providing routing services with an IP address in the same subnet as the server.
If needed the server will send an ARP request for resolving the default gateway IP address.
Once the server knows the MAC address of the default gateway it will send IP packets with destination the host in the other subnet in an ethernet frame with destination MAC address = default gateway MAC address.
The router accepts the frame and performs a rewrite by changing the ethernet header by putting the destination MAC = host MAC address and source MAC = router interface MAC address in the host subnet.
Again an ARP request is performed by the router on the other interface for resolving the host IP address if needed.
All following packets can be sent without other ARP requests.
Changing the IP address on the server and putting it in the same IP subnet of the host is possible only if you change also the L2 configuration (vlan) of the switch port where the server NIC is connected to be the same Vlan of the host.
In old times many servers used not subnetted addresses like 172.16.0.1/16 and routers could be of help using a feature called proxy ARP (answering for ARP requests for hosts that are not in local subnet with their own MAC address).
But in general each device host or server should have a default gateway configured and that IP address must be in the same IP subnet.
Hope to help
Giuseppe
06-12-2019 04:49 PM
Hi @Frank Franciamore ,
A router can communicate networks, even if have different masks.
In your case:
The ip 192.168 70.0/28 it is not a network ip, but a host ip.
That ip belongs to the network 192.168.64.0/28.
The 192.168.64.0/28 network covers these ip:
First host: 192.168.64.1
Last host: 192.168.79.254
Broadcast: 192.168.79.255.
Tha 192.168.80.0/29 network covers these ip:
First host: 192.168.80.1
Last host: 192.168.87.254
Broadcast: 192.168.87.255
As you can see, both IPs do not belong to the same network, so if you want to communicate with network devices, you must configure those networks on different interfaces of the router.
Regards
06-12-2019 05:01 PM - edited 06-12-2019 05:02 PM
Your Server on the 192.168.70.0/28 network segment can communicate with any other host on the same 192.168.70.0/28 network segment. No need for a Router there.
Now when 192.168.70.0/28 wants to communicate with a host outside its network, it needs to send the packet to its Default Gateway who is usually the Router.
The Server 192.168.70.0/28 should send the packet to the interface of the Router with an IP on the same 192.168.70.0/28 network segment.
Remember, each interface on the Router is a unique network segment. So you need to make sure that the Server can communicate with its Default Gateway (the Router) first.
Once the interface on the Router with IP in the 192.168.70.0/28, receives the packet, it can look in its Routing Table to who forward the packet next to reach 192.168.80.0/29.
If the Router happens to have another interface with an IP on that 192.168.80.0/29 segment, it will just forward the packet out of this other interface.
I hope this helps.
Cheers.
06-13-2019 08:30 AM
Hi @Hector Gustavo Serrano Gutierrez
Thank you for your response.
I just want to clarify on this statement: "So you need to make sure that the Server can communicate with its Default Gateway (the Router) first."
If I have a workstation behind the router and it's on the /29 subnet while my server is in front of the router and is on the /28 subnet - if I do not set the default gateway on the server (and workstation?), then the workstation cannot communicate with the server because the router isn't able to communicate with the server?
In other words, if I choose to not set a default gateway on my server and I simply reconfigure my server to be on the /29 subnet, will the router be able to forward the packets to the workstation since everything is on the same subnet?
Hopefully that wasn't too wordy.
06-13-2019 08:53 AM
Hello Frank,
the server needs to have a default gateway and the default gateway has to be on the SAME IP subnet where the server NIC is connected to.
IF you think of ARP activity you can understand this need:
if a destination address is the same subnet the server tries to resolve it using an ARP request and the router is not involved in the communication.
If the destination address is in a different subnet the server needs to send the packet to a default gateway that is a device providing routing services with an IP address in the same subnet as the server.
If needed the server will send an ARP request for resolving the default gateway IP address.
Once the server knows the MAC address of the default gateway it will send IP packets with destination the host in the other subnet in an ethernet frame with destination MAC address = default gateway MAC address.
The router accepts the frame and performs a rewrite by changing the ethernet header by putting the destination MAC = host MAC address and source MAC = router interface MAC address in the host subnet.
Again an ARP request is performed by the router on the other interface for resolving the host IP address if needed.
All following packets can be sent without other ARP requests.
Changing the IP address on the server and putting it in the same IP subnet of the host is possible only if you change also the L2 configuration (vlan) of the switch port where the server NIC is connected to be the same Vlan of the host.
In old times many servers used not subnetted addresses like 172.16.0.1/16 and routers could be of help using a feature called proxy ARP (answering for ARP requests for hosts that are not in local subnet with their own MAC address).
But in general each device host or server should have a default gateway configured and that IP address must be in the same IP subnet.
Hope to help
Giuseppe
06-13-2019 10:53 AM
06-13-2019 09:06 AM - edited 06-13-2019 09:23 AM
- Server and Router interface A (let's call it that way) need both to be on the same subnet.
- Workstation and Router interface B need both to be on the same subnet as well.
- Whenever Server attempts to communicate with the IP address of Workstation (and viceversa), Server will send the traffic to the Router interface A (which is in the same subnet) since Server knows by network mask that the IP address of Workstation is on a different subnet.
- Server knows the IP address of Router interface A by its Default Gateway configuration. Without Default Gateway configuration, communication to any IP outside its subnet cannot happen.
Graphical explanation:
Workstation TFTP Server + + +----+ | +---------+ | | | +----+ | 192.168.70.1/29| |192.168.80.1/29 +----+ X | | | +----------------+ Router +-----------------+ | | | x +-----+ interface_A| |interface_B | +----+ | | | | | | IP/mask: 192.168.80.2/29 +----+ | +---------+ | Gateway: 192.168.80.1 + + IP/mask: 192.168.70.2/28 Gateway: 192.168.70.1
Let me know if this helps.
Cheers.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide