CS-‐51 Introduction to Computer Networking Spring 2016

CS-­‐51
Introduction to Computer Networking
Spring 2016
Instructor: David Millsom
[email protected]
CS-­‐51 Week 1 -­‐ Administrivia
• Contact
[email protected]
• (650) 223-­‐3312
• (650) 714-­‐1281
Website: https://web.stanford.edu/group/csp/cs51
• Grades
• Options N/G, P/F, Grade
• P/F
• Attendance participation
• Grade
• Attendance
• Final paper
• Questions are on the w eb site. More might be added as appropriate.
• I Recommend taking class grade
• OK to change mind late in the course.
• OK to make multiple attempts to answer final questions
CS-­‐51 Week 1
• Reference Material
• I use Comer, Douglas E., ”Computer Networks and Internets” for reference.
• Excellent text; expensive; dense and definitely authoritative; not necessarily practical in the sense that it defines good practice or relates to real world situations – a great reference book
• To keep if you are going deeper into networking
• I am also referring to Doug Lowe, “Networking for Dummies” • More approachable than Comer
• Broader coverage of field
• More practical – covers some Windows and Unix network applications
• can be used as a reference in many real-­‐world contexts
I also use and recommend Materials from www.computerhistory.org, Computer History Museum
1401 N. Shoreline Blvd.
Mountain View, CA 94043
CS-­‐51-­‐Week 1 • Who am I
• Techie, Network Architect, Real Time Data delivery, contributor to network infrastructure (Cisco)
• What am I teaching?
• Introduction to Computer Networking for non-­‐engineers
• Who is the course aimed at ?
• People without a technical background who are curious about what goes on ‘under the covers’
• Method: Develop ideas, concepts then describe how they are realized.
CS-­‐51 Week 1
• Class Objectives: To learn enough about principles and practices of networking to make you dangerous
• What does ‘dangerous’ mean?
• Understand the principles and practices?
• A ‘subversive’ idea that the internet an enabler of creativity once the fundamentals are understood –
paradox of inventions not realizing their potential because of lack of creativity The WWW is just one of an infinite number of possible inventions to use this media.
• E.g. email and the electron : computer center director, J.J. Thompson
• Why is it special? Speed, connects between to ‘intelligent’ entities
• Some history
• Useful insofar as it informs our understanding of today’s Internet. It helps to understand why the Internet did turn out differently.
CS-­‐51 Week 1
Week 1
History + building blocks
(Conceptual) Building blocks
Week2
Elaboration on Building Blocks
Address acquisition,
NAT, DHCP, ARP
Week3
Address Acquisition,
NAT, DCHP, ARP
Week4
Layering
Week5
Routers and Switches
Security
Week6
Web Service
Questions from final
Week7
Practical examples
Questions, answers.
DNS – Domain Name Service
Physical Media
CS51 – Week 1
The Internet does what?
Transports Data
encapsulated in Packets
Packets are binary - what is binary?
Communication
between Applications
Two main
kinds TCP,
UDP
Packets carried on
physical medium
1's and 0's
Unnderstand
physical layer
Apps Identifier Each Other
Using Port Numbers
Understand bandwidth
Need Ports and IP
addresses to define security
Define network
requirements
Understand
Gateway/Router
ISPs
Design
Home/Office
Network
Pre-­‐requisites for
Building/understanding home network.
Install Home Network
Understand NAT
DHCP ARP
CS-­‐15 Week 1
•Very Important
•There are no stupid questions
•Do not hesitate ask for clarification
•The person next to you probably wants clarification also
CS51 Week 1
Discovery:
•
•
•
•
•
•
Going round the class, what is everyone’s expectation, goal.
What is everyone’s knowledge.
Computer Terminology Quiz
Binary
Binary Number
IP address
CS51 Week 1
• Discovery, cont..
Packet
Computers (hosts)
Networks
Subnets
Ethernet
Layering
Digital recording, transmission
Optical Fiber
CS-­‐51 Week 1
• Our goal this week:
• Introduce vocabulary
• Develop a conceptual understanding of components the internet
• Set the stage for next week when we color in the conceptual framework with details
CS-­‐51 Week 1
The Internet
• What distinguishes it from other forms of communication ? Speed, data exchange is bi-­‐directional, between to ‘intelligent’ entities
• Some history – reveals the climate/emphasis that led to the implementation details
• The Internet is an impressive feat of engineering but it was not the first
• ARPANET
• Proprietary network architectures
• Mostly incompatible with each other e.g. DECnet, SNA
• Ultimate survivor of competing network technologies
• Benefited from momentum created by satisfying military needs, large body of researchers and engineers, experiment based. Stateful vs Stateless
CS51 – Week 1
Internet -­‐ Historical Perspective
• Timeline – modes of signal transmission
• Ancient Greece, 8000 BC – 1830 AD :
• “digital” signaling using semaphores
• 1830 – 1990 : telegraph – Morse code – between stations
• Discrete – ‘almost’ digital
• Three symbols: dot, dash, space
• 1877 – now : telephone – metallic + optical transmission lines – between people
• Originally analog, later digital
• 1900 – now : radio (later TV) – free to air
• Analog, now digital
• 1970 – now : the internet, at first using the phone system (copper) and later, fiber
• Digital
• Important distinction: Internet provides data transfer between algorithms/apps/programs
CS51 – Week 1
• Small numbers of big machines => point to point architecture OK => ARPANET architecture satisfies requirements:
• Efficient use of resources is driving force
• Remote login
• Remote file sharing
• Sharing of expensive resources.
CS51 – Week 1
• Large numbers of smaller machines =>
• Fully meshed topology is unworkable.
• i.e. n(n-­‐1)/2 connections untenable
• Network must be robust, have no single points of failure
• i.e. must be able to tolerate hosts coming and going without causing major network interruptions
• Network must be able to rapidly recover from interruptions to network infrastructure
• This is also said to be a Department of Defense requirement. i.e. the network should survive a nuclear attack but this claim has been refuted. See http://en.wikipedia.org/wiki/ARPANET
CS-­‐51 Week 1
• HISTORY, cont ..
• 1970’s – 1980’s Competing standards
• TCP/IP – i.e. the Internet’s protocols
• OSI Reference Model
• Attempt to define standards without fully understanding the engineering implications.
• TCP/IP was the successful survivor of competition to define a universal network architecture.
• Partly driven by military needs, foundational research sponsored by DARPA (DARPA Defense Advanced Research Projects Agency – funded by military)
• STATELESS vs. STATEFUL – what does it mean? How does this affect the architecture and behavior of the network?
CS-­‐51 Week 1
Some statistics – How Big
Internet Users – 2000 = 360,985,492
Internet Users Now = 3,338,723,000
Population of Earth = 7,264,623,793
Number of IPv4 addresses = 4,294,967,296
What does the Internet actually look like?
There are many representations based on physical topology, address allocation, geographical layout.
WikiMAP
Many different devices: Main frames, work stations, desk tops, portable=laptops, notepads, phones.
IPV4 uses 32-­‐bit addresses, can directly refer to 4,294,967,296 addresses.
IPV6 uses 128-­‐bit addresses, can directly refer to 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses
CS-­‐51 Week 1
• Statistics cont/…
• Not all addresses are available
• That does not matter. The space is still very big.
CS-­‐51 Week 1
Motion
CS-­‐51 Week 1 Motion
Video
Video
& Qxx
10110..1
10110..1
& Qxx
Text
Text
Anything
Else
Anything Else
CS-­‐51 Week 1
• Components of Internet
Q: What basic function does the internet provide ?
A: The Internet provides a mechanism for data exchange between application programs in discrete units called packets. It provides transport between networks. But what is a network ?
Node B
Node A
App
App
App
App
App
App
A Simple Network
CS-­‐51 Week 1
Shared bus
Star Topology
Point-­‐to-­‐point
Ring Topology (e.g. FDDI)
CS-­‐51 Week1
• How is the data transmitted between applications organized?
• All data is reduced to binary form and sent in data units called packets.
App 1
Packet 3
Packet 2
Packet 1
App 2
CS-­‐51 Week 1
• What is binary ?
• 1’s and 0’s
• Why use it
• How is information converted to binary?
• Text, D-­‐A converter (sound), raster scan (video), sense data (motion), textual printer commands (printer)
• Binary and decimal numbers
• IP addresses
• 32 bit strings of 1’s and 0’s
• Define the maximum number of nodes that can be addressed
CS-­‐51 Week1
The Post Office vs The Internet
Component
Post Office
The Internet
Unit of transmission
Envelope
Packet
Medium
Paper
Electrical, optical, radio links
Symbols
Written text, CD’s, etc 1’s and 0’s
Address -­‐ origin
Return Address
Source Address
Address -­‐ destination
Receiver’s address
Destination Address
Sender/Receiver
Person
Application Prog.
Sender/Receiver Location
Building
Computer/Host
Receiver
Recipient’s name
Destination Port
Sender
Sender’s name
Source Port
CS-­‐51 Week 1
• Applications in the same node can exchange packets without them leaving the computer.
• When packets are exchanged between applications on separate computers, they must exit and enter via a network interface often called a NIC (Network Interface Card) card and they are conveyed by the local network (LAN) to another host or gateway.
CS-­‐51 Week 1
• When the packet destination is on another network, it is forwarded to a special node called a gateway/router which has access to other networks. This gateway/router forwards the packet in a direction which advances it towards its destination.
CS51 – Week 1
• Inter : between, net : network
• It is a network of networks
• It provides a pathway from one network to another using an agreed upon protocol suite called TCP/IP
• Everything is a network:
• Hosts (nodes) are connected to a network
• Networks are connected to other networks using ROUTERS
• Every interface connected to a network has a unique address consisting of (network number, node number)
CS51 – Week 1
• IP addresses
• Each interface in each node has one
• Often shared – discuss later
• 32 bits long – theoretically allows 2^32 nodes
• Some space allocated for other purposes
• Multicast, • unassigned
CS-­‐51 Week1
• Two networks connected by a router
H
H
H
H
H
H
H
H
H
Router
Network 1
Network 2
H
CS-­‐51 Week 1
• How does the Internet know where to forward packets?
• Each interface connected to the network has an internet address (an IP address) consisting of two numbers:
• The number of the network
• The number of the destination host in the network.
CS-­‐51 Week 1
• Three networks interconnected
H
H
H
H
H
H
H
H
H
Router
Network 2
Network 1
H
H
H
H
H
H
CS-­‐51 Week 1
• Walk through sending a packet.
• Default gateways
• Note that since there can be more than one application accessing the network more information that just the (network,host) address s needed. That is why ports are used.
CS-­‐51 Week 1
• Port numbers
• Why are they needed ?
• Remember applications?
• Applications talk to other applications
• They can even talk to themselves.
• Special IP address allows this
CS-­‐51 Week 1
• Tools
•
•
•
•
•
Tcpdump
Ping
Traceroute
Ipconfig (windows)
Ifconfig (unix, mac os)
• Homework
• Try out the tools
End Week 1
• End of week 1