module 2.3a ip - scs | uwcs100/transcripts/mod 2/2_3a... · now this address does not look like our...

15
Module 2.3a IP 0:00 - In this video we're going to continue looking at our simplified view of how the internet layers work and in particular we're going to look at the middle layer which is good known as TCP/IP. Before we get too far into this I wanted to remind us of one of the core concepts of using this layer model, and if you recall we talked about a voice conversation message where the top two layers were the same as a postcard communication message. So I want to emphasize is that the higher layers can communicate without any regard as what's happening at the lower layers and that's really important with our model and how we construct messages and send them back and forth. So we're talking about our middle layer of TCP/IP it doesn't matter if the lower layer is working over Wi-Fi or ethernet or cellular connection it doesn't matter, everything we're going to say now moving forward does not have to be concerned with how that physical layer is actually used. So let's take a look at how the middle layer TCP/IP actually works now I… 1:00 - …mentioned we're giving a simplified view the TCP/IP layer is actually two separate layers, the TCP layer which is a higher layer than the IP layer but for all intensive purposes we're going to consider them the same layer just for simplification. Now full disclosure there is an alternative to TCP that is used in the real world known as UDP or user Datagram protocol. We're not going to really discuss that but I just want to make sure for full disclosure aware that some of the

Upload: truongbao

Post on 14-Mar-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

Module 2.3a – IP

0:00 - In this video we're going to continue looking at our simplified view of how the

internet layers work and in particular we're going to look at the middle layer which

is good known as TCP/IP. Before we get too far into this I wanted to remind us of one

of the core concepts of using this layer model, and if you recall we talked about a

voice conversation message where the top two layers were the same as a postcard

communication message. So I want to emphasize is that the higher layers can

communicate without any regard as what's happening at the lower layers and that's

really important with our model and how we construct messages and send them

back and forth. So we're talking about our middle layer of TCP/IP it doesn't matter if

the lower layer is working over Wi-Fi or ethernet or cellular connection it doesn't

matter, everything we're going to say now moving forward does not have to be

concerned with how that physical layer is actually used. So let's take a look at how

the middle layer TCP/IP actually works now I…

1:00 - …mentioned we're giving a simplified view the TCP/IP layer is actually two

separate layers, the TCP layer which is a higher layer than the IP layer but for all

intensive purposes we're going to consider them the same layer just for

simplification. Now full disclosure there is an alternative to TCP that is used in the

real world known as UDP or user Datagram protocol. We're not going to really

discuss that but I just want to make sure for full disclosure aware that some of the

technologies that you use do not use TCP although the vast majority of

communication you use on the internet is actually TCP. So the first thing we're going

to do is describe IP or the internet protocol, and that's literally what the internet is

named after this IP Internet Protocol. In order to send a postcard in the real world

you need a destination address and usually you have a return address that you sent it

from. Well, you need both of these to communicate on the Internet, and to

communicate on the Internet you need the same sort of idea. This protocol requires

that you have a sending address where it's coming from and you need a destination

address of…

2:00 - …where it's going to. Now this address does not look like our normal

addresses we use for mailing addresses, they use the specific scheme to keep track

of all the different devices on the internet. So what is an IP address look like. Well it's

four numbers, each number is in the range from 0 to 255. So there's 256 possible

numbers. Then you string them together separated by period. Currently

www.uwaterloo.ca is really the number 129.97.208.23. If you launch your browser

and you just type in 129.97.208.23 up comes the University of Waterloo. Now that's

not very convenient. We’ll talk about a different way of addressing website soon but

that is an example of how each computer or device on the Internet has its own IP

address. Now unfortunately we are running out of IP addresses. If you count up the

total number of devices that can be on the internet is 256 x 256…

3:00 - …256 x 256, which is approximately four billion different devices. When the

internet was first being conceived of, that seemed like a perfectly valid number of IP

addresses but when we enter a world where each one of you may have multiple

devices and there's lots of hardware that connects all of the internet we have run and

we're past four billion devices. So they had to come up with a plan B. There's two

ways to address this problem. The first is what they call IP version 6, and the idea of

an IP version 6 is that you have a much longer IP address. This is the actual IP

address of another computer at the University of waterloo, that uses the IP version 6

scheme. With the IP version 6 scheme we can handle 340 trillion trillion trillion

devices on the internet. And that should serve humankind for a long time. The

alternative scheme is called Nat. So you did not type in 192.97.208.23 into your web

browser, you can just type in www.uwaterloo.ca. So what happens is there is a…

4:00 - …protocol named ‘DNS’ for Domain Name System. And what happens is when

you type in www.uwaterloo.ca your computer sends that request out to your local

DNS server and it then returns back the actual IP address of what you're trying to

connect to. So it converts between a more user-friendly human name to an actual IP

address. Now your local DNS server may not know exactly where uwaterloo.ca is, so

it may go on to say for example the .ca DNS server and says hey you're in Canada do

you know where this address is and then it may have come back with the number. So

it may require more than one hop to a different DNS server but eventually no matter

what name you type in it will come back. There is an international body out there

that decides who can get what name. You cannot just go ahead and say “hey can I be

microsoft.com”. So what happens is you can register different names and you can go

out and register names for yourself so…

5:00 – …you can have your own custom or vanity name or if you have a business you

want to start up you can get your own name. And then you what you do is you

register that with an agency that associates your name with a real-world physical

address. This is a controversial topic there are countries that control their own rules

for how you can get a name. So for example if you want to .ca within Canada. And

then there's other new top-level domains such as .ca, .edu, .org and each of these

have their own rules for how you can obtain your own name. At the end of the day

though you don't have to worry about this, you just simply type in a name and your

DNS server will resolve that to an IP address. Now I mentioned that there's only four

billion IP addresses out there…

6:00 - …how do you get an IP address. Well there's two categories of IP addresses,

there is fixed IP addresses, and big companies like Google and Microsoft have their

own fixed IP addresses as well as organizations like the University of Waterloo. In

fact, every number that starts with 129.97 is an actual University of Waterloo address.

University of Waterloo has that entire range. But you're just a regular citizen and you

want to connect to network whether you're at Waterloo or Starbucks or at your home

network. And each one of your device's needs an IP address. Well the way these on

the fly or temporary IP addresses are doled out, is known as DHCP, which stands for

Dynamic Host Configuration Protocol. So the idea is your device when it turns on and

it tries to connect to a network it's sort of sends a message out “hey I don't have an IP

address can I have IP address please”, and then what happens is there's a DHCP

server out there that has a bank of IP…

7:00 - …addresses that it can give out. And what it will do is, it will give you an IP

address that you can use. And it also will expire after a certain amount of time, so if

you go to Starbucks and Starbucks gives you an IP address that's great but an hour

later when you're gone someone else can get that same IP address. And so the DHCP

server just keeps track of addresses it has available and gives them out as needed.

This is especially important for your mobile devices like your phone and laptop

where you may connect to multiple different networks. Now the last tricky piece I

want to explain which will really help your understanding of how communication on

the internet works, is known as Network Address Translation, and when you connect

to your home network or even Starbucks or places on the campus this system is used

so that we don't run out of IP addresses. So how NAT actually works is a little

complicated, and I don't want to get bogged down in details, so what I'm going to do

is give you an analogy using physical addresses that will just give you an

understanding of how basically it works. So let's say we have an apartment building

and that…

8:00 - …apartment building has a physical address known as 555 real street. That's a

real physical address in our world but there's a whole bunch of people who live

inside the apartment building and they don't even know they're at 55 real street.

They all think they live at imaginary lane. So one person might think they live at 100

imaginary lane and someone else might live at a hundred and one imaginary lane.

So you might think you live at a hundred and one imaginary lane and then you want

to send a postcard to your friend who lives at destination avenue. So you fill out your

postcard dear Bob at 789 destination avenue and you return address you put as a

hundred and one imaginary lane. And then what you do is you hand your postcard to

the nice doorman who lives at real street 55 real street. So you say “hey doorman

can you please deliver this postcard for me”. He says “no problem”, and then what

he does is he changes your return address to be 55 real street, unbeknownst to you.

And then he sends out the postcards the destination avenue and then your friend at

destination avenue…

9:00 - …gets your postcard sees your address is 555 real street and then sends it

back to you. And then when it arrives the doorman looks at your postcard and goes

“A HA” this is my friend who lives at a hundred one imaginary lane, and again

changes the address from real street back to 100 imaginary lane and then passes the

postcard onto you. You were completely oblivious to this whole thing the doorman

was doing all of this managing for you. So what happens is we can have hundreds or

even thousands of computers all sharing the same physical address, and this is

another way of getting around this problem of running out of IP addresses. So when

you go on your computer and you ask your computer “hey what’s my IP address”, it

might come up with a number such as imaginary lane. And in fact, if your IP address

begins with 192.168, you live in imaginary lane. Alright we just discussed a few

technical issues that help us understand how the internet works and how the internet

protocol works, but let's actually talk about Internet routing because that's one of the

core parts of…

10:00 - …the IP protocol. Whenever your computer sends out a message it has a

destination IP address and your computer sends that to a local router and that router

may send it to another router, and then another router and eventually you'll reach

the computer that it wants to reach. All of these individual routers are all connected

together and are constantly sending millions of messages back and forth back and

forth and that's how your message gets from one side of the world to another side of

the world. How does this work? Let's discuss how it works in the real world say you

live in Kitchener Waterloo, and you want to send your postcard to someone in

England. Well you fill out your postcard and you get someone's address in England

and then you take it to your local mailbox. And then someone picks up that postcard

from the mailbox it takes it to a central depot, and they look at the address and they

say “oh this one's going to England so I might send that to the central Ontario

dispatch”, I don't know how it actually works in the real world I'm making this up. But

we can imagine that it goes to a central Ontario dispatch and someone looks at the

address there and goes “all this…

11:00 - …is going to England”. So they take it to a candidate dispatch center and

then at the candidate dispatch center they look at this address and go “all this is

going to England”, well let's put it on this boat that travels to England and it goes

over the sea, on some sort of big boat and he gets over to England and then

someone opens it up and goes “ahh ok well you want to go to London England, so

let's put it and let's give it off to someone who delivers in that region. And then

eventually you'll get narrow and narrow and smaller and eventually it will show up at

someone's house. So this idea of each person who looks at the postcard along the

way knows in general which direction the postcard has to go. And it's complicated

but that's how all the network routers on the internet work. Whenever you send out a

message each one of them send it to another router that will get you closer and

closer to your destination. Now it's hard to visualize how all the routers in the world

are connected, I stole this photo and this is from 1999 so this is even a long time…

12:00 - …ago but this is a visualization of many of the routers that exist in the real

world. And so you can see how you might start in one corner of this giant network

and make your way through a whole bunch of different paths to your destination at

the other side of the world. In general, every message you sent on the internet takes

less than 50 hops and a hop being, goes from one router to another router. That's still

a lot but you can reach almost any computer from any other computer in the world

within about 50 hops. And that's how all the messages on the internet get

transmitted.

Raw Long Form Transcript

0:00 - in this video we're going to continue

0:02 - looking at our simplified view of how

0:04 - the internet layers work and in

0:06 - particular we're going to look at the

0:07 - middle layer which is good known as

0:10 - tcp/ip before we get too far into this i

0:13 - want to remind us of one of the core

0:15 - concepts so using this layer model and

0:17 - if you recall we talked about a voice

0:19 - conversation message where the top two

0:22 - layers were the same as a postcard

0:24 - communication message so i want to

0:27 - emphasize is that the higher layers can

0:29 - communicate without any regard as what's

0:31 - happening at the lower layers and that's

0:33 - really important with our model and how

0:35 - we construct messages and send them back

0:37 - and forth so we're talking about our

0:39 - middle layer of tcp/ip it doesn't matter

0:42 - if the lower layer is working over Wi-Fi

0:45 - or ethernet or cellular connection it

0:47 - doesn't matter everything we're going to

0:49 - say now moving forward

0:51 - does not have to be concerned with how

0:52 - that physical layer is actually used so

0:55 - let's take a look at how the middle

0:57 - layer tcp/ip actually works now i

1:00 - mentioned we're giving a simplified view

1:02 - the tcp IP layer is actually two

1:04 - separate layers the TCP layer which is a

1:06 - higher layer than the IP layer but for

1:09 - all intensive purposes we're going to

1:10 - consider them the same layer just for

1:12 - simplification now full disclosure there

1:15 - is an alternative to tcp that is used in

1:17 - the real world known as UDP or user

1:19 - Datagram protocol we're not going to

1:21 - really discuss that but I just want to

1:23 - make sure for full disclosure aware that

1:25 - some of the technologies that you use do

1:27 - not use TCP although the vast majority

1:29 - of communication you use on the internet

1:31 - is actually tcp so the first thing we're

1:34 - going to do is describe IP or the

1:36 - internet protocol and that's literally

1:38 - what the internet is named after this IP

1:41 - Internet Protocol in order to send a

1:43 - postcard in the real world you need a

1:45 - destination address and usually you have

1:47 - a return address that you sent it from

1:49 - will you need both of these to

1:51 - communicate on the Internet and

1:52 - communicate on the Internet

1:53 - you need the same sort of idea this

1:55 - protocol requires that you have a

1:56 - sending address where it's coming from

1:58 - and you need a destination address of

2:00 - where it's going to now this address is

2:02 - not look like our normal addresses we

2:04 - use for mailing addresses they use the

2:05 - specific scheme to keep track of all the

2:08 - different devices on the inner

2:09 - they're so what is an IP address look

2:11 - like while it's four numbers each number

2:13 - is in the range from 0 to 255 so there's

2:16 - 256 possible numbers and then you string

2:18 - them together separated by . currently

2:21 - www.cnn.com burr 129 got 97 . too late .

2:28 - 23 if you want your browser and you just

2:31 - type in 129 . 97 . 208 . 23 up comes the

2:38 - University of Waterloo now that's not

2:40 - very convenient will talk about a

2:41 - different way of addressing web site

2:43 - soon but that is an example of how each

2:47 - computer or device on the Internet has

2:49 - its own IP address now unfortunately we

2:53 - are running out of IP addresses if you

2:55 - count up the total number of devices

2:57 - that can be on the internet is 256 x 256

3:00 - 256 x 256 which is approximately four

3:03 - billion different devices when the

3:05 - internet was first being conceived of

3:07 - that seemed like a perfectly valid

3:08 - number of IP addresses but when we enter

3:11 - a world where each one of you may have

3:13 - multiple devices and there's lots of

3:15 - hardware that connects all of the

3:17 - internet we have run and we're past four

3:19 - billion devices so they had to come up

3:21 - with a plan B there's two ways to

3:23 - address this problem the first is what

3:25 - they call IP version 6 and the idea of

3:28 - an IP version 6 is that you have a much

3:30 - longer IP address this is the actual IP

3:33 - address of another computer at the

3:34 - University of water leave that uses the

3:36 - IP version 6 ski with the IP version 6

3:39 - scheme we can handle 340 trillion

3:42 - trillion trillion devices on the

3:44 - internet and that should serve humankind

3:46 - for a long time the alternative scheme

3:49 - is called Nat

3:51 - so you did not type in 192 . 97 . 208 .

3:55 - 23 into your web browser you can just

3:58 - type in www.cnn.com has there's a

4:02 - protocol named Dee and ask for domain

4:05 - name system and what happens is when you

4:08 - type in www waterloo your computer sends

4:12 - that request out to your local dns

4:14 - server and it then returns back the

4:17 - actual IP address

4:18 - of what you're trying to connect to sew

4:20 - it converts between a more user-friendly

4:22 - human name to an actual IP address now

4:26 - your local dns server may not know

4:28 - exactly where you water . CA is so it

4:31 - may go on to say for example the . see a

4:33 - dns server and says hey you're in canada

4:36 - do you know where this address is and

4:37 - then it may have come back with the

4:39 - number so it may require more than one

4:41 - hop to a different dns server but

4:43 - eventually no matter what name you type

4:45 - in it will come back there is an

4:48 - international body out there that

4:50 - decides who can get what name you cannot

4:52 - just go ahead and say hey can I be

4:54 - microsoft.com so what happens is you can

4:57 - register different names and you can go

4:59 - out and register names for yourself so

5:01 - you can have your own custom or vanity

5:02 - name or if you have a business you want

5:04 - to start up you can get your own name

5:06 - and then you what you do is you register

5:08 - that with an agency that associates your

5:11 - name with a real-world physical address

5:14 - and this is a controversial topic there

5:17 - are a lot of each country this is a

5:20 - controversial topic there are countries

5:22 - that control their own rules for how you

5:24 - can get a name

5:25 - so for example if you want to . CA

5:27 - within canada and then there's other new

5:30 - top-level domains such as . see a dot ed

5:33 - u dot org and each of these have their

5:36 - own rules for how you can obtain your

5:37 - own name at the end of the day though

5:39 - your computer just types in eight at the

5:42 - end of the day though you don't have to

5:44 - really worry about this you type in a

5:46 - name and they at the end of the day

5:50 - though you don't have to worry about

5:51 - this you just simply type in a name and

5:53 - your dns server will resolve that to an

5:55 - IP address now I mentioned that there's

5:58 - only four billion IP addresses out there

6:00 - how do you get an IP address

6:02 - well there's two categories of IP

6:04 - addresses this fixed IP addresses and

6:07 - big companies like Google and Microsoft

6:09 - have their own fixed IP addresses as

6:11 - well as organizations like the

6:13 - university of waterloo in fact every

6:16 - number that starts with 129 . 97 is an

6:19 - actual University of Waterloo

6:20 - address what university of waterloo has

6:23 - that entire range but you're just a

6:25 - regular citizen and you want to connect

6:27 - to network whether you're at Waterloo or

6:30 - starbucks or at your home network and

6:32 - each one of your device's needs an IP

6:34 - address

6:36 - well the way these on the fly or

6:39 - temporary IP addresses are doled out is

6:41 - known as dhcp which stands for dynamic

6:45 - host configuration protocol so the idea

6:47 - is your device when it turns on and it

6:49 - tries to connect to a network it's sort

6:51 - of sense of message out hey I don't have

6:53 - an IP address can i have IP address

6:55 - please

6:56 - and then what happens is there's a dhcp

6:58 - server out there that has a bank of IP

7:01 - addresses that it can give out and what

7:03 - it will do is will give you an IP

7:05 - address that you can use and it also

7:07 - will expire after a certain amount of

7:09 - time so if you go to starbucks and

7:11 - starbucks gives you an IP address that's

7:13 - great but an hour later when you're gone

7:15 - someone else can get that same IP

7:17 - address and so the dhcp server just

7:19 - keeps track of addresses it has

7:20 - available and told them out as needed

7:23 - this is especially important for your

7:25 - mobile devices like your phone and

7:26 - laptop swear you may connect to multiple

7:28 - different networks now the last tricky

7:31 - piece I want to explain which will

7:33 - really help your understanding of how

7:34 - communication on the internet works is

7:36 - known as network address translation and

7:39 - when you connect to your home network or

7:41 - even starbucks or places on the campus

7:43 - this system is used so that we don't run

7:46 - out of IP addresses so how not actually

7:49 - works is a little complicated and I

7:51 - don't want to get bogged down in details

7:52 - so what I'm going to do is give you an

7:54 - analogy using physical addresses that

7:56 - will just give you an understanding of

7:57 - how basically it works so let's say we

7:59 - have an apartment building and that

8:01 - apartment building has a physical

8:02 - address known as 555 real street that's

8:05 - real physical address in our world but

8:07 - there's a whole bunch of people who live

8:09 - inside the apartment building and they

8:11 - don't even know they're at 55 real

8:13 - street they all think they live at

8:14 - imaginary lane one person might think

8:16 - they live at 100 imaginary lane and

8:18 - someone else might live at a hundred and

8:19 - one imagined

8:20 - Elaine so you might think you live at a

8:22 - hundred and one imaginary lane and then

8:24 - you want to send a postcard to your

8:25 - friend who lives at destination avenue

8:28 - so you fill out your postcard dear Bob

8:30 - at 789 destination avenue and you return

8:33 - address you put as a hundred and one

8:34 - imaginary lane and then what you do is

8:37 - you hand your postcard to the nice

8:40 - doorman who lives at real street 55 real

8:43 - street so you say hey doorman can you

8:45 - please deliver this postcard for me he

8:47 - says no problem and then what he does is

8:50 - he changes your return address to be 55

8:53 - real street

8:54 - unbeknownst to you and then he sends out

8:56 - the postcards the destination avenue and

8:58 - then your friend of destination having

9:00 - you get your postcard sees your address

9:02 - is 555 real street and then sends it

9:04 - back to you and then when it arrives the

9:07 - doorman looks at your postcard ago Zaha

9:09 - this is my friend who lives at a hundred

9:11 - one imaginary lane and again changes the

9:13 - address from real street back 201

9:17 - imaginary lane and then passes the

9:19 - postcard onto you you were completely

9:21 - oblivious to this whole thing the

9:22 - doorman was doing all of this managing

9:24 - for you

9:25 - so what happens is we can have hundreds

9:27 - or even thousands of computers all

9:29 - sharing the same physical address and

9:31 - this is another way of getting around

9:33 - this problem of running out of IP

9:35 - addresses so when you go on your

9:36 - computer and you ask your computer hey

9:39 - whats my IP address it might come up

9:41 - with a number such as imaginary lane and

9:44 - in fact if your IP address begins with

9:46 - 192 . 168 you live in imaginary lame

9:50 - alright we just discussed a few

9:52 - technical issues that help us understand

9:54 - how the internet works and how the

9:56 - internet protocol works but let's

9:58 - actually talk about Internet routing

9:59 - because that's one of the core parts of

10:01 - the IP protocol whenever your computer

10:04 - sends out a message it has a destination

10:06 - IP address and your computer sends that

10:08 - to a local router and that router may

10:11 - send it to another router

10:12 - another router and then another router

10:14 - and eventually you'll reach the computer

10:15 - that it wants to reach all of these

10:17 - individual routers are all connected

10:19 - together and are constantly sending

10:21 - millions of messages back and forth back

10:23 - and forth and that's how your message

10:25 - gets from one side of the world to

10:27 - another side of the world

10:28 - how does this work let's discuss how it

10:30 - works in the real world say you live in

10:32 - kitchener waterloo and you want to send

10:34 - your postcard to someone in England

10:36 - well you fill out your postcard and you

10:38 - get someone's address in England and

10:40 - then you take it to your local mailbox

10:42 - and then someone picks up that postcard

10:44 - from the mailbox it takes it to a

10:45 - central depot and they look at the

10:47 - address and they say oh this one's going

10:49 - to England so i might send that to the

10:51 - central Ontario dispatch I don't know

10:52 - how it actually works in the real world

10:54 - I'm making this up but we can imagine

10:55 - that it goes to a central Ontario

10:57 - dispatch and they look at someone looks

10:58 - at the address there and goes all this

11:00 - is going to England so they take it to a

11:01 - candidate dispatch center and then at

11:03 - the candidate dispatch center they look

11:05 - at this address and go all this is going

11:07 - to England well let's put it on this

11:08 - boat that travels to England and it goes

11:10 - over the see me on some sort of big boat

11:15 - and he gets over to England and then

11:16 - someone opens it up and goes I ok well

11:19 - you want to go to London England so

11:21 - let's put it and let's give it off to

11:23 - someone who delivers in that region and

11:26 - then eventually you'll get narrow and

11:28 - narrow and smaller and eventually it

11:29 - will show up at someone's house so this

11:32 - idea of each person who looks at the

11:34 - postcard along the way nose in general

11:38 - which direction the postcard has to go

11:40 - and it's complicated but that's how all

11:43 - the network routers on the internet work

11:45 - whenever you send out a message each one

11:47 - of them send it to another router that

11:49 - will get you closer and closer to your

11:51 - destination now it's hard to visualize

11:53 - how all the routers in the world are

11:55 - connected i stole this photo and this is

11:57 - from 1999 so this is even a long time

12:00 - ago but this is a visualization of many

12:02 - of the routers that exist in the real

12:04 - world and so you can see how you might

12:06 - start in one corner of this giant

12:09 - network and make your way through a

12:12 - whole bunch of different paths to your

12:13 - destination at the other side of the

12:15 - world in general every message you sent

12:17 - on the internet takes less than 50 hops

12:20 - and a hot being goes from one router to

12:22 - another

12:22 - router that's still a lot but you can

12:24 - reach almost any computer from any other

12:26 - computer in the world within about 50

12:28 - hot and that's how all the messages on

12:30 - the internet get transmitted