Computers and Networks
Computers and Networks CECS 410
Popular in Course
verified elite notetaker
Popular in Computer Science and Engineering
verified elite notetaker
This 111 page Class Notes was uploaded by Zackary Cronin on Monday October 5, 2015. The Class Notes belongs to CECS 410 at California State University - Long Beach taught by Staff in Fall. Since its upload, it has received 21 views. For similar materials see /class/218760/cecs-410-california-state-university-long-beach in Computer Science and Engineering at California State University - Long Beach.
Reviews for Computers and Networks
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/05/15
CECS 410 Computers and Networks Additional UNIX Commands Aliases F ilen ame Substitution and M etach aracters Creating Pseudonyms Using the alias Command Pseudonyms are nicknames for commands They make typing commands shorter and more intuitive Note Pseudonyms are usually created for commands but they also can be created for other items like naming mail groups The Alias Command The al ias command can be used to create pseudonyms When you use the al ias command we say you have created an alias We will be discussing the use of alias in the C shell The syntax will vary slightly for other shells The syntax of the command for C shell is gt alias name string This will create a pseudonym for the command s tr ing Forexample gt alias lsa ls a Dr Tracy Bradley Maples Fall 2007 l Storing Aliases Command aliases can be placed in the login file but typically they are placed in cshrc file 0 The login file will execute and thus start the aliases every time you log in o The cshrc file will execute and thus start the aliases every time you start a new C shell In the C shell you can also create aliases from the command line the Boume Korn and Bash shells don t Using the aliases Command Ifyou type gt alias with no argument the list of all aliases currently set will be displayed Examples The following table shows some useful aliases commands C shell command alias dir ls la alias spr lpr Pspr alias ls ls C alias ll ls ltr alias rename mv Dr Tracy Bradley Maples Fall 2007 2 The unalias Command 0 The unalias command can be used to remove an alias o Theunalias the alias list a command can be used to remove all aliases from Example The alias unalias and unalias a commands gt alias dir spr ls ll rename gt unalias gt alias dir spr ll rename gt unalias gt alias gt Dr Tracy Bradley Maples Fall 2007 ls la lpr Pspr ls C ls ltr mv ls ls la lpr Pspr ls ltr mv a Filename Substitution UNIX allows you to use filename substitution by selecting a pattern that matches the name of a le rather than typing the filename itself Notes Filename substitution is used to reduce the amount of typing required The patterns are specified by using special characters called metacharacters that have a special meaning to the UNIX shell program These metacharacters are sometimes called wild cards File substitution metacharacters can be used in any part the beginning middle or end of the filename to create a search pattern Dr Tracy Bradley Maples Fall 2007 The Metacharacter The question mark 7 is a special character that the shell interprets as a single character substitution and eXpands the filename accordingly Example linuxgt Aassign assign linuxgt assignl linuxgt assign44 linuxgt Aassign linuxgt H I return assignl assign3 Bassign assign2 assign44 assign return assign2 assign3 assign return assign return Bassign Dr Tracy Bradley Maples Fall 2007 The Metacharacter The asterisk is a special character that the shell interprets as a substitution for any number of characters including zero and expands the filename accordingly Example linuxgt ls return Aassign assignl assign3 Bassign assign assign2 assign44 linuxgt ls assign return assign assign2 assign44 assignl assign3 linuxgt ls a return assign assign2 assign44 assignl assign3 linuxgt ls assign return Aassign assingn Bassign linuxgt ls a return Aassign assignl assign3 Bassign assign assign2 assign44 Dr Tracy Bradley Maples Fall 2007 The Metacharacters The open and closed brackets are special characters that surround a string of characters The shell interprets this string as filenames that contain any of the specified characters and expands the filename accordingly The exclamation 1 before the specified string of characters causes the shell to expand the filenames that do not contain the characters in the string Example linuxgt ls return Aassign assignl assign3 Bassign assign assign2 assign44 linuxgt ls AB return Aassign Bassign linuxgt ls AB return assign assign2 assign44 assignl assign3 linuxgt ls 1 3 return assignl assign2 assign3 linuxgt Dr Tracy Bradley Maples Fall 2007 7 Creating Pseudonyms Using the alias Command Pseudonyms are nicknames for commands They make typing commands shorter and more intuitive Note Pseudonyms are usually created for commands but they also can be created for other items like naming mail groups The Alias Command The al ias command can be used to create pseudonyms When you use the al ias command we say you have created an alias We will be discussing the use of alias in the C shell The syntax will vary slightly for other shells The syntax of the command for C shell is gt alias name string This will create a pseudonym for the command name Dr Tracy Bradley Maples Fall 2007 8 Storing Aliases Command aliases can be placed in the login file but typically they are placed in cshrc file 0 The login file will execute and thus start the aliases every time you log in o The cshrc file will execute and thus start the aliases every time you start a new C shell In the C shell you can also create aliases from the command line the Boume Korn and Bash shells don t Using the aliases Command Ifyou type gt alias with no argument the list of all aliases currently set will be displayed Examples The following table shows some useful aliases commands C shell command alias dir ls la alias spr lpr Pspr alias ls ls C alias ll ls ltr alias rename mv Dr Tracy Bradley Maples Fall 2007 9 The unalias Command 0 The unalias command can be used to remove an alias o Theunalias the alias list a command can be used to remove all aliases from Example The alias unalias and unalias a commands gt alias dir spr ls ll rename gt unalias gt alias dir spr ll rename gt unalias gt alias gt Dr Tracy Bradley Maples Fall 2007 ls la lpr Pspr ls C ls ltr mv ls ls la lpr Pspr ls ltr mv a CECS 410 Computers and Networks NETWORKS Part 5 Binary Bits and Bytes Because computers are made up of digital electronics internally they respond to two kinds of electrical states quotonquot or quotof quot These may actually be any two conditions 0 high or low voltage 0 positive or negative voltage 0 0 or 1 0 some other combination We usually represent these with two numbers 0 and 1 The arithmetic that deals with these two states is called binary arithmetic Each 0 or 1 in the binary system is termed a bit short for binary digit Strings of bits are used to represent numbers larger than 1 much like combinations of digits are used to represent numbers larger than 9 in our decimal numbering system Bits in strings of eight are called bytes and one byte usually represents a single character of data in the computer Other sometimes used terms o A nibble is half a byte usually 4 bits Modified from wwwcknowc0m tbm Fall 2005 o An octet is 8bits another name for a byte Binary Numbers Explained Think of binary numbers in terms of switches With two switches you can represent up to four different numbers 0 0 OFF OFF Decimal O O 1 OFF ON Decimal 1 1 0 ON OFF Decimal 2 1 1 ON ON Decimal 3 NOTE Two binary numbers gives you up to decimal 3 but there are four actual numbers In our decimal system we rarely think of the zero but with computers zero is always thought of as a number Thus 0 a single bit represents 2 numbers 0 and l 0 two bits give 4 numbers 00 01 10 and 11 0 three bits show 8 numbers 0 four bits represent 16 numbers 0 eight bits represents 256 numbers From 0000000 to llllllll NOTE Each added bit doubles the number of numbers Modified from wwwcknowcom tbm Fall 2005 Number of bits Used to Possible Binary Numbers Number of Possible Represent the Number Values Represented 1 01 21 2 2 00 01 10 11 22 4 3 000 001 010 011 23 8 100 101 110 111 4 0000 0001 0010 0011 24 15 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Modified from wwwcknowcom tbm Fall 2005 Binary numbers formed like decimal except there are only two numbers to work with Exhaust those two numbers and start over with the next position to the left filled with a quot1quot When you are down to 111 you simply start the entire marked series over again with a l in front of it Thus every time you add a binary digit to the string you effectively double the number of total decimal numbers available for use It is easy to get confused over the point of zero being a digit A byte with all digits ON represents the decimal number 255 and it is hard to are just Binary Decimal Representatlon 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 Modified from wwwcknowcom tbm Fall 2005 visualize this as the 256th digit in a series but that is exactly what the computer demands of you Kilobytes and Megabytes Early manufacturers stated memory capacity in terms of kilobytes kB In the decimal system the prefix kilo means 1000 In the binary system the pre x kilo means 1024 It39s a little tricky but 1024 is 2 to the 10th power or the number that can be represented by 10 bits that are all set to one Thus ten ones in a row represents the decimal number 1023 and the 1024th digit Using this nomenclature a computer may be described as having 640K 640 kilobytes of memory when it really has 640 x 1024 or 655360 bytes By the same token computers are described as having megabytes and gigabytes of memory even though there is somewhat more than a million or billion actual bytes available When 64bit CPU39s become common memory will start to be spoken about in terabytes petabytes and exabytes 1 kilobyte 21 1024 bytes 1 megabyte 22 1048576 bytes 1 gigabyte 23 1073741824 bytes 1 terabyte 2 10 1099511 627 776 bytes 1 petabyte 25 1125899906842624 bytes 1 exabyte 25 1152921504606846976 bytes 1 zettabyte 27 1180591 620717 411303424 1 yottabyte 28 1208925819614629174706176 NOTE There is some lack of standardization on these terms when applied to memory and network transmission speeds Memory speci cations tend to adhere to the definitions above whereas network transmission speeds are measured in terms of powers of 1039 kilo103 Modified from wwwcknowcom tbm Fall 2005 mega106 giga109 etc Modified from wwwcknowcom tbm Fall 2005 CECS 410 Computers and Networks NETWORKS Part 4 IP Addresses IPv4 Internet Review internetwork A group of interconnected computer networks Internet not internet The Internet is a speci c global internetwork TCPP Transmission Control ProtocolInternet Protocol The Internet protocol that makes possible the communication between different types of machines on different types of networks Hemule Syslem Dr Tracy Bradley Maples Fall 2005 1 IPAddresses Each network and computer system on me Internet has a unique Internet address called an IP Address seamless network ms An abstraction uni orm addressing scheme Used by higherlayer network protocols Usedby applications IPAddresses Addresses consist of3Zbits To make them more readible for humans IP Addresses we use dotted decimal notation to mpresentthe 32 its 32b x Binary Number EquivalEM Dumd Dec 1 mnnnum Gunman nouumw unaanuou 2 525D mnnnnau mnommo nva nunummn 25 2a255 a For dotted decimal notation There are four values perSZbit address Each decimal number Represents eight bits Is betweenO and 255 m Txacy ndkyMzPlAs m ms 2 Classes ofAddresses IP addresses are divided into two parts 0 Pre x which identi es the network 0 Suf x which identi es the host A global authenty pie InteinetAssignedNuInbeIIIIIIIOIIM assigns a unique pre x to each network cum as case mumm cnassn Hm classs nan Example 13413942 the cheetah UNIX machine ECS 412 134139 is the pre x o 42 is the suf x o cheetah has a Class B address D Tncyandhywhnesam mus Classes of Addresses cont39d Fivs1 Fouv Table Index Class o4 MAudess de all Address a munnmmmmbbbbhbb n Mammllmnumhm sum mmmmnamwm name an mm p x m Imwuvkx sun Mam Pal usuqu A 7 m 21 mm a u V5380 I6 c 2 anansz a The maximum network ssze is determined by the elass of the address 17 aaymeynaasmmznns Addressing Example mym r r r lt gt s 3 Dre x 12310 gt vrelix 123211 K x 2 x 2 123mm 1281002 1282115115 123211234 z y K plelu 1o P o pvelix 192 548 339 1 39 39 1007037 100049 1925483 19254335 The address pre x identi es the network Need one router address per connection Dr Tncyandteymrdes mums Special Addresses o u lx a 05 nelwalk aIst nelw k ale ale au Is 21 any TV 2 commas ms campl er nelwmk alrech broadcast Imdad bmadnas mopuack Pu 5 used durlng hansrap mmmes a nelwark b b m In new adcas on lucal m eslmg an speci ed m The network addmss never appears in a packet A loopback address neverleaves he local computer m Txacy ndlzyszl m mus CECS 410 Computers and Networks Security Through Isolation Firewalls Isolation 1so1atioh has been aprimary security tool for thousands ofyears Example Castles with meals and drawbridges Securig Issue Who is controlling access to the drawbridge Who decides who gets in its my Bradley MAFIA M 2m 1 Isolation in Networks One way to provide security is to isolate and organization s internal network from the Internet allowing some packets to pass while blocking others like using a moat and drawbridge This point of isolation in networks is called a firewall administer39ed PUinC network Internet What can firewalls do for us 0 Prevent denial of service attacks 0 For example SYN ooding when an attacker establishes many bogus TCP connections and no resources left for real connections 0 Prevent illegal modificationaccess of internal data 0 For example An attacker replaces the CIA s homepage with something else 0 Allow only authorized access to inside network to a set of authenticated usershosts Dr Tracy Bradley Maples Fall 2007 2 Two types of Firewalls 1 Packet ltering Firewalls 2 Applicationlevel gateways or proxy servers Packet Filtering It is possible to con gure packet forwarding devices especially routers to drop certain packets IZEJILUJJ 1925 430 m m Mm m mum Example Suppose 1925480 is a test network and 1281000 has active workstations 39 Install lter to allow packets only from 1925480 to 000 39 Keeps potentially bad packem away from remainder ofthe network Dr TncyEndleyMA zs iallZUm 3 Packet Filtering Firewalls Defn A packet filter placed at the edge of an intranet to exclude unauthorized packets is called a firewall a m WM mm m Mum myszny o A rewall restricts external packets to just a few carefully controlled internal hosm o Firewalls de ne a secure perimeter around a local network 0 Proxies forward packets through firewall after authorization The router or firewall filters on a packetbypacket basis making a decision to forwarddrop a packet based on 0 Source IP address Destinatioan address 0 TCPUDP source and destination port numbers 0 Message type for example ICMP messages TCP datagram fields for example SYN and ACK bits 0 Other packet criteria D Tmyanaieympuamznm Application Gateways Application gateways or proxy servers can filter packets based on the highlevel application layer data as well as the fields a firewall router can use Example You can select which internal users can telnet outside the network gatewayTor39emo re Example Restrict Telnets l Require all telnet users to telnet through the application gateway J For authorized users the gateway setsup a telnet connection to destination host The application gateway relays data between the two connections U The router filter is configured to block all telnet connections not originating from gateway Application gateways or proxyservers are commonly used for mail and web access Dr Tracy Bradley Maples Fall 2007 5 Limitations of Firewalls 1P spoo ng A router cannot know if data really comes from a claimed source A big problem If multiple applications need special treatment each must have its own application gateway The client software on each computer must know how to contact the application gateway o For example an administrator must setup the IP address of the proxy in Web browser Filters often use all or nothing policy for UDP packets There are tradeoffs between the degree of communication with outside world and level of security desired Many highly protected sites still suffer from attacks Interesting Quote About Firewalls II Firewalls are a mechanism that most security purists consider to be an abomination Networking Authors Peterson amp Davie Do you agree Disagree Dr Tracy Bradley Maples Fall 2007 6 CECS7 410 Computers and Networks Protocols and TCPIP Layering Protocols Defn A protocol is a set of agreed upon rules for performing a task Example Human Protocols 0 What time is it 1141 Got The Time 200 time o I have a question 0 Introductions Dr Tracy Bradley Maples F all 2007 Examples Computer Network Protocols 0 Get a web page TCP connec rion reques r TCP connec rion res onse p Ge r h r rpwwwcnncom Time lt legt o telnet to a remote computer 0 send email Dr Tracy Bradley Maples F all 2007 Why Pr otocols In computer networking protocols are agreements about how communication should take place They specify 1 Format of messages 2 Meaning of messages 3 Rules for exchanging messages 4 Procedures for handling problems Network hardware functions at a very low level and many problems can occur that need to be addressed by protocols l Bits can be corrupted or destroyed 2 Entire packets can be lost 3 Packets can be duplicated 4 Packets can be delivered out of order Dr Tracy Bradley Maples F all 2007 3 Sets of Network Protocols 0 Sets of network protocols are designed to work together 0 Each protocol solves a small part of the communications problem 0 Sets of protocols are known as Protocol Suites or Protocol flam ies 0 They are designed in layers Protocol Design 0 Protocols are divided into layers 0 Each layer is devoted to one subproblem Example The lnternet Protocols 0 Known as TCPIP 0 Many protocols comprise the suite 0 Designed to work together 0 Divided into five conceptual layers Dr Tracy Bradley Maples F all 2007 TCPIP Layering Appllcallon Transport Internet Network Interface Physical TCPIP Layers Layer 1 Physical 0 Basic network hardware Layer 2 Network Interface 0 Interface between computer and the network ie the NIC Layer 3 Internet 0 Format of packets 0 Forward of packets Layer 4 Transport 0 Specifies how to provide reliable transfer from one application on A FER 5 Lil FER 4 r A YER LA MEN 3 A Fh39h I one computer to an application on another Layer 5 Application 0 Everything else ie how an application uses the Internet Dr Tracy Bradley Maples F all 2007 The Layering Concept Protocol software follows the layering model 0 One software module per layer 0 The modules cooperate o Incoming or outgoing data passes from one module to another The entire set of modules is known as a mdr Data ows down the sending protocol stack and back up the receiving protocol stack What Does Using TCPIP Gain Us It allows us to build a network consisting of other networks The smaller networks may be of different types m 4 HM my yJl Dr TmyEn eyMAplesGa mm 7 Building an Internetwork 0 Begin with heterogeneous network technologies 0 Connect the physical networks 0 Create software to make the resulting system appear homogeneous TCPIP The result is called an internetwork or internet Goals Create a communication system that is o Seamless 0 Uniform o Generalpurpose 0 Universal 0 Hides heterogeneity from the user To Hide Heterogeneity we must 0 Create a quotVirtualquot network ie create a software network on top of the physical network TCPIP o Invent An addressing scheme lt More about these two later A naming scheme Dr Tracy Bradley Maples F all 2007 8 Dr Tracy Bradley Maples F all 2007 CECS 410 Computers and Networks NETWORKS Part 1 Computer Networking Overview and Network Categories May you live in interesting times Chinese Blessing 0r Curse The Industrial Revolution c 1760 The change in social and economic organization resulting from the replacement of hand tools by machine and power tools and the development of largescale industrial production The Digital Revolution c 1990 The change in social and economic organization resulting from the replacement of earlier forms of communication and information storage by a digital format and the development of largescale networks transmitting digital information Introduction to Networking network net39wiirk39 n 1 any arrangement or fabric of parallel wires threads etc crossed at regular intervals by others fastened to them so as to leave open spaces netting mesh 2 a thing resembling this in some way specif a a system of roads canals veins etc that connect with or cross one another b Radio and TV a chain of transmitting stations controlled and operated as a unit c a group system etc of interconnected or cooperating individuals 3 the making of nets or netted fabric DLfn A computer network is a collection of computers interconnected Via a transmission medium e g copper wire optical fiber microwaves satellites etc The computers are usually generalpurpose programmable hardware devices Dr Tracy Bradley Maples F all 2005 1 Motivation Why use Networks Availability of resources Make resources available to anyone on the network regardless of the physical location of the resource or the user Load sharing Process a job on the least crowded or busy machine High reliability Have alternate sources of resources multiple copies Humantohuman communication Allow humans to communicate through email telephone teleconferencing etc Connectivity A network must provide connectivity among a set of computers Defn A link is the physical medium connecting computers on a network For example coaxial cable optical fiber or the air waves Defn The computers connected by the physical medium are called nodes Note sometimes these nodes are specialized pieces of hardware Defn A host is a node running a user application program Host machines are interconnected by links to form computer networks Dr Tracy Bradley Maples F all 2005 Categories of Networks based on the Area Covered o WANs Widearea networks ARPANET the Internet etc o LANs Local Area Networks Ethernet FDDI Novell NetWare AppleTalk wireless etc o PANs Personal Area Networks Home networks small work networks etc o Other networks Telephone networks cable TV networks satellites MAN Metropolitan Area Network SAN System Area Network etc Categories of Networks based on the Sharing Done on Links l PointtoPoint or storeandforward links connect only two nodes 2 Multiple Access or broadcast links allow more than two nodes to share a single physical medium Dr Tracy Bradley Maples Fall 2005 3 Categories of Networks based on the Switching across Links l Circuitswitched networks provide service by setting up a total path of connected links from the origin to the destination host Example the telephone network A control message is first sent to setup a path from the origin to the destination A return signal informs the origin that data transmission may proceed Once data transmission starts all channels in the path are used simultaneously and the entire path remains allocated to the transmission whether or not it is in use Packetswitched networks decompose messages into small pieces called packets Example the lntemet and email These packets are each numbered and make their way through the net in a storeandforward fashion Links are considered busy only when they are currently transmitting packets Switching Performance Issues Header overhead ie the amount of quotextraquot information that must be sent along with the data to ensure proper transmission For large amounts of data circuit switching lt packet switching Transmission delay ie the amount of time it takes data from the time it enters the network until it arrives at its39 destination For short and bursty messages packet switching has the lowest delay For long continuous streams of data circuit switching has the lowest delay Dr Tracy Bradley Maples Fall 2005 4 History of Networking WANs Widearea networks c 1970 Driving force The need for government and university researchers located in various parts of the United States to communicate ideas and data between computers Examples ARPANET was created in the early seventies Funded by ARPA DARPA Prototype for what has evolved into the lntemet Created by folks from Berkeley MIT ATampT Bell Labs etc LANs Local Area Networks c 1980s Driving force The creation of the personal computer in the mid70s and its widespread usage in the mid80s Evolution Sneaker Net 6 Data Switches 6 Disk Servers 6 File Servers Dr Tracy Bradley Maples F all 2005 5 CECS 410 Computers and Networks UNIX Overview The UNIX File System Unix uses a hierarchical or treestructured directory system to store les A diagram of a portion of a le tree is shown below with the directory called the quotrootquot directory at the top of the tree Dr Tracy Bradley Maples Fall 2007 1 In the gure above some of the directories shown are Name Directory Contents Name Directory Contents bin UniX utilities such as etc administrative files ls cat cp cal and directories such spell date tee etc as the le quotpasswdquot described below which contains login information for each user account usr additional utilities lib libraries such as C language and mathematics libraries tmp temporary files this dev peripheral devices directory is cleaned such as disk drives out periodically and terminals home user directories uva locally installed utilities Dr Tracy Bradley Maples Fall 2007 File System Definitions Defn A UNIX le is a collection of characters stored together Defn A UNIX directory is a collection of UNIX les Defn Your home directory is the directory you are in when you rst log into your UNIX account Note You can move from one directory to another within the UNIX le system Defn Your current directory or working directory is the UNIX directory you are working in at a particular time Example When you rst log into your account your working directory is your home directory Defn A UNIX le system is the organization of the UNIX les on a UNIX computer system UNIX le systems are organized into a quottreequot structure of les and directories Terms root leaf parent child root C quot39J ixquot 1 l fax bin dew at home tmp usr var Users home cirenmnes39b Every le and directory has a name Your home directory has the same name as your account username Dr Tracy Bradley Maples Fall 2007 3 Naming Files Naming convention File and directory names may be up to 14 characters long The following may be used Uppercase letters AZ Lowercase letters az Numerals 09 Period underscore comma Examples Legal filenames Illegal filenames Elvis Elvis EPresley E Presley HelloWorld HelloEverybocly NolFile NolFile Dr Tracy Bradley Maples Fall 2007 4 Pathnames In the UniX system all the commands you type as well as peripheral devices such as disk and tape drives can be specified as a path to a file Defn A pathname is an address that uniquely specifies a file39s location in the UNIX file structure Defn An absolute pathname gives the position of a file from the root directory Absolute pathnames always begin With Dr Tracy Bradley Maples Fall 2007 5 deU CDDI Lanqarom nnrsat Examples Filename Absolute pathname jack homejack jill homejill possum homejillpossum kangaroo homejillMarsupialskangaroo Important Your home directory has the pathname J ack s home directory has the pathname jack Dr Tracy Bradley Maples Fall 2007 Defn A relative pathname is a pathname that begins at the working directory quotdotquot the current working directory quotdotdotquot the parent of the current working directory tortmenu Ucears E515 Mafiupia39s pc wm b4rd39tu0L kanqarsu Auras Examples Suppose your current working directory is jill Filename Relative pathname possum possum kangaroo Marsupialskangaroo jill home jack jack Dr Tracy Bradley Maples Fall 2007 Basic UNIX File Commands ls list the contents of a directory unixgt ls ltretgt unix gt ls ltdirectorynamegt ltretgt Files are quothiddenquot from the simple ls command when their name begins with a period To display hidden files the a option is used with IS unix promptgt ls a ltretgt unix unixgt ls a ltdirectorynamegt ltretgt mv move a file from pathnamel to pathname2 rename a file unixgt mv pathnamel pathname2 ltretgt Example unixgt mv possum Marsupialsopossum quotinoves wi e possum to Marsupialsopossum cp copy a file from pathnamel to pathname2 unixgt cp pathnamel pathname2 ltretgt Example With current working directory jill unixgt cp possum Marsupialsopossumdm maWS w file possum and calls the new le Marsupialsopossum Dr Tracy Bradley Maples Fall 2007 8 Cunt39immrj Ciceang Bats Warsupiais barMi can t karqa roL UFILFSSLI H wombat gt redirect the output from a command to a le unixgt ltcommandgt gt ltfilenamegt ltretgt Example unixgt l s gt 1 i sting redirects the output from the command 1s into a le called listing gtgt append add to the end of a le unixgt ltcommandgt gtgt ltfilenamegt ltretgt Example uniXgt pwd gtgt listing append the pwd information onto the end of the le listing Dr Tracy Bradley Maples Fall 2007 9 cat View the contents of a file concatenate unixgt cat ltfilenamegt ltretgt unixgt cat ltfilenamelgt ltfilename2gt ltfilenameNgt ltretgt Example unixgt ls gt listing nemaWSh mg unixgt cat listing displays listing unixgt cat filel file2 file3 displays the three files one after another more View the contents of a le one page at a time unixgt more ltfilenamegt ltretgt ltspacegt will display the next page ltretgt will display one line at a time q will quit more Example unixgt l s gt 1 i sting creates listing unixgt more listing displays listing Dr Tracy Bradley Maples Fall 2007 10 mkdir create a new directory unixgt mkdir ltnewdirectorynamegt ltretgt Example If the current working directory is jill unixgt mkdi r cecs l 2 6 a subdirectory to jill called cec5126 will be created jark 1 11 COHUDEMS Ursans BaLs 43quot wombat hanmcoar I hangar opassum 1mm cd change your working directory unixgt cd ltretgt returns to home directory unixgt Cd ltdirectorypathnamegt ltretgt Example If the current working directory is jill unixgt Cd jackContinents will move the working directory to h0mejacldC0ntinents Dr Tracy Bradley Maples Fall 2007 pwd show the name of your working directory unixgt pwd ltretgt displays current directory path Example If the current working directory is jill unixgt pwd will show that the present working directory is homejill rmdir remove a directory unixgt rmdir ltdirectoryr1amegt ltretgt rmdir will remove a directory if it is empty If it still has files inside of it it will give and error message Example If the current working directory is jill unixgt rmdir j ackOceans will remove the directory homej ackOceans rm remove a file unixgt rmdir ltfiler1amegt ltretgt 1m will remove a files Example If the current working directory is jill unixgt rm Bats will remove the file homejillBats Dr Tracy Bradley Maples Fall 2007 12 CECS 410 Computers and Networks UNIX Miscellany mv cp su sudo and making your own commands mv and cp In UNIX two commands are used for copying renaming and moving les mv move a le from pathnamel to pathnameZ to rename or move a le unixgt mv pathnamel pathnameZ ltretgt Example With current working directory jill unixgt mv possum Marsupialsopossum moves the le possum to Marsupialsopossum or unixgt mv possum Opossum renames the le possum to opossum still within directory jill Verrr nEWL Hcenrs Huh Hanna39s 35an mc rm Lannarm arm Dr Tracy Bradley Maples Fall 2007 1 cp copy a file from pathnamel t0 pathnameZ unixgt cp pathnamel pathnameZ ltretgt Example With current working directory jill unixgt cp possum Marsupials opossum duplicates the le possum and calls the new file Marsupialsopossum The su and sudo Commands Modi ed from Ubuntu Documentationhttpshelp ubuntu comcommunity In Linux and Unix in general there is a superuser named root 0 The Windows analog of root is Administrator The superuser can do anything and everything and thus doing daily work as the superuser can be dangerous 0 You could type a command incorrectly and destroy the system Ideally you run as a user that has only the privileges needed for the task at hand In some cases this is necessarily root but most of the time it is a regular user The su Command In many versions of UNIX a person can become superuser by using the su command and enetering the superuser password Dr Tracy Bradley Maples Fall 2007 2 The sudo Command By default the root account password is locked in Ubuntu This means that you cannot login as root directly or use the su command to become the root user however since the root account physically eXists it is still possible to run programs with rootlevel privileges This is where sudo comes in it allows authorized users to run certain programs as root without having to know the root password This means that in the terminal you should use sudo for commands that require root privileges simply prepend quotsudoquot to all the commands you would normally run as root Just remember when sudo asks for a password it needs YOUR USER Password and not the root account password Is is better to use su or sudo Note Allowing other users to run sudo To add a new user to sudo open the Users and Groups tool from System gt Administration menu Then click on the user and then on properties Choose the User Privileges tab In the tab find Executing system administration tasks and check that In the terminal this would be sudo adduser user admin where you replace user with the name of the user Dr Tracy Bradley Maples Fall 2007 3 CECS 410 Computers and Networks UNIX and Linux OS Review DLfn The operating system OS is the software that manages the way other programs run on the computer The OS controls all peripheral devices attached to a computer and handles communication between the user and the computer OS Timeline 1964 OS360 For IBM 360 Computers 1964 DOS360 DOS for IBM 360 Computers L T 978 Apple DOS31 First Apple 0 1981 MS DOS Microsoft s DOS 1984 Mac OS 10 First Mac OS 1985 MS Windows 10 First Windows OS l r lllaf sui quotll7rllr 1995 Windows 95 1997 Mac OS 76 1998 Windows 98 2000 Windows 2000Me 2001 Windows XP 006 Microsoft Vista Dr Tracy Bradley Maples Fall 2007 l Unix Modified from Wikipedia Unix or UNIX is a computer operating system originally developed in the 1960s and 1970s by a group of ATampT Bell Labs employees including Ken Thompson Dennis Ritchie and Douglas Mcllroy Today39s Unix systems are split into various branches developed over time by ATampT several other commercial vendors as well as several nonprofit organizations Unix was designed to be portable multitasking and multiuser The Unix systems are characterized by various concepts plain text files command line interpreter hierarchical file system treating devices and certain types of interprocess communication as files etc In software engineering Unix is mainly noted for its use of the C programming language and for the Unix philosophy During the late 1970s and early 1980s Unix39s in uence in academic circles led to massive adoption particularly of the BSD variant originating from the University of California Berkeley of Unix by commercial startups the most notable of which is Sun Microsystems Dr Tracy Bradley Maples Fall 2007 2 Features of Linux Linux is a UNIXlike operating system Linux is free Linux provides opensource software ie the code used to write Linux is also available Linux was first released in 1991 Linux originally relied on the GNU Project libraries Linux aims for software that is interoperable ie it runs on multiple hardware platforms Linux is controlled by its developer and user communities Linux comes in many avors You can develop a Linux flavor and sell it Popular versions avors of Linux include Debian RedHat Fedora Core Ubuntu and many more Check out the Ubuntu home page wwwubuntucom Dr Tracy Bradley Maples Fall 2007 3 CECS 410 Computers and Networks Wireless LANs What is wireless networking1 The term wireless networking refers to technology that enables two or more computers to communicate using standard network protocols but without network cabling Strictly speaking any technology that does this could be called wireless networking The current buzzword however generally refers to wireless LANs This technology fuelled by the emergence of crossvendor industry standards such as lEEE 80211 has produced a number of affordable wireless solutions that are growing in popularity with business and schools as well as sophisticated applications where network wiring is impossible such as in warehousing or pointofsale handheld equipment 6 1 Modi ed from httpwww irnmsn 39 39 39 f Wilvivaalhtnll1 Dr Tracy Bradley Maples Fall 2007 What is a wireless network made up of There are two kinds of wireless networks 1 An ad hoc or peertopeer wireless network consists of a number of computers each equipped with a wireless networking interface card 0 Each computer can communicate directly with all of the other wireless enabled computers 0 The computers can share les and printers this way but may not be able to access wired LAN resources unless one of the computers acts as a bridge to the wired LAN using special software This is called quotbridgingquot Figure 1 AdHoc or Peert0 Peer Networking Each com puterw ilh a wireless interface can communicate directly with all of the others Dr Tracy Bradley Maples Fall 2007 2 A wireless network can also use an access point or base station 0 In this type of network the access point acts like a hub providing connectivity for the wireless computers 0 It can connect or quotbridgequot the wireless LAN to a wired LAN allowing wireless computer access to LAN resources such as file servers or an existing Internet connection There are two types of access points a Dedicated hardware access points HAPs or wireless access points WAPs such as Lucent39s WaveLAN Apple39s Airport Base Station or WebGear39s AviatorPRO Wrwma Network Wired Elhert rel NBIWWR Hardware 5130855 P0311 HIE Server Figure 2 Hardware Access Point W ire less connected com puters using a Hardware Access Point Dr Tracy Bradley Maples Fall 2007 b So ware Access Points whxch run on a computer eqmpped wnh awxreless networkmterface card as usedm an adrho r eerrtorpeerwuelessnetwork EmlynAm mm mm m m Pom F39gum 3 SnfBNareAcc mm w we less cunnecled cumpula s usmg a Su ware Access Fumt n Mm qmmmmw What is IEEE 80211 Wireless networking hardware requires the use of underlying technology that deals with radio frequencies as well as data transmission The most widely used standard is IEEE 80211 produced by the Institute of Electrical and Electronic Engineers IEEE 0 This is a standard defining all aspects of Radio Frequency Wireless networking How many wireless networked computers can use a single access point 0 This depends upon the manufacturer Some hardware access points have a recommended limit of 10 with other more eXpensive access points supporting up to 100 wireless connections Using more computers than recommended will cause performance and reliability to suffer 0 Software access points may also impose user limitations but this depends upon the specific software and the host computer39s ability to process the required information If my computer is connected to a wireless LAN can it communicate with computers on a wired LAN as well 0 Yes to do this you will need some sort of bridge between the wireless and wired network This can be accomplished with an access point 0 Hardware access points are available with various types of network interfaces such as Ethernet or Token Ring but typically require extra Dr Tracy Bradley Maples Fall 2007 hardware to be purchased if your networking requirements change Dr Tracy Bradley Maples Fall 2007 What is the range of a wireless network 0 Each access point has a finite range within which a wireless connection can be maintained between the client computer and the access point 0 The actual distance varies depending upon the environment manufacturers typically state both indoor and outdoor ranges to give a reasonable indication of reliable performance 0 When operating at the limits of range the performance may drop as the quality of connection deteriorates and the system compensates 0 Typical indoor ranges are 150300 feet but can be shorter if the building construction interferes with radio transmissions o Longer ranges are possible but performance will degrade with distance 0 Outdoor ranges are quoted up to 1000 feet but again this depends upon the environment Dr Tracy Bradley Maples Fall 2007 Can I have more than one access point Yes multaple aeeess ppmts ear be eormeeted to a wrred LAN or sometarrtes even to a second wrreless LAN xf the aeeess pomt supports thrs In ost eases separate aeeess pomts are rrttereortrteeted ma awrred r rte m s AN providmg wt e1ess con etavrty peerfre areas such as of ces or classrooms but eormeeted t am wrred LAN for aeeess to networkresourceS such as le servers wtmass mtth thuss quotma 2 Figum A Mtutiple Ac mm w tretess connected cumpmers usmg Mmttple Aeeess Pemts n Mm qustmmw o If a single area is too large to be covered by a single access point then multiple access points or extension points can be used Wimms V Wired NLW qu Eurath Netwmk He Samar amnion Ful l Figure 5 Extension Point W ire less connected com puters using an A ccess Point with an Extension Point Dr Tracy Bradley Maples Fall 2007 What is Roaming A ereless computer can roam from one access pOmLLO another wth the software and hardware malntalnlng a sleady nemwork connecuon by monltorlng Lhe slgnal slrenglh from mrmnge access polan and locklng on to the one wth the best quallty Usually thls ls completely lransparenl to the user they are not aware that a dlffermt access polnt ls belng used from area to area Access polan are requlred lo haye overlapplng wlreless areas to achleve thls as can be seen n the followlng dlagmm Alba l nu saw Mm Palm Vllvnms mum Figure Rnaming A user Dan M 0V8 frml A real M Ma 2 ransaaren y The ereless netwurkmg hardware autumatlcally swaps tn the Access Fumt with Lhebestslgnal Not all access polan are capable of bemg con gured to support roammg Also ofnote ls that any access polan for a slngle vendor should be used when lrnplenenung roarnlng as there ls no of clal m nwhr qmwhslmmn standard for this feature Dr Tracy Bradley Maples Fall 2007 Can I use a wireless network to interconnect two LANS Yes Wtretesshetworkthg offers a costceffecuve sotuttoh to users wtth dtf cutt phystcat thstauattohs such as campuses hospttats or busmesses wtth more than one locattoh m trhrhedtate proxtrmty but separated by pub hc thoroughfare Th1 type ofthstauattoh requtres two access pothts Each access port acts as a bndge or router corhectthg tts owh LAN to the wtretess corhecttoh The wtretess cohhectroh allows the two access pohts to commumcate wah each other and therefore mtercorhect the two LAN S Q 0 mass mun Moka N tn LAN Win Cmumunicau39nns A H am are Assess Figure 7 LA 2 pumt prewarhg wuetess cumecavrty ta lucal cumputers and a su tvmre access pumt The su thre access pumt pruwaes whee Ethernet netwurk z D nwhl qmwkslmmn computers access to Wired Network 1 What about security 0 Wireless communications obviously provide potential security issues as an intruder does not need physical access to the traditional wired network in order to gain access to data communications 0 However 80211 wireless communications cannot be received much less decoded by simple scanners short wave receivers etc This has led to the common misconception that wireless communications cannot be eavesdropped at all However eavesdropping is possible using specialist equipment 0 To protect against any potential security issues 80211 wireless communications have a function called WEP Wired Equivalent Privacy a form of encryption which provides privacy comparable to that of a traditional wired network If the wireless network has information that should be secure then WEP should be used ensuring the data is protected at traditional wired network levels 0 Also it should be noted that traditional Virtual Private Networking WPN techniques will work over wireless networks in the same way as traditional wired networks Dr Tracy Bradley Maples Fall 2007 How can I use a wireless network to share an Internet connection onee you realrse that wrreless eards are analogous to ethernet eards and that ernpty spaee ls analogous to ethernet eablrng the answer to thrs questron beeornes elear To share an Internet eonneetron aeross aLAN you needtwo thrngs 1 an Internet shanng hardware oleyree or soltware program 2 aLAN KyourLAle wrreless the sarne errtena apply You need 1 anaeeessporntanol 2 awlrelessLAN mums Newark 0 mlmml mme torment Acwshml F39gum y Hardware Access Point w lreless cunnemd tum plum usmg 3 Hardware Aeeess Pulnt fur shared lntemet aeeess n mmdqmnlnummt If I use a wireless network to connect to the Internet does my ISP need a wireless network too 0 If you use a wireless network to connect to the Internet the wireless part only concerns your LAN 0 The communications link from your LAN to your Internet service provider ISP would be identical whether or not you had a wireless network 0 For example if you connected an ethernet network to the Internet via a 56K modem when you upgraded your network to use wireless you would still use the same 56K modem to connect to the Internet Can networking software identify a wireless computer in the same way it can identify an ethernet computer on the network Wireless cards look just like ethernet cards to your network drivers 0 In fact wireless networking cards have unique MAC hardware addresses that are formatted like ethernet hardware addresses allocated from the same standards organization Can I mix wireless equipment from different vendors 0 Because most wireless networking hardware vendors support the 80211 standard they can interoperate 0 When purchasing wireless networking hardware from separate vendors be sure to obtain guarantees from the vendors that the hardware will interoperate and follows the standards Dr Tracy Bradley Maples Fall 2007 W39hat MAC protocol does Wireless Use compuler l compuler 2 computer 3 ernrteolrange 7Not all stataons reeewe all transrnrssrons 7 Cannotuse CSMA CD Exampleln or 7Maenrnurn txansmlsslon dlstance ls d 7 Stanons land 3 do not reeewe eaeln otlner39s transrnrssrons CSMA CA Useol on wlreless networks Bonn sldes senol srnall message followed by olata txansmlsslon 7 er about to senolto Y 7 Yls about to reeewe from x 7 Data frame sent from x to Y 7 Y senols a frame tlnat says tlne olata was successfully reeeweol Pnrgnse Inform all stauons 1 range ofX or Ybefore transrnlsslon Known as Callixian Avoidance CA 1 Mm qukslmmW Dr Tracy Bradley Maples Fall 2007 CECS 410 Computers and Networks Network Security Network Security Problems Primary issues 0 Privacy preventing others from listening or eavesdropping to information being sent over a network 0 Authentication preventing others from masquerading as someone else and ensuring that the stated author of a message is indeed the author 0 Message integrity ensuring that messages are received as they are sent without any malicious changes Primary solution 0 Data encryptiondecryption also called enciphermentdeciphennent or encodingdecoding Concerns 0 Degree of security Is it really safe 0 Performance speed of the encryptiondecryption Is it fast enough to be practical Dr Tracy Bradley Maples Fall 2007 Basic Encryption Terminology data encryption The act of applying a transforming function to data with the intention that only the receiver of the data will be able to read it data decryption The act of reversing an encryption process to recover the data from an encrypted message encryption key The input to the encryption function that allows transformation of the data plaintext The original nonencrypted message ciphertext The encrypted message intruder An unauthorized entity trying to intercept a message 0 Alice and Bob want to exchange secret messages 0 The intruder Trudy tries to interfere Alice daTa conTrol me sages channel secure receiver secure dafa sender data Dr Tracy Bradley Maples Fall 2007 Simple Encryption Examples Transposition of the plaintext Plaintext I LOVE COMPUTERS Shift all letters 3 places in alphabetical order Caesar Cipher 8 places Ciphertext L ORYH GRPSXWHUV Substituting using a ciphertext alphabet Text Alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ Substitution Alphabet QWERTYUIOPLKJHGFDSAZXCVBNM Plaintext I LOVE COMPUTERS Substitute with the new alphabet Ciphertext O KGWT EGJKXZTASZ Dr Tracy Bradley Maples Fall 2007 3 Secret and Public Key Schemes There are three types of cryptographic algorithms 1 secret key 2 public key 3 message digest or hash functions Secret key encryption schemes rely on the same key being used for both encryption and decryption Both the sender and the receiver must have the secret key Plaintext Plaintext Encrypt with secret key Decrypt with secret key Ciphettext Secret key encryption Main idea Both the sender and the receiver must have the same secret key Dr Tracy Bradley Maples Fall 2007 4 Public key encryption schemes use a different key to decrypt the ciphertext from the one that was used to encrypt it A public key system uses a pair of keys one for the sender the quotprivatequot key and the other for the recipient the quotpublicquot key Plaintext Plaintext Encrypt with Decrypt with public key private key Ciphcrtext Public key encryption Main idea The public key pair is generated in such a way that a message encrypted with a public key can only be decrypted using the corresponding private key Cryptographic hash functions compute a cryptographic checksum over a message The cryptographic checksum is sent over the network along with the plaintext message The hash function is chosen so that it is virtually impossible for two messages to hash to the same checksum Main idea The cryptographic checksum does not protect an intruder from intercepting a message rather it is designed prevent malicious changes from being made to the message Dr Tracy Bradley Maples Fall 2007 5 Secret Key Example Data Encryption Standard DES DES is a block cipher that works on 64bit blocks of data using a 64bit key only 56 bits of the key are actually usable the last 8 are parity bits DES encryption and decryption have three phases 1 the 64bit plaintext message is permuted shuf ed 2 the encoding operation is applied 16 times to the message 3 the inverse of the original permutation is reversed DES Steps The sender used the 64bit key to encode the plaintext The ciphertext is sent across the network The receiver uses the same 64bit key to decipher the block The blocks are reassembled into the original message DES Notes Encoding and decoding using the same procedure Encoding and decoding in DES are very fast The US Government has certified DES but it has not been proven to be secure The only known way to break DES is to search through all possible 256 keys On the average you would only need to search 255 or 36 x 1016 possibilities Problem How do you securely distribute the secret key Dr Tracy Bradley Maples Fall 2007 6 Public Key Example Rivest Shamir and Adelman RSA A very secure easy to use encryption scheme The important step in RSA is selecting the publicprivate key pair carefully The keys are 512bits long and chosen using number theory to be relatively prime numbers no common factors greater than 1 RSA is secure because factoring large primie numbers is computationally expensive Implementation details The public keys can be easily published in a phone book of public keys The private keys are issued through a secure trusted central agency Problem RSA encryptiondecryption is too slow DES is one hundred times faster than RSA Dr Tracy Bradley Maples Fall 2007 7 Combining the Private and Public Key Schemes One solution that addresses the problems of both DES and RSA is to combine the two approaches Use RSA to securely transmit a DES private key across the network Slow but easy to do and secure Once a shared DES private key is exchanged begin transmission of the message using DES The remainder of the transmission will be secure and fast This combination scheme is often used in the Internet to provide security Example The HTTPS protocol Dr Tracy Bradley Maples Fall 2007 8 CECS 410 Computers and Networks Computers Part 1 What is a Computer A computer is composed of two main parts 1 Software 2 Hardware Computer Software Defn A computer program is a set of instructions for a computer to follow Defn Computer software is the collection of programs used by a computer which includes operating systems compilerstranslators applications Dr Tracy Bradley Maples Fall 2007 Computer Hardware There are three main classes of computers 0 PC Personal Computer Relatively small used by one person at a time o Workstation Larger and more powerful than a PC 0 Mainframe Still larger Requires support staff Shared by multiple users 0 Handheld devices Dr Tracy Bradley Maples Fall 2007 Computer Organization There are five main components in a computer p x Input devices 0 Allows communication into the computer N Output devices 0 Allows communication out to the user Processor CPU 0 The brain of the computer a 4 Main memory 0 Memory locations containing the running program U Secondary memory Permanent record of data often on a disk 3939i num 39 aquot WWI hr39snmm 39ih fli l39il pmnmm in n39 H m mum I an FINJMIIIKM IILIII Mng mm F urmu Dr Tracy Bradley Me Computer Memory Computer memory stores I programs data I results Types of eomputermemory 0 Man Memory 0 RAM Random Access Memory 0 Semr permanent datarstorage eapabrlrty n mmwmmtmmmt Main Memory 0100 1001 1100 1100 mommmwnn Main Memory 39 Long list ofmemory locations 39 Each contains zeros and ones 39 Can change during program execution 39 Each memory location has eight bits 39 The address is the number that identi es a memory location Larger Data Items Some data is too large for a single byte so it takes more than one byte for storage The address refers to the rst byte Data Representation O A may look like 01000001 0 65 may look like 01000001 0 An instruction may look like 01000001 0 How does the computer know the meaning of01000001 Interpretation depends on the current instruction Dr Tracy Bradley Maples F211 mm Computer CPU 0 The brains of the computer 0 Arithmetic calculations are performed using the ArithmeticLogical Unit ALU 0 Control unit decodes and executes instructions 0 Arithmetic operations are performed using binary number system The fundamental CPU building block is a switch Switches are made from ultrasmall transistors Examples 0 The Pentium processor contains about three million transistors o The Pentium Pro has about 55 million transistors Dr Tracy Bradley Maples Fall 2007 InputOutput Devices lO Devices are accessories that allow computer to perform specific tasks IO Devices 0 Receiving information for processing 0 Return the results of processing 0 Store information Common input and output devices 0 Printer 0 Joystick 0 CDROM 0 Keyboard Monitor Dr Tracy Bradley Maples Fall 2007 Computer Software Computer Software can be divided into two categories 0 Application software Programs designed to perform specific tasks that are transparent to the user 0 System software Programs that support the execution and development of other programs Two major types of System Software 0 Operating systems 0 Translation systems Dr Tracy Bradley Maples Fall 2007 Application Software Application software is the software that has made using computers indispensable and popular Common application software 0 Word processors 0 Desktop publishing programs 0 Spreadsheets 0 Presentation managers 0 Drawing programs Operating Systems Operating systems control and manage the computing resources Important services that an operating system provides 0 File system 0 Commands that allow for manipulation of the le system 0 Ability to perform input and output on a variety of devices 0 Management of the running systems Examples of Operating Systems MSDOS Windows Unix Dr Tracy Bradley Maples Fall 2007 Machine Languages and Programming Languages Machine Language is o the Native tongue of the computer 0 It is binary 0s and Is that specify what to do For Example 0010 0000 0000 0100 1000 0000 0000 0101 00110000 0000 0110 High Level Programming Languages 0 Resemble human language C C Pascal 0 Make it easy for humans to write computer programs For Example cost price tax Compilers take programs written in highlevel programming languages and translate them into machine language Dr Tracy Bradley Maples Fall 2007 CECS 410 Computers and Networks Network Interconnection Devices Repeaters Hubs Bridges Switches and Routers Repeaters and Hubs A repeater is a network interconnection deVice that regenerates signals coming in one link onto another 0 Repeaters use no logic in regenerating signals so data and noise are both sent through the repeater o Repeaters can be used to extend the range of a single LAN A hub is a network interconnection deVice that accepts an input signal from an incoming port and copies it onto all of its output ports Tracy Bradley Maples Fall 2007 Physically hubs are 0 Small electronic devices 0 Have connections for seveml computers eg 4 or 20 Logically hubs 0 Opemte only on signals 0 Propagate each incoming signal to all connections 0 Are similar to connecting segments With repeaters 0 Do not understand packets so it cannot lter them Hubs have extremely loW cost Ethernet Huh T Ethernet Cables r quotTwisted Pairquot Adapter cm File Server Tracy Bradley Maples Fall 2007 Bridges and Switches A frame is a packet of data passed across the network at Layer 2 of the network protocol stack 0 At Layer 2 of the protocol stack media access control MAC a esses are used to send messages from one computer to another 0 MAC addresses are also known as physical addresses or hardware addresses 0 MAC addresses are not the same an IP addresses IP addresses are software addresses that can be changed MAC addresses are hardware addresses associated with the network interface card MC and cannot be changed 0 Frames have two MAC addresses in their header 1 the MAC address of the source computer and 2 the MAC address of the destination computer DESI Souermme Preamble Address AddressType DaalnFrame one n l7 mm 47 mmdgl The Ethernet ame format Tracy Bradley Maples Fall 2007 A bridge sometimes called a tranqmrent bridges is a network in erconnection device that forwards data frames coming in from one connection to the outgoing link that corresponds to the MAC destination address in the frame A bridge 0 Is a hardware device 0 Connects two LAN segments 0 Forwards frames 0 Does not forward noise or collisions from the incoming connection 0 T inter name ua eu on L 4 A bridge is used to connect two localarea networks LANs or two segments of the same LAN that are the same type A network with a bridge Tracy Bradley Maples Fall 2007 A switch is a network interconnection device that accepts a frame from an incoming port and forwards the frames to the outgoing link that corresponds to the MAC destination address in the frame A switch o Is physically similar to a hub o Is logically similar to a bridge 0 It operates on frames 0 It understands MAC addresses 0 It only forwards frames when necessary 0 Permits separate pairs of computers to communicate at the same time 0 Has higher cost than a hub Switches can be used in heavily loaded networks to isolate data ow and improve performance Switch prices are dropping so that there is very little difference from hub prices Most home users get very little if any advantage from switches even when sharing lntemet connections since most lntemet connections are in the 12 Mbps range far below LAN speeds of 10 100 Mbps speeds Tracy Bradley Maples Fall 2007 An IP datagram is a packet of data passed across the network at Layer 3 and above of the network protocol stack 0 At Layer 3 and above of the protocol stack IP addresses are used to send messages from one computer to another 0 IP addresses are software addresses that can be changed according to the network subnet they are attached to 0 IP datagrams have two IP addresses in their header 1 the IP address of the source computer and 2 the IP address of the destination computer Tracy Bradley Maples Fall 2007 A router is a network interconnection device that accepts an 1 agram from 39 coming port and formrds the datagnain to the outgoing link that corresponds address in the from 135139 connmmion Sava to the IP destination Tracy Bradley Maples Fall znm A router o Forwards data depending on IP addresses not Hardware MAC addresses 0 Isolates each LAN into a separate subnet with separate IP addresses 0 Needs to be set up before they are used Once set up they can communicate with other routers and learn the way to parts of a network that are added after a router is initially configured Tracy Bradley Maples Fall 2007 CECS 410 Computers and Networks Ethernet LANs Sharing the Transmission Media in a LAN 0 Shared medium used for all transmissions 0 Only one station transmits at any time o Stations take turns using medium Local area networksLANs depend on a Media Access Control MAC policy to regulate the sharing of the transmission medium There are two primag categories of multiple access protocols 1 Allow Collisions During Transmission Contention Access gt MANAGE COLLISIONS Example Ethernet 2 Prevent Collisions During Transmission Controlled Access gt COLLISION FREE Examples Token Ring Networks Dr Tracy Bradley Maples Fall 2007 Ethanet Bu Netwm39k Most popular LAN widely used IEEE standard 8023 Several generations 7 Same frame format 7 Different data rates 7 Different wiring schemes Illustration ofEtha39net Transmission bIIINIH Lab139 hmrtl mi immin mm inquot delimit dummy Atmm vmmulm39l muttoni m rdlww39i u a A trim Mm mm o ummr arealt1 tubr Ethernet Cable snared bus Only one station transmits at any time Signal propagates across entire cable All stations receive transmission The MAC policy is called CSMAI an Dx Txxy xadlzyMzyks Fan m7 C SMA CD 0 Most popular contention access scheme 0 CSMACD stands for Qarrier ense Multiple Access with Qollision Detection CSMACD Transmission Satans are attached to a bio irecIona bus C SMACD Tr an sm ission Algorithm I Assemble Framel I Is Channel Yes Busy N Increment 8 dJ en am Atten39pts 0 T Yes i Start Collision Too Many N0 Transmission Detected Atter39rpts Yes Transmission Done Dr Tracy Bradley Maples Fall 2007 CSMA CD Paradigm Multiple Access MA Multiple computers attach to shared media Each uses same access algorithm 0 Carrier Sense CS Wait until medium idle Begin to transmit frame 0 Simultaneous transmission possible but Interfere with one another Called collision o CSMA plus Collision Detection CD Listen to medium during transmission Detect Whether another station s signal interferes Back off from interference and try again Backoff after Collision When collision occurs Wait random time t1 0 lt t1 lt 1 Use CSMA and try again If second collision occurs Wait random time t 0 lt i lt 2d 0 Double range for each successive collision Called exponential backo Dr Tracy Bradley Maples Fall 2007 CSMACD Collision Detection 555555 a A begins transmission c B detects collision sends jam signal 09 A detects collisionLid before the end of transmission Conclusion The amount of time it takes to detect a collision is twice the propagation delay Dr Tracy Bradley Maples Fall 2007 CECS 410 Computers and Networks LAN Wiring Physical Topology and Interface Hardware Speeds of LANs vs Computers Often LANs operate at a rate so fast that the computer39s CPU cannot process bits at network speed Network Interface Hardware Question How can a computer attach to a network that sends and receives bits faster that the CPU can handle Answer Specialpurpose hardware connects the computer to the network and handles all the details of packet transmission and reception The specialpurpose hardware is known as a network adaptor card or network interface card NIC Dr Tracy Bradley Maples Fall 2007 mm m mu u mm uhxu m M w Am m n m I m mu ummu W n ml quot3mquotle n1 39qu mmamm Nll39 myme mm m m mm7r WWquot mumm 1m wr nu hm A H nmpmrl r NICs functxon hke IO devxces Inc are bule for a specl c network Bechnology m MWWksm znm