1 chapter 8 networking. 2 introduction a network is an interconnected system of cooperating...

23
1 Chapter 8 Networking

Upload: erika-sullivan

Post on 17-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

1

Chapter 8 Networking

Page 2: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

2

Introduction

A network is an interconnected system of cooperating computers

Common network terminology

How networks are built

How to talk to other people on the network

(communication)

How to use other computers on the network

(resource sharing)

Page 3: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

3

Building a network

Ethernets most common implementation of LAN developed at Xerox

PARC.

How does it work ?

1. Each computer has an Ethernet card connected to the wire

2. A computer broadcasts a message onto the Ethernet together with

header and trailer information that contains destination address. Only

the Ethernet card whose address matches the destination address

accepts the message.

3. When a collision occurs, they try again.

Page 4: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

4

Building a network

Routers

a device that links together

two or more networks

automatically routes

incoming message to the

correct network.

Router

LAN

LAN

Page 5: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

5

Building a network

Gateways

high-capacity router to connect LAN to

wide area network

LAN Gateway Internet

Page 6: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

6

Internet

Internet

the large collection of cooperating networks which uses

TCP/IP protocol.

Internet Protocol(IP)

a protocol about the addressing scheme

Transport Control Protocol(TCP)

a protocol about the way that large messages are sent as

several smaller messages and then reconstructed at the

destination

Page 7: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

7

Internet

Internet address of our department

each computer on the Internet has its own IP address.

hardware independent address

cs.sookmyung.ac.kr : 203.252.206.1

pl.sookmyung.ac.kr : 203.252.195.218

cc.sookmyung.ac.kr : 203.252.201.4

cslinux2.sookmyung.ac.kr : 203.252.195.17

Page 8: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

8

Users

Listing users users rusers -a {host}* display a list of users on your local host/ network

More user listings who [am i] rwho display a list of every user on local host.

Personal datafinger {userId}* display information about a list of users including

on a remote host

Page 9: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

9

Communicating with Users

Sending a line at a time write userId [tty]

copy its standard input, one line at a time, to the terminal associate with userId

Interactive conversationstalk userId [tty]

talk to a user on the Internet via a split-screen interface.

Messages to everyonewall [ fileName ]

copy its standard input to the terminals of every user on the local host

Page 10: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

10

Communicating with Users

%write chang

message to chang

^D

% talk chang@cs

Messge from [email protected]: connection requested by u98…@cstalk: respond with: talk u98…@cs%talk u96…@cs

Page 11: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

11

Distributing data

Copying files

ftp -n [ hostName ]

manipulate files and directories on both your local host and a remote host

ftp ccConnected ..

Name ..

Password …

ftp>

Page 12: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

12

Distributing data

Command Meaning

!command Executes command on local host

help

lcd change current local working directory

cd change current remote working directory

ls remoteDirectory list current remote working directory

pwd print current remote working directory

open hostName [ port ] a connection to the host with name hostName

close shuts down the current connection

get remoteFile [ localFile ] copy the remote file to the local file

put localFile [remoteFile] copy the local file to the remote file

quit

Page 13: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

13

Distributed Processing

Remote login

rlogin -ec [-l userId] hostName login into the remost host hostName

Remote connection

telnet [host [port] ]

establishes a two-way connection with a remote port.

Page 14: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

14

Distributed Processing

Executing remote commands

rsh [-l userId] hostname [command]

remote execution

create a remote shell on the host hostName to

execute command

access control

list hostnames in ~/.rhosts of the remote host

Page 15: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

15

Distributed Processing

% rlogin cs

% rlogin -l chang cs

% rsh cs

% rsh cs ls

% telnet cs

Command Meaning

open host Connect to host with optional port specifier

close close current connection

qut exit telnet

z suspend telnet

? print summary of telnet commands

Page 16: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

16

World wide web

Mosaic started at UIUC the first web browser available on Intenet

Netscape can be used as in the PC need X-window to display

Page 17: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

17

X-window

Client/Server 기반 윈도우 시스템

X server 와 X client

네트워크 기반 윈도우 시스템

X server 와 X client 가 같은 호스트 혹은

다른 호스트에 위치할 수 있다 .

Page 18: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

18

X-window 의 동작 과정

X server

X client

X client

X client

TerminalScreen

Mouse Keyboard

Display

X-window

X applications

Page 19: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

19

X-window 의 동작 과정

Display

consists of a terminal screen, a keyboard, and a mouse

X server

handles all the input and output of data at the display

one X server to each display

보통 X-window 는 X server 를 의미함 .

Page 20: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

20

X-window 의 동작 과정

X client

디스플레이의 사용자와 대화하는 X 응용 프로그램

X client 의 예

- xterm, xclock, netscape, ….

출력을 X server 에 요청

X server 로부터 입력을 받음

- 마우스 클릭 , 윈도우 이동 , 키보드 누름 , …

Page 21: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

21

X applications

What is an X application ?

Application program runnable on X-window

xterm, hanterm, xcalc, xfig, ghostview, xfm, …

Where are X applications ?

/usr/X11R6/bin on Linux

/usr/openwin/bin on Solaris

Page 22: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

22

Display on X-window

Setting display

setenv DISPLAY hostname:0

setenv DISPLAY 203.252.196.78:0

Display on remote X-server

setting display and execute X-applications or

execute X-applications with -display option

xclock -display hostname:0

Page 23: 1 Chapter 8 Networking. 2 Introduction  A network is an interconnected system of cooperating computers  Common network terminology  How networks are

23

Access control on X-window

Access control

control access to X-server

xhost +hostname

added to the list allowed to connect to the X

server.