-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInternet_Protocol.Rpres
209 lines (121 loc) · 7.23 KB
/
Internet_Protocol.Rpres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Internet Protocol Basics
========================================================
author: Jim Hogan
date: 2015-04-05
transition: fade
incremental: true
Research Computing and Data Management
-------------------------------------------------------
[http://github.com/brianhigh/research-computing](http://github.com/brianhigh/research-computing)
<small style="font-size:.5em">
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br />
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a>
</small>
Introduction
========================================================
This short tutorial is on the basics of the Internet Protocol, or "IP".
Brian High's [Computing Basics Wiki](https://github.com/brianhigh/computing-basics/wiki/networking) provides a lot of complementary information on networking and troubleshooting. This short tutorial will cover many of the basic components of IP.
When we say "your computer" that could mean almost any IP-connected device like PC, tablet or smart phone whether connected over a wired network or wireless network.
How Do I get on the Internet?
=================================
* Being on the Internet requires that a computer have an "IP address".
* Some other parameters related to the IP address need to be configured to make the Internet connection useful.
* The typical format of IP addresses are referred to as haveing 4 octets and the dotted notation is common:
* Example: 128.95.112.1
How does an IP address get set?
================================
There are 2 main ways to set an IP address:
* Statically
* Dynamically
Static Addresses
===================
You may be familiar with a settings page like this:
![Static IP Settings](images/ip-3.png)
----
All values are set manually and do not change unless manually altered.
Dynamic Addresses
===================
But you have the option in many cases to set IP address info automatically
![Static IP Settings](images/ip-4.png)
----
Dynamic addresses require a server on the network running the protocol "DHCP"" (Dynamic Host Control Protocol).
Addresses set with DHCP can change.
DHCP negotiation takes the form of a call-and-response.
DHCP can be set to supply other parameters like subnet mask and default gateway.
What are "Subnet Mask and "Default Gateway"?
===========================================
* Subnet Mask is required for your computer to communicate with other devices on the same local subnetwork or "Subnet".
* Default Gateway is required for your computer to communicate with devices on other networks.
Subnet Mask in a Nutshell
=======================
Let's say you plug in a laptop to your home network and it gets a dynamic address like this from the little blue box provided by your ISP....
The address is 192.168.1.10, but remember that it operated really is binary?:
11000000101010000000000100001010
The subnet mask exists to divide this number into 2 sections, the network bits and the host bits
So, if you take a typical value of subnet mask like 255.255.255.0, that translates into binary:
11111111111111111111111100000000
Subnet Mask: too complicated!
============================
* IP Addr : 11000000101010000000000100001010
* Mask : 11111111111111111111111100000000
* Net Bits : 110000001010100000000001________
+ Network is 192.168.1.0
* Host Bits : ------------------------00001010
+ Host bits = 10 so address is 192.168.1.10
So subnet being 192.168.1.0, all devices on this subnetwork need to use the same mask in order to know what subnet they are on and to communicate with other devices on the subnet.
Subnet Mask Example Table
=============================
Parameter |Binary Value |Readable Result
----------|----------------------------------|---------------
IP Addr |`11000000101010000000000100001010`|192.168.1.10
Mask |`11111111111111111111111100000000`|255.255.255.0
Net Bits |`110000001010100000000001________`|192.168.1.0
Host Bits |`________________________00001010`|10
So subnet is 192.168.1.0, and all devices on this subnetwork need to use the same mask in order to know what subnet they are on and to communicate with other devices on the subnet.
Default Gateway: maybe simpler!
================================
![Default Gateway](images/ip-8.png)
----
An Example:
<-- Where you want to get, say www.washington.edu
<-- What you travel over (The Internet)
<-- Your home router/wifi device. This would be default gateway.
How Does Routing Work?
==========================
![Default Gateway](images/ip-8.png)
----
All devices in this communications meash maintain something called routing tables that determine how packets should best be routed based on the destination address contained in the packet header.
Routing tables may be very simple or they may be very complex.
Public and Private Addressing
================================
Aside from static and dynamic, IP addresses can also be either public or private.
An IETF "RFC" defines ranges of IP addresses that are not routed by default and so are "private". The 3 main ones are like so:
10.0.0.0 through 10.255.255.255
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255
So these ranges are not reachable from other networks, but they can be used to build extensive private networks.
Private Addressing and NAT
============================
If you are using a device with a private address, it would not, by itself, be able to reach the Internet.
To enable access from private address, a technique is used called "NAT" (Network Address Translation) that maps your private address to a public, routable one.
Your small router at home probably uses NAT, as do large networks like here at UW.
Excercise: look to see what address is assigned to your computer and then see what address it shows to the work via a site like http://whatismyip.com. Same? Different?
NAT Serves Another Purpose
============================
Available addresses in the "IPv4" address space are nearly exhausted.
The use of NAT has allowed many computers to connect to the Internet without the assignment of a (scarce) public IP address.
What is to become of the Internet with no IPv4 addresses left?
================================================================
The short answer is Internet Protocol version 6 (IPv6) which has a hugely bigger address space.
IPv6 a topic for another day of year!
A List of bigger Internet terms and protocols you can safely ignore
=====================================================================
But if you are hyper-curious or can't fall asleep, take a look at:
[IPv6](http://en.wikipedia.org/wiki/IPv6)
[AS - Autonomous System](http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29)
[BGP - Border Gateway Protocol](http://en.wikipedia.org/wiki/Border_Gateway_Protocol)
[OSPF - Open Shortest Path First](http://en.wikipedia.org/wiki/Open_Shortest_Path_First)
What we should cover next
==========================
Internet Name Resolution
[Networking on Computing Basics Wiki](https://github.com/brianhigh/computing-basics/wiki/networking)