Networking Theory CSCI 201 Principles of Software Development
Networking Theory CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. [email protected] Outline Networking Overview IP Addressing DNS Ports NAT Subnets DHCP
Test Yourself USC CSCI 201L Networking Overview A server is a computer that has at least one program running on it that can service requests from another program A client is a computer that requests a service to be performed by another computer Consider browsing the web. What is the service provided by a web server? USC CSCI 201L 3/31
Servers Server hardware is typically more robust and expensive than other hardware, but a server can physically be any computer USC CSCI 201L 4/31 Server Room USC CSCI 201L 5/31 IP Addresses
An IP address is a unique address that is required of all computers that communicate on a network IPv4 addresses consist of 32 bits separated as 4 numbers of 8 bits each IPv4 was standardized in 1983 IPv6 was standardized as a draft in 1998 and became an official IETF standard in 2017
126.96.36.199 IPv6 addresses consist of 128 bits separated as 8 sets of 4 hexadecimal values fe29:392A:3396:829E:5591:40d3:3495:109A NOTE that if all four hexadecimal values are 0, the term will be omitted fe29:392A:3396::5591:40d3 (4th, 7th, and 8th terms are 0000) USC CSCI 201L 6/31
IPv6 Address Space How many IPv4 addresses are there? 32 bits = 232 addresses = 22 * 230 addresses = 4,294,967,296 addresses How many IPv6 addresses are there? 128 bits = 2128 addresses = 28 * 2120 addresses = 256 * 2120 addresses = 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses 210 = 1024 = ~103 = thousand 270 = ~1021 = sextillion 220 = 1,048,576 = ~106 = million 280 = ~1024 = septillion 230 = ~109 = billion 290 = ~1027 = octillion
240 = ~1012 = trillion 2100 = ~1030 = nonillion 250 = ~1015 = quadrillion 2110 = ~1033 = decillion 260 = ~1018 = quintillion 2120 = ~1036 = undecillion USC CSCI 201L 7/31 IPv4 Classes Network numbers are managed by ICANN The Internet Assigned Numbers Authority (IANA) was founded by USC/ISI in 1976 by Jon Postel and transferred to ICANN in 1998
ICANN was founded primarily to take over control of IANA USC CSCI 201L 8/31 IPv4 Special Addresses USC CSCI 201L 9/31 Finding Your IP Address Open a command line and type ipconfig in Windows ifconfig in Mac or Linux
USC CSCI 201L 10/31 Routing Routing is the process of sending data from one computer to another Routers use two algorithms Distance Vector and Link State The specifics of those algorithms are outside the scope of this lecture USC CSCI 201L 11/31 Routing
Source Destination USC CSCI 201L 12/31 Finding a Route This is a very complicated process, but running tracert (Windows) or traceroute (Mac, Linux) from a command line or terminal will show you all the routers visited from your computer to a destination USC CSCI 201L
13/31 Trans-Oceanic Pipelines USC CSCI 201L 14/31 Trans-Oceanic Pipelines Microsoft and Facebook finished MAREA, a 4000 mile long transatlantic communication cable, transmitting 160Tb/sec, connecting Virginia to Spain around 1700 feet below the surface, in February 2018 USC CSCI 201L
15/31 Satellite Communication USC CSCI 201L 16/31 Domain Name System (DNS) Some servers can be identified by a hostname and domain name An example would be www.usc.edu www is the hostname (or an alias for a hostname) usc.edu is the domain name To find the IP address of a hostname/domain name combination
from a command line, run ping or nslookup from a command line or terminal USC CSCI 201L 17/31 DNS Namespace The hostname/domain name combination will be mapped to an IP address through DNS servers DNS is a hierarchical domain-based naming scheme implemented through a distributed
database system for implementing DNS was conceived at USCs ISI and managed there until 1998 DNS is now managed by ICANN USC CSCI 201L 18/31 Actual DNS Records USC CSCI 201L 19/31 Ports Since more than one networked program can run
on a computer at the same time, we need a way to uniquely identify them Ports allow us to do just that A client application will specify the port on the server with which to communicate, and that uniquely identifies the server application A port is in the range from 0 to 65535 (16 bits) 0-1023 (inclusively) are reserved for well-known applications, so root or administrator access is required to run an program on a port in that range 1024-49151 (inclusively) are registered ports and can be used by any application 49152-65535 are dynamic or private ports and are typically used by the operating system when an application needs to pass an application off to a non-registered port USC CSCI 201L
FTP data FTP control SSH Telnet SMTP DNS HTTP IMAP HTTPS There are many others, but these are some of the more popular ones USC CSCI 201L 21/31
Public and Private IP Addresses Public IP addresses are able to be seen by any computer in the world and are required for communicating on the Internet Private IP addresses are typically secured behind a firewall Private IPv4 addresses are in the following ranges Class A Private: 10.0.0.0 10.255.255.255 20=1 network with 224 addresses Class B Private: 172.16.0.0 172.31.255.255 24=16 networks with 216 addresses
Class C Private: 192.168.0.0 192.168.255.255 28=256 networks with 28 hosts on each network Private IP addresses must use NAT (see next slide) if accessing the Internet because private IP addresses cannot communicate outside local networks IPv6 doesnt have a need for private IP addresses (why?), but it still could use them if desired USC CSCI 201L 22/31 NAT Network Address Translation (or IP Masquerading)
allows a computer to have a private IP address Private IP addresses are not able to be accessed by hosts outside of the local network A NAT server (usually implemented in a router) substitutes its own public IP address in place of the computers private IP address The NAT server must maintain a NAT table that links the private IP address and TCP/UDP source port combination to the destination IP address Since the NAT servers public IP address has been substituted for the computers private IP address in the packet, the response from the destination computer will come back to the NAT server The port will let the NAT server know to which computer to forward the response USC CSCI 201L
23/31 NAT Example 20/31 Subnets Since network addresses are so scarce in IPv4, we can take a few bits away from the host address to make a subnet within a network To implement subnetting, the router needs a subnet mask that indicates the split between the network/subnet combination and the host The subnet mask will consist of all 1s followed by all 0s
255.255.255.0 = 11111111 255.255.255.2 = 11111111 11111111 11111111 11111111 11111111 00000000 VALID 00000010 NOT VALID The subnet mask can also be written using slash notation The number after the slash will represent the number of bits to be used in the subnet address This would correspond to the number of 1s in the subnet mask
255.255.255.0 could be written as /24 USC CSCI 201L 25/31 Subnets in IPv6 Subnetting exists in IPv6, but because there are so many bits in the IP address, we dont need to take bits from the host Bits 1-48 - Network address Bits 49-64 Subnet address Bits 65-128 Host address Slash notation is used to identify the number of bits used in the network and subnet, but regardless, there are always 264 hosts on every subnet
A /64 means there is no subnetting A /48 means there are 216 subnets available on that network This is the maximum number of subnets available on an IPv6 network USC CSCI 201L 26/31 Subnet Example #1 Assume a host has an IP address of 188.8.131.52 with a subnet mask of 255.255.255.192 (also written as 184.108.40.206/26) What is the network address? (i.e. what class IP address is this?) What is the subnet mask in binary? How many hosts can be in the subnet? 220.127.116.11= 255.255.255.192
01001010 01111101 01111111 01101000 = 11111111 11111111 11111111 11000000 Network Address this is a Class A address, so the first 8 bits are allocated for the network: 18.104.22.168 Subnet Mask in binary will have the first 26 bits as 1s with the last 6 bits as 0s # Hosts the last 6 bits are reserved for hosts, giving 26-2=62 host addresses for this subnet Remember that the address with all 0s and all 1s are reserved USC CSCI 201L 27/31 Subnet Example #2
To get the network/subnet address from an IP address and subnet mask, perform a logical AND operation between them 22.214.171.124 = 1000 1001 255.255.224.0 = 1111 1111 126.96.36.199 = 1000 1001 1110 0101 1111 1111 1110 0101 1001 1010 1110 0000 1000 0000
1101 1101 0000 0000 0000 0000 The network/subnet address is 188.8.131.52 This subnet mask provides 19 bits for the network address and 13 bits for the host address Another way we could have written the IP address with the subnet mask is 184.108.40.206/19 Note that the subnet mask can never contain fewer 1 bits than the number of bits in the network address Why does that make sense? USC CSCI 201L 28/31
DHCP Dynamic Host Control Protocol (DHCP) is used for a computer or router to automatically assign IP addresses and other network configuration (such as the gateway and subnet mask) to computers on the network These addresses can be private or public IP addresses Most routers assign private IP addresses, such as 192.168.1.101 Routers often have DHCP servers built into them USC CSCI 201L 29/31 Outline Networking Overview
IP Addressing DNS Ports NAT Subnets DHCP Test Yourself USC CSCI 201L Test Yourself For each of the following IP addresses and subnets, write out the IP address in binary, subnet mask in decimal and binary, subnet address in decimal and binary, and the range of IP addresses that can be assigned to hosts.
220.127.116.11/15 18.104.22.168/26 22.214.171.124/29 Explain why the following IP address/subnet combination does not make sense. 126.96.36.199/22 Why are ports needed for NAT? USC CSCI 201L 31/31
No change other than all atoms speed up More atoms would condense More atoms would evaporate More are gaseous KMT summary: Matter is made up of particles having negligible mass are in constant random motion (vibrate, rotate, translate) The particles...
Introduction to ns-2 Outline Part 1: model and simulate Internet traffic Part 2: an introduction to ns-2 What is ns-2 Fundamentals Writing ns-2 codes Wireless support Traces support and visualization Emulation Related work Part 3: trace-driven network simulation What is...
moon rotates . slowly once a month at the same time it is . revolving around the earth- once in 27 1/3 days. The moon shows progressively different phases as it revolves around the Earth. When the . moon is...
Climate Change (and You) Mark van Soestbergen ICBE UF BCN February 14, 2006 Carbon Dioxide Gasoline is 85.5% carbon Humans add about 25 billion tonne carbon dioxide to the atmosphere each year Summers will be scorchers Climate Change (and You)...
(Not sharing the grass,middlegoat teasing the younger one) Make puppets fromsocks, brown paper bags or. Write the script for their new version and act out the story with puppets. How did they solve the problem? ... Make a synonym wall...
9.6 Radiation safety in the radiopharmacy. 9.7 Product containment enclosures. 9.8 Shielding for radionuclides 9.9 Designing a radiopharmacy. 9.10 Security of the radiopharmacy. 9.11 Record keeping. Nuclear Medicine Physics: A Handbook for Teachers and Students - Chapter 9 - Slide...
Arial Trebuchet MS Humanst531 BT Times New Roman Wingdings Monotype Sorts ONC Template (Amanda Smith) PowerPoint Presentation Basis for Priority on Health IT Medical Errors Medical Errors from Lack of Information The Rising Costs The Rising Costs Industry and Commercial...
6) Identificar segmentos de mercado y segmentar el mercado en base a los atributos valorados por los consumidores. 7) Identificar los atributos o dimensiones relevantes de un producto o servicio. 8) Evaluar la efectividad publicitaria. Posicionamiento VI. Informe de Investigación...
Ready to download the document? Go ahead and hit continue!