explain how internet work!
Answers
Answer:
The information used to get packets to their destinations are contained in routing tables kept by each router connected to the Internet. Routers are packet switches. A router is usually connected between networks to route packets between them. Each router knows about it's sub-networks and which IP addresses they use..
Now that we have a (very) high level sense of what the internet is, how exactly does it work? This is where your browser comes into play.
Your browser is what we call a “client application” and what this simply means is that its a program that allows you to make requests to different web sites and respond to the data that those web sites send back. To best explain how this works, I’ll list out some of the steps involved with making a request to ESPN.com:
From our discussion above, remember how I said that each web server has its own unique ip address? Well, the web server for ESPN has its own ip address, which I found out is 199.181.33.61.
When you type in “http://espn.go.com” into your browser, your browser somehow needs to know that this URL (i.e. uniform resource locator) actually means the ip address 199.181.33.61. So what the browser does is that it contacts the DNS (domain name service) and looks up the ip address for that url. You can think of the DNS as a phone book (do you kiddies even know what this is anymore??)
Once the ip address is retrieved, your browser attempts to connect to the web server by opening up a socket connection. Without getting into the details, think of this as you physically calling the tall building (i.e. web server) and seeing if they’re still open. If someone responds, then you know they’re open and you’re connected.
Now that your browser and the server have a open connection with each other, your request to a specific article on ESPN can be made. But before your request can be sent over the internet, it has to follow a set of rules that describe how the request must be formatted. These set of rules are known as TCP/IP and the HTTP protocol.
Essentially, think of it like this: in order to travel along the highways and roads of the internet, every request made by your browser and every response sent by a web server must first be chopped up into small packets of data. You can think of your original request as a photo mosaic, and once its been chopped up, each tile represents a packet of data. Aside from containing the binary bits of data, each tile also knows the ip address its supposed to go to and how to reassemble itself once all the packets reach the destination ip address.
Going back to our example of requesting a specific article on ESPN, the request for the article is chopped up into packets and sent along the highway and roads. Along the way, there are routers (and other similar devices) that basically act as traffic cops and direct the packets to the correct path leading to the ip address.
Once all the packets of data arrive at the web server, the web server will look for the specific article, similar to how you’d look for a file in a cabinet drawer. Once the file has been located, the web server will chop up the response into data packets again, and send them back to your browser.
Finally, when all the data packets arrive back at your browser, your browser will reassemble all packets into the HTML, CSS, JavaScript, and image files that represent the article. And once these files are processed, you’ll magically see the article displayed on screen.
In a nutshell, that’s what the Internet is and how it works! And while I’ve glossed over MANY details of how this intricate system works, I think that for the majority of us, having this basic understanding of what happens behind the scenes will demystify some of the magic and help us appreciate the internet that we’ve come to rely on for, basically, everything.