1. Challenges of Computer Networks
1.1.What is a Computer Network?
Wikipedia: A computer network is a group of computers that use a set of common communication protocols over digital interconnections for the purpose of sharing resources located on or provided by the network nodes.
1.2. Classifying Networks
- By size: Local area networks (LANs) versus Wide area networks (WANs)
- By connectivity: Point to point versus broadcast networks
- By communication medium: Wired, wireless, satellite, Bluetooth, even your TV remote control!!
- By mobility: Fixed versus mobile
1.3. Top level challenges
- Security!
- Problem determination/isolation
- Heterogeneity
- Providing a unified service environment
2. Challenges of sending data
2.1. Common Issues in Networking
- Framing and encoding
- Addressing
- Routing
- Error detection and correction
- Flow and congestion
3. Distributed Systems
3.1. Definition
Wikipedia: A distributed system is a system whose components are located on different networked computers, which communicate and coordinate their actions by passing messages to one another. The components interact with one another in order to achieve a common goal.
3.2. Advantages
- Access to remote resources (sharing)
- Access to computing power that you don’t have locally
- Scalability
- Robustness (duplication of resources)
3.3. What is IP address?
Wikipedia: An Internet Protocol address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.
3.4. Types of Address
- Hostname address, e.g. severn.cs.nott.ac.uk
- IP address, e.g. 128.243.10.4
- Hardware address, e.g. 00-8C-39-7C-B3-14
3.5. Identifying Applications
Port Numbers:
- 80/443
- 8080 …
3.6. IP Addresses - Sending to Many
There are special IP addresses for sending to more than one host (computer):
- A Multicast address allows a message to be sent to a group
- A Broadcast address allows a message to be sent to all hosts on a network
3.7. Types of IP(V4) Addresses
Address Type | Meaning and Packet Delivery |
---|---|
Unicast | Uniquely identifies a single computer, and specifies that only the identified computer should receive a copy of the packet |
Broadcast | Corresponds to all computers, and specifies that each computer on the network should receive a copy of the packet |
Multicast | Identifies a subset of the computers on a given network, and specifies that each computer in the subset should receive a copy of the packet |
4. Introduction of Unix
4.1. Operating Systems
- The program that controls all the other parts of the computer system, manages hardware and software
- Enables you to use the computer system and its facilities
4.2. What does the Kernel do?
- Managing the machine’s memory and allocating it to each process
- Scheduling the work done by the CPU so that the work of each user is carried out as efficiently as possible
- Organising the transfer of data from one part of the machine to another
- Accepting instructions from the user interface and carrying them out.
- Enforcing the access permissions that are set on the file system
4.3. Command involved
- ssh
- sftp
- passwd
5. Unix Filestore
5.1. Files
- From the user’s point of view, all information on the computer is stored in files
- Files may contain many kinds of information, including programs, data and documents
- Like paper files, they have a name (chosen by the user) and some content
- By convention, the filename suffix suggests the type of content
5.2. Directories
- Files are stored in directories (folders)
- Each directory may contain many files and also other directories
- By convention, directory names do not usually have suffixes
5.3. Command involved
- cat
- more\less
- head\tail
6. Absolute and Relative Pathnames
6.1. Two ways of specifying filenames
- From the current directory - relative pathnames
- From the root directory - absolute pathnames
6.2. Command involved
- pwd
- cd
- ls
- mv
- cp
- rm
- mkdir
- rmdir
Lab1
7. Unix File Operations
7.1. UNIX thinks everything is a file!
- Directories and programs are all files!
- Input and Output channels are files
- All of these things can be manipulated like files
7.2. Shell Metacharacters
- *
- ?
7.3. Command involved
- file
- wc
8. Security and File Permissions
8.1. Permissions lists
- ugo
- rwx == 421
8.2. The effect of directory permissions
- Execute lets you change (cd) into that directory
- (i.e. you are searching the directory)
- Read lets you list files in the directory
- (i.e. you are reading the directory contents)
- Write lets you create and delete files
- (i.e. you are writing to the directory contents)
8.3. Command involved
- chmod
9. Unix Input/Output
9.1. Input and Output in UNIX
UNIX considers input and output to programs to be “streams of data”.
- Could be from the user
- Could be from a file
- Could be from another program
9.2.Redirecting I/O
Each UNIX command has a number of input and output channels, these are files that are specified in arguments.
- STDIN (0)
- STDOUT (1)
- STDERR (2)
9.3. STDIN
- Stands for Standard Input
- This is where programs expect to find their input
- Everything you type at the command line goes onto STDIN
- If you want to read the input from a file instead, use <
9.4. STDOUT
- Stands for standard output
- This is where programs (usually) write any output they generate. By default STDOUT appears in your terminal window
- If you want to save the output to a file instead, use >
- You can also use >> which appends the output onto a file’s contents
9.5. STDERR
- Stands for standard error
- This is where programs usually write error messages. So even if you are redirecting the normal output, you can still see error messages
- You can redirect STDERR using 2>
9.6. Redirecting symbol
Symbol | Meaning |
---|---|
> | redirect STDOUT |
>> | appends |
2>&1 | redirect both(STDOUT&STDERR) outputs |
< | redirects the standard input |
9.7. Piping
- |