Title: Networking with UNIX and Linux Chapter Nine
1Networking with UNIX and LinuxChapter Nine
2Brief History of UNIX
- UNIX system is characterized by a rich tradition
and a culture of personal friendships in an era
of impersonal disconnectedness that, some would
say, the computer itself has fostered - System V
- Versions of UNIX that come from Bell Labs
- BSD (Berkeley Software Division)
- Versions of UNIX from researchers at the
University of California at Berkeley - Berkeley Software Distribution (BSD) Berkeley
versions of UNIX - Added TCP/IP network subsystem to UNIX
- ATT sold rights to UNIX
- Now owned by two groups
- The SCO Group owns rights to UNIX source code
- The Open Group owns UNIX trademark
3Common UNIX Features
- The ability to support multiple, simultaneously
logged in users - Hierarchical file systems that incorporate
demountable volumes - Consistent interfaces for file, device and
interprocess input/output - The ability to start processes in the background
- Coordinate multiple, simultaneously running tasks
- Mount disk partitions on demand
- Apply permissions for file and directory access
and modification - Uniform method of issuing data to or receiving
data from hardware devices, files, and running
programs - Start programs without interfering running
programs
4Common UNIX Features
- Hundreds of subsystems, including dozens of
programming languages - Program source code portability
- User-definable window system, the most popular of
which is the X Window system - Two main categories
- Proprietary
- Open source
5Current State of the Market
- Unix market is huge and highly segmented
- Some real-time implementations of the UNIX system
exist - Operating system must respond to input immediately
6Proprietary UNIX
- An implementation of UNIX for which the source
code is either unavailable or available only by
purchasing a licensed copy from The Santa Cruz
Operation - Suns proprietary version of UNIX is called
Solaris - Runs on SPARC-based workstations and servers,
Intel-based Pentium-class workstations and
servers - IBMs proprietary version of UNIX is called AIX
- Runs on PowerPC-based computers
- Does not run on Macs
- Novells proprietary version of UNIX is called
SUSE - Apple Mac OS X
- Runs on Xserve server
- Runs on PowerPC-based computers
7Choosing a Proprietary UNIX System
- Advantages
- Accountability and support
- Optimization of hardware and software
- Predictability and compatibility
- Drawback
- Customer has no access to the systems source
code and thus cannot create a custom solution
8Open Source Softwareand Open Source UNIX
- Software developed and packaged by a few
individuals and made available to anyone without
licensing fees - Also called freely distributable software
- Includes UNIX-like systems such as Linux, GNU,
FreeBSD, Ubuntu, SlackWare, Mandrake, and RedHat - Flavor
- Different implementations of UNIX-like systems
9Selecting a Network Operating System
- Is it compatible with existing infrastructure?
- Will it provide the security required by the
networks resources? - Can the technical staff manage it effectively?
- Will existing applications run smoothly on it?
10Selecting a Network Operating System
- Will existing applications run smoothly on it
- Will it accommodate future growth (that is, is it
scalable)? - Does it support additional services the networks
users require? - How much does it cost?
- What type of sort can be expected from the vendor?
11Choosing UNIX
- Samba
- Open source software package
- Complete Windows NT-style file and print sharing
facility - UNIX was originally developed as a time-sharing
system - Computing system to which each user must attach
directly to share the resources of that computer - Some proprietary UNIX systems have received
Orange Book certification - Rigorous operating system security specification
first published by U.S. Department of Defense in
1985
12Hardware for a UNIX Server
- Basic system unit must include
- Motherboard with CPU, memory, and I/O control
- Network interface card (NIC)
- Floppy disk drive
- CD-ROM drive
- One or more fixed disks
13Decisions in Choosing Hardware
- Which applications and services will run on the
server? - How many users will this system serve?
- How much random access memory (RAM) will the
server need? - How much secondary storage (hard disk) will the
server need?
14Hardware
- More current lists of supported hardware on the
hardware compatibility list (HCL) at
http//metalab.unc.edu/LDP/HOWTO/Hardware-HOWTO.ht
ml
Minimum requirements for a Linux RedHat server
15Minimum hardware requirements for Solaris 10
16Mac OS X Server Hardware Requirements
17Preinstallation Questions
- What is the new servers name?
- What is the servers IP address?
- What kind of video card is installed in the
server? - What kind of monitor is attached to the new
server? - What is the administrative users password?
- How can I remember all this information?
18Pre-installation Requirements
- A clean PC that satisfies the Linux hardware
requirements - The distribution media for Red Hat version
(CD-ROM and floppy disk) - One or two hours of uninterrupted time
- Read more about multiboot systems at the Linux
installation HOWTO site - http//www.linuxhq.com/LDP/HOWTO/Installation-HOWT
O.html
19A Closer Look at Linux
- Linux multiprocessing
- Supports symmetric multiprocessing (SMP)
- Linux memory model
- From its inception, Linux was created to use both
physical and virtual memory efficiently
20A Closer Look at UNIX UNIX Multiprocessing
- Allocate separate resources (e.g., memory space)
to each process as it is created - Enables partitioning of processes in memory
- Prevent programs from disrupting operation of
entire system - Support symmetric multiprocessing (SMP)
- Solaris up to 128 processors
- Linux up to 32 processors
- Mac OS X Server up to 2 processors
21The UNIX Memory Model
- Use both physical and virtual memory efficiently
- Allocate memory area for each application
- Sharing memory between programs wherever possible
- Increases efficiency
- Most use 32-bit addressing scheme
- Enables programs to access 4 GB of memory
- Most can run on CPUs employing 64-bit addresses
- Virtual memory disk partition or a file
22Layered View of Linux Operating System
23Linux
- Kernel
- Controls computer system resources
- Scheduling user jobs
- Ensure a fair use of system resources
- As in NetWare, is the core of the system
- Also similar to NetWare, it is possible to add or
remove functionality by loading and unloading
Linux kernel modules - Analogous to NetWare NLMs
24Kernel
- Core of all UNIX-type of systems
- Loaded into memory and runs computer turned on
- Coordinates access to computers hardware
- Can add or remove functionality by loading and
unloading kernel modules - Files containing instructions for performing
specific tasks - Kernel origins
- Solaris original ATT UNIX software
- Linux Linus Torvalds
- Mac OS X Server (XNU) Mach
25Linux
- Shell
- Command line and initiates execution of commands
- X Window System
- Graphical User Interface
- Motif(mwm)
- The standard window manager
- fvwm - f Virtual Window Manager
- Allows greater customization
26Client/Server
- Server
- Managers the display
- Client communicates with Server
- Client
- Running program
27Linux Command Sampler
- Command interpreter
- Program that accepts your typing and runs the
command - Also known as a shell
- Keeps track of the command history, much like the
doskey command in DOS and Windows NT
28Shell - xterm
29Linux File and Directory Structure
- Hierarchical file system
- Organization of files and directories on a disk
partition in which directories may contain files
and directories
Linux file system hierarchy
30UNIX System File and Directory Structure
- First OSs to implement hierarchical file system
- /boot directory contains kernel and other system
initialization files - Applications and services stored in /bin and
/sbin directories - /var directory holds variable data
- Users login directories typically in /home
- /Users on Mac OS X Server
31Linux File Services
- Linux includes support for multiple types of file
systems - Local file systems
- Remote file systems
- Its native file system, called ext3
- Allows you to access DOS FAT as well as NTFS
- Can both attach shared file systems and share
local partitions with other users - Windows or NetWare
- Network File System (NFS)
32Linux File Services
- Network File Systems (NFSs) analogous to Windows
shares or NetWare network volumes - Attach shared file systems (or drives) from
Windows, NetWare, or other UNIX servers and share
files with users on other computers - Sun Microsystems NFS
- Samba open source application that implements
Windows SMB and CIFS file system protocols - Included with Solaris, most Linux distributions,
and Mac OS X Server systems by default - Mac OS X Server uses AFP
33Linux File Services
- Disk File Systems
- OSs facility for organizing, managing, and
accessing files through logical structures and
software routines - Native file system type on Linux is ext3
- Solaris employs UFS
- Mac OS X Server employs HFS file system
- Can access FAT and NTFS partitions
34File System
- A file is a sequence of bytes the kernel does
not impose a structure on files. - Files are organized in tree-structured
directories. - Directories are files that contain information on
how to find other files.
35File System
- Path name identifies a file by specifying a path
through the directory structure to the file. - Absolute path names start at root of file system,
e.g., /home/rtracy/phone/calls - Relative path names start at the current
directory, e.g., phone/calls
36File System
- Directories
- Used to organize the hierarchical file system
- Directories are just files with a special format,
so the representation of a file is the basic UNIX
concept. - Ordinary Files
- Plain text or binary files (executable file)
- Special Files
- Special files such as lp for a line printer
/dev/lp
37Disk Organization
- Disks are divided into 512 bytes block
- Four regions
- reserved for booting
- size of disk and boundaries
- file definitions, device numbers, i-numbers to
uniquely identify files - free blocks
38i-node or File Descriptor
- Owners ID
- Physical address
- Protection Bits (r,w,x)
- File Size
- Time of creation, last update, and last use
- File Type (d - for directory)
- Links
39i-node
Memos
Name i-number
notes
Calculate
I-node for notes I-node for Calculate
File Info
File Info
0 block pointer
0 block pointer
1 block pointer
1 block pointer
2 block pointer
2 block pointer
Block 0
Block 1
Block 0
Block 1
Block 2
notes
notes
Calculate
Calculate
Calculate
40File Hierarchy
- Root Directory
- /
- Parent Proceeded by /
- cd Change Directory
- cd .. Up one level
- cd home directory
41Long Listing ls -l
- drwxrwxr-x
- User, group, entire system
- d indicates directory
- r read
- w write
- x execute
- - no acess
42System Utilities
- Used by the system administrator to monitor the
state of the system. - Taskbar - displays taskbar on desktop
- Memory Usage, system load, active processes - top
- Identify Window - display information about a
window - size, location, title
43Linux Command Sampler
- Manual pages
- Linux system documentation for all commands
- Section 1 covers commands typically entered while
typing in a command window - Sections 2 through 7 document the programmers
interface to the UNIX system - Section 8 covers the commands used by
administrators to manage the system
44Linux Command Sampler
- You can access manual pages by entering the man
command in a Linux command window - For example, to read the manual page entry for
the telnet command, enter man telnet in a command
window
45Linux Command Sampler
- To instruct the system to print all files in the
current directory that have been accessed in the
past five days, type find . type f atime 5
print - To list a file named account.xls, type ls
account.xls - Globbing
- Form of filename substitution
- For example, type ls 1 a would produce a
detailed listing of all files with the letter a
46Linux Command Sampler
- Windows NT separator is character is \
(backslash) - The Linux directory separator is / (forward
slash) - In a Windows NT command window, the telnet is
typed as \winnt\system32\telnet.exe - The telnet command in Linux is /usr/bin/telnet
47Linux Command Sampler
- Pipe (entered as a vertical bar )
- Serves as the connection between two commands
- Pipeline
- Two or more commands separated by a pipe
48Linux Command Sampler
49Linux Command Sampler
50Linux Command Sampler
51Linux Command Sampler
- Linux systems keep quite a bit of information
about each file, including - Filename
- File size (in bytes)
- Date and time a files i-node (file information
node) was created - Date and time that the file was last accessed
- Date and time that the file contents were last
modified
52Linux Command Sampler
- Information Linux system keeps about each file
(cont.) - Number of aliases or links to the file
- Numeric identifier of the user who owns the file
- Numeric identifier of the group to which the file
belongs - Access rights for the owner, the group and all
others
53Linux Command Sampler
- To learn about the i-node information, use the ls
command
Example of output from ls
54Linux Command Sampler
- Other valid file types
- l for symbolic link files
- b for block devices
- c for character device files
55Linux Command Sampler
Anatomy of ls output
56Configuring Linux for Network Administration
- Adding groups and users
- Groupadd
- Command to add a new group ID to a Linux system
- Useradd
- Command to add a new user ID to a Linux system
57Configuring Linux for Network Administration
- To add group IDs to a Linux system
- Log in to system as user root
- Type groupadd instructors, then press Enter at
the command prompt to add group instructors - Type groupadd students, then press Enter to add
the group students - Type groupadd administrators, then press Enter to
add the group administrators
58Configuring Linux for Network Administration
- To add a new user and assign the user a password
- Type useradd g users G instructors thomas, then
press Enter to add new user account thomas - Type passwd thomas, then press Enter
- Type the password and press Enter
59Changing File Access Permissions
- To create a directory and assign it to a group
- To log off Linux, type exit, then press Enter
- To log back on to as thomas, enter thomas at the
login prompt - Enter password for thomas
- To create new directory, type the command mkdir
PROGRAMS, then press Enter - List the file with ls l
- Enter the command chgrp instructors PROGRAMS to
assign PROGRAMS to the group instructors
60Changing File Access Permissions
- To change the access permissions for the PROGRAMS
directory - Type chmod gw PROGRAMS to add write access for
the instructors group to PROGRAMS, then press
Enter - Type chmod o-rw PROGRAMS to remove read and write
access by others to PROGRAMS, the press Enter - Type ls l to view the access permission assigned
to PROGRAMS
61Installing Red Hat Version of Linux
- Insert the Boot Diskette disk
- Turn on the computer
- Press Enter
- Press Enter after being prompted for basic
installation information
Welcome to Red Hat Linux screen
62Installing Red Hat Version of Linux
- Press Enter to select your language
- Press the down arrow until us is highlighted,
then press Enter to select it - Choose No to PCMCIA support by repeatedly
pressing the tab key until Linux setup highlights
No, then press Enter - Press Enter to choose Local CD-ROM for the medium
from which youll perform the installation - When Installation Path screen appears, choose
Install, then press Enter
63Installing Red Hat Version of Linux
- Select the type of system being installed by
choosing Server, then press the arrow key until
Setup highlights the word Server, then press
Enter - Press Enter to indicate your system does not have
any SCSI devices - If the Probe Result screen appears once package
installation is complete, press Enter so Mouse
Configuration screen appears - Press Tab once to highlight the Emulate 3 Buttons
field, then press spacebar to select that option - You can change mouse configuration with
/usr/sbin/mouseconfig after the systems up and
running
64Installing Red Hat Version of Linux
- Press Tab and then press Enter
- When Xconfigurator asks if you want to probe for
your video card, use Tab to indicate you want
Setup to probe for your video card, then press
Enter - When completing the video hardware configuration
screens, you can return to previous screens using
the Back function, then press Tab until the word
Back is selected and press Enter - After specifying monitor type, press Tab and then
Enter - Press Enter to test the driver
65Installing Red Hat Version of Linux
- You can use the Back function (by pressing Tab
until Linux setup highlights the Back box, then
pressing Enter) to return to previous screens and
select a different video card or monitor if the
video test pattern looks wrong or doesnt appear - To configure your server to start with a static
IP address, press Enter - On the Configure TCP/IP screen, press Tab to move
between fields, and press Enter to accept the
values and continue with TCP/IP configuration
66Installing Red Hat Version of Linux
Configure TCP/IP screen
67Installing Red Hat Version of Linux
- As the Configure Network screen appears, press
Tab to move between fields and press Enter to
accept the values and complete the servers
TCP/IP configuration
Configure Network screen
68Installing Red Hat Version of Linux
- For configuring time zones, press Tab until Linux
setup highlights Hardware clock set to GMT, press
Tab and then Enter to accept your choices - At Root Password screen, enter the password
twice, then press Tab, and then Enter - Following prompts, create the Linux Emergency
Boot Disk - After final screen appears, press Enter to
restart server - Log in to the new Linux server as user root when
the system presents you with the login prompt
69Internetworking with Other Network Operating
Systems
- UNIX-type of systems and Windows can both
communicate via TCP/IP - File systems not necessarily compatible
- Samba one application that bridges file system
incompatibility - Provides networking services necessary to make a
UNIX-type system a fully featured Windows file-
and printer-sharing server - Communicates with Windows servers using SMB
file-sharing protocol and CIFS protocol
70Internetworking with Other Network Operating
Systems
- Samba
- Communicates with Windows servers
- WINE
- Enables Windows programs to run on Linux
- VMware
- Emulates a complete Intel-based computer
- Telnet unsecured terminal emulation
- SSH encrypted secure shell
- Dozens and dozens of command-line utilities that
enable access to contents of files generated on
other systems
71Internetworking with Other Network Operating
Systems
- All modern flavors of UNIX, Linux, and Mac OS X
Server support data sharing using directory
services based on LDAP - Solaris Sun Java System Directory Server
Enterprise Edition - Linux OpenLDAP
- Mac OS X Server Open Directory
72Linux Internet Servicesand Linux Processes
- Apache
- Open source software application that is the
leading Internet Web server - Mail
- SMTP and POP3/IMAP support
- Linux Processes
- Another UNIX innovation is the notion of
separate, numbered processes