Networks and TCPIP Part 1 Addressing Quick Preview


































































- Slides: 66
Networks and TCP/IP Part 1 - Addressing
Quick Preview p Networked devices can only talk to devices they are directly connected to n n p Typically via a switch or hub Can be a router All computers in a network have to have unique address n Includes p p p Need to change things easily n n p Local computers All other computers/devices in the network Update a network card Replace a server with at better one How can this be reliably (and easily) done?
TCP/IP Term typically used as a single entity - BUT in reality is… p Two separate but complementary protocols: p n IP p n TCP p n Internet Protocol § How to address machines (find machines) Transmission Control Protocol § How to reliably get data to machines (send data) Note: TCP is not the only protocol to send data
Networks in General PART ONE
Physical Network Technologies p Circuit Switched Network n Connection oriented Establish a solid, “permanent” connection before communication p Circuit is reserved for exclusive use during the whole communication p Example: POTS: Plain Old Telephone Service p p Packet Switched Network n Store forward network Packet(s) sent from node to node p Intermediate nodes store and then pass to next node p Circuits only established to pass packet to next node p Examples: Post Office, Internet p
Network Types by Scope p LAN n p Local area network p Limited scope p § Single building or a small campus § More typically homogeneous and high speed Typically can access directly WAN n Wide Area Networks p p n p Large region or Continental span Typically heterogeneous and lower speed Usually need router involved to access MAN n Metro-area network p Regional (city wide)
OSI Model LAYERED MODEL
OSI – Open Systems Interconnect p OSI Model n Open Systems Interconnection p n n Not concerned with a particular technology at any level 7 layers to define communications We need only be concerned with the first 3 or 4 layers at the infrastructure level
Data Encapsulation
Sidebar - Warning p The OSI and TCP/IP and Ethernet models do not have 1 -1 mappings n n A layer in OSI may be defined by 1, 2 or 3 different TCP/IP layers/definitions A lot of different interpretations of mappings
OSI – Layer 1: Physical p Hardware and interconnection n Electronic Interfaces p n Cables p n Real live silicon § Ethernet card § Token-Ring card E. g. Cat 5 e cables Connectors p E. g. RS-232 C or RJ-45
OSI – Layer 1: Physical p Examples n IEEE 802. 5 p n RS-232 c p n p Fire. Wire IEEE-1284 p p n GPIB or HPIB Instrumentation Bus IEEE-1394 p n “Traditional” Serial Link IEEE-488 p n Token Ring hardware specs Parallel interface “Centronics” IEEE 802. 3 p p Most Common: 10/1000 Base T (for Ethernet) Many variants (coax, copper, fiber, etc. ) § § § 10 Base 2 (Coax) 10 Base-T 1000 Base-T 1000 Base-X (fiber) 10 GBase-T
OSI – Layer 2: Data Link p Local Network Addressing n p Getting data from one node to another adjacent (near-by) node Examples n n n Ethernet (802. 3 y, 802. 3 z, etc. ) Token Ring (802. 5) ATM (Asynchronous Transfer Mode)
OSI – Layer 3: Network Layer p Inter-network n n p Getting data from one device to another within a network Establishing unique addresses on a network Examples n n IP IPX p n Novell networks Apple. Talk
OSI – Layer 4: Transport Layer p Service Identification n n p “Reliably” getting data from node to node What application is it going to Examples n n TCP UDP SPX Apple. Talk
OSI – Layer 5: Session Layer p Communications between computers n Maintains communications between applications on the computers
OSI – Layer 6: Presentation Layer Standard interface p Data manipulation, if needed p n Encoding/Decoding p n n n EBCIC ASCII Encrypting Serializing Objects Loading / Unloading data structure into XML
OSI – Layer 7: Application Layer p Interfaces directly to the application
OSI – What’s it all Mean? p Sending Application n p Sends the data down the layers on its side where it finally gets sent over the physical media Receiving Application n Physical media receives the data and sends the data back up the layers to the receiving application //
Resume 1/23
Internet and TCP/IP PART TWO
Media Access Control SIDEBAR: MAC ADDRESSES
MAC addresses: Media Access Control p Every addressable network device has a unique address for each of its interfaces n n 48 bits long 281, 474, 976, 710, 656 addresses! p p n 48 bit addresses will run out about 2100! § 2013 update: could happen in 25 years 64 bit standard has been defined! § EUI-64 Divided into 2 parts: p Organization Unique Identifier (OUI) part § Think of this as the manufacturer id p p Network Interface Controller (NIC) part Note: there is also an EUI-48 n Basically the same as MAC-48
MAC addresses p Why not use MAC for all communication? n n What if network card fails and gets replaced? What if network card gets upgraded? Token ring Ethernet p Ethernet 10 Mb/s Fast Ethernet (100 Mb/s) p Ethernet 1 G ? ? p n p What if computer gets replaced? Don’t want to update all the old card references with the new card address
What is it? INTERNET
Internet p From Wikipedia: n n The Internet is a worldwide, publicly accessible network of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). It is a "network of networks" that consists of millions of smaller domestic, academic, business, and government networks, which together carry various information and services, such as electronic mail, online chat, file transfer, and the interlinked Web pages and other documents of the World Wide Web.
Internet vs. World Wide Web (WWW) The WWW is not the Internet p The Internet is not the WWW p WWW is a part of the Internet p p Internet services consists of: n n n WWW e. Mail FTP Vo. IP and many, many others…
Internet Protocol IP
IP – Internet Protocol p Standard for how computers on networks are addressed n IPv 4 p p n “Current” standard 4 bytes 32 -bit number ~4 billion potential addresses Running out of address space! § Some estimated February 2011!!!! § Fall 2011 – addresses all assigned! IPv 6 p p p Next standard § Became “mainstream” in 2009 128 -bit numbers ~3. 4 x 1038 potential addresses
Sidebar: How big is 3. 4 x 1038? p p p Course sand: ~1 mm (10 -3 meter) 1 cubic meter of sand has: n n n 1000 x 1000 grains 109 grains (1 billion!) 4 cubic meters is all IPv 4 could address n n 1000 m x 1000 m = 109 m 3 109 x 109 or 1018 grains! n 3. 4 x 1020 cubic kilometers! n n 1. 08× 1021 m 3 or about 1 x 1012 km 3 Fill about 3. 4 x 108 Earths! 1 cubic kilometer is: So 3. 4 x 1038 grains would fill Volume of the Earth: p p That’s 340, 000 Volume of the Sun n n 1. 4 x 1018 km 3 About 200 Suns
Sidebar: How big is 3. 4 x 1038? p Another view n n About 100 billion stars in a galaxy (1011) About 100 billion visible galaxies 1022 stars in the visible universe! Enough address for the all the stars in 1016 universes 10, 000, 000 -orp 10 quadrillion Universes! p
Sidebar: How big is 3. 4 x 1038? p And now the bad news: n n Approximations vary, but best guess are there about 1 x 1079 atoms in the universe IPv 6 can’t give each atom it’s own unique IP address
And now, back to your regularly scheduled lecture…
Telephone Area Code Analogy p Every telephone has a four part number n Country code p p p n p p – 704, 980, 919, etc – 406 Kannapolis Concord – 932, 933, 938, etc – 782, 783, etc. Residence/business number p p North Carolina Montana City (exchange) code p n – 1 – 44 – 353 Area code p n United States UK Ireland nnnn 1 -704 -687 -8194
Area Code First part tells country (optional) p Second part designates state or section of state (sometimes optional) p Third part is the city or part of city (used to be optional or partially optional) p Fourth part actual telephone (mandatory) p
Hierarchy p This hierarchy helps find the phone in question n What country is it in? – United State or Canada Nation Code 1 p What State? – North Carolina § Area Code 704 p § What city? – Charlotte § City Exchange Code 687 § § What phone? § n UNC Charlotte in the city Exchange code 8194 1 -704 -687 -8194
Hierarchy p Likewise a hierarchy helps find computers within a network n What network? – UNCC p p Problem: n p What machine? – ajklinux 1 There a variety of sizes of companies with different needs for network capability Hence the various classes of networks
HOW TO DIVIDE UP ADDRESSES FOR THE RANGE OF ADDRESS REQUIREMENTS? – IPV 4
Divide and conquer p Each address has two parts: n Network ID p n Host ID p p p Identifies the organization or network Identifies a specific computer in the organization 32 bits ~4 billion identifiers Organizations have different requirements n Large orgs p p n Lots of computers Relatively few large orgs Small orgs p p Fewer computers Lots of small companies
IP Classes p IPv 4 address is conventionally broken into four “dotted octets” n e. g. four 8 -bit address numbers separated by a period p n Each octet has the range 0 -255 decimal p n n. n 00 -FF hexadecimal Usually written in the form: 10. 192. 3. 244 (decimal) § Decimal is the most common p 0 c. 1 f. 3 d. 22 (hex) p
IP Classes p IP addresses are grouped in to 5 categories n n n p Class Class A B C D E Only Classes A-C are commonly used
Classes p 3 Major Classes: n Class A Fewest number of networks (organizations) p Each network has a large number of potential hosts p n Class B Medium number of networks p Medium number of hosts per network p n Class C Greatest number of networks p Each having a small number of hosts per network p
Class A p Class A n Denoted by a 0 in the first (leftmost) bit of the address Bits 1 through 7 denote the network id p Bits 8 through 31 denote host id p n n n 0 nnn nnnn. hhhh The first octet will be in the range 0 -127 Allows 126 unique network IDs p n 0 and 127 are special cases Each network has 16, 777, 214 host IDs p 0 and 16, 777, 215 are special cases
Class B p Class B n Denoted by a 10 in the first two bits of the address Bits 2 through 16 denote the network id § 14 bits p Bits 16 through 31 denote host id § 16 bits p n n n 10 nn nnnn. hhhh First 2 octets in the range 128. 0 to 191. 255 14 bits 16, 384 Class B networks p 16 bits each network can have 65, 534 hosts § the first address and last address have special meaning
Class C p Class C n Denoted by a 110 in the first three bits of the address Bits 3 through 24 denote the network id § 21 bits p Bits 25 through 31 denote host id § 8 bits p n n n 110 n nnnn. hhhh First 3 octets in range 192. 0. 0 to 223. 255 21 bits 2, 097, 152 Class C networks p 8 bits each network can have 254 hosts § 0 and 255 are special cases
Class D p Class D n “Multicast” Denoted by a 1110 in the first four bits of the address 1110 mmmm n Address range is 224. 0. 0. 0 to 239. 255 n n
Class E p Class E n n Experimental Denoted by a 1111 in the first four bits of the address 1111 rrrr Address range is 240. 0 to 255
Network "rules" p Only machines in the same network can directly communicate with each other n E. g. p p Class C network § 110 n nnnn. hhhh § Only machines with an IP address with the matching n bits! 192. 168. 1. 1 § Can communicate with: § 192. 168. 1. 25 § 192. 168. 1. 103 § 192. 168. 1. 244 § Etc. § Cannot directly communicate with: § 192. 168. 2. 1 (different Class C network) § 172. 16. 1. 1 (different Class altogether)
Subnetworks p Can split a network into smaller sub groups n Physical reasons p n Logical reasons p n Don’t want engineering to get to financial data Performance reasons p p Computers belonging to different parts of a business Security reasons p n Computers in different buildings or campuses Don’t respond to messages not meant for a group Accomplished with a subnet mask n Different Classes have different default subnet masks
Subnets p Only addresses in the same network and same subnet can directly talk with each other n p Really just the same subnet n 192. 168. 1. 2 can access 192. 168. 1. 242 p n Same network! 192. 168. 1. 2 cannot directly access: 192. 168. 2. 1 with a the default subnet of 255. 0 p Different network! p
Subnet Masks p Divided into two parts: n n p Denotes which part of the address is for n n p Network address part Host address part Network ID (subnet) Host ID (within the subnet) An IPv 4 subnet mask has 32 bits to match the 32 IP address bits n Uses same dotted notation as network addresses
Default Subnet Masks p Default subnet mask for a Class A network n Network: p n Subnet: p p 1111. 0000 255. 0. 0. 0 FF. 00. 00 Default subnet mask for a Class B network n Network: p n 10 nn nnnn. hhhh Subnet: p p 0 nnn nnnn. hhhh 1111. 0000 255. 0. 0 FF. 00. 00 Default subnet mask for a Class C network n Network: p n 001 n nnnn. hhhh Subnet: p p p 1111. 0000 255. 0 FF. FF. 00
Subnet Mask Notes 1 s are always first, 0 s are always last p Subnet mask cannot be “broken” p n p The following subnet mask is illegal: n n p That is the 1 s and 0 s cannot be interwoven 1111 000011110000 Note the string of 1 s after some 0 s The following are legal: n n n 111100000000 11111111 10000000 11111111 11111000
Shorthand notation p Shorthand notation n Since: p p n / convention can be used p p Slash (/) followed by the number of 1 s in the mask Mask examples: n n 255. 0 /24 255. 0. 0 /16 255. 0. 0. 0 /8 255. 128 /25 p n n 11111111 10000000 255. 192 /26 p 11111111 11000000 255. 128. 0. 0 /9 p p Strings of 1 s and 0 s cannot be broken 1 s must be always first 1111 100000000 CIDR notation: base address followed by /nn n e. g. 172. 16. 4. 0/24
IPV 4 WRAPUP
“Magic” network addresses p Private addresses: n Class A p n Class B p n 172. 16. 0. 0 172. 31. 255 § 1, 048, 576 addresses § 16 contiguous Class B networks Class C p p 10. 0 10. 255 § 16, 777, 216 addresses 192. 168. 0. 0 192. 168. 255 § 65, 536 addresses § 256 contiguous Class C networks Reserved for private use n n For use inside a private LAN Are NOT found on the Internet!
Resume 1/25
IPv 4 Header
Remember Data Encapsulation? This is where IP fits
Approximately how many IPv 4 addresses are there: A. B. C. D. E. 4 4 4 thousand million billion trillion quadrillion 30 sec countdown
IPV 6
IPv 6 Header Format
IPv 6 Address Label Convention p Written with : separators in hex n 8 groups of 4 hex number (2 bytes) p 128 bits p One contiguous block of 0’s can be written shorthand with a : : notation n Only one block is allowed since need to calculate how many 0’s of the 128 were “compressed”
IPv 6 Address Label Convention p Written with : separators in hex n 8 groups of 4 hex number (2 bytes) p p 128 bits Other examples a 45 d: 37 ef: ffee: 0000: f 000: 0000 a 45 d: 37 ef: ffee: : f 000: 0000 a 45 d: 0000: ffee: 0000: 00 fe: f 000 a 45 d: : ffee: 0000: 00 fe: f 000
IPv 4 or IPv 6 p When will IPv 4 be obsolete? n Guesses vary p p n Never § …, 82 Redditors offer their views on the matter. Here a few that represent the general tenor: § Well since I still support IPX for some legacy apps … in 100 years. § Right after POTS dies. And then only after another 30 years. § General IPv 6 adoption is 18 months away. My college prof told me this in 1995, and he’s still right. § Not in our career lifetime. § IPv 6 will take off during the year of the Linux desktop. You’ll pull IPv 4 from my cold, dead hands § Network. World – Paul Mc. Namara Mar 24, 2015 5 years § “We are probably four or five years away from IPv 6 being relatively ubiquitous, ” said Owen De. Long, director of professional services at Hurricane Electric, which bills itself as the world’s largest IPv 6 backbone. “After that, I think IPv 4 is going to become unsustainable and the people who are using it are going to be left behind. ” § GCN – William Jackson Mar 19, 2013 My best guess p p When the cost of an IPv 4 get too high All blocks assigned already Market forces will drive up IPv 4 prices 10 -20 years? … § Might have an HDTV type of solution
IP Summary p Internet Protocol n n n The protocol for computers on a network to methodically identify, locate and address each other Used to route data from a source host to a destination host via one or more IP networks On a network all IP addresses must be unique This does not mean that all hosts everywhere must have unique IP addresses p Hosts on different networks may use the same addresses p