I'm reading up on networking and there is something about the layer 2+3 OSI model interaction i don't get. I want first to understand the basics so feel free to keep it simple.
Lets say we have a LAN - 5 computers all connected to a router which is connected to an ISP router.
1. one of the PC on the LAN wishes to send a message to another PC on the same LAN(they are both connected to the local router but not to each other directly) - is there layer 3 encapsulation in use here? if not - and we only use the layer 2 information, what is the path the message will go through? is it PC1->PC2 , or PC1->Router->PC2. if it is going through the router - what information is added in each message transaction? and if not - do PC's on the same LAN (connected to the same router in some layer 2 protocol) aware of each other? can they message each other although they are not connected directly
2. one of the PC on the LAN wishes to send a message to a PC outside the LAN (way way outside). i understand it goes PC1->Router->ISP Router -> ......... -> recipient local router -> recipient which entity adds the layer 3 data? is it the router? PC1? ISP router? when will this information be needed? since all single transaction is connected by devices who can talk between them self's in layer 2 protocols? (PC1 talks to it's router in level 2 protocol, so does Router to ISP router... etc?)
any further information worth adding will be appreciated. Thanks!