networking and the internet lectures 17,18 dr. adam p. anthony

47
NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Upload: lionel-summers

Post on 25-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

NETWORKING AND THE INTERNETLectures 17,18

Dr. Adam P. Anthony

Page 2: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Overview

Tuesday: Computer Network Basics Physical Layer of the Internet Network Security Basics

Next Week: Data layer of the internet (World Wide Web) Types of internet data Technical Internet Protocols

Page 3: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

In the Beginning…

A typical computation setup involved one computer and one or more users

Then, computers dropped in price Sharing data is important

Shouldn’t have to pass around disks Put wires between the computers that

let them share data Combination of computers + wires (or

some other communication medium) = NETWORK

Page 4: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

About Abbreviations

Networking Systems require long phrases to describe components and protocols: “Carrier Sense, Multiple Access with

Collision Detection” Professionals grew tired of repeating

these tongue twisters constantly Most people resort to abbreviations:

CSMA/CD You WILL be tested on whether you know

these abbreviations!

Page 5: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Types of Networks

Local Area Network (LAN) Buildings, homes

Metropolitan Area Network (MAN) Larger areas, such as whole cities

Wide Area Network (WAN) Massive networking efforts connecting

computers across entire countries or the world

Page 6: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Network Topologies

Topology: sort of like a bird’s eye view of a network

Two parts to topology: nodes and edges In a network:

Nodes = computers, connection equipment Edges = connections between computers

and/or equipment Topology is not always determined by how

the layout ‘looks’ but by how the nodes connect to edges

Page 7: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Bus Network Topology

Similar to the bus inside a computer

All messages are relayed across the bus.

Every computer gets to read every message

Each message includes an address so that computers can ignore messages intended for others

Security Issues?

4-7

A network Hub is a piece of equipment that acts as a very short bus. It has little internal circuitry.

Page 8: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Star Network Topology

Center computer: has the task of relaying messages from one computer to another Called an Access

Point Neighbors don’t get

to ‘listen in’ on conversations

Difference between Bus/Star?

Advantages/ Disadvantages?

4-8

Page 9: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Communication Protocols

No matter the topology, we have multiple computers talking at the same time How do they keep messages straight?

Only send a message when the line is quiet If two computers send at same time, message is ruined

Ethernet uses Carrier Sense, Multiple Access with Collision Detection (CSMA/CD): Each computer waits a random amount of time, then re-

sends if the line is quiet WiFi uses Carrier Sense, Multiple Access with Collision

Avoidance (CSMA/CA) Simplest approach: ask the Access Point if it’s OK to

transmit (request/permit strategy)

Page 10: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Combining Homogeneous Networks Repeater

Does not discriminate as to where the message is going Takes two small busses, creates one big bus

Bridge Same as repeater, but blocks messages if they aren’t

addressed to anyone in the adjacent bus Lets 2 separate but compatible bus networks talk to

each other Switch

Same as bridge, but can connect multiple busses together

Analogy to a switch between several train tracks

Page 11: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

4-11

Building a large bus network from smaller ones

Page 12: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Routers and internets

BW has Ethernet connections (CSMA/CD), as well as WiFi (CSMA/CA) connections Different protocols can’t talk to each other!

Router Used to distribute messages between incompatible and/or

separate networks Each separate network gets its own router

internet (Lower-case i) Multiple incompatible or separate networks that are able to

pass messages to each other Routers know how to:

1. Communicate with their home network2. Communicate with other routers3. Locate an outside network, given an appropriate address

for a single computer

Page 13: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

4-13

Routers connecting two WiFi networks and an Ethernet network to form an internet

Page 14: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Process Communication Methods Client/Server Model

Two distinct programs that work together Client: what users at home use. Connects to the server. Server: provides data and services to the client Most of the work is done on the server

Peer-to-Peer Also two (or more) programs working together Different from client/server Both programs are identical but know how to work

together Examples: Skype, AIM, BitTorrent

Distributed Systems Multiple programs working collaboratively to solve a

single problem

Page 15: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

4-15

The client/server model compared to the peer-to-peer model

Page 16: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

What is the Internet?

A proper noun (always an uppercase I) Al Gore invented it (not really!)

Initiated by the U.S. Military for infrastructural reasons

Universities also involved for research purposes

Later expanded, commercialized It is an internet (lowercase i) on a really

large scale—world wide.

Page 17: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

The Internet: Physically

Big, less well-known companies establish rough, world-wide network (each bubble a router).

Same (or similar) companies establish regional networks; lease connections from Tier 1.

Road-runner, Baldwin-Wallace, WOW!, AT&T, Comcast, etc. lease connections from Tier 2You and I lease connections from Access ISP’s.

Page 18: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Internet Addressing

Any internet (including the Internet) needs an explicit addressing system Each and every computer needs a unique

and undisputable address Managed by the Internet Corporation for

Assigned Names and Numbers (ICANN) Independent, but internationally cooperative

not-for-profit company IP Address numbering system Domain Name registration

Page 19: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

IP Addresses

Every computer that has internet access—large or small—has been assigned unique number (or Address), given by their ISP

Current Version IPv4: 32-bit binary addressing system Dotted Notation:

192.168.1.1 Number represents one byte of the total binary

address

Page 20: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

The Internet: What Routers Do

USChina

•US user’s IP is 138.492.345.691•Makes request for connection to 645.204.183.221. How do we find it?•Extra connections:

•Economic Advantage•Speed Advantage•Reliability Factor

100.X.X.X –199.X.X.X

645.X.X.X

600.X.X.X – 699.X.X.X

645.204.X.X

645.204.183.221

Page 21: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

What is a Domain?

100.X.X.X –199.X.X.X

AT&T

•Once a computer is given an address, no other computer can have the same address•Example: AT&T might “own” all IP addresses that start with 100, up to addresses that start with 199

•They then sell them to lower-level customers

•The set of numbers an entity owns are called the entity’s domain•All communication with computers whose address starts with 100 up to 199 are controlled, directly or indirectly, by AT&T

Page 22: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

What is a Domain Name?

Text-Based replacement for an IP address Simple to implement:

keep a list of all known domain names (millions of them!)

Maintain a server (Domain Name Server, or DNS) that will give you an IP address if you give it a name

Sub-Domains Some companies will name portions of their

domain, even just single computers (servers) http://bb.bw.edu

Top-Level Domain (can also be .com, .gov, country-specific, among others)

Main Domain Name

Sub-Domain Name

Page 23: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Domain Name Servers

USChina

DNS??

http://www.zhaodaola.com.cn/

!! 645.204.183.221

Page 24: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Network Security Basics

Virus: Lives “inside” another legitimate program Won’t do anything until that program is executed by a user Once executed, will cause damage, then try to spread

Worm Like a virus, but it is a standalone program that exploits operating

systems to get installed and executed automatically Trojan Horse

Program that looks legitimate, but has a virus or a worm included in its code

Spyware Phishing Denial of Service

Making 1000’s of requests to a server until it crashes so nobody gets to use it

Page 25: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Network Protection Measures Firewall

Block connections based on certain rules: Software used Service requested Sophisticated pattern matching

Can be placed at the router (entry point to network) or on each individual computer

Proxy Servers “Middle Man” strategy—all messages go through one computer, keep

that computer secure May also act as a firewall

Encryption Use mathematics to make messages unreadable unless you have the

correct ‘key’ to decipher the message Legislation

Difficult to enforce because Internet is world-wide and actions may be legal in other countries.

Page 26: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

THE WORLD-WIDE WEB

Lecture 18

Page 27: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

What is the World Wide Web?

It is just a _single_ application that runs on the Internet

Other applications that run on the Internet include: Email Instant Message File Transfer Protocol (FTP)

It is the most popular Built on the idea of sharing, linking documents “Surfing the Internet” vs. “Surfing the web”

Commonly taken to have same meaning Technically speaking, more is done on the Internet

than just ‘surfing’

Page 28: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Hypertext

Anyone familiar with the internet is familiar with hypertext

Simple concept: within one document, allow for a method of referencing and accessing other documents Called a hyperlink Clearly, not limited to just the WWW

WWW = huge collection of inter-connected hypertext documents that are all accessible from the Internet

Hypermedia: term that recognizes that much of the web is no longer text but still has hyperlinks

Page 29: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Implementing Hypertext on the Internet

Remember, the Internet is just a network; a way for computers to communicate Nothing happens on the internet unless

someone writes and distributes a program that makes it happen

Tim Berniers-Lee Did not invent the Internet! Did invent the WWW Two components make WWW possible:

Hyper Text Transfer Protocol (HTTP) Hyper Text Markup Language (HTML)

Page 30: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Hyper Text Transfer Protocol

Client/Server protocol for finding, retrieving hypertext documents:1. Client: requests document from server

Most common client = web browsers

2. Server: responds to requests, initiates data transfer to client

3. Client: displays the downloaded data on the screen

Uniform Resource Locator (URL): Method for finding/linking to documents on

WWW (next slide)

Page 31: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Uniform Resource Locators

Optional: defaults may be used.

Page 32: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

More on URL’s

URL’s can be used to locate any file/service on the Internet, using any protocol

Most common is HTTP Many browsers don’t require you to type http:// at

the beginning, assuming that is what you wanted Others include:

FTP (File Transfer Protocol) SCP (Secure Copy Protocol) AFP (Apple Filing Protocol) SSH (Secure Shell)

More on this later!

Page 33: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

The Other Half: Hyper Text Markup Language

Hyper text Markup Language (HTML) has two purposes:1. Provide a method for linking to other documents2. Provide a simple method for giving a web page

rich formatting capabilities Is a type of ‘code’ that we can write using a

basic text editor HTTP client has a third job: read hypertext and

display the resulting document on the screen Sometimes called rendering

Page 34: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Internet Protocols

The Internet is a world-wide phenomenon, allowing people in different cultures with different computers communicate and share information with each other freely

This is only possible because of the wide-spread adoption of common communication and data protocols (sort of like languages)

Without these protocols, the Internet is not nearly as fascinating

Rare example where world-wide cooperation yields an amazing benefit

Page 35: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Process Layers

Page 36: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Internet Process Layers

Application: Constructs message with address

Transport: Chops message into packets

Network: Handles routing through the Internet

Link: Handles actual transmission of packets

Page 37: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Following a Message Through the Internet

Routers

Computers

Page 38: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

About Ports

Bottom 3 layers don’t care what is being transferred Top Layer (Application) does care

WMP doesn’t want HTTP data, IE doesn’t want video data Data can be given a port number

Each application gets its own port number Anything with a different port number is ignored

Some port numbers are unofficially standardized: HTTP browsers ‘listen’ to port 80 FTP: port 20 or 21 SSH: 22 Email: 25

Port numbers can be changed, blocked for security reasons URL’s can include a port: http://www.domain.com:1245

Page 39: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Process Layer (Internet) Protocols Link: CSMA/CD (ethernet) or CSMA/CA (wireless) Application: written by individual software

developers, but must be compatible with transport layer protocol

Transport: next slide Has to be compatible with the installed network

layer protocol (done as a package deal) Network: next slide

Has to be compatible with the installed link layer protocol (usually trivial—done on networking equipment)

Page 40: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

TCP/IP Protocol Suite

TCP: Transmission Control Protocol One implementation of the transport layer Verifies connection to destination before sending data Verifies receipt of each packet Offers flow and congestion control If these seem like a waste of time, use UDP, another

protocol which skips all of that IP: Internet Protocol

Defines the language routers use to talk to each other Biggest job: finding the fastest path between two addresses

Takes into consideration traffic and equipment malfunction TCP/IP identifies the whole suite, but there are many

protocols in the package besides TCP and IP!

Page 41: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Getting Started With HTML

No installation required! Create a new file with a .html extension Edit with notepad!

Or, download a better text editor. Many CSC students like notepad++

Once finished, just find the file and double click it to view it in a web browser If you’re not happy with the result, go back to

notepad and make changes Once 100% happy, you can upload it to a

web server and put it on the WWW

Page 42: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

HTML and Tags

A ‘Tag’ is a bit of text inside ‘<‘ ‘>’ Every tag has a start-tag and an end tag:

<body> </body>

All non-tag text in between a start tag and an end tag is ‘affected’ by that tag when rendered: The code: <b>This text is

bold-faced.</b> This text is not. Is rendered as: This text is bold-faced.

This text is not.

end tag has same text as start tag, but with a forward slash in front

Page 43: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Non-Displaying Tags

Some tags are for organizational purposes: <html>: indicates that this file is using the

hypertext markup language. </html> should be the last line in the code

<head>…</head>: section for non-displayed header information such as Title, author, keywords, style information, etc.

<body>…<body>: indicates the portion of the file that will actually be displayed by the browser

Page 44: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Text-Augmenting Tags:

Already learned about bold-font (<b>) Others:

<H1>, <H2>, <H3>, <H4>: decreasing levels for header text (titles, chapters, sections, etc.) Mostly affects size of text, but can have other effects

<i>, <u>: italic, underline <p>: start a new paragraph (skips a line) <small>, <big>: temporarily resize text

For more information: http://www.w3.org/html/wiki/Learn

Page 45: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Hyperlink and Image Tags

<a>: hyperlink tag Requires additional information, href:

<a href=“www.bw.edu”>Go to BW’s home page</a>

Renders as: Go to BW’s home page <img>: image tag

Has no end-tag (one of a few exceptions) Example: <img src = “myPic.jpg”> myPic.jpg needs to either:

Be in the same folder as the file Have a path included from the server’s top-level:

Src = “/images/random/myPic.jpg”

Page 46: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Lists

<UL>: Unordered list (bullet points) <OL>: Ordered list (numbered points) <li>: list item for both types of list

<UL> <li> 4 C. Flour</li> <li>1 C. Milk</li> <li>3 Eggs</li> <li>4 Tbs Sugar</li></UL>

•4 C. Flour•1 C. Milk•3 Eggs•4 Tbs Sugar

<OL> <li>Combine Flour, sugar</li> <li>Beat together Milk, Eggs</li> <li>Gradually stir milk mixture into flour mixture</li></OL>1. Combine Flour, sugar2. Beat together Milk, Eggs3. Gradually stir milk mixture

into flour mixture

Page 47: NETWORKING AND THE INTERNET Lectures 17,18 Dr. Adam P. Anthony

Common, but advanced features Know what these are for now; in Web

programming you’ll learn how to use them: Tables: organizing data into blocks of cells XML: eXtensible Markup Language

Make up your own tags, write programs that interpret/render tags in any way you like

Very popular for data representation, storage Cascading Style Sheets (CSS):

Set up ‘default’ styles including backgrounds, colors, fonts, etc.

Used to create a uniform, site-wide template for all pages