Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides...

89
zef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert Koretsky, Syed A. Sarwar, 2005 Addison Wesley

Transcript of Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides...

Page 1: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

1

expanded by Jozef Goetz, 2009

Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert Koretsky, Syed A. Sarwar, 2005 Addison Wesley

Page 2: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

2Objectives You may ignore slides from 66 to the

end.

To describe networks, the Internet and internetworks and explain why they are used

To discuss briefly the TCP/IP protocol suite, IP addresses, protocol ports, and internet services and applications

To explain what the client-server software model is and how it works

To discuss various network software tools for electronic communication ,

1. remote login, 2. file transfer, 3. remote command execution , and 4. status reporting

To describe briefly the secure shell

To cover the commands and primitives

Page 3: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

3Computer Networks and Internet works

When two or more computer hardware resources are connected they form a computer network

1. Local area Networks (LANs)2. Metropolitan area networks (MANs)3. Wide area networks (WANs)

An internetwork is a network of networks

Page 4: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

4A brief history of the Internet

• ARPANET (50s and 60s, some universities)• NSFNET (late 70s, all universities)• TCP/IP (invention ’74) became the official

protocol in 1983. When NSFNET and the ARPANET were connected, the

growth became exponential Many regional networks (Canada, Europe, the Pacific) joined

up In mid-80s people began viewing the collection of

networks as the Internet The glue that holds the Internet together is the

TCP/IP reference model and TCP/IP protocol stack

• ANS (Advanced Networks and Service) by MERIT, MCI, and IBM took over NSFNET in 1990 as ANSNET• ANSNET sold to American Online in 1995.

Page 5: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

5The ARPANET The original ARPANET design.

IMP - Interface Message Processor

Page 6: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

6The ARPANET

Growth of the ARPANET (a) December 1969. (b) July 1970. (c) March 1971. (d) April 1972. (e) September 1972.

Page 7: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

7

NSFNET The NSFNET backbone in 1988.

Page 8: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

8

Internet Usage Machine is on the Internet if

it runs the TCP/IP protocol stack, has an IP address, and can send IP packets to all the other machines on

the Internet

Millions PC can call up an Internet service provider using a modem, be assigned a temporary (dynamic) IP address, and send IP packets to all the other hosts

The ch-r of the network was changed from an academic and military playground to a public utility

Page 9: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

9

Internet Usage Traditional applications (1970 – 1990)

E-mail News

newsgroups devoted to different topics)

Remote login Using telnet, WinSCP, rlogin, ssh

programs

File transfer Using FTP programs

Page 10: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

10What is the World Wide Web?

From the Free Online Dictionary of Computing:

"An Internet client-server hypertext

distributed information retrieval system." The Web is not a network. The Web is not the Internet itself. The Web is not a proprietary system like AOL. Instead the Web is a system of clients (Web browsers) and servers that uses the Internet for its data exchange.

On the WWW everything (documents, menus, indices) is

represented to the user as a hypertext object in HTML format. Hypertext links refer to other documents by their URLs.

These can refer to local or remote resources accessible via FTP, Gopher, Telnet or news, as well as those available via the http protocol used to transfer hypertext documents.

Page 11: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

11

11

History of the Internet and World Wide Web

WWW Allows computer users to locate and view

multimedia-based documents Introduced in 1991 by Tim Berners-Lee

Developed information system based on hyperlinked text documents

HyperText Markup Language (HTML) Developed communication protocols as

backbone

WWW today Makes info instantly accessible Merges computing and communication

technologies

Page 12: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

12

12

Internet Usage In ’91 Tim Berners-Lee at CERN

(Switzerland) invented the WWW (World Wide Web)

to a hyperlink (HTTP) access to documents brought millions of nonacademic users

In ’93 development of Mosaic by Marc Anderson, the first graphics-based web browser at NCSA This created an interface to the Web that was easy

to use – just point and click instead of remembering text commands

This set the stage for easier information sharing and retrieval

Page 13: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

13Architecture of the Internet.

Overview of the Internet. Signal is transferred to the ISP’s (Internet Service Provider)

POP – Point of Present (located in the tel. switching office) and injected into the ISP’s regional network

from this point the system is fully digital and packet switched

A NAP (Network Access Point) is a room

full of routers, at least one per backbone

A LAN in the room connects all the routers,

so packets can be forwarded from any backbone to any other backbone

Page 14: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

14Collection of Subnetworks

The Internet is an interconnected collection of many networks.

SNA: Systems Network Architecture

-IBM's mainframe network standards

Page 15: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

15X.25 Networks• Developed during 70's. 1st public data network interface between public packet-switched networks and customers.

Data packet has a 3-byte header a 12 bit connection #, a packet sequence #, an acknowledgment # etc. and up to 126 bytes of data

• Operate at 64 Kbps, so are very slow and becoming outdated. However there are still many of them in operation.

• Connection oriented:

Uses:• Switched Virtual Circuit

established when the first packet is sent circuit remains for duration of session providing in-order

delivery, and flow control.• Permanent Virtual Circuit

established by agreement between the customer and the carrier:

Like a leased line

Page 16: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

16Frame Relay• Takes advantage of modern high-speed reliable

digital phone lines.

Connection oriented.Property:

In-order delivery, no error control, no flow control,

akin to LAN

• This allows simple protocols with work done by user computers rather than by the network.

Runs at 1.5 Mbps with few features.

• Customer leases a permanent virtual circuit between two points.

this "virtual leased line" means that the wire is shared with other users at a great price reduction.

Page 17: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

17

Broadband ISDN and ATM

Connection oriented.• ISDN (Integrated Services Digital

Network) offers cable, video on demand, e-mail, etc.

• ATM (Asynchronous Transfer Mode) early ’90s is underlying Mechanism inside the tel. system. Transmits in small fixed-size cells. Not

synchronous. Was supposed to merge voice, data, cable TV, telex,

telegraph etc. into a single integrated system – it didn’t happen

Alive, used by carriers for internal transport

Page 18: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

18

(a) Computer Networks and (b) Internetworks

R – routerH - host

Page 19: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

19Why Computer Networks and Internetworks?

Sharing of computer resources computers, printers, plotters, scanners, files and

software

Network as a communication medium inexpensive, fast, reliable

Cost efficiency large computing power available

Less performance degradation if one computer crashes, the remaining ones

are still up

Page 20: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

20Network Models

International Standards Organization’s Open System Interconnect Reference Model (ISO’s OSI 7-Layer Reference Model)

The TCP/IP 5-layer Model Used in the Internet

Page 21: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

21

Network Modelswith approximate mapping between the two

•The first 4 layers deal with the communication between hosts.

•The 5th layer deals with the Internet services provided by various applications.

•Most of the 1st layer is handled by hardware (communication medium used, attachments of hosts to the medium).

•The rest of the 1st layer and all the 2nd layer is handled by the (Network Interface Card) NIC card in a host.

•Layers 3 and 4 are fully implemented in the operating systems kernel on most existing systems.

•The first 2 layers are network hardware specific, the others are work independently of the physical layer

Page 22: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

22Reference Models

Protocols and networks in the TCP/IP model initially. The Application layer contains all of the higher-

level protocols – telnet - virtual terminal protocol – FTP – file transfer – SMTP – e-mail – DNS - Domain Name System – NNTP - Network News Transfer Protocol – HTTP - Hypertext Transfer Protocol

Page 23: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

23The TCP/IP Protocol Suite

As a user you can see the application layer from applications and utilities:

1. Web browsing,

2. file transfer, 3. remote login4. etc.

1st -2nd layer is handled by the Network Interface Card -NIC card

Page 24: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

24The TCP/IP Protocol Suite IGMP - Internet Group

Management Protocol handles multicasting

ICMP - Internet Control Message Protocol

Handles errors and control messages.

Protocol is used to forward information, primarily error messages.

To see if a computer is running, the `ping' program sends an echo request, which is part of ICMP.

ARP -Address Resolution Protocol is a protocol for mapping an Internet Protocol IP address to a physical machine address that is recognized in the local network.

For example, in IP Version 4, the most common level of IP in use today, an address is 32 bits long.

In an Ethernet LAN, however, addresses for attached devices are 48 bits

1st -2nd layer is handled by the Network Interface Card -NIC card

RARP - Reverse Address Resolution Protocol is a protocol by which a physical machine in a LAN can request to learn its IP address from a gateway server's Address Resolution Protocol (ARP) table or cache.

A network administrator creates a table in a LAN’s gateway router that maps the physical machine (addresses) into IP addresses.

Page 25: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

25Transport Layer: The TCP and UDP The purpose of the transport layer is to

transport application data from your machine to a remote machine and vice versa

User Datagram Protocol (UDP) is a connectionless protocol, offers the best effort delivery service

Transmission Control Protocol (TCP) is a connection-oriented protocol that establish a virtual connection with the destination before transmitting data, thus the TCP leads

completely reliable, error free in-sequence delivery of data

Page 26: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

26Routing of the Application DataThe Internet Protocol (IP)

The network layer is responsible for

routing application data to the destination host

IP is responsible for transporting IP datagrams containing TCP segments or UDP datagrams to the destination host

The IP is a connectionless protocol, it simply sends the application data without establishing virtual connection with the destination before transmitting data, thus the IP routing is best effort and

doesn’t guarantee delivery of TCP segments or UDP datagrams

Page 27: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

27Routing of the Application DataThe Internet Protocol (IP)

In IPv4 the IP address (32 bits) is divided into three fields:

1. address class, 2. network ID and 3. host ID

The address class field identifies the class of the address and dictates the number of bits used in the network ID and host ID fields

This scheme has 5 address classes : A,B,C,D,E

Page 28: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

28IPv4 Addresses in Dotted Decimal

Notation 32-bit binary numbers

are difficult to remember

IPv4 addresses are given in dotted decimal notation (DDN)

In DDN all 4 bytes of an IPv4 address are written in their decimal equivalents and are separated by dots

Example: 192.102.10.21

Page 29: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

29IP Addresses

IP address formats.

127.0.0.0 (or 127.x.x.x, where x is between 0-127) is known as localhost

is used to send a data packet to itself. for testing purpose.host ID = 1…1 is the broadcast address in order to send a data packet to all hosts on a network

Page 30: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

30

IPv4 Address Classes

The sum of network IDs for class A, B, C = 2^7 + 2^14 + 2^21 = 1,113,664 networksThe sum of hosts IDs for class A, B, C = 2^24 + 2^16 + 2^ 8 = 3,758,096,400 hosts

Page 31: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

31

IPv4 Address Classes

Prove all ranges!!!

Page 32: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

32

IPv4 Address Classes

•A: Very large organizations and government agencies•B: Large organizations: AT&T, IBM, MIT, large universities etc.•C: Small to medium sized organizations: ISP, small consulting companies, community colleges, universities

In IPv4 the IP address (32 bits)

In IPv6 the IP address is 128 bits and it covers the # of hosts 6 x 2^28 times the present world population

Page 33: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

33

IPv4 Address Classes

Figure 14.5  An internetwork of 4 networks with one class A, one class B, and 2 class C networks connected via 4 routers

class A

class C

class C

class B

Page 34: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

34Symbolic Names Symbolic names are easier to remember remain the same even if the numeric address

changes must be unique for a host on the Internet Format: hostname.domain_name e.g. students.up.edu

where:domain_name = organization_name.top-

level_domain organization_name is assigned by the Network Information

Center e.g. ulv.edu

Attaching the name of a host to a domain name with a period between them yields the fully qualified domain name (FQDN) for the host

e.g. egr.up.edu – egr is a host name at the University of Portland

Page 35: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

35

A portion of the Internet domain name hierarchy

Page 36: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

36

Top-Level Internet Domains

Page 37: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

37

Page 38: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

38The Domain Name System Domain Name System (DNS) service

translates symbolic names to equivalent IP addresses DNS implements a distributed database

of name-to-address mappings

A set of dedicated hosts run name servers that take requests from the application software and work together to map domain names

to the corresponding IP addresses every organization runs at least 1

domain name server app uses gethostbyname() to get its IP

address

Page 39: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

39

Inverse domain The servers that handle the

inverse domain are also hierarchical.

This means the netid part of the address should be at a higher level than the subnetid part, and the subnetid part higher than the hosted part.

In this way, a server serving the whole site is at a higher level than the servers serving each subnet.

To follow the convention of

reading the domain labels from the bottom to the top, an IP address such as 132.34.45.121 (a class 13: address with netid 132.34) is read as 121.45.34.132.in-addr. area.

This configuration makes the domain look inverted when compared to a generic or country domain.

Page 40: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

40DNS lookup utility: host

[jgoetz jgoetz]$ host ulv.eduulv.edu has address 192.231.179.66ulv.edu mail is handled (pri=5) by mxg1.ulv.eduulv.edu mail is handled (pri=5) by mxg2.ulv.edu

[jgoetz jgoetz]$ host 192.231.179.6666.179.231.192.IN-ADDR.ARPA domain name pointer www.ulv.edu

[cs253u@shell cs253u]$ host ecs.fullerton.eduecs.fullerton.edu has address 137.151.27.1

[cs253u@shell cs253u]$ host 137.151.27.11.27.151.137.in-addr.arpa domain name pointer ecs.fullerton.edu.[cs253u@shell cs253u]$

Page 41: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

41The Domain Name System #DNS service is to use a static host file /etc/hosts #a static hosts file contains the domain names and their IP addresses configured by the

system admin$ cat /etc/hosts

[jgoetz jgoetz]$ cat /etc/hosts

127.0.0.1 localhost192.231.179.91 raq4.ulv.edu # Cobalt automated entry for eth0192.231.179.81 loki.ulv.edu loki #Veritas Backup Server

#to view IP address and other info about host’s interface to the network $ /sbin/ifconfig –a # faculty.ulv.edu has 192.231.179.91

[jgoetz jgoetz]$ /sbin/ifconfig -aeth0 Link encap:Ethernet HWaddr 00:10:E0:05:A8:F4 inet addr:192.231.179.91 Bcast:192.231.179.95 Mask:255.255.255.224 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:212947098 errors:0 dropped:0 overruns:0 frame:0 TX packets:318162567 errors:3 dropped:0 overruns:0 carrier:3 collisions:0 txqueuelen:100 Interrupt:5 Base address:0x8000

eth1 Link encap:Ethernet HWaddr 00:10:E0:05:A8:F3 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 Interrupt:9 Base address:0x8100

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3924 Metric:1 RX packets:1749416 errors:0 dropped:0 overruns:0 frame:0 TX packets:1749416 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 $

Page 42: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

42The Domain Name System[cs253u@shell cs253u]$ cat /etc/hosts

# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost shell192.168.3.25 ldap.int.ecs.fullerton.edu ldap192.168.3.29 ecsmysql.ecs.fullerton.edu ecsmysql192.168.3.30 mail.ecs.fullerton.edu mail137.151.28.223 lupus.ecs.fullerton.edu lupus192.168.3.200 lupus2.ecs.fullerton.edu lupus2

Page 43: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

43The Domain Name System#lookup for the IP address of a host name:[cs253u@shell cs253u]$ nslookup ecs.fullerton.edu

Server: 192.168.3.26 # name serverAddress: 192.168.3.26#53

Name: ecs.fullerton.eduAddress: 137.151.27.1

[jgoetz jgoetz]$ nslookup ulv.eduServer: ns.ulv.eduAddress: 64.69.149.200Name: ulv.eduAddress: 192.231.179.66

[jgoetz@raq4 ~]$ nslookup faculty.ulv.eduServer: ns.ulv.edu # this a name server Address: 64.69.149.200Name: faculty.ulv.eduAddress: 192.231.179.91

#nslookup uses file /etc/resolv.conf to find the host that runs the name server and passes the request over it.

[jgoetz@raq4 ~]$ host 192.231.179.9191.179.231.192.IN-ADDR.ARPA domain name pointer FACULTY.ULV.EDU

Page 44: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

44The Domain Name System nslookup uses file /etc/resolv.conf to find the host that runs the

name server and passes the request over it. [cs253u@shell cs253u]$ cat /etc/resolv.conf nameserver 137.151.1.1 nameserver 192.168.3.26

DNS lookup utility: dig interacts with name servers specified in /etc/resolv.conf and display their responses – gives more info than

nslookup

Page 45: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

45The Domain Name System[jgoetz@raq4 ~]$ dig faculty.ulv.edu

; <<>> DiG 8.3 <<>> faculty.ulv.edu;; res options: init recurs defnam dnsrch;; got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR,

id: 4;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1,

AUTHORITY: 2, ADDITIONAL: 2;; QUERY SECTION:;; faculty.ulv.edu, type = A, class = IN

;; ANSWER SECTION:faculty.ulv.edu. 1D IN A 192.231.179.91

;; AUTHORITY SECTION:ulv.edu. 1D IN NS ns.ulv.edu.ulv.edu. 1D IN NS ns2.ulv.edu.

;; ADDITIONAL SECTION:ns.ulv.edu. 1D IN A 64.69.149.200ns2.ulv.edu. 1D IN A 64.69.154.123

;; Total query time: 25 msec;; FROM: raq4.ulv.edu to SERVER: default --

64.69.149.200;; WHEN: Wed Nov 16 22:25:25 2005;; MSG SIZE sent: 33 rcvd: 116

[jgoetz jgoetz]$ dig ulv.edu

; <<>> DiG 8.3 <<>> ulv.edu;; res options: init recurs defnam dnsrch;; got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2;; QUERY SECTION:;; ulv.edu, type = A, class = IN

;; ANSWER SECTION:ulv.edu. 12H IN A 192.231.179.66

;; AUTHORITY SECTION:ulv.edu. 12H IN NS ns2.ulv.edu.ulv.edu. 12H IN NS ns.ulv.edu.

;; ADDITIONAL SECTION:ns.ulv.edu. 12H IN A 64.69.149.200ns2.ulv.edu. 12H IN A 64.69.154.123

;; Total query time: 11 msec;; FROM: raq4.ulv.edu to SERVER: default -- 64.69.149.200;; WHEN: Thu Nov 15 16:21:26 2007;; MSG SIZE sent: 25 rcvd: 108

Page 46: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

46The Domain Name System[jgoetz jgoetz]$ dig ulv.edu

; <<>> DiG 8.3 <<>> ulv.edu;; res options: init recurs defnam dnsrch;; got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2;; QUERY SECTION:;; ulv.edu, type = A, class = IN

;; ANSWER SECTION:ulv.edu. 12H IN A 192.231.179.66

;; AUTHORITY SECTION:ulv.edu. 12H IN NS ns2.ulv.edu.ulv.edu. 12H IN NS ns.ulv.edu.

;; ADDITIONAL SECTION:ns.ulv.edu. 12H IN A 64.69.149.200ns2.ulv.edu. 12H IN A 64.69.154.123

;; Total query time: 11 msec;; FROM: raq4.ulv.edu to SERVER: default -- 64.69.149.200;; WHEN: Thu Nov 15 16:21:26 2007;; MSG SIZE sent: 25 rcvd: 108

dig ecs.fullerton.edu

; <<>> DiG 9.2.4 <<>> ecs.fullerton.edu;; global options: printcmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29854;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:;ecs.fullerton.edu. IN A

;; ANSWER SECTION:ecs.fullerton.edu. 86400 IN A 137.151.27.1

;; AUTHORITY SECTION:ecs.fullerton.edu. 86400 IN NS ecs.fullerton.edu.

;; Query time: 22 msec;; SERVER: 192.168.3.26#53(192.168.3.26);; WHEN: Fri Mar 14 23:54:21 2008;; MSG SIZE rcvd: 65

Page 47: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

47

Well-known Internet Services

Page 48: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

48The Client-Server Software Model

Internet services are implemented by using a paradigm in which the software for a service is partitioned into 2 parts The part that runs on the host on which the

user running the application is logged on to is called the client software

The part that’s usually starts running when a host boots is called the server software

Connection-oriented client server models: client sends a connection request to the

server and the server either rejects or accepts the

request. If server accepts the request, the client and

server are said to be connected through a virtual connection

Page 49: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

49

The Client-Server Software Model

http://faculty.ulv.edu/

Page 50: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

50Displaying the Names.

uname [OPTION]...

DESCRIPTION Print certain system information.

With no OPTION, same as -s. -a, --all print all information -m, --machine print the machine (hardware)

type -n, --nodename print the machine's network node

hostname -r, --release print the operating system

release -s, --sysname print the operating system name -p, --processor print the host processor type -v print the operating system

version

--help display this help and exit

--version output version information and

exit

[jgoetz jgoetz]$ unameLinux

[jgoetz jgoetz]$ uname -nraq4.ulv.edu

[jgoetz jgoetz]$ uname -a[jgoetz jgoetzLinux raq4.ulv.edu 2.2.16C37_V #1 Sat Apr 12 15:06:43 PDT 2003 i686 unknown

Page 51: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

51Displaying the Host Name$ uname -nyamsrv1.ece.gatech.edu

$ uname -aSunOS yamsrv1.ece.gatech.edu 5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-250

[cs253u@shell cs253u]$ whatis hostname hostname (1) - show or set the system's host

name

$ hostname – name of the host you are logged on to yamsrv1.ece.gatech.edu

[jgoetz jgoetz]$ hostnameraq4.ulv.edu

-a, --all print all information -m, --machine print the machine (hardware) type -n, --nodename print the machine's network node

hostname --help

Page 52: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

52cpu info.[cs253u@shell cs253u]$ less /proc/cpuinfo

processor : 1vendor_id : AuthenticAMDcpu family : 15model : 35model name : Dual Core AMD Opteron(tm) Processor 175stepping : 2cpu MHz : 2211.280cache size : 1024 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : nofpu : yesfpu_exception : yescpuid level : 1flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge

mca cmovpat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm

3dnowext 3dnow lahf_lm pni

/proc/cpuinfo (END)

Page 53: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

53Remote Login. The telnet protocol is designed to allow you to connect to a

remote computer over a network

telnet [options] [host[port]]

Purpose: To connect to a remote system ‘host’ via a network; the ‘host’ can

be specified by its name or IP address in dotted decimal notation

Commonly used options/features:-a Attempt automatic login-l Specify a user for login

usage: telnet [-l user] [-a] host-name [port]e.g.titan/bin > telnet -l jgoetz -a faculty.ulv.edu

Trying 192.231.179.91...Connected to FACULTY.ULV.EDU (192.231.179.91).Escape character is '^]'.Password:Last login: Wed Nov 29 13:00:01 from cpe-66-74- …

telnet help //ortelnet --help // to get available cmds

Page 54: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

54

Remote Login (contd.)

[jgoetz jgoetz]$ telnet -?telnet: invalid option -- ?Usage: telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user][-n tracefile] [-b hostalias ][-r] [host-name [port]]

Ctrl + D close the session

Page 55: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

55Remote Login (contd.)

# reverts to the telnet client – place in the foreground

Page 56: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

56Using Telnet to Invoke Other Well-known Services

invokes a daytime service running at port 13

Page 57: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

57Remote Login (contd.)[cs253u@shell cs253u]$ telnet -l cs253u -a ecs.fullerton.eduTrying 127.0.0.1...Connected to ecs.fullerton.edu (127.0.0.1).Escape character is '^]'.Password:

Linux CentOS * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** Welcome To Titan *** *** California State University at Fullerton *** *** Department of Computer Science ***

================================================================== This system follows rules and policy set down by the Computer Science Department. By using this system you expressly consent to all rules and policies which govern this system.

Visit http://tech.ecs.fullerton.edu for tutorials, downloads and additional information about the system.

==================================================================You have mail.

$ telnet upsun29

Trying 192.102.10.89...Connected to upsun29.egr.up.edu.Escape character is ‘^]’.UNIX(r) System V Release 4.0 (upsun29.egr.up.edu)login: sarwarPassword: **********Last login: Sat Dec 27 05:05:37 from upYou have mail.DISPLAY = (‘)TERM = (vt100)$

Page 58: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

58File Transfer

ftp [options] [host]Purpose:

To transfer files from or to a remote ‘host’

Commonly used options/features -d Enable debugging-i Disable prompting during

transfers of multiple files-v Show all remote responses

Page 59: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

59File Transfertitan/jozefg > ftp -v faculty.ulv.edu // -v Show all remote responses

Connected to faculty.ulv.edu.220 ProFTPD 1.2.9 Server (ProFTPD) [192.231.179.91]500 AUTH not understood500 AUTH not understoodKERBEROS_V4 rejected as an authentication typeName (faculty.ulv.edu:jozefg): jgoetz331 Password required for jgoetz.Password:230 User jgoetz logged in.Remote system type is UNIX.Using binary mode to transfer files.

ftp> ls -l200 PORT command successful150 Opening ASCII mode data connection for file list-rw-r--r-- 1 jgoetz site7 123392 Nov 28 21:01 Assig.doc-rwxrwxrwx 1 jgoetz site7 13 Oct 31 07:22 mdrwxrwsr-x 4 jgoetz site7 4096 Jun 1 2006 web226 Transfer complete.

ftp>

Page 60: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

60File Transfer

Page 61: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

61

Page 62: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

62Testing a Network Connection

ping [options] hostname

Purpose: Send an IP datagram to ‘hostname’ to test whether it is on the network (or Internet); if the host is alive it simply echoes the received datagramOutput: Message(s) indicating whether

the machine is alive

Commonly used options/features:-c count Send and receive ‘count’ (e.g. 3) packets-f Send 100 packets per second or as many as can be handled by the network; only the superuser can use this option-s packetsize Send ‘packetsize’ packets; the default is

56 bytes (plus an 8 byte header)

Page 63: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

63Testing a Network Connection

ping -c count Send and receive ‘count’ packetsping -s packetsize Send ‘packetsize’ packets; the default is

56 bytes (plus an 8 byte header); Test yahoo.com

Page 64: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

64

Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

Utility Commands Examining System Setups

whereis, whoami$ whoamibobk$ whereis mkdirmkdir: /usr/bin/mkdir$

Printing and General Utility Commands lpr, cal$ lpr -Pprintname file_name $ lpr –Pcs200 file_name // print your file in CS200 at the printer designated // as cs200 - you can find this format by entering // $help => look for “printing” $ cal // display calendar$ cal 11 2004

Communication Commands

$ who // check the user name to whom you want to talk $ mesg [y|n] // permit execution write or talk $ write username $ biff [y|n] // notification on/off

Page 65: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

65

Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

Utility Commands (Contd)

Page 66: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

66Displaying Users on a Network

$ rwho | more - remote who displays info about the user currently using machines on your network: log name, computer:terminal, date and time the user logged in

Bobk upibm7:ttyC4 Jul 26 12:03Dfrakes upibm47:ttyp2 Jul 26 11:49Lulay upsun17:pts/0 Jul 26 10:17Oster upsun17:pts/2 Jul 26 12:28Sarwar upibm7:ttyp2 Jul 26 11:15$ rwho -a | moreBobk upibm7:ttyC4 Jul 26 12:03dfrakes upibm47:ttyp2 Jul 26 11:49kent upibm48:ttyp0 Jul 26 03:41 8:49kittyt upibm9:ttyp0 Jul 26 07:36 1:28kuhn upsun29:console Jul 16 13:11 99:59lulay upsun17:pts/0 Jul 26 10:17oster upsun17:pts/2 Jul 26 12:28pioster upsun20:pts/0 Jul 26 09:53 2:41sarwar upibm7:ttyp2 Jul 26 11:15sarwar upsun29:pts/0 Jul 26 11:24 1:00$

Page 67: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

67Displaying Users on a Network.

rusers [options] [host_list]

Purpose: Display the login names of the remote users logged on to all the machines on our local networkOutput: Information about the users logged on to the hosts on your local network in one line per machine format

Commonly used options/features:-a Display all host names even if no

user is using it

-l Display the user information in a long format similar to that

displayed by the who command

Page 68: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

68Displaying Users on a Network

for particular machine

Page 69: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

69Displaying the Status of Hosts on a Network

ruptime [options] – remote uptime

Purpose: Show status of all connected machines on the

local area network Output: Status of machines including machine name,

up/down status, time a machine has been up (or down) for-called machine uptime, and the

number of users logged on to the machine

Commonly used options/features after sorting : -l Display output after sorting it with load average

-t Display output after sorting it by machine uptime-u Display output after sorting it by the number of

users

Page 70: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

70Displaying the Status of Hosts on a Network

Commonly used options/features after sorting : -l Display output after sorting it with load average

-t Display output after sorting it by machine uptime-u Display output after sorting it by the number of users

Page 71: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

71Displaying Information About Users

finger [options] [user_list]

Purpose: Display information about the users in the ‘user_list’;

without a ‘user_list’, the command displays

a short status report about all the users currently logged on to the specified

hosts

Output: User info extracted from the ~/.project and ~/.plan files

Commonly used options/features:-m Match ‘user_list’ to login names only-s Display output in a short format

[cs253u@shell cs253u]$ finger cs253u2Login: cs253u2 Name: UserDirectory: /home/titan0/class/cs253u/cs253u2 Shell: /bin/bashNever logged in.No mail.No Plan.

Page 72: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

72Displaying Information About Users

[jgoetz@raq4 ~]$ finger -s JozefLogin Name Tty Idle Login Time Office Office Phonejgoetz Jozef Goetz pts/1 Nov 30 21:05 (64.69.147.181)

[jgoetz@raq4 ~]$

[jgoetz@raq4 ~]$ finger -m jgoetzLogin: jgoetz Name: Jozef Goetz

Directory: /home/sites/site7/users/jgoetz Shell: /bin/bashOn since Wed Nov 30 21:05 (PST) on pts/1 from 64.69.147.184No mail.No Plan.

-m Match ‘user_list’ to login names only-s Display output in a short format

Page 73: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

73Displaying Information About Users

-m Match ‘user_list’ to login names only-s Display output in a short format

Page 74: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

74Displaying Information About Users

// if the finger server is running

[jgoetz jgoetz]$ finger [email protected][ulv.edu]finger: connect: No route to host[jgoetz jgoetz]$ [email protected]

Page 75: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

75The rlogin Command The rlogin command allows you to log on to a host on your

local network (or remote)

rlogin [options] hosts

Purpose: To connect to a remote LINUX or UNIX ‘host’ via a network ; the ‘host’ can be specified

by its name or IP address in the dotted decimal notation

Commonly used options/features:-ec Set the escape character to ‘c’( the default is ‘~’)-l user User ‘user’ as the login name on the remote host

slogin [options] hosts - secure version uses strong cryptography for transmitting data

e.g.[jgoetz jgoetz]$ rlogin -l jozefg ecs.fullerton.edu ecs.fullerton.edu: Connection refused // it is not a local network

Page 76: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

76The rlogin Command

$ rlogin upsun -l performPassword:Last login: Mon Dec 18 12:08:12 from upsun21.up.eduSunOS Release 4.1.3 (UPSUN_SERVER) #5: Mon Nov 14

17:31:44 PST 1994DISPLAY 5 (upx46:0.0)TERM 5 (vt100)$ whoamiperform$ hostnameupsun.egr.up.edu$

-ec Set the escape character to ‘c’( the default is ‘~’)-l user User ‘user’ as the login name on the remote host

Page 77: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

77Remote Command Execution

rsh – remote shellrsh [options] host [command]

Purpose: To execute a command on a remote machine

, ‘host’, on the same network; the rlogin command is executed if no

‘command’ is specified

Commonly used options/features:-l user Use ‘user’ as the login name

on the remote host

ssh [options] host [command] -secure version uses strong cryptography for transmitting data

Page 78: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

78Figure 14.8  The semantics of the rsh upsun29 ps command

The same network

Page 79: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

79Figure 14.9 The semantics of the rsh upsun29 sort students > sorted_students command

students and sorted_students are files

Page 80: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

80Remote Command Execution

Page 81: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

81Remote Command Execution

•input from local file students and store the sorted result in a sorted_students file on the remote machine

•the sort cmd takes input from the students file on the local machine, (upibm7) and the output is sent to the sorted_students file on the local machine

When used without arguments, the rsh reverts to the rlogin command.it is executed if no ‘arguments’ is specified

//to log on a different network on the Internet

Page 82: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

82Remote Copy

rcp[options] [host:]sfile [host:]dfilercp[options] [host:]sfile [host:]dir

Purpose: To copy ‘sfile’ to ‘dfile’ source file – sfile destination file - dfile

Commonly used options/features-p

Attempt to preserve file modify and access times; without this option the command uses the current value

of unmask to create file permissions

-r Recursively copy files at ‘sfiles’ to ‘dir’

Page 83: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

83Remote Copy (contd.)

$ rcp ~/myweb/*.html upsun29:webmirror

$ rcp ~/unixbook/Chapter[1-9].doc upsun29:unixbook.backup

$ rcp upsun29:ece446/projects/*.[c,C] ~/swprojects.backup

$ rcp -rp www1:* www2:

$

Secure version of the rcp command

$ scp prog4.c upsun29:~/courses/cs213/programs/$ scp -r upsun21.egr.up.edu:courses.$ scp -rp www1:* www2:$

-p Attempt to preserve file modify and access times; -r Recursively copy files at ‘sfiles’ to ‘dir’

Page 84: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

84Interactive Chat

talk user [tty]Purpose: to initiate interactive

chat with ‘use’ who is logged in on a ‘tty’ terminal

$ talk bob

[Waiting for your party to respond]Message from [email protected] at 13:36 ...talk: connection requested by [email protected]: respond with: talk [email protected]

$ talk sarwar@upibm7

Page 85: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

85Tracing the Route from One Site to Another Site

traceroute www.yahoo.com

#some administrators disable this cmd for security

Page 86: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

86

Important Internet

Organizations

Page 87: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

87

Web Resources

Page 88: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

88

Web Resources

Page 89: Jozef Goetz, 2009 1 expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.

Jozef Goetz, 2009

89Request For Comments (RFCs) – omit it

The TCP/IP standards are described in a series of documents, known as the Request for Comments

RFCs are first published as the Internet Drafts and are made available to all Internet users for reviewer and feedback by placing them in known RFC repositories

After the review process is complete, a draft can become a standard

Some RFCs are for information only others are experimental