350 likes | 470 Views
Behind the Plug. 0011: IP Address Confusion. Looking at DNS. Speaking of addresses… What is this thing? It’s an IP address Technically, it’s an IPv4 address… But what’s an IP address?. ( ip addresses). IP Addresses. IP Addresses. Colonial Baptist Church/6051 Tryon Rd/Cary , NC (USA).
E N D
Behind the Plug 0011: IP Address Confusion
Looking at DNS • Speaking of addresses… What is this thing? • It’s an IP address • Technically, it’s an IPv4 address… • But what’s an IP address? (ip addresses)
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA) The name gets us the address –remember DNS?
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA)
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA)
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA)
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA)
IP Addresses Colonial Baptist Church/6051 Tryon Rd/Cary, NC (USA) • Each part of a normal address “narrows down” the location a little more • North Carolina is within the US • Cary is within North Carolina • Tryon Road runs through Cary • 6051 is a specific location on Tryon Road Less specific information is to the right More specific information is to the left
IP Addresses 192.168.100.1/24 • IP Addresses are constructed the same way… • Only backwards • And an IP address doesn’t relate to a geographical location • Well, okay, it’s the same concept, anyway! More specific information is to the right Less specific information is to the left
IP Addresses IP Addresses have three parts…* • How do I know where the Network Address ends and the Host Address begins? • The prefix length tells me • How? • Well, you just had to ask, didn’t you… • This means we’ll have to take a trip down binary lane… 192.168.100.1/24 Prefix Length Network Address Host Address
Binary Lane • The base of a number tells us the number of unique symbols in a particular position or digit • Our “normal” way of counting is base 10 • You start at 0 and count to 9 • When you get to 9, to add a digit, or position, to count one more • 9+1 == 10 The added second digit
Binary Lane • Binary is base 2 • This means there are only two numbers in each digit, or position • You count 0, 1... • If you add 1 more, you can’t add it to the first digit • So you have to add a second digit • 1+1 == 10 The added second digit
Binary Lane • Why do computers use binary numbers? • Because memory is like a light switch; its either on or off • So there’s really only two digits to work with, 0 and 1
Binary Lane 123456 101010 ones ones tens twos one hundreds fours Each new digit is double the next lower one one thousands eights ten thousands six-teens one hundred thousands thirty-twos
Binary Lane • To convert from binary to decimal (“normal”) • Map out the “place” of each binary digit • Multiply the binary digit by the “place value” • Sum the results
Binary Lane • To convert from decimal (“normal”) to binary... • Divide the number by 2 • Record the remainder; this is the first digit • Repeat until the number is gone
IP Addresses • An IP address is really 4 decimal numbers • Rather than one big number • This was only done to make the number somewhat “memorizable” by humans • Each “section” is separated by a period • Or a ‘dot” • Hence, this is a “dotted notation” • Each “section” is actually 8 binary digits • Better known as an octet 192.168.100.1
IP Addresses 192.168.100.1 First Octet Third Octet Fourth Octet Second Octet 8+ 8+ 8+ 8 == 32 • There are 32 binary digits (“bits”) in an IP address • This means there are about 4.2 billion possible addresses
IP Addresses Now, to go back to our original question –how do I know where the network ends, and the host begins? • The result is the network number • I can make the network part as large or small as I like by changing the length of the subnet mask • As I make the network part larger, I get more networks, and fewer hosts • As I make the network part smaller, I get fewer networks, and more hosts 192.168.100.1/24 There are 24 “1’s” in the “subnet mask” 11111111.11111111.11111111.00000000 AND each pair of numbers (essentially multiply) 11000000.10101000.01100100.00000001 11000000.10101000.01100100.00000000 192 .168 .100 .0
Network Topologies 10.1.0.0/24 • Physical topologies “aggregate” • Cities are a part of a state • States are a part of a nation • Logical topologies aggregate as well • Longer network addresses are a part of shorter network addresses 10.1.0.0/23 10.1.1.0/24 10.1.0.0/22 10.1.2.0/24 10.1.2.0/23 10.1.3.0/24
Network Topologies 10.1.0.0/24 10.1.0.0/23 10.1.1.0/24 10.1.0.0/22 10.1.2.0/24 10.1.2.0/23 These networks are considered a part of the host address space in this larger network 10.1.3.0/24 These networks are considered a part of the host address space in this larger network
Network Topologies • So, I… • Typed a location into my browser • The computer used DNS to convert the name into an address • I (kindof) know how the address is structured • But how does that address tell me where the server is that I’m trying to get to? • In the physical world • Someone assigns state names, city names, street names, and street numbers • How does this work in a network?
Network Topologies 192.168.101.0 192.168.103.0 192.168.102.0 192.168.104.0 • The network portion of the IP address describes a location, just like a physical address • This isn’t a physical location, though, it’s a logical location (or a topological location)
Network Topologies • This is a tricky (or even slippery) concept • Of course a network must be located in some physical location • The network map “touches” the physical map • But two locations that are side by side on the network might be miles apart physically • The network map isn’t identical to the physical map
Network Topologies • Physically both red dots are about the same distance from Virginia • Topologically, though, the one on the right is closer to Virginia, while the one on the left is closer to Kentucky • The maps “touch,” but they don’t match • In other words, topology is an abstraction on top of the physical world
IP Addresses • So an IP address is a way to describe a topological location on the network… • … Just like a postal address is a way to describe a physical location • Which is really a location on the network of roads, if you think about it
IP Addresses • There are actually two kinds of IP addresses in the world • IPv4 • IPv6 • From our perspective, the only real differences are: • The size of the address • The way they are written
IP Addresses • 192.168.100.0/24 • This is an IPv4 address • There are around 4.2 billion IP addresses in the world • 32 bits, 4 octets, remember? • But… we are actually running out!
IP Addresses • FEC0:0000:0000:0001/64 • This is an IPv6 address • Each digit represents eight bits (one octet) • There are 128 bits (16 octets) in all • This means there are 340,282,366,920,938.5x10^23 IPv6 addresses • We probably won’t ever run out of these • But, it’s going to take a long time to convert over to using IPv6 addresses…
Special IP Addresses • Some IP addresses are “set aside” for special use • 127.0.0.1 is the “local host” • Connecting to 127.0.0.1 will always connect to the computer you’re actually on • 10.0.0.0/8, 192.168.0.0/16, and 172.16.0.0/12 are “private” address spaces • These address spaces can’t be used on the global or public Internet • There are also addresses set aside for “multicast” use, experimental use, and other such stuff
IP Addresses • Okay, so we’re really confused by IP addresses now… • But at least we get the idea that every computer on the Internet has an address, like every house has an address • But I still have questions! • How does all that data fit on that little skinny wire, anyway?