41
CSC 110 - Intro. to Computing Lecture 23: Networks

CSC 110 - Intro. to Computing Lecture 23: Networks

Embed Size (px)

Citation preview

Page 1: CSC 110 - Intro. to Computing Lecture 23: Networks

CSC 110 -Intro. to Computing

Lecture 23:

Networks

Page 2: CSC 110 - Intro. to Computing Lecture 23: Networks

Announcements

Quiz #5 on Thursday Homework #6 (on networks) due Friday

Quiz #6 (also on networks) will be next week

Page 3: CSC 110 - Intro. to Computing Lecture 23: Networks

OSI Reference Model

Open Systems Interconnect Reference Model Established by International Organization for

Standardization (ISO) Models how computers connect in networks

Allows different systems (e.g., Windows and Macs) to connect on a single network

Proprietary networks may not use OSI Reference Model But then may be unable to connect to other networks!

Page 4: CSC 110 - Intro. to Computing Lecture 23: Networks

Using OSI Reference Model

Each layer is independent of others New technologies created at

appropriate layer New IM client need

not consider how computers areconnected

New wireless technologies does not consider applications

Page 5: CSC 110 - Intro. to Computing Lecture 23: Networks

Physical Layer

You are here

Page 6: CSC 110 - Intro. to Computing Lecture 23: Networks

Physical Layer

Transmits 0s & 1sOnly deals with transmissions of 0s and 1s

0 1

Page 7: CSC 110 - Intro. to Computing Lecture 23: Networks

Physical Layer Examples

Examples of the physical layerDial-up connection: modem’s phone-lineDSL/Cable: cable from computer to modem;

cable from model to wallEthernet: cable from wall to computer

Page 8: CSC 110 - Intro. to Computing Lecture 23: Networks

Physical Layer Examples

“Physical” name can be misleadingMay not involve physical items such as wireless using radio signals to/from computer

0 1

Page 9: CSC 110 - Intro. to Computing Lecture 23: Networks

Data Link Layer

You are here

Page 10: CSC 110 - Intro. to Computing Lecture 23: Networks

Data Link Layer

Physical layer transmits 0s and 1sDoes not know or care if other machine is on

0

Page 11: CSC 110 - Intro. to Computing Lecture 23: Networks

Data Link Layer

Ensures data received by other machineHas no clue how data is transmitted, however

0 0Physical Layer

Page 12: CSC 110 - Intro. to Computing Lecture 23: Networks

Physical & Data Link Example

Page 13: CSC 110 - Intro. to Computing Lecture 23: Networks

Network Layer

You are here

Page 14: CSC 110 - Intro. to Computing Lecture 23: Networks

Network Layer

Assumes connections between machines workNo problem; handled by model’s lower levels

Network layer handles local-area networkTypically referred to using its acronym: LANLAN is connects relatively small number of

“physically” interconnected machines

Page 15: CSC 110 - Intro. to Computing Lecture 23: Networks

LAN Topologies

Defines how machines in LAN connected 3 dominant topologies exist

Each has advantages and disadvantagesNo single solution works in all situations

Ring topology – like a traffic rotary/circle Star topology – like flying on an airline Bus topology – similar to computer buses

Page 16: CSC 110 - Intro. to Computing Lecture 23: Networks

Ring Topology

Each machine connected to 2 others All data flows in one fixed direction

Source0

Target0

1

1

Source1

Target1

1

1

Page 17: CSC 110 - Intro. to Computing Lecture 23: Networks

Ring Topology

Hard to add new nodes (computers) Can be very slow

Source

Target

1

1

1

1

1

1

Page 18: CSC 110 - Intro. to Computing Lecture 23: Networks

Star Topology

Machines connected to center node All data flows must through this machine

Source

Target

1

1

1

Page 19: CSC 110 - Intro. to Computing Lecture 23: Networks

0

Star Topology

Fairly quick & easy to add new machines Need to be careful to handle collisions

Source1

Target1

1

1

1

Source0

Target0

0

0

Oops!!

Page 20: CSC 110 - Intro. to Computing Lecture 23: Networks

Bus Topology

Machines connect to central bus Data flows to every machine on the bus

Source

Target

11

1

1

1

1

Page 21: CSC 110 - Intro. to Computing Lecture 23: Networks

Bus Topology

Easiest network to build, can be fastest But needs sophisticated collision handler

Source1

Target1

11

1

1

1

1

Target0

Source0

BigOops!!!

Page 22: CSC 110 - Intro. to Computing Lecture 23: Networks

Transport Layer

You are here

Page 23: CSC 110 - Intro. to Computing Lecture 23: Networks

Transport Layer

Transport layer deals with internetworking Internetworking – Communication between

networksWhen we combine LANs we call the resulting

structure a WAN (wide-area network)

Page 24: CSC 110 - Intro. to Computing Lecture 23: Networks

Wide-Area Network

Gateway – computer in a LAN that connects to a different LAN

Canisius.Buf

Canisius.Amh

Page 25: CSC 110 - Intro. to Computing Lecture 23: Networks

Sidebar: internet vs. Internet

an internet –network which joins multiple LANs togetherRarely used synonym for WAN

the Internet – global network created by joining many networks together using IP for transport layer IP (Internet Protocol) defines how each computer

can be uniquely identified and how to pass information across networks

Page 26: CSC 110 - Intro. to Computing Lecture 23: Networks

Internet

Internet relies on backbone of high-speed connections to carry traffic between networksBackbone supported by AT&T, IBM, & others

Routing data between networks relies upon knowing computer’s IP address IP software breaks up data and routes it across

networksEach portion of data may be routed differently

Page 27: CSC 110 - Intro. to Computing Lecture 23: Networks

Two Forms of IP Address

NumericalUsually written as four 8-bit numbersTypically something like 192.28.12.1Easiest for computers to use

HostnameUsually written as three or four words separated by a

“.”Often something such as aries.canisius.eduEasiest for humans to use

Page 28: CSC 110 - Intro. to Computing Lecture 23: Networks

IP Address

Consider aries.canisius.eduEach of these words helps identify the

computer in question Similar setup exists for numerical

addresses

Page 29: CSC 110 - Intro. to Computing Lecture 23: Networks

Top-Level Domains

The last word of the hostname (edu) is its top-level domain (TLD) name

Page 30: CSC 110 - Intro. to Computing Lecture 23: Networks

Country Codes

Most TLDs controlled by a US-regulated corporation

Other countries maintain own TLD

Page 31: CSC 110 - Intro. to Computing Lecture 23: Networks

Domain Name

Last two words of hostname are the domain nameExample domain names: canisius.edu, cnn.com,

whitehouse.gov, wendys.ca, google.com, google.co.uk

Each domain name is unique to the organizationMust be registered yearly through central registrar

for the TLD

Page 32: CSC 110 - Intro. to Computing Lecture 23: Networks

Computer Name

First word of hostname is the computer nameComputer names unique within a domain

Only one computer named www at Canisius

Names may not be unique between domains Lots of computers on Internet named www

Page 33: CSC 110 - Intro. to Computing Lecture 23: Networks

Domain Name System

The domain name system (DNS) translates hostnames into numeric IP addressesDNS is an example of a distributed database If a can server resolves the hostname, done If not, server asks another DNS serverEvery TLD has 1 – 6 root DNS servers which

contain all records If necessary, can eventually ask one of these

Page 34: CSC 110 - Intro. to Computing Lecture 23: Networks

OSI Reference Model so far

Only discussed moving data between computersUsing/interpreting data occurs at higher levels

Page 35: CSC 110 - Intro. to Computing Lecture 23: Networks

Back to the Network Layer

Common question is to find how long network would take to process requests

For ring topologies, this is simpleRemember to move all data at the same time

Page 36: CSC 110 - Intro. to Computing Lecture 23: Networks

Ring Topology

All data flows in one fixed direction All machines can send data at once

Source0

Target0

1

1

Source1

Target1

1

1

Page 37: CSC 110 - Intro. to Computing Lecture 23: Networks

Star Topology

Central node can receive from only one machine at a time

Can send & receive data at same time, however

Source

Target

1

1

1

Page 38: CSC 110 - Intro. to Computing Lecture 23: Networks

Star Topology Timing

Nodes in star network begin by sending data Collision occurs when multiple nodes send data

to center node at same time Bad news: central node cannot differentiate all

the different data Good news: central node serves as traffic cop

Orders nodes by their ID number Requests data from first node at first time unit after

collision Reads new data and sends out results in following

units

Page 39: CSC 110 - Intro. to Computing Lecture 23: Networks

0

Star Topology

Since 3 < 4, handle data from Node #3, then Node #4 (then Nodes #5 - 2000, as needed)

Node #4

Node #2

1

1

1

Node #3

Node #2000

0

0

Page 40: CSC 110 - Intro. to Computing Lecture 23: Networks

Bus Topology Timing

No central node to determine the order node should send data after a collision

Nodes use simple heuristic to avoid further collisions Lots of different heuristics exist, but class uses simple

one After collision, each node waits number of time units

equal to its node ID number before send data Note: this may result in some wasted time units

(unless more traffic is generated)

Page 41: CSC 110 - Intro. to Computing Lecture 23: Networks

For Next Lecture

Read chapter 16 Do homework #5 Get your service learning finished ASAP!

Start polishing your essay before its due