❔ IP addresses

If our local pc have like DHCP, another layer of WLAN (given by ISP) and the ISP has their own IP. So if i want to ping my friend's pc, how is that possible?
6 Replies
infernus8349
infernus8349OP2y ago
or more like, if i access a website, they will be sending some packets to display it right? so in the packet, how do the routers know that the packet should go to my country and then to my ISP and then it is going to WLAN when the packet only contains my IP which again is just a DHCP given by my router whose IP is given by ISP (WLAN) i dont understand how this owrks *works
Jester
Jester2y ago
if you want to ping your friends pc thats in their home network and youre in yours. you have to ping its home (isp) ip. then their rooter has to forward it to their pc in the network. by default the firewall in the rooter wont let you trough. i think if you send a request out of your network, your rooter remembers it has to let the response in back to you
infernus8349
infernus8349OP2y ago
how can the ISP know that the ping should go to my friend's pc when the header contains only the data of the reciever and here the reciever is the ISP?
ACiDCA7
ACiDCA72y ago
the packets contain a destination so the router knows where to route them
ChucklesTheBeard
Keep in mind that you're asking a huge, huge question, essentially the same as "how does the internet work", so you're only going to get simplified answers as nobody has time to explain every detail... 1. You need to know your friend's public, internet-facing IP, this information is encoded in the outgoing packet. 2. Their ISP was assigned that IP (likely a whole range of IPs) by ICANN, an international group. The ISP then assigns them to individual customers like your friend. 3. Your ISP figures out how to get the packet to your friend's ISP using perhaps several protocols, including BGP. 4. When the packet arrives at your friend's router, the router decides what to do with the packet; perhaps forwarding it to your friend's actual computer on their LAN.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server