cit 140: introduction to itslide #1 cit 140: introduction to it networking
TRANSCRIPT
CIT 140: Introduction to IT Slide #2
Topics1. What are Networks?2. Why do we want Networks?3. Social Issues4. Sizes and Types of Networks5. Circuit vs Packet Switching6. Network Structures: Peer-to-peer and Client-server7. Performance Issues8. Network Protocols and Models9. TCP/IP10. History of Networks11. UNIX Network Commands
CIT 140: Introduction to IT Slide #3
What is a Computer Network?
When two or more computer hardware resources are connected they form a computer network.
CIT 140: Introduction to IT Slide #4
Why Networks?
Resource SharingPhysical resources: printers, scanners, faxes
Information: files, databases, web pages
CommunicationE-mail
Collaborative work
E-commerce
Instant messaging
CIT 140: Introduction to IT Slide #5
Social Issues
Controversial topicsPolitics, religion, sex
Employers vs employeesMonitoring
Censorship
Government vs citizensFBI Carnivore System
National Security Letters
CIT 140: Introduction to IT Slide #6
Sizes of Networks
PANs: Personal Area Networks
LANs: Local Area Networks
WLANs: Wireless LANs
MANs: Metropolitan Area networks
WANs: Wide Area networks
CIT 140: Introduction to IT Slide #7
Types of Networks
Subnetworks are parts of individual networks, often connected through a single switch.
Network can refer to any size network.
Internetworks are larger networks composed of multiple networks.
CIT 140: Introduction to IT Slide #9
Circuit vs Packet Switching
Circuit-switched: A connection called a circuit is set up between two devices and used for the whole communication.
Packet-switched: Data is chopped up into small pieces called packets and sent over the network. Each packet may follow a different path between the communicating parties.
CIT 140: Introduction to IT Slide #11
Network Structure
Peer-to-Peer: Every computer is an equal peer, running similar software with no special roles. Requests can be from any computer to any other computer.
Client-Server: A small number of computers are designed as central servers to provide services to a larger number of user machines called clients.
CIT 140: Introduction to IT Slide #13
Performance Issues
Throughput– Amount of data that can be sent per unit time.– ex: 56Kbps cable modem– ex: 4000Kbps cable modem
Latency– Amount of time from request to response.– ex: 2 PCs on a network have a latency ~ 10ms– ex: Satellite internet has a latency ~1000ms
CIT 140: Introduction to IT Slide #14
Throughput vs Latency
An Ultrium3 tape holds 400GB.
A 60cm3 box holds 100 tapes.
The box contains 3200 terabits!
FedEx can ship it anywhere in US in 24 hrs.
Throughput is 3200 terabits / 86400 seconds
= 38 Gbps!
NetFlix transfers more data than Internet!
Latench is 24 hours though.
CIT 140: Introduction to IT Slide #15
Network Protocols
A protocol is an agreement between communicating parties on how communication is to proceed.
CIT 140: Introduction to IT Slide #16
Protocol Example: HTTP> telnet www.google.com 80Trying 72.14.203.99...Connected to www.l.google.com.Escape character is '^]'.GET / HTTP/1.1
HTTP/1.1 200 OKCache-Control: privateContent-Type: text/htmlSet-Cookie: PREF=ID=e812e6c7ead517fe:TM=1131846389:LM=1131846389:S=rD8-
WNplszt1Ko8A; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Server: GWS/2.1Transfer-Encoding: chunkedDate: Sun, 13 Nov 2005 01:46:29 GMT
a46<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-
1"><title>Google</title><style>
CIT 140: Introduction to IT Slide #17
Protocol Example: HTTP
> telnet www.google.com 80Trying 72.14.203.99...Connected to www.l.google.com.Escape character is '^]'.GET /foo HTTP/1.1
HTTP/1.1 404 Not FoundContent-Type: text/htmlServer: GWS/2.1Content-Length: 1244Date: Sun, 13 Nov 2005 01:47:47 GMT
CIT 140: Introduction to IT Slide #18
Protocol Stacks
Protocols are stacked together in layersHigh level protocols are application protocols.
Medium level ones perform tasks like routing packets through the network.
Low level protocols deal with cabling and electrical signaling.
CIT 140: Introduction to IT Slide #20
Application Layer
User applications– Web (http)– E-mail (smtp)
CIT 140: Introduction to IT Slide #21
Transport Layer
The transport layer is an end-to-end protocol that transports application data from your machine to a remote machine and vice versa.
User Datagram Protocol (UDP) offers the best effort delivery service.
Transmission Control Protocol (TCP) offers the completely reliable, in-sequence delivery. It provides a virtual circuit for the communication.
CIT 140: Introduction to IT Slide #22
Network Layer
IP protocol routes packets from source to destination.Uses IP addresses for source and destination.
ex: 10.11.32.10
Does not guarantee delivery.Responsibility of transport or application layer.
Uses special purpose computers called routers.
CIT 140: Introduction to IT Slide #24
IP Addresses
32-bit binary numbers
IP addresses are given in dotted decimal notation (DDN)
> ifconfig hme0
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 172.20.20.40 netmask ffffff00 broadcast 172.20.20.255
CIT 140: Introduction to IT Slide #25
DNS Names
Symbolic names are easier to remember Remain same even if the numeric address changesMust be unique for a host on the Internet
Format: hostname.domain_name
Example: www.nku.edu mail.nku.edu cs.nku.edu
CIT 140: Introduction to IT Slide #26
The Domain Name System
Domain Name System (DNS) translates DNS names from application layer to IP addresses for network layer.
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
CIT 140: Introduction to IT Slide #28
Dig: DNS Lookup
dig [options]
Purpose Interact with name servers specified in/etc/resolv.conf and display
their responsesOutput Responses of name servers for queries
sent to themCommonly used option/features:-f file For batch operation , take domain names
(or IP addresses) from ‘file-p port Interact with a name server at ‘port’
instead of the default port53
CIT 140: Introduction to IT Slide #29
Dig Example> dig www.google.com
; <<>> DiG 8.3 <<>> www.google.com;; res options: init recurs defnam dnsrch;; got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 5,
ADDITIONAL: 0;; QUERY SECTION:;; www.google.com, type = A, class = IN
;; ANSWER SECTION:www.google.com. 14m40s IN CNAME www.l.google.com.www.l.google.com. 4m40s IN A 72.14.203.104www.l.google.com. 4m40s IN A 72.14.203.99
CIT 140: Introduction to IT Slide #30
Data Link Layer
Break up transmission into small enough packets (often called frames) and send them sequentially.
Traffic regulation: ensure fast transmitter doesn’t overwhelm slow receiver.
CIT 140: Introduction to IT Slide #31
Physical LayerHow many volts is a 1?How many volts is a 0?How long does a bit last?
How many pins does connector have?
What is each pin used for?
CIT 140: Introduction to IT Slide #32
Internet StandardsIETF (Internet Engineering Task Force)
– Open group responsible for Internet standards.
RFC (Request for Comments)– Internet standard documents.– IETF archives RFCs at www.ietf.org.
IANA (Internet Assigned Numbers Authority)– Coordinates unique network numbers.– IP addresses, protocol numbers, etc.
ICANN (Inet. Corp. for Assigned Names & Numbers)– Manages DNS top level domains (TLDs) like .com, .gov– Gives domain registrars responsibilities over domains.
CIT 140: Introduction to IT Slide #33
History of Internet1969 ARPAnet created (4 hosts)1984 DNS deployed1986 Cleveland Freenet offers free Internet access1987 Number of hosts reaches 10,0001988 Morris Worm1989 Number of hosts reaches 100,0001990 First commercial dialup ISP1991 WWW released at CERN1992 Number of hosts reaches 1,000,0001993 Mosaic, graphical web browser, released1994 First banner ads appear on the web1995 AOL offers Internet access1996 Telcos try to ban Internet telephones1996 Number of hosts reaches 10,000,0002000 Number of hosts reaches 100,000,000
CIT 140: Introduction to IT Slide #34
Displaying the Hostname
> hostname
zappa
> uname -n
zappa
> uname -a
SunOS zappa 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-250
CIT 140: Introduction to IT Slide #35
Testing a Network Connection
ping [options] hostname
Purpose: Send packet to hostname. If hostname is up, packet is echo’ed back and ping records that host is alive.
Commonly used options/features:
-s Send one packet/second andrecord latency statistics.
CIT 140: Introduction to IT Slide #36
Ping Example> ping www.uc.eduno answer from www.uc.edu> ping www.google.comwww.google.com is alive> ping -s www.google.comPING www.google.com: 56 data bytes64 bytes from 72.14.203.104: icmp_seq=0. time=17. ms64 bytes from 72.14.203.104: icmp_seq=1. time=20. ms64 bytes from 72.14.203.104: icmp_seq=2. time=17. ms64 bytes from 72.14.203.104: icmp_seq=3. time=21. ms64 bytes from 72.14.203.104: icmp_seq=4. time=16. ms^C----www.google.com PING Statistics----5 packets transmitted, 5 packets received, 0% packet lossround-trip (ms) min/avg/max = 16/18/21> ping -s www.muohio.eduPING www.muohio.edu: 56 data bytes64 bytes from w8zr.net (134.53.7.73): icmp_seq=0. time=43. ms64 bytes from w8zr.net (134.53.7.73): icmp_seq=1. time=1260. ms64 bytes from w8zr.net (134.53.7.73): icmp_seq=2. time=263. ms64 bytes from w8zr.net (134.53.7.73): icmp_seq=3. time=43. ms64 bytes from w8zr.net (134.53.7.73): icmp_seq=4. time=42. ms^C----www.muohio.edu PING Statistics----5 packets transmitted, 5 packets received, 0% packet lossround-trip (ms) min/avg/max = 42/330/1260
CIT 140: Introduction to IT Slide #37
Traceroute> traceroute www.google.comtraceroute: Warning: www.l.google.com has multiple addresses; using 72.14.203.104traceroute to www.l.google.com (72.14.203.104), 30 hops max, 40 byte packets 1 172.20.20.253 (172.20.20.253) 0.550 ms 0.332 ms 0.307 ms 2 192.122.237.10 (192.122.237.10) 0.715 ms 0.690 ms 0.731 ms 3 h13.188.140.67.ip.alltel.net (67.140.188.13) 1.234 ms 1.192 ms 1.066 ms 4 h6.31.213.151.ip.alltel.net (151.213.31.6) 3.515 ms 3.710 ms 3.705 ms 5 h212.33.213.151.ip.alltel.net (151.213.33.212) 3.547 ms 3.491 ms
h208.33.213.151.ip.alltel.net (151.213.33.208) 3.558 ms 6 so-1-0.hsa2.Cincinnati1.Level3.net (4.78.218.5) 5.506 ms 29.589 ms 12.175 ms 7 4.68.124.241 (4.68.124.241) 6.038 ms ae-1-54.bbr2.Chicago1.Level3.net (4.68.101.97)
62.243 ms 19.935 ms 8 4.68.124.202 (4.68.124.202) 19.798 ms 19.855 ms so-2-0-1.bbr2.Chicago1.Level3.net
(64.159.0.162) 16.263 ms 9 francetelecom-level3-oc48.Chicago1.Level3.net (4.68.111.2) 19.930 ms 4.68.124.202
(4.68.124.202) 15.908 ms francetelecom-level3-oc48.Chicago1.Level3.net (4.68.111.2) 19.779 ms
10 * * *11 66.249.95.253 (66.249.95.253) 20.204 ms * *12 72.14.238.89 (72.14.238.89) 20.886 ms 66.249.95.253 (66.249.95.253) 16.119 ms 16.023
ms13 72.14.238.89 (72.14.238.89) 17.237 ms 16.971 ms 17.030 ms14 72.14.203.104 (72.14.203.104) 21.288 ms 64.233.175.94 (64.233.175.94) 19.653 ms
27.886 ms
CIT 140: Introduction to IT Slide #38
Displaying User Information 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 information 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.
CIT 140: Introduction to IT Slide #39
Finger Example> finger waldenjLogin name: waldenjDirectory: /export/home0/waldenj Shell: /bin/bashOn since Nov 13 09:39:18 on pts/2 from 23.112.19.41No unread mailPlan:Fall 2005 Class Schedule
CSC 382 Computer Security MW 1:40-2:55CIT 140 Introduction to IT TR 2:00-3:15CSC 501 Int. Prog. Workshop TR 4:50-6:05> finger -s waldenjLogin Name TTY Idle When Wherewaldenj ??? pts/2 Sun 09:39 23.112.19.41
CIT 140: Introduction to IT Slide #40
Remote Login: telnet (Obsolete)telnet host [port]
Purpose: Obsolete, insecure protocol for logging into a remote system. Superseded by ssh.
Currently used to demonstrate network protocols by connecting to their ports, as we did for HTTP earlier.
Ports for common protocols are listed in the file /etc/services.
CIT 140: Introduction to IT Slide #41
Telnet Port Example: 80
> telnet www.google.com 80Trying 72.14.203.99...Connected to www.l.google.com.Escape character is '^]'.GET /foo HTTP/1.1
HTTP/1.1 404 Not FoundContent-Type: text/htmlServer: GWS/2.1Content-Length: 1244Date: Sun, 13 Nov 2005 01:47:47 GMT
CIT 140: Introduction to IT Slide #42
Remote Login: sshssh [options] host [command]ssh [options] user@host [command]
Purpose: Secure login to remote host.
Commonly used options/features:-l user Login as specified username.-p port Specifies remote port to connect to-v Verbose output
CIT 140: Introduction to IT Slide #43
ssh: secure shell> ssh [email protected] whoPassword:jw :0 Oct 15 14:11jw pts/0 Nov 10 08:58 (:0.0)jw pts/1 Oct 22 12:46 (:0.0)jw pts/2 Oct 21 23:02 (:0.0)jw pts/7 Oct 15 14:20 (:0.0)> ssh [email protected] "ps -ef | grep ssh"Password:jw 7779 7733 0 Oct15 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-
launch --exit-with-session /usr/bin/gnome-sessionroot 1890 1 0 Oct21 ? 00:00:02 /usr/sbin/sshdroot 5882 1890 0 Nov10 ? 00:00:00 sshd: jw [priv]jw 5886 5882 0 Nov10 ? 00:00:00 sshd: jw@nottyjw 25660 25659 0 21:49 ? 00:00:00 bash -c ps -ef | grep sshjw 25674 25660 0 21:49 ? 00:00:00 grep ssh
CIT 140: Introduction to IT Slide #44
The scp Command
Securely copy files from machine to machine across the network
> scp prog.c zappa.nku.edu:~/classes/cit140/programs/
Password:
> scp -r zappa.nku.edu:classeses .
Password:
CIT 140: Introduction to IT Slide #45
The sftp Command
Securely copy files from machine to machine across the network using an interactive session.
> sftp [email protected]
Connecting to zappa.nku.edu...
[email protected]'s password:
sftp> ls
bash-3.0.tar.gz cit140 csc382
csc501 mail public_html
sftp> get bash-3.0.tar.gz
Fetching /export/home0/waldenj/bash-3.0.tar.gz to bash-3.0.tar.gz
/export/home0/waldenj/bash-3.0.tar.gz 100% 2362KB 472.3KB/s 00:05
sftp> quit
CIT 140: Introduction to IT Slide #46
File Transfer
ftp [options] [host]
Purpose: To transfer files from or to a remote machine.
Commonly used options/features -d Enable debugging-i Disable prompting during
transfers of multiple files-v Show all remote responses
CIT 140: Introduction to IT Slide #47
FTP Example> ftp ftp.gnu.orgConnected to ftp.gnu.org.220 GNU FTP server ready.Name (ftp.gnu.org:waldenj): ftp230-Due to U.S. Export Regulations, all cryptographic software on this230-site is subject to the following legal notice:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp> cd gnu/bash250 Directory successfully changed.ftp> dir bash-3.0*200 PORT command successful. Consider using PASV.150 Here comes the directory listing.drwxr-xr-x 2 1003 1003 4096 Feb 14 2005 bash-3.0-patches-rw-r--r-- 1 1003 65534 2418293 Aug 03 2004 bash-3.0.tar.gz-rw-r--r-- 1 1003 65534 65 Aug 03 2004 bash-3.0.tar.gz.sig226 Directory send OK.remote: bash-3.0*224 bytes received in 0.0074 seconds (29.39 Kbytes/s)
CIT 140: Introduction to IT Slide #48
Automating Ftp> wget ftp://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz--21:42:24-- ftp://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz => `bash-3.0.tar.gz'Resolving ftp.gnu.org... done.Connecting to ftp.gnu.org[199.232.41.7]:21... connected.Logging in as anonymous ... Logged in!==> SYST ... done. ==> PWD ... done.==> TYPE I ... done. ==> CWD /gnu/bash ... done.==> PORT ... done. ==> RETR bash-3.0.tar.gz ... done.Length: 2,418,293 (unauthoritative)
100%[====================================>] 2,418,293 579.54K/s ETA 00:00
21:42:29 (579.54 KB/s) - `bash-3.0.tar.gz' saved [2418293]
CIT 140: Introduction to IT Slide #49
Automating Web Transfers> wget http://greenend.org.uk/~sgtatham/putty/latest/x86/putty.exe--21:44:51--http://greenend.org.uk/~sgtatham/putty/latest/x86/putty.exe => `putty.exe'Location: http://the.earth.li/~sgtatham/putty/0.58/x86/putty.exe [following]--21:44:52-- http://the.earth.li/%7Esgtatham/putty/0.58/x86/putty.exe => `putty.exe'Connecting to the.earth.li[193.201.200.66]:80... connected.HTTP request sent, awaiting response... 200 OKLength: 421,888 [application/x-msdos-program]
100%[====================================>] 421,888 307.46K/s ETA 00:00
21:44:54 (307.46 KB/s) - `putty.exe' saved [421888/421888]
CIT 140: Introduction to IT Slide #50
Interactive Chat
talk user
Purpose: to initiate interactive chat with user who is logged in on a specific terminal
> talk bob
[Waiting for your party to respond]
Message from [email protected] at 13:36 ...
talk: connection requested by [email protected].
talk: respond with: talk [email protected]
> talk sarwar@upibm7