0

Could I clarify the data flow when a device within a network requests data from a device outside a network? So say I have a LAN, and I want to get data from a server outside my LAN. The server gets the IP address of the LAN's router from the packet, and sends the packet to the router based on that IP Address. Once the router receives the frame, the switch within the LAN then uses the destination MAC Address within the frame to find the specific device within the LAN to receive the message. Is that right?

Please correct/clarify/elaborate on any of these points

3
  • You seem to be mixing things up. Frames are the PDUs on the data link layer which may use MAC addresses for forwarding (switching), while packets are used on the network layer where routing is done, based on IP addresses. Please rephrase your question so it becomes clear what you're asking, see the help center for guidance.
    – Zac67
    Jul 16, 2022 at 6:32
  • Re edit: it's not really becoming clearer - now your question seems to be about NA(P)T which may be ubiquitous but isn't the normal way of routing and is only used between private and public IPv4 address spaces.
    – Zac67
    Jul 16, 2022 at 10:06
  • When the request is initiated from the server to the outside LAN, it is referred to as outbound traffic. Make sure source NAT configuration is available in perimeter L3 devices so that source private IP can be hidden, and also ensure outbound security policy or access-list and routing is available to route traffic to outbound Jul 17, 2022 at 3:02

1 Answer 1

1

Draw a diagram - and re-phrase what you asked as "You want to get data from a server outside my LAN to a client within my LAN" Then to answer your points

The server gets the IP address of the LAN's router from the frame,

No , it gets the IP address of the client from the packet in the frame There is no IP address of the router in the frame

and sends the frame to the router based on that IP Address.

No it creates and sends a New frame to the router based on the Servers routing table

Once the router receives the frame, the switch within the frame then uses the destination MAC Address within the frame to find the specific device within the LAN to receive the message.

This is phrased strange (there is no switch within the frame) but once the router receives the frame it extracts the packet then creates a new frame with the packet inside it to send onward based on the routers current routing table

Is that right?

2
  • Yepp this makes perfect sense, thanks! Actually, on that last paragraph, does the router send the packet (Btw does the LAN router send out a packet or frame at this stage) to the device within the LAN or does the switch do that?
    – meg hidey
    Jul 16, 2022 at 10:46
  • For this conversation Frames are layer 2 so Source and Destination are MAC packets are layer 3 so addressed by Source and Destination are IP. Everything sends both = its how are the addresses determined
    – Ross
    Aug 16, 2022 at 1:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.