美文网首页
知识点15:初识网络(internet primer)

知识点15:初识网络(internet primer)

作者: BryantHe | 来源:发表于2017-03-30 02:33 被阅读15次

    There's not just one option called internet. And so something or some things exist in between when we want to connect to the internet.


    The first of these things is an IP address.

    And so an IP address just looks pretty much like this:

    So instead of 4 billion addresses, we're going to have that huge number of addresses, which is 340 billion billion billion billion, so a lot of IP addresses.

    But we're bad at dealing with them even though we know about them. So IPv6 has been around for a while. And only in the last couple years have we actually started phasing in these IPv6 addresses to phase out the IPv4 addresses.

    But some places do have them. And they look similar to a regular IP address. But they are a lot longer.

    So instead of now having four clusters of 8 bytes for your address, we now have eight clusters of 16 bytes. And 8 times 16 is 128.

    And we represent these in the less conventional hexadecimal form.

    Because having 16-bit numbers means that instead of being a range of 0 to 255, We'd have a range of 0 to 65,535. And so having a bunch of those stuck together would be very difficult to read.And so we usually use hex just out of convenience.

    And so a typical IPv6 address might look something like this:

    It's certainly a lot longer than the IPv4 address we've seen before. But this would be a valid IPv6 address.

    This one is also about IPv6 address.

    This one happens to belong to Google. And notice there's a bunch of zeros there.

    Sometimes these addresses can get so long. And since we're still pretty early in IPv6, sometimes there can be big chunks of zeros in there that we don't need.

    If you're reading this out loud, it's 2001.4860.4860.0.0.0.0.8844. It's kind of a lot, right? So if you see a bunch of zeros, you might sometimes see an IPv6 address like this:

    where they omit the zeros and use a double colon instead.

    This is OK, though. Because we know that there are supposed to be eight distinct chunks. And so by implication, we see four. So we know that there must be four sets of zeros like this, that fill it in.


    So, OK.

    We know a little bit more about IP addresses now. But how do we get them?

    DHCP server, a Dynamic Host Configuration Protocol server. It's a big mouthful of text.

    But really all it does is it assigns you an IP address. Your DHCP server has a list of addresses that it can validly assign. And it gives you one. That's pretty much all there is to it.

    Now before DHCP, this task of assigning addresses fell to a system administrator.

    So an actual person would have to manually assign your computer and address when you connected to a network.

    So DHCP just sort of automates this process of giving you an IP address. But that's how you get it. It's just a program running somewhere between you and the internet that has a bank of IP addresses that it can give out. And when you connect to the network, it gives you one.

    So let's revisit this diagram.

    Somewhere between you and the internet, there's a DHCP server.


    Now, let's talk about DNS.

    And you can think about it as if it's just a huge list running from 0.0.0.0 all the way down to 255.255.255.255, which would be the highest possible-- that's the full range from 0s to 255s of all 4 billion-ish IPv4 addresses.

    And similarly for IPv6s, we're also going to have a yellow pages that'll be a lot bigger.

    what actually DNS is:

    So now we know that somewhere between us and the internet there exists a DNS server as well as a DHCP server.


    Now, access points, what our access points?

    Well, access points you're probably pretty familiar with from actually connecting to the internet.

    That's the network that you choose, the home or your work network or what have you.

    Every machine having a unique IP address, which we have run out of, because we're over 4 billion devices trying to connect to the internet, what we do is instead assign an IP address to a router. That router or access point just in your home, for example.

    And the router's job as to sort of act as a traffic cop, allowing everybody who's connected to that router to use the same IP address to get out.

    Does that make sense? So everybody at your home has a private IP address.

    They can't connect to the internet, or the internet rather can't speak to them, through that private address. They can only speak to them through the address in the router. And it's the router's job to take information that you're sending the router and direct it to the correct place and for information that's coming into the router for the router to send it to you.

    So the routers are really the devices here-- particularly a router in your home, the most common sort of usage case for most people --that has the public IP address.

    That's the device that's connected to the internet. And you connect to the router to have information flow through it on your behalf.

    So again, somewhere between us and the internet, we have an access point. And that's what we connect to.


    We're not the only person probably on our local network trying to use the internet. There's probably several of us trying to get in.

    And we're not the only network that exists in the world, right? There are other networks, too, that are trying to connect to the internet.

    But the internet is not, again, a separate entity. It's just a set of rules that allow these networks, these small networks, the blue, the purple, and the red network here, to communicate with each other.

    So there's no thing they're all connecting to. They're all just connected to each other, right?

    And so somewhere on these networks exists the services that we actually want. So maybe in the blue network is where Google lives. And in the purple network is where Facebook lives. And in the red network, well, maybe that's where all those cats are.

    And so if we want to get information about cats, we just traverse this chain of networks to get the information we want. And here, I've represented the network as all being able to talk to each other. And we can only talk to the network. But the network can't talk back to us. But that's not true either, right? This is all a two-way street. Information can flow through networks back and forth.

    How does it do that?

    Well, the internet's really a system of protocols.

    And we're going to start talking about what those protocols are in future videos.

    The End

    相关文章

      网友评论

          本文标题:知识点15:初识网络(internet primer)

          本文链接:https://www.haomeiwen.com/subject/szzyottx.html