Labs - RNDr. Šárka Vavrečková, Ph.D.

advertisement
Šárka Vavrečková
Hardware
and Communication
Technologies
Institute of Computer Science
Faculty of Filosophy and Science in Opava
Silesian University in Opava
Opava
April 30, 2015
Annotation: This study material is assigned to the students of the subject Hardware a komunikačnı́ technologie (Hardware and Communication Technologies).
We assume at least basic knowledge in hardware, computer networks and operating systems, optimaly lectures of the subject Technical equipment of personal computers.
Hardware and Communication Technologies
RNDr. Šárka Vavrečková, Ph.D.
Available on: http://elearning.fpf.slu.cz/
Institute of Computer Science
Faculty of Filosophy and Science in Opava
Silesian University in Opava
Bezručovo nám. 13, Opava
Typesetted with LATEX
Tato inovace předmětu Hardware a komunikačnı́ technologie je spolufinancována Evropským sociálnı́m fondem a Státnı́m rozpočtem ČR, projekt čı́slo CZ.1.07/2.2.00/28.0014,
“Interdisciplinárnı́ vzdělávánı́ v ICT s jazykovou kompetencı́”.
Contents
1 Hardware basics
1.1 Common hardware components . . . . . . . . . . . . .
1.1.1 Chassis . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Mainboard . . . . . . . . . . . . . . . . . . . . . .
1.1.3 Processor . . . . . . . . . . . . . . . . . . . . . .
1.1.4 Memory modules . . . . . . . . . . . . . . . . . .
1.2 Basic tools . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.1 Common screws and screwdrivers . . . . . . . .
1.2.2 Tools to prevent electrostatic discharge . . . . .
1.2.3 Other tools . . . . . . . . . . . . . . . . . . . . .
1.3 Software for hardware detection in operating systems
1.3.1 Hardware commands in Windows . . . . . . . .
1.3.2 Hardware commands in Linux . . . . . . . . . .
1.3.3 fdisk in Linux . . . . . . . . . . . . . . . . . . .
1.4 Third party software . . . . . . . . . . . . . . . . . . . .
1.4.1 HWInfo . . . . . . . . . . . . . . . . . . . . . . . .
1.4.2 System Spec . . . . . . . . . . . . . . . . . . . .
1.4.3 PC Wizard . . . . . . . . . . . . . . . . . . . . . .
1.4.4 Other software to discover hardware . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
1
1
4
6
8
8
13
14
14
15
19
22
23
23
25
26
27
2 Playing with hardware and reparations
2.1 Processor . . . . . . . . . . . . . . . . .
2.1.1 Recognizing Intel processors . .
2.1.2 Recognizing AMD processors . .
2.1.3 Processor installation . . . . . .
2.1.4 Testing and monitoring . . . . .
2.1.5 Benchmark results . . . . . . . .
2.1.6 Overclocking and underclocking
2.2 Memory . . . . . . . . . . . . . . . . . .
2.2.1 Properties . . . . . . . . . . . . .
2.2.2 Installation . . . . . . . . . . . .
2.2.3 Speed and latency . . . . . . . .
2.2.4 Memory information . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
29
29
29
36
41
42
44
46
48
48
50
51
53
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Network
3.1 Communication overview . . . . . . . . . . . . .
3.1.1 Protocol stacks . . . . . . . . . . . . . . .
3.1.2 Encapsulation . . . . . . . . . . . . . . .
3.2 Network equipment . . . . . . . . . . . . . . . .
3.2.1 Active network equipment . . . . . . . .
3.2.2 Passive network equipment . . . . . . . .
3.2.3 RJ-45 connectors – crimping . . . . . . .
3.3 Network commands in Windows . . . . . . . . .
3.3.1 Files related to network . . . . . . . . . .
3.3.2 Basic working with IP and MAC address
3.3.3 Testing and statistics . . . . . . . . . . .
3.3.4 Other commands . . . . . . . . . . . . . .
3.4 Network commands in Linux . . . . . . . . . . .
3.4.1 Files related to network . . . . . . . . . .
3.4.2 Older address commands . . . . . . . . .
3.4.3 iproute2 and command ip . . . . . . .
3.4.4 Network interface and addresses . . . .
3.4.5 Routing and filtering . . . . . . . . . . . .
3.4.6 Neighbourhood . . . . . . . . . . . . . . .
3.5 Network diagnosis . . . . . . . . . . . . . . . . .
3.5.1 Wi-fi channels . . . . . . . . . . . . . . .
3.5.2 Wireshark . . . . . . . . . . . . . . . . . .
3.5.3 Where to place it? . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
72
. 72
. 72
. 75
. 75
. 75
. 76
. 78
. 80
. 80
. 80
. 82
. 85
. 85
. 85
. 87
. 89
. 89
. 91
. 95
. 96
. 96
. 100
. 104
4 Servers
4.1 Windows Server . .
4.1.1 Editions . . .
4.1.2 Roles . . . . .
4.1.3 Installation .
4.2 Linux Server . . . .
4.2.1 Distributions
4.2.2 Installation .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2.3
2.4
2.5
2.6
2.2.5 Overclocking . . .
2.2.6 Testing . . . . . . .
Magnetic memory media
2.3.1 Revision . . . . . .
2.3.2 S.M.A.R.T. . . . . .
2.3.3 Errors testing . . .
Power supply unit (PSU)
Monitoring . . . . . . . .
2.5.1 HWMonitor . . . .
Benchmarks . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
54
57
60
60
61
64
65
69
69
70
107
107
107
108
110
111
112
113
Chapter
1
Hardware basics
1.1
Common hardware components
We suppose certain knowledge of hardware over the subject “Technical equipment of
personal computers”, but we revise some components and their functionality.
1.1.1
Chassis
Chassis (or case) is mainly constructed from steel, aluminium, plastic or some other
materials. We choose chassis according to the following criteria:
• form factor (size) – our mainboard has to fit the chassis (neither bigger nor smaller),
all screws have to match,
• number of 5.25” and 3.5” positions (for HDDs, optical drives, card readers),
• material – too thick chassis vibrates whilest fans rotate,
• inner space – air needs to circulate,
• number and arrangement of USB plug seats or other important plugs,
• other criteria (e.g. design).
1.1.2
Mainboard
Motherboard (or mainboard) is the most important part of every computer (including
notebooks, HTPCs,1 etc.). We pay attention to
• form factor (ATX, BTX, micro-ATX, mini-ITX, etc.),
• type of processor socket (LGA 1155, LGA 2011, AM3, FM1, . . . ),
• chipset (Intel H61, Z68, AMD A55, . . . ),
• BIOS producer, BIOS possibilities (including overclocking),
1
HTPC (Home Theatre PC) is small silent well-designed PC in living rooms, used for videos, photos, TV
signal streaming, . . .
1
C HAPTER 1
H ARDWARE BASICS
2
• integrated peripherals (yes/no/what/quality),
• number and type of memory slots,
• supported version of USB and SATA interface,
• number of PCIe slots and others (as the case some/what graphic and sound interfaces), etc.
Figure 1.1: Mainboard – ASRock G41C-GS
C HAPTER 1
H ARDWARE BASICS
3
Figure 1.2: Mainboard – Gigabyte Z77-D3H
C
Labs
1. See the manual of the mainboard in Figure 1.1. The manual can be found on web
ftp://europe.asrock.com/manual/G41C-GS.pdf. Compare with the picture, discover:
•
•
•
•
•
•
form factor of this mainboard,
processor socket type,
chipset – what north and south bridge is here?
supported memory (Is it dual-channel? Does it support ECC?)
integrated graphics and its interfaces,
integrated audio and network chip,
C HAPTER 1
H ARDWARE BASICS
4
• all leaded interfaces/plugs (graphics – VGA, DVI, . . . ?),
• BIOS and its properties,
• version of USB and SATA.
Take a look at instalation process images (processor, memory modules, hard disks)
and BIOS Setup. What are the possibilities of memory and processor overclocking?
Examine ACPI configuration, Storage configuration (including PIO/DMA mode for
disks) and HW Health monitoring.
2. Get similar information about the mainboard Gigabyte Z77-D3H (Figure 1.2). Find
its manual (ask Google). Compare these two mainboards, notice the difference in
processor sockets and chipset structure.
3. Well, we have some training mainboards, so we will have a look at them.
4. Choose some web store with hardware and find a mainboard according to these
criteria:
•
•
•
•
•
•
form factor micro-ATX,
processor socket LGA 1155,
chipset Intel H61,
SATA III interface (6 Gb/s),
USB 3.0 support,
2 or more memory banks.
C
1.1.3
Processor
Processor is a heart of a computer. There are a few producers of processors:
• Intel – the most popular processors especially for desktops, notebooks, netbooks,
HTPCs
• AMD – the second one popular producer of processors
• VIA – produces chipsets, CPUs, memory modules, audio chips and other chips, we
know VIA Nano for netbooks
• ARM processors are produced by more manufacturers – nVidia (Tegra), Marvell,
Texas Instruments, Transmeta, . . . , with RISC instruction sets
• IBM – PowerPC in old Apple Macs, and other producers
Hardware architectures:
• x86 – 32bit architecture of older Intel and AMD processors
• x64 (the same as amd64 or x86-64) – 64bit architecture of newer Intel and AMD
processors
• ARM
• ia-64 – Intel processors for servers (Itanium)
• Sun SPARC, MIPS, . . . – other server architectures
C HAPTER 1
H ARDWARE BASICS
5
Each processor needs concrete type of socket. When buying processor, we would know
what socket is necessary.
Intel uses these sockets for desktop computers – see Table 1.1.
2004
High
end
Mainstream
−→
2008
2006
2009
LGA 775
(Pentium 4,
Core 2);
LGA 771
(Xeon)
LGA 775
(Pentium 4,
Core 2)
time −→
2011
LGA 1366
(high-performance
Xeon,
Core i7 900 series)
LGA 1156
(DMI bus;
Core i7 800
series, Core i5,
i3, cheaper Xeon)
2012
LGA 2011
(Sandy Bridge-E,
Ivy Bridge-E)
LGA 1155
(Sandy Bridge,
Ivy Bridge)
LGA 1150
(Haswell,
Broadwell)
Table 1.1: Intel CPU sockets
The processors designated for LGA 775 are connected to the north bridge chip via
classic FSB bus.
The newer high-end processors (LGA 1366) are connected to the north bridge chip
via QPI, the memory controller is inside the processor chip.
The processors for LGA 1156 and LGA 1155 have all functions of the north bridge
integrated, so no separate north bridge is used and these processors are connected to the
south bridge via DMI bus. Most of the mainstream processors designated for LGA1156
and LGA155 sockets have integrated GPUs (graphics cores).
AMD is not as strict as Intel with processors separation, some processors fit into
more than one socket.
High end
and
mainstream
APUs
2007
2009
2011
2012
AM2+
65nm; Phenom,
Phenom II,
Athlon II
AM3
45nm; Phenom II,
Athlon II,
Sempron
AM3+
Bulldozer
(AMD FX);
32nm
FM1
32nm; Llano
FM2
Trinity
Table 1.2: AMD CPU and APU sockets
APUs combine CPU and GPU (a processor and a graphics processor), whilst the processors designated for AM2+, AM3 and AM3+ do not contain any graphic core. Newer
APUs contain very good graphics cores, so if we want a machine to work with graphics,
videos etc., an APU is a quite good idea.
C HAPTER 1
H ARDWARE BASICS
6
More information:
•
•
•
•
http://ark.intel.com/
http://products.amd.com/
http://www.10stripe.com/featured/cpu/index.php
http://www.cpu-world.com/Sockets/index.html
Each processor meets some of the properties well-known from the subject “Technical
equipment of personal computers” – hyperscalar and superscalar architectures, out-oforder execution, branch prediction, low or high TDP, Turbo boost or Turbo core, etc. We
can explore these properties on the webs of processor producers (they are mentioned
above).
C
Labs
1. Find images of the particular sockets and processors and compare.
2. Browse some computer web store and find some interesting processors to plug into
the socket LGA 1155, LGA 1366, AM3+ and FM1.
C
1.1.4
Memory modules
Nowadays, there are nearly exclusively DIMM (Dual In-line Memory Module) modules
in desktop computers, only rarely (in very old computers) we can find SIMM (Single. . . )
modules. All types of memory chips on SIMM and DIMM modules are dynamic memories,
they need periodic refresh of their content.
There are these types of memory chips on DIMM modules:
• SDR (the older ones from 90’s) – work synchroniously with the system timer, one
tick = one operation;
• DDR – 184pin DIMM for desktops or smaller 200pin SO-DIMM for notebooks; data
are transferred on both the rising and falling edges of the clock signal (two times
a clock), so the transfer rate is doubled (or this module is able to work at the half
frequence with the same transfer rate),
• DDR2 (around 2008) – 240pin DIMM or 200pin SO-DIMM; the bus between the
memory cells and the buffer is twice wider, so double amount of data per clock is
moved,
• DDR3 – 240pin DIMM or 204pin SO-DIMM; lower voltage and doubled bus clock,
• DDR4 – comming soon.
Nowadays, DIMM moduls with DDR3 are the most used.
C HAPTER 1
H ARDWARE BASICS
7
Remark:
DIMM modules with different memory chips are not compatible, we have to know what
type of memory slots (so called memory banks) are on our mainboard.
The memory modules are labeled by their transfer rate or by their frequency, see Table 1.3.
Chips
JEDEC labeling
Labeling by chips
Examples
DDR
PCxxxx
DDRyyy
DDR2
PC2-xxxx
DDR2-yyy
or DDR2-yyyy
DDR3
PC3-xxxx
or PC3-xxxxx
DDR3-yyy
or DDR3-yyyy
PC1600
=DDR200
PC2700
=DDR266
PC3200
=DDR400
PC2-4200 =DDR2-533
PC2-6400 =DDR2-800
PC2-8500 =DDR2-1066
PC3-6400 =DDR3-800
PC3-8500 =DDR3-1066
PC3-10600=DDR3-1333
where xxxx is transfer rate (MB/s)
and yyy is doubled frequency (bus clock, MHz)
Table 1.3: DIMM labeling
Very important indicator of quality and usability is latency (marked tCL). Lower latencies mean better response of memory chips. We will concern with latencies later, now
we would know that newer types od DIMMs generaly have higher latencies than older
types. Typical values of tCL:
• DDR: 2–3
• DDR2: 3–6
• DDR3: 6–11
Lower is better. As we can see, latencies grow with higher frequencies.
Communication with memory modules is controlled by a memory controller. This
component is integrated either in the north bridge or in the processor. The memory
controller may be able to communicate parallely with two, three or four memory modules
at the same time, so we call it dual-channel, triple-channel or quad-channel memory
controller.
But if we want to utilize this property, we must put the modules into the correct
banks. This information can be found in the documentation of the mainboard, usually
we ought to put them into the banks with the same color; see the figures with mainboards
above.
C HAPTER 1
H ARDWARE BASICS
8
Figure 1.3: Memory modules
More information:
• http://www.bit-tech.net/hardware/memory/2007/11/15/the secrets of pc memory part 1/4
• http://www.xbitlabs.com/articles/memory/display/ddr2-ddr.html
• http://computer.howstuffworks.com/ram.htm
C
Labs
Learn to recognize different types of DIMM modules, try to insert them into memory
banks with locking and to take them out.
C
1.2
1.2.1
Basic tools
Common screws and screwdrivers
We need to have some tools to open the given PC, to install and repair components. First
we deal with screws (fasteners) and screwdrivers.
C HAPTER 1
H ARDWARE BASICS
9
Slot (flat, flat-blade, flat-head screw, in czech “plochý”) is the most known type. It is
the simpliest and the cheapest, but we meet these screws very rarely in PCs and other
electronic devices. This type of screw is soon worn out. Some typical flat screws are
shown in Figure 1.4 (round-head machine screw, flat-head wood screw).
Sizes: from 2.4 mm till 13 mm
Figure 1.4: Flat screws and screwdriver2
Phillips (created by Henry F. Phillips, marked “PH”) is designed to prevent damage when
using an electric screwdriver, it simplifies the motion in harder materials. The Phillips
screw is a cross with a slight circle in the middle (so it is snub – not sharp). The Phillips
heads are very common in electronics.
Sizes: PH000 (the smallest), PH00, PH0, PH1, PH2, PH3, PH4
Figure 1.5: Phillips screw and screwdriver3
Frearson (Reed and Prince, by Reed & Prince Manufacturing Company) is similar to
Phillips, but it is sharper, more pointed in “V” shape.
Figure 1.6: Comparison of Phillips and Frearson4
Pozdriv (pozidrive, positive drive) is enhanced version of Phillips too. Whilst Phillips
screws have rounded corners, pozdriv screws have additional straight-sided flanks, so
they are less strained when screwing. It is often marked by “PZ”.
Sizes: PZ0, PZ1, PZ2, PZ3
2
http://images.yourdictionary.com/screw
http://greybursts.blogspot.cz/2010/09/of-screwdrivers-and-men.html
4
http://en.wikipedia.org/wiki/Phillips screw
3
C HAPTER 1
H ARDWARE BASICS
10
Figure 1.7: Pozdriv (PZ) screws and screwdriver5
Remark:
Be careful, switching of Phillips and PZ (especially a PZ screwdriver to a Phillips screw)
may couse damage of the screw.
Figure 1.8: Comparison of Phillips and Pozdriv6
Torx (star, hexalobular) is star-shaped with six rounded corners. Torx screwdrivers
can fit to screws very closely, so they allow application of high torque (in czech: točivý
moment). The rounded corners reduce wearing of screws and screwdrivers. We can meet
them on some harddisks, consumer electronics, automobiles, motorcycles, bikes etc.
Sizes: from T4 till T30 (really until T100)
Figure 1.9: Torx screws7
External Thumb screw has an over-sized head with large wing type blades that allow
the screw to be screwed by hand. Producers use it mainly on cases of computers or
other electronic devices which may require re-instalations or removals. Thumbscrews
sometimes have an additional Phillips or slot head. We usually do not need a screwdriver.
5
http://www.tme.eu, http://www.powertoolsdirect.com,
http://mgaguru.com/mgtech/tools/ts101.htm
6
http://rsn-mk1.blogspot.cz/2012 03 01 archive.html
7
http://www.ultimategarage.com, http://hlmet.com, http://www.made-in-china.com,
http://www.jatagan.eu
C HAPTER 1
H ARDWARE BASICS
11
Figure 1.10: Thumb screws8
Hex (imbus, hex socket, Allen) is flat hexagonal fastener with six sides. Its advantege
is large contact area and large lifetime of screws. They are very popular in cars, bikes,
furniture, and sometimes in electronics.
Sizes: in mm, for example H0.7, H1.0, H1.5, H2.0, H7, H25, etc.
Figure 1.11: Hex (imbus) screws, screwdriver and keys9
5star torx, security torx and Pentalobe 5star torx is similar to normal 6star torx,
but it has 5 corners instead of 6. Security torxes (the both 6star and 5star security)
are supplied by central security stick, we are not able use “normal” 6star or 5star torx
screwdriver.
Apple uses Pentalobe (“flower”) on iPhone’s and MacBook’s body. Pentalobe is similar
to 5star torx, but the corners are much more rounded. We can unscrew it by a special
pentalobe screwdriver, by a 5star torx screwdriver and with very careful manipulation by
a slot screwdriver.
Figure 1.12: Security torx and Apple Pentalobe10
Other screws: We can meet external types of screws, such as external hex. Tri-wing
screws and TP3 imbus (Triangular Recess Security) are typical for Nintendo.
There are security variants of some types of screws – for example Torx Security and
Hex Security. The main reason for use of the security variants by producers is to make
8
http://www.unicorpinc.com/metric thumbscrews.htm http://www.grainger.com
http://www.nitrorcx.com, http://www.bike4u.cz, http://katalog.mav.cz,
http://www.outdoor-cyklo-sport.cz
10
http://www.fordstownerssa.co.za, http://appleheadlines.com, http://www.ebay.com
9
C HAPTER 1
H ARDWARE BASICS
12
the relevant parts of computers or components inaccessible for common users, so we
need special screwdrivers.
Figure 1.13: External hex, Tri-wing, TP3, Torx Security, Hex Security11
Tool sets: For more frequent repairing we need some handy toolset. In any case a set
of screwdrivers is suitable. For better space complexity we choose a set of bits with the
most common bits (see Figure 1.14).
Figure 1.14: Screwdrivers Toolkits12
More information:
•
•
•
•
•
•
http://www.sizes.com/tools/screw drive.htm
http://www.wired.com/thisdayintech/2011/07/0707phillips-screw-patent/
http://en.wikipedia.org/wiki/Screw drive
http://en.wikipedia.org/wiki/Screwdriver
http://donsnotes.com/home garden/fasteners.html
C APOTOSTO, Rosario. Screwdriver Basics. Popular Mechanics 173 (12). pp. 82–83.
December 1996. ISSN 0032-4558. URL:
http://books.google.cz/books?id=R2YEAAAAMBAJ&pg=PA82
11
http://findnsave.miamiherald.com, http://en.wikipedia.org/wiki/List of screw drives,
http://www.libertyfastener.com/security%20Fasteners.html,
http://toolboxhero.com/2011/06/ineed-a-star-screwdriver-bit-with-a-hole-in-middle/, http://www.shop4fasteners.co.uk
12
http://www.miniinthebox.com, http://www.aliexpress.com, http://dx.com
C HAPTER 1
1.2.2
H ARDWARE BASICS
13
Tools to prevent electrostatic discharge
When two objects with different voltage touch with each other, dangerous eletrostatic
discharge (ESD) occurs. It also concerns the human body, computer components, chips.
People are able to survive it remaining healthy, but not always electronic components
– ESD is called a “silent killer”. The situation is worse in dry air, using classic (nonantistatic) carpets, etc.
What to do to prevent ESD when opening a case (chassis) and we do not have any
antistatic tools:
• wash your hands in flow of cold water,
• touch the chassis of PC before handling any component (the PC must be switched
off, but still plugged into the electrical outlet).
Well, but we would have to touch the chassis all the time or at least very often.
Figure 1.15: Antistatic Wrist Strap13
There are recommended antistatic tools. We can use an antistatic wrist strap (grounding strap) – we connect it to the chassis of PC or to a large area of metal (for example
radiators in the room). Another way is to use antistatic mats, antistatic floor mats, ESD
bags or ESD jackets.
More information:
• http://www.pcworld.com/article/82184/article.html
• http://www.talktoanit.com/A+/aplus-website/lessons-antistatic.html
13
http://www.talktoanit.com/A+/aplus-website/lessons-antistatic.html
C HAPTER 1
1.2.3
H ARDWARE BASICS
14
Other tools
We also can use the following tools:
• Pliers are sometimes useful (for example to unscrew to tight screws or to pick some
objects through too narrow hole).
• Tweezers to pick some objects through too narrow hole or to set them there.
• Penlight to see well in dark cases.
• Clamps to tighten long cables.
• Network tools – Network Cable Crimp for RJ-45, some testers (RJ-45 cable tester,
wi-fi analyzer, etc.).
• Air blower or compressed air or vacuum cleaner to blow off dust.
• Isopropyl alcohol to clean water-sensitive parts of various components.
When opening the chassis of such computer, the screws may roll out or mix up. So, we
need something to keep them without rolling out. There is one practical way – we can
use the plastic interior of a box of chocolates (of course without the chocoloates).
Figure 1.16: Extensive tool set with 100 parts(“Fellowes 100-Piece Super Tool Kit”)14
C
Labs
Try working with the common screwdrivers, take down some common desktop computer.
C
1.3
Software for hardware detection in operating systems
There are software tools to get information about hardware. We are able to find out large
amount of information without opening chassis.
14
http://www.shopping.com
C HAPTER 1
1.3.1
H ARDWARE BASICS
15
Hardware commands in Windows
systeminfo is simple command for Windows XP and later. It lists only basic information
(manufacturer, system type, processor, BIOS, network card).
M
Example 1.1
C:\Windows>systeminfo
Host Name:
OS Name:
OS Version:
OS Manufacturer:
OS Configuration:
OS Build Type:
Registered Owner:
Registered Organization:
Product ID:
Original Install Date:
System Up Time:
System Manufacturer:
System Model:
System type:
Processor(s):
PRACE-SARKA
Microsoft Windows 7 Enterprise
6.1.7601 Service Pack 1 Build 7601
Microsoft Corporation
Standalone Workstation
Multiprocessor Free
sarka
Silesian University in Opava
xxxxxxxxxxxxxxxxxxxxxxxxx
7.5.2012, 9:16:40
0 Days, 1 Hours, 12 Minutes, 25 Seconds
ATComputers
COMFOR ELINK I48
X64-based PC
1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 42 Stepping 7 GenuineIntel ˜3100 MHz
BIOS Version:
Award Software International, Inc. F4 ZA, 1.12.2011
Windows Directory:
C:\WINDOWS
System Directory:
C:\WINDOWS\system32
Boot Device:
\Device\HarddiskVolume1
System Locale:
en-us;English (United States)
Input Locale:
en-us;English (United States)
Time Zone:
N/A
Total Physical Memory:
4 013 MB
Available Physical Memory: 2 289 MB
Virtual Memory: Max Size: 8 024 MB
Virtual Memory: Available: 6 088 MB
Virtual Memory: In Use:
1 936 MB
Page File Location(s):
C:\pagefile.sys
Domain:
WORKGROUP
Logon Server:
\\PRACE-SARKA
Hotfix(s):
110 Hotfix(s) Installed.
[01]: KB982861
[02]: 982861
[03]: KB971033
[04]: KB2305420
[05]: KB2393802
.....
(etc. - cut out too long output)
[108]: KB976902
[109]: KB976932
[110]: KB982018
NetWork Card(s):
3 NIC(s) Installed.
[01]: Realtek PCIe GBE Family Controller
Connection Name: Local Area Connection
DHCP Enabled:
Yes
DHCP Server:
193.84.206.48
IP address(es)
[01]: 193.84.198.193
[02]: fe80::4d9b:7004:31e9:b6df
[02]: VMware Virtual Ethernet Adapter for VMnet1
Connection Name: VMware Network Adapter VMnet1
DHCP Enabled:
No
[01]: 192.168.237.1
[02]: fe80::6cd9:a651:1f5f:741
C HAPTER 1
H ARDWARE BASICS
16
[03]: VMware Virtual Ethernet Adapter for VMnet8
Connection Name: VMware Network Adapter VMnet8
DHCP Enabled:
No
IP address(es)
[01]: 192.168.126.1
[02]: fe80::a562:bf86:535d:982
We can get information of any visible computer in LAN (using /S), select one of 3 possibilities of display type (list, table, csv – /FO csv) redirect the output (e.g. systeminfo >
d:\filename.csv).
M
diskpart is an interactive text console (text-mode interpreter) to manage memory devices (Windows Vista or Server 2008, or later).
M
Example 1.2
We start cmd.exe and enter these commands (we need admin privileges):
diskpart
we start the program, the prompt is of the form diskpart>
help
the first level of help, list of main inner commands with short description
help list
the second level of help, possibilities of using the inner command list
help list disk
the third level of help, details of the command list disk
list disk
we list all connected disks (including USB flash disks), e.g.
Disk ###
-------Disk 0
Disk 1
Status
------------Online
Online
Size
Free
-------- ------465 GB 1024 KB
7640 MB
0 B
Dyn
---
Gpt
---
(one SATA harddisk and one USB flash disk); the free space is not meant as datafree, it is meant as space without partitions
select disk 0
we select disk number 0, the selected disk is focused, from now we
work only with the given disk
list partition
we list partitions of the selected disk, output:
Partition ###
------------Partition 1
Partition 2
Partition 0
Partition 4
Partition 3
Type
--------------Primary
Primary
Extended
Logical
Restoration
Size
-------100 MB
97 GB
360 GB
360 GB
8000 MB
Offset
------1024 KB
101 MB
97 GB
97 GB
457 GB
if no dynamic volumes are used, volumes are the same as partitions,
except the extended partitions (and optical media are volumes):
list volume
Partition ###
------------Partition 0
Partition 1
Partition 2
Partition 3
Partition 4
Ltr
--D
Label
---------
Fs
----
C
P
System
Personal
WinRE-ATC
NTFS
NTFS
NTFS
NTFS
Type
--------DVD-ROM
Partition
Partition
Partition
Partition
Size
------0 B
100 MB
97 GB
360 GB
8000 MB
Status
-------No Media
Healthy
Healthy
Healthy
Healthy
Info
----System
Bootable
Hidden
C HAPTER 1
H ARDWARE BASICS
17
One (dynamic) volume can take up more partitions.
for detailed information about the selected disk, compare with the previous output:
detail disk
WDC WD5000AAKX-001CA0
Disk ID
: 15CA3D14
Type
: ATA
Status
: Online
Read-only
: No
Boot disk
: Yes
Pagefile Disk : Yes
...
Volume ###
---------Volume 1
Volume 2
Volume 3
Volume 4
Ltr
---
Label
----------
C
P
System
Personal
WinRE-ATC
select partition 4
Fs
----NTFS
NTFS
NTFS
NTFS
Type
---------Partition
Partition
Partition
Partition
Size
-------100 MB
97 GB
360 GB
8000 MB
Status
-------Healthy
Healthy
Healthy
Healthy
Info
-------System
Bootable
Hidden
we select one of the partitions (no. 4) – in our system it is the
volume 3
for detailed information about the selected partition:
detail partition
Partition 3
Type
: 07
Hidden : No
Active: No
Offset in bytes: 104964554752
Volume ###
---------* Volume 3
Ltr
--P
Label
---------Personal
Fs
----NTFS
Type
---------Partition
Size
-------360 GB
Status
--------Healthy
Info
--------
for detailed information about the selected volume (with the partition
we selected its volume too):
detail volume
Disk ###
-------* Disk 0
Status
-----------Online
Read Only
:
Hidden
:
No Default Drive Letter:
Shadow Copy
:
Offline
:
BitLocker Encrypted
:
Installable
:
Volume Capacity
Volume Free Space
Size
-------465 GB
Free
------1024 KB
Dyn
---
Gpt
---
No
No
No
No
No
No
Yes
: 360 GB
: 340 GB
we destroy the selected partition (really!!!); if the partition (volume)
is dynamic, we ought to use delete volume instead
delete partition
create partition primary size=18000
we create new primary partition of the size 18
000 MB
format fs=ntfs
the created partition is formated to the file system NTFS
C HAPTER 1
H ARDWARE BASICS
18
we assign the letter M: to the created partition, we can assign the
partition to a folder/mount point as in Linux instead (by assign mount=...)
assign letter=m
assign
without determining the letter, the first free letter is used
we mark the partition as active – bootable (of course, only if we want to have
this partition bootable)
active
exit
we exit the program
M
More information:
•
•
•
•
http://technet.microsoft.com/en-us/library/cc766465%28v=ws.10%29.aspx
http://support.microsoft.com/kb/300415
http://commandwindows.com/diskpart.htm
Creating Virtual Hard Disks [online]. Technet.Microsoft.com, 2010. URL:
http://technet.microsoft.com/en-us/library/gg318052%28v=ws.10%29.aspx
• Walkthrough: Deploy a Virtual Hard Disk for Native Boot [online]. Technet.Microsoft.com,
2009. URL:
http://technet.microsoft.com/en-us/library/dd744338%28v=ws.10%29.aspx
M
Example 1.3
We can use diskpart in the classical non-interactive way:
we create a new partition of the given size
(15 000 MB) on the disk no. 0 (the first HD)
diskpart /add \Device\HardDisk0 15000
diskpart /delete \Device\HardDisk0\Partition1
the first partition of the disk 0 is
delated
diskpart /delete F:
we delete the partition marked by F:
M
chkdsk This program (chkcsk means “check disk”) checks the file system integrity
status of hard disks (HD, not SSD). Every version of Windows has its own variant of
chkdsk, we are not allowed to mix the variants.
M
Example 1.4
The output of chkdsk seems as follows:
chkdsk d:
without any other params (we need administrative privileges):
The type of the file system is NTFS.
WARNING!
F parameter not specified.
C HAPTER 1
H ARDWARE BASICS
19
Running CHKDSK in read-only mode.
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
302848 file records processed.
File verification completed.
548 large file records processed.
0 bad file records processed.
2 EA records processed.
120 reparse records prcessed.
CHKDSK is verifying indexes (stage 2 of 3)...
376312 index entries processed.
Index verification completed.
0 unindexed files processed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
302848 security descriptors processed.
Security descriptor verification completed.
36733 data files processed.
CHKDSK is verifying USN Journal...
37199360 USN bytes processed.
USN Journal verification completed.
Windows has checked the file system and found no problems.
494394367
68662284
102556
0
421379
65536
425208148
kB
kB
kB
kB
kB
kB
kB
total disk space.
in 219161 files.
in 36734 indexes.
in bad sectors.
in use by the system.
occupied by the log file.
available on disk.
4096 bytes in each allocation unit.
123598591 total allocation units on disk.
106302037 allocation units available on disk.
chkdsk d:
/F
repairs the found errors
chkdsk d:
/R
repairs the found errors, restores the readable pieces of data
M
C
Labs
1. Find out information provided by the command systeminfo. What is the processor
architecture, BIOS version, the amount of the physical memory, installed network
cards?
2. Try the possibilities of the command diskpart – try using help, list disks, partitions
(first pick a disk), volumes, list detailed information about disk, partition volume.
3. Run disk checking.
C
1.3.2
Hardware commands in Linux
The Linux Kernel does not use “string” device names (as /dev/sda1), but it works with
their number designations. Each device is marked by two numbers:
C HAPTER 1
H ARDWARE BASICS
20
• Major number is unique for the given type of device (disks, monitors, network cards,
etc.) – the device class.
• Minor number is unique for every instance of the given type.
For example: if we get connected two network cards, their major numbers are the same
and their minor numbers are different.
M
Example 1.5
We can find the major and minor numbers of devices (the following output is shorten):
[[email protected]
˜]$
ls -la /dev
drwxr-xr-x. 19 root root
dr-xr-xr-x. 18 root root
crw-rw----. 1 root video
...
crw-------. 1 root root
...
crw-rw-rw-. 1 root root
...
crw-rw-rw-. 1 root root
brw-rw----. 1 root disk
brw-rw----. 1 root disk
brw-rw----. 1 root disk
...
lrwxrwxrwx. 1 root root
...
crw-rw-rw-. 1 root tty
...
crw-rw-rw-. 1 root root
3380 Nov 21
4096 Nov 21
10, 175 Nov 21
2012 .
2012 ..
2012 agpgart
5,
1 Nov 12
2012 console
1,
3 Nov 12
2012 null
1,
8,
8,
8,
8 Nov
0 Nov
1 Nov
2 Nov
2012
2012
2012
2012
12
12
12
12
15 Nov 12
5,
1,
random
sda
sda1
sda2
2012 stdout
0 Nov 12
2012 tty
5 Nov 12
2012 zero
-> /proc/self/fd/1
The output is from Fedora. The major and minor numbers are focused. For example –
virtual devices (such as random, null, zero) have the same major number (1), the minor
numbers are different. The major number of disk partitions (SCSI and SATA) is 8, whilst
for IDE disks/partitions it is 3.
M
More information:
• http://www.linux-tutorial.info/modules.php?name=MContent&pageid=94
• http://www.thegeekstuff.com/2009/06/how-to-identify-major-and-minor-number-in-linux/
C
Labs
List the contents of the directory /dev as shown above (if the major and minor numbers
are not displayed, try ls -las /dev). What numbers have your virtual devices? Note: the
file system udev generates these numbers dynamically, especially the minor numbers, so
yours can be different.
C
C HAPTER 1
H ARDWARE BASICS
21
The following commands relate to disks and memory:
df
(disk free) writes out free space on disks, mounting points etc.
sync
shows filesystems on partitions too
gives information about mounted filesystems including the virtual ones
synchronization of partitions and caches
fsck
(files checking) checking and repairing the filesystems, there are more variants:
df -Th
df -ah
for the filesystem ext3, we check the partition /dev/sda9 (it
is necessary to disconnect it in advance)
raiserfsck /dev/sda3
for the filesystem RaiserFS
fsck.ntfs /dev/sda2
for NTFS
fsck.vfat /dev/sda5
for FAT16 and FAT32, etc.
mkfs.ext3 /dev/sda4
creating the filesystem ext3 on /dev/sda4, similarly for other
filesystems
fsck.ext3 /dev/sda9
mount
lists mounted devices, with parameters we can mount partitions
mount /mnt/winD
mounts the partition with the mouning point /mnt/winD
mount -o r /mnt/winD
with the indication “read-only”
mount -t vfat /dev/sdb2 /mnt/flash
we mount the given USB flash disk with
the filesystem FAT32, special file /dev/sdb2 and mounting point /mnt/flash
umount /mnt/winD
the given partition is unmounted
free
M
writes out complete memory information
Example 1.6
We need information about partitions on our harddisk and their filesystems:
[[email protected]
˜]$
df -ah
Filesystem
/dev/sda1
proc
sysfs
...
udev
...
Size
20G
0
0
237M
Used Avail Use% Mounted on
3.2G
16G 18% /
0
0
- /proc
0
0
- /sys
4K
237M
1% /dev
Well, there is one physical partition, we know its capacity and other information. But
there is not swap partition in this list!
M
M
Example 1.7
Let us obtain information about memory:
[[email protected]
˜]$
free
total
Mem:
502392
+/- buffers/cache:
Swap:
522236
used
496120
436488
358736
free
6272
65904
163500
shared
0
buffers
3556
cached
56076
C HAPTER 1
H ARDWARE BASICS
22
We enforce using human readable format:
[[email protected]
˜]$
Mem:
+/- buffers/cache:
Swap:
free -h
total
490M
509M
used
477M
419M
350M
free
13M
70M
159M
shared
0B
buffers
3.3M
cached
54M
The command uses recounting 1024 = 210 . If we choose recounting 1000 = 103 , the results
are a bit different:
[[email protected]
˜]$
Mem:
+/- buffers/cache:
Swap:
free -h --si
total
502M
522M
used
489M
429M
358M
free
13M
72M
163M
shared
0B
buffers
3.4M
cached
55M
M
C
Labs
1. Write out information about partitions used by Linux, try some of switches. Plug
some USB flash disk. Is it in the output of the given command?
2. Write out memory information.
3. Remember the commands mount and umount. Umount your mounted USB flash
disk by the command umount and mount it again manually by the command mount,
bypassing the automatic mounting mechanism.
C
1.3.3 fdisk in Linux
Fdisk in Linux is quite sophisticated program, we can work with disk partitions (on USB
flash disks too, but we ought to know that Windows are not able to see more than the
first partition of USB flash disks – that is why USB flash disks have typicaly only one
partition), including making filesystems or setting “active” bit of the given disk.
M
Example 1.8
When running fdisk, we set the disk to configure/check. It is necessary to use one of the
ways to get administrative privileges. In Ubuntu we use sudo mechanismus. We try use
fdisk in the interactive mode.
[[email protected]
˜]$
sudo fdisk /dev/sda
[sudo] password for sarka:
Command (m for help):
C HAPTER 1
H ARDWARE BASICS
23
The prompt has changed (after typing the password). We can show help by the key “m”,
or write any other inner command (each is represented by one of letters). So we chose
“p”, it means listing the MBR table of the disk (see help of the program).
Command (m for help):
p
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2 610 cylinders, total 41 943 040 sectors
Units = sectors of 1 * 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimal/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f0004
Device
Boot
Begin
/dev/sda1
2048
*
/dev/sda2
40896510
/dev/sda5
40896512
End
40894463
41940991
41940991
Blocks
20446208
522241
522240
Id
83
5
82
System
Linux
Extended
Linux swap/Solaris
This output is complete, there are three partitions on this disk (really two – /dev/sda1
is primary, /dev/sda2 is extended, and the third one, /dev/sda5 is only logical partition
inside the extended one). Pay attention to the long numbers in the columns Begin, End
and Blocks of the rows /dev/sda2 and /dev/sda5. They are very similar. Why?
We finish by touching the key “q” and Enter.
M
Remark:
By the command fdisk -l we show information about all disks. We need administrative
privileges too.
C
Labs
1. Try fdisk without passing to the interactive mode as outlined in Remark above –
find out information about all disks in your computer. You can run it inside a virtual
computer or from LiveDVD, if you do not have any standard installed Linux.
2. Run fdisk in the interactive mode (for some of your disks).
C
1.4
1.4.1
Third party software
HWInfo
HWInfo32 and HWInfo64 are the most popular tools to find out information about
hardware (processors, chipsets, graphics etc.). This (czech) product is freeware
and there are extensions to this software.
C HAPTER 1
H ARDWARE BASICS
24
Figure 1.17: HWInfo64
We choose HWInfo32 for computers with the architecture x86, and HWInfo64 for
computers with the architecture x64 or amd64.
More information:
• http://www.hwinfo.com/
• http://www.techspot.com/downloads/5239-hwinfo64.html
• http://www.tomshardware.co.uk/forum/272236-11-using-hwinfo64-what-temp
C
Labs
Download HWInfo32 or HWInfo64 (according to your system) and test your PC. Find out
• what is your processor – codename, number of physical/logical cores, socket type,
TDP, what features are supported (SSE types and AVX instruction sets, AES, Turbo
mode, etc.), cache (L2 or L3), frequency,
C HAPTER 1
H ARDWARE BASICS
25
• mainboard – model, chipset, bios,
• memory – type, size, mode (single- or dual-channel), timing, number of modules
and their properties (including serial number, voltage, timing), speed,
• what is your graphics – GPU/video chipset, processor clock and video memory clock,
• monitor – name, manufacturer, date of manufacture, vertical and horizontal size,
frequences, supported video modes,
• HDD – drive controller/interface (SATA II, SATA III, what speed), capacity, geometry
properties (number of cylinders, heads – surfaces – platters, cache buffer size), DMA
mode, NCQ, support of S.M.A.R.T., Power Mangement, etc.,
• optical drive – model, controller/interface, DMA mode support, possibilities of reading/writing (CD-R/RW, DVD+/-R/RW, etc.)
• audio and network card properties.
Check S.M.A.R.T. values of your hard disk. Is everything O.K.?
C
Figure 1.18: System Spec
1.4.2
System Spec
System Spec is a free simple program with GUI, providing surprising amount of
information, but sometimes it is not as precise as we want. The interface is shown
in Figure 1.18. Basic information can be found in the main window, we can open other
windows with specific information by pushing the buttons on the top of the main window.
C HAPTER 1
H ARDWARE BASICS
26
More information:
• http://www.alexnolan.net/software/sysspec.htm
C
Labs
Try System Spec, find out information about your mainboard, processor and memory
modules.
Compare this software with HWInfo – run the both applications on the same computer
and compare the achieved results.
C
1.4.3
PC Wizard
The next interesting program to obtain hardware information is PC Wizard. It is
freeware by CPUID. The provided information is very wide and precise, we can find
out the detailed values of parameters of all components in the given computer (hardware),
operating system, DirectX, and there are simple benchmarks there. Two-tier icon menu
is on the left side, see Figure 1.19. There is a portable version of this software too.
More information:
• http://www.cpuid.com/softwares/pc-wizard.html
Remark:
Be careful while installing. All the mentioned applications are great and it is freeware,
but they often try to install some other software or toolbars during their installation, so
carefully read all texts in windows during installation.
C
Labs
Test PC Wizard and dicsover all possibilities of this software. Try to compare with HWInfo
and System Spec.
C
C HAPTER 1
H ARDWARE BASICS
27
Figure 1.19: Four screens of CPUID PC Wizard
1.4.4
Other software to discover hardware
Fresh Diagnose is freeware, and the possibilities of this program are similar to
the possibilities of PC Wizard. We can find out the detailed information about all
components in our computer and test these components using simple benchmarks.
Speccy is freeware by Piriform (this company also produces well-known program
CCleaner for cleaning Windows including its registery). This application provides
information about hardware components, so if we do not need benchmarks, it is a good
choice.
C HAPTER 1
H ARDWARE BASICS
28
More information:
• http://www.freshdevices.com/freshdiag.html
• http://www.piriform.com/speccy
C
Labs
1. Try or at least take a look at the described software.
2. Find out the licence information for all the above mentioned programs – is it possible
to use it for commercial purposes?
C
Chapter
2
Playing with hardware and reparations
2.1
Processor
We should be able to recognize common types of processors by their codename and to
consider their properties. Let us take a look at the most popular processors by Intel and
AMD.
2.1.1
Recognizing Intel processors
Intel produces processors, mainboards, chipsets, SSDs, network cards and other
products. Nowadays, regarding processors, Intel keeps the Tick-Tock system
– each year the litography (manufacturing process) or the architecture is changed in
rotation.
Tick
Tock
Tick
22nm
ll
West
mere
32nm
m
Penr
yn
Tock
Hasw
e
Tick
45nm
Mero
m
NetB
urst
Manufacturing process:
65nm
Tock
Iv y
Brid
ge
Tick
Sand
y
B r id
ge
Tock
Neha
le
Tick
(Micro)architecture:
Core
2005
2006
Nehalem
2007
2008
2009
Sandy Bridge
2010
2011
Haswell
2012
2013
Figure 2.1: Intel Tick-Tock schema
Tick-Tock schema is shown on Figure 2.1. The phase “Tick” means new architecture,
the phase “Tock” means lesser litography. Description of the most important processors
follows. The mentioned properties are not absolutely valid, Intel sometimes generates an
“exception”.
29
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
30
3rd Generation Core i: 22nm litography, microarchitecture Ivy Bridge (architecture
Sandy Bridge), Turbo Boost 2.0, 64bit main instruction set, AVX and AES instructions,
Dual-channel memory controller, mainly 4 physical cores (not all processors)
• Core i7-3xxx (digit “3” followed by three next digits) – very powerful processors for
home and commercial sphere, 8 MB L3 cache, high base frequency (=clock speed),
integrated graphics card (HD4000, very good), TDP 77 W, HyperThreading, HW
virtualization supported
• Core i7-3xxxK – the same, unlocked multiplier
• Core i7-3xxxS – a bit lower base frequency, lower TDP (65 W)
• Core i7-3xxxT – a bit lower base frequency than “S” series, TDP is only 45 W
• Core i5-3xxx – only 6 MB L3 cache, wide scale of variants – integrated graphics
HD4000 or HD2500, different base frequencies (lower than for Core i7), some of
them do not provide HyperThreading, differencies in HW virtualization support
• Core i3-3xxx – only 3 MB L3 cache, only 2 physical cores, no HW virtualization support, no Turbo Boost (in combination with low frequency ⇒ very low performance)
The letter “U” at the end of the specification means processors with ultra low voltage
(so, ULV processors). They are undervolted, they have less physical cores, less base
frequency, smaller L3 cache.
The letter “M” at the end of the specification means mobile processors (for laptops).
They typicaly have smaller L3 cache, often only 2 physical cores, less frequency, support
of Wi-Fi and WiMAX.
The desktop versions use the socket LGA 1155, the mobile versions use some of BGA
or PGA sockets.
performance level
3 . . . weak
5 . . . medium
7 . . . high-end
current type
of processors CPU code number
A
A
A
AA
related to performance
or frequency
(higher is better)
Core i 5 -3 570 K
generation additional properties
. . . first generation
2 . . . second generation
3 . . . third generation
K
S
T
M
...
...
...
...
unlocked multiplier
underclocked
more underclocked
mobile
etc.
Figure 2.2: Intel processors marking
M
Example 2.1
Examples of 3rd Generation Core i processors:
• Core i7-3770: typical reprezentative of Core i7 3rd generation
• Core i7-3770K: unlocked multiplier, more expansive; for people who want to overclock
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
31
• Core i7-3770S: underclocked (lower frequency), lesser TDP
• Core i5-3570: HW virtualization, no HyperThreading, HD2500 graphics
• Core i5-3470T: HW virtualization, graphics HD2500, Hyperthreading, but only 2
physical cores! – more similar to Core i3 than to Core i5
• Core i5-3570K: no HW virtualization, no HyperThreading, HD4000 graphics
• Core i3-3240: only 2 physical cores, HyperThreading (so 4 logical cores), HD2500
graphics – machines for Word+Excel :-)
• Core i7-3517U: TDP is 17 W. Why? Only 2 physical cores, HyperThreading, ultra low
base frequency, HD4000 graphics, only 4 MB L3 cache; this processor is intended
for cheaper mobile devices
• Core i7-3615QM: for mobile devices too, but 6 MB cache, 4 physical cores, HyperThreading, Turbo Boost, TDP 45 W; more useful
• Core i5-3660M: for mobile devices, 3 MB cache, 2 physical cores, HyperThreading,
Turbo Boost, TDP 35 W, HD4000 graphics
• Core i3-3120M: 3 MB cache, 2 physical cores, HyperThreading, but no Turbo Boost,
TDP 35 W, HD4000 graphics
M
Remark:
Core i5 Ivy Bridge is acceptable for overwhelming majority of users. Core i7 are too
expansive, Core i3 are too slow. Of course, we should choose well, equipment of Core i5
is very diverse. Notice differencies among i7, i5 and i3, and between desktop and mobile
processors.
3rd Generation Core i Extreme Edition: only mobile processors yet. 4 physical cores,
HyperThreading, 8 MB cache, base frequency and TDP medium (mobile) or high (desktop), Turbo Boost, HW virtualization, Wi-Fi, WiMAX, the mobile versions have integrated
graphics HD4000.
Example: Core i7-3940XM
2nd Generation Core i:
32nm litography, (micro)architecture Sandy Bridge, Intel
HD3000 or HD2000 integrated graphics, other properties similar to Ivy Bridge (Core i
3rd Generation), maximum memory size is lesser – usually 8 or 26 GB
• Core i7-2xxx
• Core i5-2xxx
• Core i3-2xxx
The desktop versions use the same socket as the 3rd generation, LGA 1155.
C HAPTER 2
M
P LAYING WITH HARDWARE AND REPARATIONS
32
Example 2.2
Examples of 2nd Generation Core i processors:
• Core i7-2600: TDP 95 W, 4 physical cores, HyperThreading, Turbo Boost 2.0, 8 MB
L3 cache, HW virtualization, HD2000 graphics
• Core i5-2550K: TDP 95 W, 4 physical cores, but no HyperThreading, Turbo Boost
2.0, 6 MB L3 cache, no HW virtualization, no integrated graphics, unlocked multiplier
• Core i5-2400: TDP 95 W, 4 physical cores, no HyperThreading, Turbo Boost 2.0, 6
MB L3 cache, HW virtualization, HD2000 graphics
• Core i3-2130: TDP 65 W, 2 physical cores, HyperThreading, no Turbo Boost, 3 MB
L3 cache, no virtualization, HD2000 graphics
• Core i5-2510E: for mobile devices, TDP 35 W, 2 physical cores, HyperThreading,
Turbo Boost 2.0, 3 MB L3 cache, HW virtualization, HD3000 graphics, Wi-fi, WiMAX
• Core i3-2370M: for mobile devices too, TDP 35 W, 2 physical cores, HyperThreading,
no Turbo Boost, 3 MB L3 cache, no virtualization, HD3000 graphics, Wi-fi, WiMAX
M
2nd Generation Core i Extreme Edition:
32nm litography (Sandy Bridge), Turbo
Boost 2.0, HW virtualization, high frequency. These processors are assigned to desktops
or laptops:
• the desktop variant has no integrated graphics, the used socket is LGA 2011, TDP
is 130 or 150 W, 15 L3 cache, 6 physical cores and Hyperthreading, max memory
up to 64 GB, Quad-channel memory controller
• the laptop variant has integrated graphics chip HD3000, TDP is 55 W, 8 MB L3
cache, 4 physical cores and HyperThreading, max memory up to 32 GB, Dualchannel memory controller
M
Example 2.3
Examples of 2nd Generation Core i Extreme Edition processors:
• Core i7-3970X: extremely powerful processor with very high energy consumption
(so, very high TDP – 150 W), very expensive
• Core i7-2960XM: less cores, lower frequency, lower TDP, less L3 cache ⇒ slower
than Core i7-3970X, but by way of contrast to other mobile processors, performance of this model is very good; it is a bit more expensive than the desktop model
mentioned above
M
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
33
1st Generation Core i (formaly “previous generation”): Nehalem architecture, there are
two microarchitectures – Nehalem (42nm litography) and Westmere (32nm litography).
SSE 4.2 multimedia instruction set (no AVX instructions)
• Core i7-9xx (we call it 900 series) – QPI bus between the given processor and the
North Bridge, LGA 1366 socket, Turbo Boost 1.0, LGA 1366 socket, HyperThreading, Triple-channel memory controller, 24 GB maximal memory size
– with the cores Gulftown: 32nm litography, 12 MB L3 cache, 6 physical cores,
TDP 130 W
– with the cores Bloomfield: 45nm litography, 8 MB L3 cache, 4 physical cores,
TDP 130 W
(well – worse litography + the same TDP = less physical cores; more cores with
worse litography would mean worse TDP)
• Core i7-8xx (800 series) – DMI bus between the given processor and the South
Bridge (it means that all functions of the North Bridge are integrated to the processor), LGA 1156 socket, Turbo Boost 1.0, LGA 1366 socket, HyperThreading,
Dual-channel memory controller, 16 GB maximal memory size
– with the cores Lynnfield: 45nm litography, 8 MB L3 cache, 4 physical cores,
TDP 95 W
• Core i5-xxx – DMI bus, LGA 1156 socket, Turbo Boost 1.0, 16 GB maximal memory
size
– with the cores Clarkdale: 32nm litography, 4 MB L3 cache, 2 physical cores,
HyperThreading, TDP 73 W, integrated Intel HD graphics
– with the cores Lynnfield (the same as i7 800 series): 45nm litography, 8 MB L3
cache, 4 physical cores, no HyperThreading, TDP 95 W, without graphics core
• Core i3-xxx – DMI bus, LGA 1156 socket, no Turbo Boost (it is bad)
– with the cores Clarkdale: 32nm litography, 4 MB L3 cache, 2 physical cores,
HyperThreading, TDP 73 W, integrated Intel HD graphics
32nm processors of the first generation have the integrated graphics core; but this core
is made by 45nm litography, although it is inside the same package. 45nm processors
have no integrated graphics.
The models intended to mobile devices (laptops) have less L3 cache, lower base frequency, lower TDP and often less physical cores.
M
Example 2.4
Examples of 2nd Generation Core i processors:
• Core i7-980: 32nm litography (cores Gulftown), QPI bus, LGA 1366, 6 physical cores
with HyperThreading, Triple-channel memory controller, very expansive in 2011
• Core i7-920: 45nm litography (cores Bloomfield), QPI bus, LGA 1366, 4 physical
cores with HyperThreading, Triple-channel memory controller
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
34
• Core i7-880: 45nm litography (cores Lynnfield), DMI bus, LGA 1156, 4 physical
cores with HyperThreading, 8 MB cache
• Core i5-670: 32nm litography (cores Clarkdale), DMI bus, LGA 1156, 2 physical
cores with HyperThreading, 4 MB cache
• Core i5-760: 45nm litography (cores Lynnfield), DMI bus, LGA 1156, 4 physical
cores, but without HyperThreading, 8 MB cache
• Core i3-560: 32nm litography (cores Clarkdale), DMI, LGA 1156, 2 physical cores
with HyperThreading, 4 MB cache
Newer (smaller) litography is better, more physical cores are better than less physical
cores without HyperThreading. So:
• cores Clarkdale and Gulftown: 32nm litography,
• cores Lynnfield and Bloomfield: 45nm litography
QPI bus means LGA 1366 socket, DMI bus means LGA 1156 socket.
M
Core 2 processors: for older mainboards with the socket LGA 775 (some of the highperformance models are for LGA 771), classical FSB bus between the socket LGA 775
and the North Bridge chip (so the memory controller is in the North Bridge), 45nm or
65nm litography, no graphics core integrated, no HyperThreading, no Turbo Boost
M
Example 2.5
Examples of Core 2 processors with 45nm litography:
• Core 2 Duo E8400: 2 cores, 6 MB L2 cache (no L3 cache), TDP 65 W (all Core 2 Duo
have 65W TDP), LGA 775
• Core 2 Quad Q9450: 4 cores, 12 MB L2 cache, TDP 95 W, LGA 775
• Core 2 Extreme QX9775: 4 cores, 12 MB L2 cache, TDP 150 W, higher clock speed
(frequency), LGA 771
M
We can find some cheaper processors made by 32nm litography process:
• Pentium Desktop: some of them are produced with 32nm litography with the integrated graphics, without advanced technologies such as Turbo Boost or HyperThreading, they respond to the worst/cheapest Core i3 models, DMI bus, LGA 1155
• Celeron: some of them 32nm litography with the integrated graphics, 2 cores without HyperThreading, no Turbo Boost, DMI bus, LGA 1155
• Atom: integrated graphics (very cheap), 1 or 2 cores, HyperThreading, no Turbo
Boost, no Out-of-order, very low TDP, only 4 GB maximal memory size!
C HAPTER 2
M
P LAYING WITH HARDWARE AND REPARATIONS
35
Example 2.6
Some of the cheapest “non-Core i” processors:
• Pentium G870: 32nm litography, 2 cores, no HyperThreading, integrated HD Graphics, no Turbo Boost, 3 MB L2 cache, TDP 65 W; very cheap, we know why
• Celeron G555: 32nm litography, 2 cores, no HyperThreading, integrated HD Graphics, no Turbo Boost, 2 MB L2 cache, TDP 65 W; shorter memory bandwidth and
slower graphics than Pentium G870; cheaper than Pentium G870, worse
• Atom D2550: 32nm litography, 2 cores with HyperThreading, integrated HD Graphics, no Turbo Boost, 1 MB L2 cache, TDP 10 W, very low frequency, only 1 memory
channel, only 4 GB max. memory supported, very slow graphics
Do not buy these processors!
M
Figure 2.3: Interesting parts of the Intel web
More information:
• http://www.intel.com/technology/manufacturing/index.htm
• From Sand to Silicon – the Making of a Chip.
URL: http://newsroom.intel.com/docs/DOC-2476
Video for 45nm technology: http://www.youtube.com/watch?v=Q5paWn7bFg4
• Intel: The Making of a Chip with 22nm/3D Transistors.
URL with video: http://www.youtube.com/watch?v=d9SWNLZvA8g
C HAPTER 2
C
P LAYING WITH HARDWARE AND REPARATIONS
36
Labs
1. Explore http://ark.intel.com/ and find out some newer interesting processors. Try the
comparing function with at least 3 different processors.
2. What is the meaning of the property “AES New instructions”? Find it on the web
page of some newer processor. This property is only for 32nm or newer processors.
3. Similarly find the property “Intel Wireless Display” (Wi-Di). This property is related
to a integrated graphics.
4. And what about “Intel Anti-Theft”?
2.1.2
C
Recognizing AMD processors
AMD produces processors, graphic cards, memory modules and mainboards.
No official Tick-Tock scheme is not kept by AMD, but some production scheme
exists. The development is separated into two main branches – classic processors and
APUs. APU is a combination of a weak processor and of a (quite) good graphic chip. We
need not any dedicated graphic card, it is integrated into the processor box. AMD does
not implement hyperthreading, so we do not distinguish physical and logical cores.
Nowadays there are several variants of AMD processors.
AMD FX: FX processors are high-end products with 4, 6 or 8 cores. They are produced
with 32nm litography process, working on high frequencies, 8 MB L3 cache, TDP is about
100 W. These processors belong to the AM3+ socket. Some of them are marked as “Black
Edition” – their multiplier is unlocked.
FX processors are without graphic core, so we need a dedicated graphic card.
Nowadays there are three generations of FX. The first and second one are built on
Bulldozer architecture (the second gen is only transitional), the third one on Piledriver
architecture. The third generation of FX is called Vishera. All FX architectures are made
with 32nm litography.
FX generation
FX processors
AMD FX generation 1, 2 or 3
@
(higher is better) @
@
Vishera FX -8 3 20
CPU “weak” cores performance level
4 . . . 4 cores (2 Bulldozer modules)
6 . . . 6 cores (3 Bulldozer modules)
8 . . . 8 cores (4 Bulldozer modules)
00, 20, 30, 50, etc.
(higher is better),
related to frequency
Figure 2.4: AMD FX processors marking
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
37
Although AMD FX are very powerful, it is not possible to compare them with Intel
processors working on the similar frequencies. In fact, the FX cores are too simple and
too many parts are shared. The processors are created from “Bulldozer modules”. One
Bulldozer module has two simple cores, each core has its own ALU (so one module has
two ALUs), but on the other hand only one FPU, one shared decoding unit and one branch
prediction unit. In view of this fact, the performance of AMD FX with 8 cores is similar
to (a bit better than) Intel Core i7 with 4 physical and 8 logical cores (hyperthreading) on
the same frequency.
M
Example 2.7
Examples of AMD FX processors:
• Procesor AMD FX-4100: 4 cores (⇒ 2 Bulldozer modules), TDP 95 W, Turbo Core,
L2 cache 2×2 MB, L3 cache 8 MB
• AMD FX 6200: 6 cores, TDP 125 W, Turbo Core, 6 MB L2 cache (2 MB for each
module), 8 MB L3 cache
• AMD Vishera FX-8350 Black Edition: 8 cores, 4×2 MB L2 cache, 8 MB L3 cache,
TDP 125 W, unlocked multiplier
M
AMD A-Series are APUs, so the graphics core (Radeon) is integrated. They are produced
with 32nm litography process. These processors have 2 or 4 computing cores and a good
graphic chip. TDP is between 65 and 100 W, only two-level cache (1 or 4 MB of L2 cache).
The processing part is not excessively performing, we use these APUs in case if we need
primarily performance in graphic tasks (video, pictures editing, web browsing, etc.).
A-Series APUs have two generations too – Llano (the first generation) belongs to the
FM1 socket; Trinity (the second generation) belongs to FM2 and CPU is the same architecture as Vishera – Piledriver.
M
Example 2.8
Examples of A-Series APUs:
• AMD A8-3850: The first generation (Llano), FM1 socket, Radeon HD 6550D graphics, 4 cores, 4 MB L2 cache, TDP 100 W
• AMD A8-5500: The second generation (Trinity), FM2 socket, Radeon HD 7560D
graphics, 4 cores, 4 MB L2 cache, TDP 65 W
• AMD Trinity A10-5700: FM2 socket, Radeon HD 7660D graphics, 4 cores, 4 MB L2
cache, TDP 65 W
M
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
generation
3 . . . Llano
5 . . . Trinity
A-Series class
A4
A6
A8
A10
...
...
...
...
38
performance level
related to performance
and frequency
(higher is better)
Q
Q
Q
Q
QQ
A8 - 5 600 K
2 Bulldozer modules, worse GPU
3–4 modules, better graphics
4 modules, more better graphics
5 modules, the best graphics
additional properties
K . . . (Black Edition)
unlocked multiplier
M . . . mobile
etc.
Figure 2.5: AMD A-Series processors marking
AMD E-Series are weak processors (APUs) in particular determined for all-in-one computers. They have only 2 cores, 1 MB L2 cache, worse graphics than A-Series, but very
low TDP. The litography is mainly 32nm, but some E-Series APUs are produced with
40nm litography (this litography step is typical for graphics cards and the Bobcat architecture). E-Series are not separately sold.
M
Example 2.9
Some E-Series APUs:
• AMD E1-1200: 32nm litography, AMD Radeon HD 7310 graphics, 2 cores, TDP
18 W
• AMD E2-3200: 32nm litography, AMD Radeon HD 6370D graphics, 2 cores, TDP
65 W, higher frequency
• AMD E-350: 40nm litography, AMD Radeon HD 6310 graphics, 2 cores, TDP 18 W
M
AMD Phenom II: Phenoms are “better” desktop processors, but it is older generation
than FX. Pehenoms II are produced with the 32nm litography, they work on higher frequencies, L2 and L3 cache are quite high. TDP is about 100 W. No graphics module is
included. Phenoms II belong to the AM3 socket.
M
Example 2.10
Some of AMD Phenom II processors:
• AMD Phenom II X6 1045T: 6 cores, 3 MB L2 cache, 6 MB L3 cache, 2,7 GHz, TDP
95 W (the lowest of all Phenom II X6)
• AMD Phenom II X4 965 Black edition: 4 cores, 2 MB L2 cache, 6 MB L3 cache, 3.4
GHz, TDP 125 W, unlocked multiplier
M
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
39
AMD Athlon II: produced with 45nm (AM3 socket) or 32nm (FM1 or FM2 socket) litography process. Athlon II Trinity (the newest generation) belongs to FM2 socket. Athlon II
has only two levels of cache memory, usually from 1.5 till 4 MB L2 cache. TDP is between
45 and 100 W. No graphics module is included.
M
Example 2.11
Some of AMD Athlon II processors:
• AMD Athlon II X3 450: 3 cores, 45nm litography, 3.2 GHz, 1.5 MB L2 cache (3×512
KiB), AM3 socket, TDP 95 W
• AMD Athlon II X4 651: 4 cores, 32nm litography, 3 GHz, 4 MB L2 cache, FM1
socket, TDP 100 W
• AMD Trinity Athlon II X4 740: 4 cores, 32nm litography, 3.2 GHz, 4 MB L2 cache,
FM2 socket, TDP 65 W
M
AMD Sempron is the cheapest type of AMD processors (parallel for Intel Celeron) with
low frequencies and small-sized L2 cache (1 MB only). Semprons do not have any graphics module. They are produced with the 45nm litography. They belong to the AM3 socket.
M
Example 2.12
One AMD Sempron processor:
• AMD Sempron 145: AM3 socket, 1 MB L2 cache, 2.8GHz, TDP 45 W
M
AMD Fusion is not a concrete type of processor, it is similarly a concept combining CPU
and GPU (well, it is APU). AMD counts various processors among AMD Fusion products
– Bobcat/Brazos and Zacate (40nm, see E-Series), Llano (32nm), Trinity (32nm) and
others.
More information:
• AMD CPU Manufacturing. URL with video: http://www.youtube.com/watch?v=qLGAoGhoOhU
• A NGELINI, Ch.: AMD FX-8350 Review: Does Piledriver Fix Bulldozer’s Flaws? Tom’s
Hardware, October 23, 2012. URL: http://www.tomshardware.com/reviews/fx-8350vishera-review,3328.html
• A NGELINI, Ch.: AMD’s Trinity APU Efficiency: Undervolted And Overclocked. Tom’s
Hardware, October 2, 2012. http://www.tomshardware.com/reviews/a10-5800k-trinityefficiency,3315.html
• W OLIGROSKI, D.: AMD A10-4600M Review: Mobile Trinity Gets Tested. Tom’s Hardware, May 15, 2012. URL: http://www.tomshardware.com/reviews/a10-4600m-trinitypiledriver,3202.html
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
40
• T OLMAN, H. AMD A10-5800K Trinity Desktop Processor. Benchmark Reviews, October 2, 2012. URL:
http://benchmarkreviews.com/index.php?option=com content&task=view&id=860&Itemid=63
• M ASIERO, M. – R OOS, A.: CPU Charts 2012: 86 Processors From AMD And Intel,
Tested. Tom’s Hardware, December 24, 2012. URL:
http://www.tomshardware.com/reviews/cpu-performance-comparison,3370.html
• AnandTech CPU Benchmarks. URL: http://www.anandtech.com/bench/CPU/2
Figure 2.6: Interesting parts of the AMD web (processors]
C
Labs
1. Explore http://products.amd.com and find out some newer processors for AM3, AM3+,
FM1 and FM2 sockets. Try the given filters and comparison of choosen products.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
41
2. Compare some properties of various graphics modules for desktop APUs (find it on
http://www.amd.com/uk/products/, on the left: APUs, Desktop, Product Specs). Note
the properties “Radeon Cores on Die”, “GPU Clock Speed” and “DDR3 Speed” (well,
also “Radeon Brand”). Note the differences between A-Series and E-Series.
C
2.1.3
Processor installation
Processor installation is similar to various platforms. The procedure is the following:
1. Prepare the given mainboard – take it out of a computer etc., according to the
present situation.
2. The newer Intel and AMD sockets usually have a small latch of some other securing
against falling the processor out of the socket. The latch may be metallic or plastic.
So, open the socket.
Figure 2.7: Intel processor – latch to open the LGA 775 socket
3. Locate the processor pins – the processor must be correctly turned!
4. Gently insert the processor.
5. Close the socket. If it is not possible, return to 3 :-) or – does the processor belong
to your socket?
6. Apply a thermal pad or paste/grease (be carreful, we use only a drop of paste).
7. Put the heat sink to the installed processor (some heat sink intended for the given
socket) and fasten it.
8. Connect up a heat sink power.
9. Complete the installation – fix memory modules, cables, power, etc., close the case.
10. Test the power and stability of the installed computer.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
42
There are some tiny differencies when installing various processors. Concrete techniques
are described on the below mentioned webs:
More information:
• How to install a LGA1156 or LGA1155 processor into the socket. Intel.com, September 18, 2012. URL: http://www.intel.com/support/processors/sb/CS-032258.htm
• AMD Processor Installation Videos. AMD.com. URL: http://support.amd.com/us/SystemBuilding-and-Compatibility/Pages/ProcessorInstallationVideos.aspx
• S CHMID, P.: LGA 775 Processor Installation. Tom’s Hardware, June 19, 2004. URL:
http://www.tomshardware.com/reviews/intel-stakes-vision-pc-future-775-launch,830-6.html
• Intel CPU installation (LGA 775), video by Intel. July 2006. URL:
http://www.youtube.com/watch?v=b6NbPMQgwPM
• LGA 775 install video (ASRock mainboard). August 2006. URL:
http://www.youtube.com/watch?v=8emxPAZZ53w
• AMD processor installation. July 2008. URL: http://www.youtube.com/watch?v=iss6QSGzVNc
• K YRNIN, M.: Installing a CPU and Heatsink (AMD), 8 pages. About.com. URL:
http://compreviews.about.com/od/tutorials/ss/DIYCPU.htm
• How to Install a New Processor (Intel, AMD, VIA). Video included. URL:
http://www.wikihow.com/Install-a-New-Processor
2.1.4
Testing and monitoring
CPU-Z is one of the most popular tools to get information about processor including some run-time information. There are the most important information – type
of processor, socket, litography, maximal value for TDP, maximal frequency, current frequencies, cache sizes, integrated GPU information, etc.
More information:
• http://www.cpuid.com/softwares/cpu-z.html
The interface of CPU-Z is very simple with several tabs, as we can see on Figure 2.8. There
are three tabs relative to processor – the first one (CPU), the second one with processor
cache information and the tab GPU (if our processor includes a graphics module).
C
Labs
1. Download CPU-Z and try it on at least one computer.
2. Find out the list of supported processors.
C
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
43
Figure 2.8: CPUID CPU-Z – information related to processor
Core Temp is more specialized tool. We use it for monitoring current temperature
of each physical core and other “dynamic” properties of the given processor. The
interface of this application is very simple but sufficient, and there is a possibility of
displaying in System Tray (menu Options, Settings, Display, Close Core Temp to the
System Tray), or of using a “Minimode” (menu Options, Toggle Minimode; we can combine
it with “Always on Top”).
More information:
• http://www.alcpu.com/CoreTemp/
There are several interesting plug-ins for Core Temp. For example, we can use a plug-in
for remote monitoring, making temperature graphs, or gadgets for Windows Vista and
Windows 7. These plug-ins are available on the project web, see the address above.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
44
Figure 2.9: Core Temp
C
Labs
1. Try Core Temp. While installing, skip the other offered tools!
2. Discover the project web. Find out the list of supported processors, take a look at
the part “How does it work” and “Add Ons” (= plug-ins).
C
2.1.5
Benchmark results
Some of the above mentioned tools can test processor performance. But there are several
methods for real testing of processor performance with the possibility of comparison.
M
Example 2.13
We want to find out performance of the given processor – Intel Core i5-3570, and to
compare it with the values for “K” and “S” variant.
This information is on http://www.passmark.com. We open this page on a web browser.
On the right side there is a field “Select a page”. We select “Searchable CPU list” as
indicated on Figure 2.10. We obtain very long CPU list. If we use Firefox and the option
for searching by writing is activated (do you know how to activate it?), this task is simple.
We found these values:
• Intel Core i5-3570 @ 3.40GHz, Passmark CPU Mark: 7004
• Intel Core i5-3570K @ 3.40GHz, Passmark CPU Mark: 7140
• Intel Core i5-3570S @ 3.10GHz, Passmark CPU Mark: 6420
“S” version is underclocked and undervolted, we can see the effect on performance.
M
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
45
Figure 2.10: CPU Benchmarks web page
C
Labs
1. Take a look at the web http://www.passmark.com. Find out the vales for several
common processors made by Intel, AMD and VIA in the CPU list. Click on one of
processors.
2. What values are typical for these processors?
•
•
•
•
•
•
•
•
•
•
•
•
•
Intel Core i5 second generation for desktops
Intel Core i7 second generation for desktops
Intel Core i3 second generation for desktops
Intel Core i3 second generation for mobile devices
Intel Core i5 third generation (Ivy Bridge) for desktops
AMD FX
AMD A8 (or in general AMD A-Series)
AMD Phenom II
AMD Sempron
Intel Atom
VIA Nano, compare with Intel Atom
Intel Xeon (newer types with 4 digits)
AMD Opteron (newer types with 4 digits), compare with Intel Xeon
C
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
46
Remark:
The measured values are only approximate – the quoted value is affected by the overall
PC configuration. We usually suppose the difference up to 5 %.
2.1.6
Overclocking and underclocking
We overclock the processor if we want to fasten it. But we have to keep in our mind that
the given processor will be hotter and “hungry” (energy consumption rises). Contrarily,
we underclock to lower energy consumption and heating.
Overclocking and underclocking is possible by one of these ways:
1. We change FSB/HT/QPI (bus) frequency.
2. We increase or decrease multiplier – for processors with the unlocked multiplier:
• Intel: “K-Series” edition,
• AMD: “Black Edition”.
3. We change voltage of processor cores.
Sometimes other additional changes are necessary, for example memory overclocking or
underclocking; in case that CPU and memory are not suitably synchronized, delays and
instabilities of the given system appear.
Remark:
It is necessary to overclock very slowly, in short steps, and we have to test system stability after each step. The excessively overclocked processor overheats, is unstable (some
random computation errors emerge) and its lifetime shortens. Each overclocked system
needs very good cooling and an adequately dimensioned power supply unit.
Overclocking and underclocking is usually done in BIOS Setup, but some producers
(such as Asustek with the products Asus) make available applications to overclock from
the installed operating system. Some general tools (third-party) exist, for example CrystalCPUID or RightMark CPU Clock Utility.
How to overclock/underclock (in BIOS Setup):
1. Find out whole information about our processor (frequencies, multiplier).
2. Pass out into BIOS Setup (or UEFI) and find out the section with CPU oveclocking/underclocking.
3. If Turbo Boost (Intel) or Turbo Core (AMD) is set, unset it.
4. Change a bit the chosen parameter (e.g. we increase frequency by 10 or 20 MHz).
5. Put the processor to the test. We can use Prime95 (Windows, MacOS X) or MPrime
(Linux, FreeBSD) in “Torture” mode during a few hours (6 hours are recommended).
6. If everything is OK, we are able to come back to step 4.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
47
Remark:
If some instabilities are shown, we can a bit increase voltage – if a system is undervolted (for example when we excesively increased frequency), transistors in cores “do not
manage” to switch with a rate that is determined by increased frequency, which leads to
instability of cores.
Sometimes it is necessary to overclock memory too.
One of the simplier applications is CrystalCPUID. We are able to change some
(accessible) parameters of processor cores. This application has simple GUI, as we
can see on Figure 2.11.
Figure 2.11: Overclocking with CrystalCPUID
More information:
• http://crystalmark.info/software/CrystalCPUID/index-e.html (CrystalCPUID download)
• http://www.mersenne.org/freesoft/ (Prime95 download)
When underclocking, we do not work only with nominal frequency, but mainly with
voltage, consumption of a core is exponentially dependent on its voltage, thus e.g. with
voltage decreasing about 20 %, consumption decreases about 36 %.
More information:
• A Beginner’s Guide to Overclocking Your Intel Processor. Lifehacker.com, July 2010.
URL: http://lifehacker.com/5580998/a-beginners-guide-to-overclocking-your-intel-processor
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
48
• PCWizKid: CPU Overclocking 101 – Part 1, Introduction. Video on YouTube. URL:
http://www.youtube.com/watch?v=TeBk4j5E0dg
• G RAHAM -S MITH, D.: BIOS guide: how to overclock your CPU. PCPro, 12 June 2011.
URL: http://www.pcpro.co.uk/tutorials/367693/bios-guide-how-to-overclock-your-cpu
• Using different overclocking settings with CrystalCPUID. URL:
http://forums.techgage.com/showthread.php?t=6153
2.2
Memory
We know some basic information about memory modules (see Chapter 1.1.4, page 6).
We are familiar with various types of memory chips, memory modules labeling, we are
able to recognize the common types of modules including the mobile ones. But there are
some other important properties.
2.2.1
Properties
Parity checking. The modules with this property have one one additional chip for parity
(for example – on a memory module there are 8 standard memory chips and 1 parity
chip). The used method is odd parity, as we can see on Table 2.1. Each row contains
odd number of “1” bits (or: sum of the bits is odd).
Chip 1
Chip 2
Chip 3
Chip 4
Chip 5
Chip 6
Chip 7
Chip 8
Parity chip
...
0
1
1
0
0
...
...
0
0
1
0
1
...
...
0
1
1
0
0
...
...
1
1
1
0
1
...
...
0
0
1
0
0
...
...
0
1
1
0
1
...
...
0
0
1
0
0
...
...
0
0
1
0
0
...
...
0
1
1
1
0
...
Table 2.1: Odd parity example (binary digits, simplified)
When even sum of bits on the same location over all memory chips (including the
parity chip) is detected, the parity error occured.
Remark:
Modules with parity checking are more protected, but slower. This property is necessary to be supported by the both – the module and the mainboard (memory controller).
Moreover, when parity-checking error occurs, the computer is turned off !
Nowadays, we meet parity checking likely on older types of modules, ECC is more common.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
49
Error checking.
The modules with the property ECC (Error-Correcting Code) use
parity bits too. The module includes only 8 (or 4 or 16) “big” memory chips and one or
two smaller parity chips. Eeach group of 8 bits in memory chips receives 1-bit additional
information (odd parity) in the parity chip.
The single-bit errors on data can be detected. When parity error becomes, it is corrected, our PC (or server) keeps working, it is not turned off.
The modules, that are not ECC, are marked as “non-ECC”.
Remark:
ECC modules are determined for server mainboards. They are a bit slower, but safer. This
property must be supported by the module and by the mainboard (and by the memory
controller) too.
If our mainboard does not support ECC, we must use non-ECC modules!
There are some subsequent techniques for more expansive server memory modules:
Multiple-bit error correction, Chipkill, Memory scrubbing, Intel Single Device Data Correction (SDDC).
Registered. The memory modules marked as “Registered” contain one additional chip,
the register chip. This chip acts as a buffer, which slightly slows down memory access, it
is something as caches. The communication stream is more stable, no data is lost when
the traffic is too fast. It is useful when we have bigger amount of high-capacity modules
on a mainboard and we require stable and scalable memory.
Registered modules are sometimes marked as “Buffered”. The modules, that are
not registered, can be marked by “not-buffered” (or there is no information about this
property).
A lot of server memory modules meet the both these properties – they are ECC and
Registered too. We also meet with “Registered with Parity” modules, but it is the same
(ECC and Registered).
Remark:
This property is also typical for server mainboards and modules (the mainboard must
support “Registered” modules), so we do not buy these modules for desktop mainboards.
C
Labs
Find out ECC and Registered memory modules in some web store. Note the way of their
marking, their common capacity and their price.
C
C HAPTER 2
2.2.2
P LAYING WITH HARDWARE AND REPARATIONS
50
Installation
Installation of memory modules is simplier than installation
of processors. How to proceed:
1. Verify the right type of memory modules – the memory bank is intended for one specific type of memory
modules, we must use the right module type.
2. Check the right side to plug the module, we can recognize it by the keying on the bottom of the module.
3. Open the bank (each bank has two locks on its sides).
4. Plug the module into the bank. This step requires a
bit of strength, do not worry do it.
Figure 2.12: Opened locks
5. Fix the module in the bank by the locks. This step of a memory bank
requires a bit of strength too.
Do not touch the gold-plated fields of a module.
Under some circumstances it is advantageous to have two (or more) modules with
lesser capacity than to have one module with bigger capacity – when we have a dualchannel or triple-channel or quad-channel memory controller. All the modules can be
accessed simultaneously, so it works faster. We find out this possibility in the documentation of our mainboard, the memory controller is situated in the north bridge or in the
processor chip.
But it is necessary to know what banks to use for these reasons. If we have a dualchannel memory controller and there are four memory banks in our mainboard, the
banks are in two different colors (we can see it on Figure 1.1 on page 2). The right way
for using this property is described in the documentation.
Remark:
We are able to use the dual/triple/quad-channel property of our memory controler, if we
satisfy all these three conditions:
• this memory controller knows it :-)
• we have two/three/four identic memory modules with the same frequency, latency,
etc., optimaly we buy a kit of memory modules,
• we push the modules to the right banks.
C
Labs
Try to install a memory module.
C
C HAPTER 2
2.2.3
P LAYING WITH HARDWARE AND REPARATIONS
51
Speed and latency
Capacity of our memory is important, but its speed (throughput) and latency is important
too.
We need to know how a memory module works. There exists a logical gride of memory
cells (we put one bit into one cell). Thus the memory cell is on one row and one column.
Suppose that an operating system wants to read data from memory. This “multioperation” is decomposed by a memory controller into such partial operations (commands)
and each operation takes some time:
1. RRD (Row Active to Row Active Delay): find the proper memory bank; if it is different
from the last used, activate the new bank containing the searched row.
2. RAS (Row Address Strobe): find the row.
3. RCD (RAS to CAS Delay): the row is found, prepare for looking for the column.
4. CAS (Column Address Strobe): find the column.
5. reading or writing . . .
6. RP (Row Precharge): renew the contents of the read cells (remember – this type of
memory is destructive while reading!).
There are some other operations related to memory refreshing (remember – this type of
memory is dynamic, it is necessary to refresh periodicly the cells content!).
• RFC (Row Refresh Cycle): deactivate a memory module (memory modules must be
deactivated during their refreshing).
• RF (Refresh): refresh (rewrite the cells by reading without modification).
The memory controller does it to prevent discharging capacitors, the interval is a few
miliseconds.
Latency is the time measure representing delay between the moment of issuing the
read/write command and its fulfiling.
The typical spent time for reading or writing is:
tRAS (how long we find the row)
+ tRCD (how long we cross from row finding to column finding)
+ tCL (CAS Latency; how long we find the column)
+ tRP (how long we renew the cells)
+ ...
Remark:
The subsequent read memory cell is very likely to be found on the same row as the
previous read cell. It implies that the operations RRD, RAS and RCD are not frequently
used; the most common operation is CAS.
Well, the time parameter tCL is the most important for memory latency. We often meet
with equating the terms tCL and memory latency. It is clear that “less is better”.
C HAPTER 2
M
P LAYING WITH HARDWARE AND REPARATIONS
52
Example 2.14
Each memory module is labeled either only with its tCL or with a bit longer sequence of
numbers. If the whole string is present, it may look like one of these three sequences:
tCL–tRCD–tRP–tRAS
3 – 3 – 2 – 6
8 – 7 – 6 – 19
5 – 5 – 5 – 16
/ CM RATE
/
1T
/
2T
/
2T
The values tCL, tRCD, tRP and tRAS are clear.
The “managing” value CM RATE (Command Rate) is a time interval between forming
some of the above mentioned commands with determining the target memory chip, and
its receiving by such chip. It is usually 1 or 2.
Nowadays, only tCL is often given. If no this information can be found, we can expect
worse value.
M
Typical values of tCL are:
• between 2 and 3 for DDR,
• between 3 and 6 for DDR2,
• between 5 and 10 for DDR3.
As we can see, faster types of modules work with worse latency.
How much is tCL important when buying new modules? We would consider these
criteria (in the quoted order):
1. type and capacity of modules,
2. frequency – higher is better, but first of all memory frequency and processor frequency would be synchronized (one would be a multiple of the remaining one),
3. latency – important mainly if our processor has low L2 cache.
M
Example 2.15
Some of memory modules specifications:
• Crucial CT2KIT25664BA1339A 4GB DDR3 SDRAM Memory Module
4GB Kit 2X2GB PC3-10600 1333MHZ DDR3 240-Pin DIMM Unbuffered CL9 1.5V
means DDR3 modules (classic DIMM for desktops with 240 pins), kit of 2 pieces
(each 2 GB), total capacity 4 GB, frequency 1333 MHz, transfer rate 10 600 MB/s
(PC3-10600), latency is 9 (CL9), unbuffered and non-ECC
• Kingston ValueRAM 2GB DDR2 SDRAM Memory Module
2GB 2 x 1GB - 667MHz DDR2-667/PC2-5300 - Non-ECC - DDR2 SDRAM - 240-pin
means one DDR2 desktop module, capacity 2 GB, frequency 667 MHz, transfer rate
5300 MB/s, latency is not given (but we can find somewhere else – CL5), unbuffered
and non-ECC
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
53
• SODIMM Kingston, 8GB, DDR3, 1600MHz, Non-ECC, CL11
means one notebook (SO-DIMM) DDR3 module, capacity 8 GB, frequency 1600
MHz, transfer rate 12 800 MB/s (because DDR3-1600 equals to PC3-12800), latency
is CL11, unbuffered and non-ECC
M
2.2.4
Memory information
We can obtain information about memory modules in the well-known CPU-Z. We
select the tab “Memory” – this is basic information about installed memory chips.
The next tab, “SPD”, contains detailed memory information saved on SPD chips of memory modules, we will get familiar with SPD in the next subsection. Memory tabs of CPU-Z
are shown on Figure 2.13.
Figure 2.13: Getting memory information with CPU-Z
HWInfo32 and HWInfo64 is known us too. We can obtain more detailed information
(the question is – do we need all the details?). We can see this tool on Figure 2.14,
and it is run on the same system as CPU-Z descripted above, so you can compare them.
C
Labs
Try to get information about memory modules with CPU-Z and HWInfo. How much
modules did you find? If more than one, what number of channels is used parallely
(dual/triple/quad-channel)? What value does tCL take?
C
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
54
Figure 2.14: Getting memory information with HWInfo64
2.2.5
Overclocking
Memory modules shell be overclocked, we are able to change some of the above mentioned
time parameters. Why is it possible? A memory module can work very fast, but in the
first place we require stable synchronized communication between a memory controller
and a module. If it is not synchronized, one of the two communicating subjects has to
wait for the other one and their communication is delayed. So, higher frequencies do not
necessarily mean faster communication.
Memory overclocking can be done in BIOS Setup or UEFI, or with the special applications.
The configuration possibilities are different in various BIOSes and UEFIes, we can see a
simple screen on Figure 2.15. We are able to increase frequency or to decrease tCL, but
we have to proceed in very small steps and it is necessary to test stability of the comuter
after each step.
If the value tCL is kept too low, memory latency is a bit better, but the probability
of memory errors grows (memory cells are not able to be rewritten in the given too short
time). The remaining memory parameters have similar “secondary effects”.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
55
Figure 2.15: Memory overclocking, Award BIOS Setup
The parameter CM RATE (it may be “1T/2T command timing) is better to be kept on
2T and very often it is not possible to change it. If we can change CM RATE and we select
1T, communication with memories is strongly faster, but the probability of memory error
grows much more than with changing tCL. Certainly we should not do it if we have more
than one module.
Remark:
All settings (not only) related to memory timing are saved in EEPROM or flash SPD chip
(Serial Presence Detect) on each memory module (it is usually one of the smaller chips).
Information kept in this chip is mapped to BIOS Setup.
Sometimes it is too complicated to capture the best values for the above mentioned time
parameters. Producers offer several possibilities of simplifying setting the right values.
Not all producers do it, some of them offer something of the following:
• Possibility of selecting aggresive or conservative memory timing in BIOS Setup (two
pre-prepared profiles for memory timing, available in BIOS Setup).
• EPP (Enhanced Performance Profiles) – 4 advanced profiles for memory timing are
put in SPD chip (available in BIOS Setup). We only select one of these profiles in
BIOS Setup. EPP is used by nVidia and some other producers.
• XMP (eXtreme Memory Profile) – the same as EPP, but made by Intel for its DDR3
modules.
We can use these profiles only with the memory modules who support them (and the
motherboard must them support too).
C HAPTER 2
M
P LAYING WITH HARDWARE AND REPARATIONS
56
Example 2.16
This fact can be found in module specifications. For example:
Kingston SODIMM DDR3 4GB 1600MHz CL9 HyperX XMP (Kit 2x2GB)
As we can see, these two modules (kit of 2 modules) support XMP profiles.
M
As mentioned above, there are these ways to overclock (or underclock, sometimes it is
necessary) our memory modules:
• BIOS Setup and UEFI,
• special applications.
BIOS Setup is shown on Figure 2.15 (but it really can be different, it depends on BIOS
possibilities), UEFI is similar (it only has graphical interface). Let us take a look at the
applications.
CPU Tweaker is one of the applications allowing overclocking. We can overclock
processor and memory with it. We obtain all relevant information about CPU and
memory, and some of the depicted parameters can be changed. This tool is shown on
Figure 2.16.
Figure 2.16: CPU Tweaker
More information:
• http://www.tweakers.fr/cputweaker.html
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
57
Most people makes memory overclocking in BIOS Setup, it is not any problem. We
only have to find the proper section in BIOS Setup (or UEFI), whitch is likely labeled
“Performance”, “Advanced configuration” or similarly. So, how to overclock memory:
1. find the proper section in BIOS Setup, check the concrete possibilities,
2. try to change tCL (or another parameter) in very small step,
3. test stability of your system – use MemTest (see below),
4. if everything is OK, you can finish or return to step 2, if some errors occur, put the
changed value back and test again.
More information:
• I WANIUK, P.: How to overclock your RAM. Tutorial Make the most of your memory with our RAM tweaking tips. PCFormat Issue 256, October 2nd, 2011. URL:
http://www.techradar.com/news/computing-components/upgrades/how-to-overclock-yourram-1030286
• T ORRES, G.: Understanding RAM Timings. Hardware Secrets, May 17, 2011. URL:
http://www.hardwaresecrets.com/article/Understanding-RAM-Timings/26
• Intel and Overclocking DDR3 memory. Intel.com. URL: http://www.intel.com/content/
www/us/en/gaming/gaming-computers/intel-extreme-memory-profile-xmp.html
• L ENG, R.J.: The Secrets of PC Memory: Part 1 Bit-Tech.net, 15th November 2007.
URL: http://www.bit-tech.net/hardware/memory/2007/11/15/the secrets of pc memory part 1/4
• Woomack: Memory Overclocking Guide for Intel Ivy Bridge platform. Overclockers.com, July 31, 2012. URL: http://www.overclockers.com/memory-overclocking-guideivy-bridge
• Memory (RAM) Overclocking Guide – DDR3. Master’s Lair, July 2011. URL:
http://www.masterslair.com/memory-ram-overclocking-guide-ddr3/
• YAM, M.: A Tour Of The Kingston Memory Factory In Taiwan. Tom’s hardware,
August 5, 2010. URL: http://www.tomshardware.co.uk/picturestory/7-dram-flash-nandssd-usb.html
2.2.6
Testing
We use memory testing in these cases:
1. something is wrong, from time to time some mistake occurs, there are some instabilities in applications running, BSD (Blue Screen of Death – do you know it?)
etc.,
2. we bought new memory modules,
3. we overclock memory,
4. we can give benchmark results, we test performance (see Section 2.6, page 70).
We focus on the first three cases (memory functionality, not performance).
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
58
Memory testing should be carried out without the assistance of the operating system
(all the common operating systems lock memory and other hardware for kernel mode),
optimally we should boot from a removable media. So, we need a bootable ISO image to
burn out on CD, or image for USB flash disks.
There are these tools for memory testing:
• MemTest86+ (freeware)
• GoldMemory (shareware)
• Windows Memory Diagnostic
More information:
• http://www.memtest86.com
• http://www.goldmemory.cz
• http://oca.microsoft.com/en/windiag.asp
The first one is the most popular, let us see how MemTest86+ treats. We download
an ISO image or image for USB flash disks, than we burn/install it and boot from the
given media. MemTest (and all similar tools) uses only pseudo-GUI, as we can see on
Figure 2.17.
Figure 2.17: MemTest86+1
Immediately after booting MemTest begins with testing. Found errors are highlighted,
see Figure 2.18.
But that is not all. We have to determine what specific memory problem occured.
The fault might be defective hardware (a memory module, a bank, a memory controller,
1
Source: http://www.geekstogo.com/forum/topic/246994-guide-to-using-memtest86/
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
59
Figure 2.18: MemTest86+, error found
a mainboard or a processor), but it can also be bad memory timing that causes instability,
or an insufficient power supply unit.
Remark:
If some error is reported, we ought to test more than ones to reveal if the found errors
occur randomly in time (sometimes yes and sometimes no) and location (at different
locations). We try push a memory module to some other bank and test again. If we have
more than one memory module, we can try to swap them themselves and test again.
Error types:
• error occurs randomly (in time and location too) – the problem may be in:
–
–
–
–
mainboard or processor
weak power supply unit
memory modules are not compatible with each other
the given memory module is not compatible with mainboard
• error occurs with the same module before and after swithing the modules or after
replacing the module to the other bank (the same address while repeating, but
different address while switching modules): this module is faulty
• error occurs on the same address before and after switching modules (or if we have
only one module – without errors after replacing): this bank is faulty or too dusty
More information:
• Guide to using Memtest86+. GeeksToGo, July 21, 2009. URL:
http://www.geekstogo.com/forum/topic/246994-guide-to-using-memtest86/
C
Labs
Try to test some PC or notebook with the bootable version of MemTest86+.
C
C HAPTER 2
2.3
2.3.1
P LAYING WITH HARDWARE AND REPARATIONS
60
Magnetic memory media
Revision
We are familiar with HDD basics, but to review the basics, we recall the basic terms:
Figure 2.19: Magnetic disk geometry
What properties are important:
• capacity
• form factor – usually 3.5” or 2.5”
• data interface – must correspondent to some of interfaces of mainboard:
–
–
–
–
–
–
–
–
SATA 1 (1.5 Gb/s) – do not buy it, a bit slow
SATA 2 (3 Gb/s) – sufficient for common HDDs
SATA 3 (6 Gb/s) – very good for faster HDDs, good for SSDs
SCSI (cca 3 Gb/s) – old
SAS (Serial Attached SCSI) 1.0 (3 Gb/s) – old
SAS 2.0 (6 Gb/s) – for servers
Fibre Channel (FC) – for servers
USB – external disks (choose USB 2.0, higher version is a bit problematic for
now)
– eSATA, FireWire – for faster external disks
– Thunderbold, ExpressCard, wireless – less common
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
61
• rotations per minute – 5400 rpm (notebook HDDs), 7200 rpm (desktop HDDs) or
more (server HDDs)
• cache amount – usually 8–64 MB (more is better)
Disk controller is a very important part of each disk. This component gets requests for
disk operations, organizes the requests queue, translates the given linear LBA (Logical
Block Addressing) address (specified by a file system) to the corresponding physical address and fulfils the requirements.
More information:
• http://www.hdd-tool.com/hdd-basic/hard-disk-and-hard-drive-physical-components.htm
• http://hssl.cs.jhu.edu/r̃andal/419/lectures/L3.DiskHard.pdf
2.3.2
S.M.A.R.T.
S.M.A.R.T. (Self Monitoring Analysis and Reporting Technology) is a monitoring system
to detect and report on possible failures of HDDs, the purpose is to warn a user of
instabilities and HDD failures. This system is integrated to all newer discs.
Various disks provide various amount of information, it depends on the version of
ATAPI. Disk controller permanently oversees the given values (number of faulty reads,
number of writing errors, changes in spinning up time, number of remapped sectors
(when discovering they to be defective), disk temperature, etc.) and logs them.
Some of the most important values:
• Raw_Read_Error_Rate – number of errors when reading,
• Spin_Up_Time – time it takes to spin disk platters; if it is not OK, it usually means
damaged spindle motor,
• Reallocated_Sector_Count – when a faulty sector is found, it is remapped – replaced
with a reserved sector; this value shows count of these remappings, and if it grows,
the given disk is a write-off,
• Seek_Error_Rate – number of faulty head possitioning; if this value grows, the
mechanismus of heads possitioning is not quite right,
• Spin_Retry_Count – number of failed spindle motor starts; we should backup our
data and get a new disk,
• Temperature_Celsius – temperature of a disk; this value is for information only (it
normally should not exceed 60 °C).
We obtain:
1. raw value – specific real value for the monitored quantity,
2. value – “risk index” in range 0–100 (number 0 usually means the maximal risk,
number 100 means that everything is OK),
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
62
3. thresh – “dangerousness limit” in range 0–100; if value exceeds thresh (downwards),
it means real risk.
Example of three possible rows of S.M.A.R.T. attributes can be found in Table 2.2. We
can see that for the given disk the spinning up time is quite good, the value 11 is much
higher than the thresh. But seek error rate is not ideal – it is too near to its thresh.
ID#
Attribute
Flag
Value
Worst
Thresh
...
3
7
194
Spin_Up_Time
Seek_Error_Rate
Temperature_Celsius
0x0007
0x000f
0x0022
079
061
074
079
058
067
011
051
000
...
...
...
...
Type
Updated
When_failed
Raw_Value
...
...
...
Pre-fail
Pre-fail
Old_age
Always
Always
Always
-
6260
7863642
28 (Lifetime)
Table 2.2: Example of several rows in S.M.A.R.T. table
Remark:
There is a possibility that S.M.A.R.T. does not work although it would; we should check
in BIOS if it is not disabled.
We need a program (an application) to make this information accessible.
• for Windows: HDDScan, CrystalDiskInfo, SpeedFan, HDD Health, SiSandra, Home
Server SMART, etc.
• for Linux: smartmontools package (usually already installed) – for command line,
GNOME Disks or GNOME Disk Utility (with GUI), etc.
Most producers provide their own monitoring applications (for example Seagate, Samsung, Western Digital, Hitachi).
CrystalDiskInfo is one of the applications to check the S.M.A.R.T. attributes. We
can see its GUI on Figure 2.20. It is possible to check the values, and – with some
problems emerging – this software is able to alert us by mail. This tool is freely available
including its source code.
SpeedFan can monitor much more items – fan speeds, voltages, temperatures, and
it arranges access to disk S.M.A.R.T. too. Compared to the previous tool, SpeedFan
also allows to start testing (extended or short), see Figure 2.21.
More information:
• http://crystalmark.info/software/CrystalDiskInfo/index-e.html
• http://www.almico.com/speedfan.php
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
63
Figure 2.20: CrystalDiskInfo with S.M.A.R.T. attributes
Figure 2.21: SpeedFan – monitoring and testing S.M.A.R.T.
C
Labs
Try one of the present tools and find out:
• HDD information – data interface, supported technologies, disk temperature,
• S.M.A.R.T. values for number of reading errors, number of remapped sectors, etc. –
is any value near its thresh?
C
C HAPTER 2
2.3.3
P LAYING WITH HARDWARE AND REPARATIONS
64
Errors testing
Sometimes we need to test our disk and find out damaged sectors. There are two types
of tools for this purpose – the tools working inside an operating system and the tools
working without an installed operating system (bootable tools).
HD Tune exists in two editions – HD Tune Pro is a commertional software with big
amount of disk functions, HD Tune (not Pro) is its trial version and we can use it
free for personal use. The trial version has less functions, but the function Error Scan is
sufficient.
Figure 2.22: HD Tune
MHDD belongs to the second type of tools. We can download an ISO file (it is freeware)
based on FreeDOS, burn it and boot from it. The interface is shown on Figure 2.23.
MHDD is very popular and also successful in taks of finding and remapping bad
sectors on IDE, SATA, SCSI and USB disks.
More information:
• http://www.hdtune.com/
• http://mhdd.softpedia.com/
• http://hddguru.com/software/2005.10.02-MHDD/mhdd manual.en.html
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
65
Figure 2.23: MHDD2
C
Labs
Try the both present tools (well, be careful with the licence of HD Tune). Download and
burn MHDD, it is very useful tool.
C
More information:
• The PC Guide: Hard Disk Drives. April 17, 2001. URL:
http://www.pcguide.com/ref/hdd/index.htm
• T YAGI, T.: Data Recovery with & without Programming. BPB Publications, New Delhi,
India, 2004. ISBN: 81-7656-922-4. URL: http://www.datadoctor.biz/author.htm
• Active Disk Wiper – Table of contents. URL: http://www.active-disk-wiper.com/activewiper-help.htm
• Test If Linux Server SCSI/SATA Hard Disk Going Bad. Cyberciti.biz. Last updated
July 10, 2012. URL: http://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html
2.4
Power supply unit (PSU)
A power supply unit converts AC power to DC power with adaptation to several different
(low-)voltage levels. There are these specifications (form factors):
• ATX and ATX12V (the most frequently used units),
• TFX (“Thin”, we use them into low-profile cases),
• external PSU for laptops (notebooks) and other very slim devices, etc.
2
Source: http://k.zol-img.com.cn
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
66
There are several rails coming out of a PSU. They consist of a few colorful wires:
• red: +5 V
• yellow: +12 V
• white: -5 V
• blue: +12 V
• orange: +3.3 V
• black: ground
Various components need various voltage. Rails containing yellow wires are set for mechanical components such as fans and HDDs, and for newer processors. Some of PSU
connectors are of the form “dices”, this form is very modular. So there are these rails and
connectors to power the components (see Figure 2.24):
• 24pin ATX connector – the main rail to power up the mainboard and everything
connected to the mainboard. Some older mainboards need a 20pin connector. Some
PSUs provide the combination of 20pin and 4pin connectors and we are able to
connect them together side by side into the 24pin plug.
• 4pin 12V connectors – fans and monitoring sensors are powered by this connector
(but over mainboard, not directly, see Figure 2.25).
• 6pin or 8pin VGA – they are used as an extra power to high-performance dedicated
graphics cards (PCIe is not able to ensure sufficient power to these cards). Some
PSUs provide the combination of 6pin and 2pin VGA instead of the 8pin VGA, we
do not hesitate to stick them into the 8pin plug.
• SATA power connectors – slim connectors to power devices connected over SATA
cable (HDDs, optical drives, etc.). The inner key is of the shape the Greek letter Γ
(Gamma).
• Molex connectors – they are mainly used for IDE (PATA) drives (older HDDs and optical drives), so we connect a wide IDE cable plus this molex to them. Some mainboards use molexes to provide an extra power to the PCIe×16 slot (for a powerful
dedicated graphics card).
• Floppy drive power connector – is more thin and narrow than molex.
CPU fans and sensors need powering too, so they have a power connector to connect
into a plug on the mainboard. The given connector is similar to a floppy drive power
connector, only more narrow (there are only 3 pins there, a floppy connector has 4 pins).
It follows that power flows from PSU into a mainboard over 4pin 12V connector, and then
to a CPU fan over this 3pin power connector.
Remark:
Power supply units are dangerous! They keep voltage a few seconds after
switching off yet.
So before dismantling your PC we ought to wait a while and we would
use the hardware switch of PSU (see the picture on the right).
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
67
Figure 2.24: Power connectors
Power requirements of a common desktop computer are between 250 and 1000 W. It
depends on used components (CPU, graphics card, fans, . . . ). Office and cheaper home
computers manage on 300W PSU, but if we have a powerful CPU and some powerful
dedicated graphics, we need a high-powered PSU.
The efficiency rating of PSU determines how much energy is lost during the conversion
AC power to DC with the given voltage. The lost energy is transformed to heat and this
heat has to be taken away by the PSU fan, so we waste an energy and an extra energy is
used to take the produced heat out. PSUs with higher efficiency are able to utilize more
energy.
We would become conscious of the fact that a common computer’s consumption is
only about 60 % of the total capacity during the most of the work time, no computer
works at full blast all the time. The PSUs usually allow for it and they work with the
highest efficiency when the computer works the consumption between 50 and 60 %.
PSU certifications determine the minimal efficiency of PSU on the given consumption.
The existing certifications are in Table 2.3. Of course, PSUs with higher certification are
better (they produce less heat at all the values of consumption.
80 Plus
80 Plus 80 Plus 80 Plus
80 Plus
Bronze
Silver
Gold
Platinum
Efficiency on the given consumption
20% consumption
50% consumption
100% consumption
80 %
80 %
80 %
82 %
85 %
82 %
85 %
88 %
85 %
Table 2.3: PSU certifications
87 %
90 %
87 %
90 %
92 %
89 %
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
68
Figure 2.25: Connecting power connectors to get CPU fan to work
More information:
•
•
•
•
http://www.plugloadsolutions.com/80PlusPowerSupplies.aspx
http://www.buy-a-new-computer.com/computer-power-supply/pc-power-supply-connectors/
http://compreviews.about.com/od/cases/bb/PSU.htm
http://crossaffairs.blogspot.cz/2011/07/power-supply-unit-psu-troubleshooting.html
When buying a computer power supply unit (or typicaly a new chassis with a PSU), we
pay attention to these criteria:
• form factor of PSU (mostly ATX or ATX12V),
• active PFC (Power Factor Correction) – all newer PSUs meet it,
• power rating – according to the used components and their requirements,
• efficiency – the more the better, we choose by the 80Plus certification,
• modular – the cables are detachable, we can have connected only the cables we
need,
• well, price too.
C
Labs
1. Discover some PC and find out all the power connectors. What power connector is
plugged into the P1 plug on mainboard – 20pin or 24pin? How much SATA power
connectors and molexes are there? Where is the plug for CPU fan? What else
connectors are plugged?
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
69
2. Explore some web store and find a PSU for a computer with power rating until 450
W, with some rational value of efficiency with relation to quite good price (at least
80 Plus Bronze certification).
C
2.5
2.5.1
Monitoring
HWMonitor
HWMonitor is one of free tools for hardware monitoring. It is different from the
previous tools, its job is to display data gained from various sensors. We can see
the interface on Figure 2.26. It depends what sensors are connected.
Figure 2.26: CPUID HWMonitor
C HAPTER 2
2.6
P LAYING WITH HARDWARE AND REPARATIONS
70
Benchmarks
SiSoftware Sandra is one of the most popular benchmarking tools. We get information about hardware including our memory modules, and we have the use of
several interesting tools and benchmarks. This software is commercial, but we can try
lite version free.
Figure 2.27: SiSoftware Sandra – memory information
There are more benchmark applications – CPUMark, Futuremark 3DMark, PCMark
Vantage, PCMark 7, GPU-Z, etc. Some of them are freely available, see addresses listed
below.
C HAPTER 2
P LAYING WITH HARDWARE AND REPARATIONS
71
More information:
•
•
•
•
•
http://www.sisoftware.net/
http://www.memorybenchmark.net/ram.php?ram=Kingston+99U5471-002.A01LF+2GB
http://www.overclockzone.com/download/
http://www.futuremark.com/support/guides
http://www.techradar.com/news/software/applications/best-overclocking-software-15-top-apps721381
• http://www.techpowerup.com/downloads/
• http://www.techpowerup.com/gpuz/
• Wawro, A.: Overclock Your CPU, GPU, and RAM. PCWorld, May 23, 2011. URL:
http://www.pcworld.com/article/228488/overclock your cpu gpu and ram.html
Chapter
3
Network
We review several terms and concepts of computer networks, but we assume that readers
have a basic understanding of this subject.
3.1
Communication overview
When a person wants to tell something to another person, they both have to understand the same communication language, their communication consists of words of this
language, maintaining the given syntactic and semantic structure.
When a computer wants to tell something to another computer (or some other device), they both have to understand the same communication language too – we call this
language a protocol.
Remark:
A communications protocol describes digital unit formats and rules for their processing
and transmission between computing systems.
3.1.1
Protocol stacks
Each protocol serves for some given partial purpose (procols can not be too complicated),
so protocols have to cooperate with other protocols – a protocol can provide services to
another protocol. But no protocol can cooperate with any other one.
So, all the known protocols are separated to several levels and it was determined that
each protocol provides services to higher layer protocols and uses the services of lower
layer protocols.
It was necessary to standardize all communication elements – besides the mentioned
protocols, all communicating elements need their own addresses.
72
C HAPTER 3
N ETWORK
73
ISO/OSI
Reference model
L7
Application Layer
L6
Presentation Layer
L5
Session Layer
L4
Transport Layer
L3
Network Layer
L2
L1
Data Link Layer
Physical Layer
LLC
MAC
Meaning:








Providing data conversions – encryp-
Protocol
Data Units:
Addressing:
Provides services to applications (network interface) – manipulation, semantic conversions, security.
tion, (de)compression, conversion to
another data format, . . .




Opens, coordinates and ends conver- 


sations between two applications.
data, messages
Reliable connection between two endpoints; segmentation of a data stream
before and composition after transfer.
segments
ports
Forwards data to the given destination, provides routing, works with
logical topology of network.
packets, datagrams
IP addresses
Works with physical topology of network, synchronizes network traffic.
frames
Manages the process of sending and
receiving data, defines physical and
electrical specifications for devices.
bits
MAC addresses
Figure 3.1: ISO/OSI Reference Model
There are two generally known reference models of protocol layers for computer networks – ISO/OSI and TCP/IP. The first one is more complex, the second one is more
practical. These two models are illustrated on Figures 3.1 and 3.2. Applications do not
work at Application Layer, they only use services of application protocols! (For example:
a mail client uses services of SMTP, IMAP and POP3).
Remark:
A protocol suite is a collection of all the protocols that can work on layers in the given
reference model.
A protocol stack is a complex set of protocols that can be implemented on a specific
type of device (so, a protocol stack can be considered as an implementation of a protocol
suite). For example:
• The most devices connected to internet implement the TCP/IP protocol stack.
• The H.323 protocol stack is implemented on many VoIP devices (Voice over IP –
internet telephony).
• The GSM protocol stack is implemented on GSM devices (mobile phones etc., devices
with a GSM chip). Other mobile technologies (3G, LTE, . . . ) have their own protocol
stacks too.
C HAPTER 3
N ETWORK
74
Reference model
ISO/OSI
L7
Reference model
TCP/IP
Protocol
Data Units:
Protocols:
POP3, IMAP
Application Layer
SMTP
Application Layer
L6
Presentation Layer
L5
Session Layer
L4
Transport Layer
Transport Layer
segments
L3
Network Layer
Internet Layer
packets, datagrams
L2
L1
Data Link Layer
data, messages
FTP, SFTP
etc.
DNS
DHCP
HTTP, HTTPS
Physical Layer
ICMP, IGMP
IPv4, IPv6
LLC (IEEE 802.2)
LLC
MAC
TCP, UDP
frames
Network Interface
Layer
bits
IEEE 802.3,
IEEE 802.11, . . .
Figure 3.2: TCP/IP Reference Model – comparison with ISO/OSI
Remark:
We say that a device works/operates at such ISO/OSI level if the given device implements
several protocols of this level (and of course also some protocols of the lower levels), it
implements (a functional part of) a protocol stack.
More information:
•
•
•
•
•
•
•
http://people.ee.duke.edu/ romit/courses/f07/material/
http://en.wikibooks.org/wiki/CCNA Certification
http://www.exa.unicen.edu.ar/catedras/comdat1/material/TP1-Ejercicio5-ingles.pdf
http://www.javvin.com/protocolsuite.html
http://www.ipcomm.de/protocols en.html
http://www.zframez.com/protocolsuite.html
http://www.karunya.edu/linuxclub/resources/Linux%20Network%20Administrator%27s%20
Guide%202nd%20Ed.pdf
• http://www.tcpipguide.com/free/index.htm
C HAPTER 3
3.1.2
N ETWORK
75
Encapsulation
PDU’s belonging to higher layers are encapsulated into PDU’s of lower layers. We can
demonstrate it over a Ethernet packet.
Ethernet
header
Application data
Message
Application
layer
TCP
header
Application data
TCP
segment
Transport
layer
IP
header
TCP
header
Application data
IP
packet
Network
layer
IP
header
TCP
header
Application data
Ethernet
frame
Data-link
layer
FCS
Table 3.1: Encapsulation in protocol layers
When sending data, each PDU is wrapped inside the appropriate lower layer PDU.
This scheme is valid for Ethernet frames, a scheme for other types of PDUs and other
protocol stacks would be similar.
In each step (downward) a header (and sometimes a footer too) is added. Conversely,
PDUs in incoming traffic are unpacked by removing headers and footers.
3.2
3.2.1
Network equipment
Active network equipment
Hub (concentrator) is simple network device with a few ports (more than 2);
a hub is able to receive a signal from some port and to transmit it to all remaining
ports. Hubs work at Layer 1 (Physical) of ISO/OSI, they “see” only bits with no internal
structure of a bit stream. A hub does not work with any addresses.
Real hubs (not cut off switches) are now hard to get. We can use them to duplicate
traffic (e.g. for passive traffic monitoring).
Repeater is a device with 2 physical ports working at Layer 1. This device only
regenerates and repeats signal from one port to the second one. We can often
meet wireless repeaters which regenerate wireless signal to increase network coverage.
Switch works at Layer 2 (Data-link). In contrast to hubs, switches forward
obtained signal only to one port, not to all ports. So a switch is able to determine
the right port according to an address (usually MAC address) stated in a data frame. In
LANs, we mostly meet Ethernet switches.
C HAPTER 3
N ETWORK
76
A switch determines among ports by a special table with L2 addresses – this table
is called MAC table or CAM table. Each row of this table contains an MAC address, an
outcomming physical port (interface address) and some additional information according
to specific properties of such device.
Some switches
include L3 funcionality too (or – multilayer switch).
Bridge mainly operates at Layer 2 too. Bridges typicaly connect two network
segments, they work similarly to switches (but they have only two ports – each
for one network segment).
Wireless bridge connects a wireless network to another LAN. It can be WDS
(Wireless Distribution System).
Router works at Layer 3 (Network Layer). Routers forward by logical addresses
(mainly IP addresses), these addresses are kept in a routing table. More than one
way may lead into one destination L3 address (in contrast to MAC addresses at LANs), a
router has to choose one of the existing ways – the best one with the least cost.
Nowadays, routers work with subnets, not with particular computers. So, they have
subnet IP addresses in their routing tables.
Brouter (Bridge Router) is a device combining bridge and router functionality (it operates at Layers 2 and 3).
Gateway works on Layers 4–7. Geteways operate as interfaces connecting two networks
with different protocol stacks.
NIC (Network Interface Card) allows the computer or other complex device to access
a network medium (wired – e.g. Ethernet, or wireless – e.g. Wi-fi).
C
Labs
Find out Cisco network icons on Internet. We will need them for networks modelling.
They are accessible in several formats – EPS and some picture formats.
C
3.2.2
Passive network equipment
Signal in computer networks can be transmitted through
• copper cables (wired, the most common) – UTP (unshielded) or STP (shielded)
• optical cables (wired too, but LED or laser light is used instead of electrons)
• air (wireless – there are radio, infrared and other wireless networks)
• coaxial cables – TV signal distribution (TV antennas), connecting external antenna
to a wirelless router, . . . (with different impendances!)
• etc.
C HAPTER 3
N ETWORK
77
Various cables constitute the most important passive network equipment.
At Ethernet networks we often use UTP – unshielded twisted pair cables with RJ-45
connectors.
Remark:
Important related standards:
• ISO/IEC 11801 – telecommunication cabling systems for structured cabling, we
often use the categories 5, 5e and 6 for Ethernet,
• ANSI/TIA/EIA-568-B – besides other elements, this standard defines the way of
plugging T568A better known as RJ-45.
More information:
• Guide to ISO/IEC 11801. February 2008. URL: http://www.lanster.com/pub/files/file
/okablowanie normy/Guide ISO 11801 2nd Amendment1.pdf
• What’s the Difference Between T568A and T568B? CableOrganizer.com Learning
Center.
URL: http://www.cableorganizer.com/articles/difference-between-T568A-andT568B.html
There are more different types of Ethernet cables (categories). The most common UTP
cables are:
• Cat 3 – for telephone wiring only,
• Cat 5 – for Ethernet, frequencies of up to 100 MHz (10Base-T, Fast Ethernet 100BaseTX, and sometimes Gigabit Ethernet 1000Base-T), maximal length is 100 m,
• Cat 5e – similar to Cat 5, but crosstalk specifications are better, we use Cat 5e for
Gigabit Ethernet,
• Cat 6 – for Gigabit Ethernet and 10GBase-T (10Gb Ethernet), frequencies of up to
250 MHz, more strict specifications for crosstalk and noise,
• Cat 6a (not 6e!) – frequencies of up to 500 MHz, improved specifications of alien
crosstalk; the maximal length is 100 m for Gigabit Ethernet and 55 m for 10Gb
Ethernet,
• Cat 7, the newest one.
C
Labs
Take a look (quickly) at the information sources stated above. Examine some Ethernet
cable and find out its type.
C
C HAPTER 3
N ETWORK
78
More information:
• Twisted pair cables. ePanorama.net. URL:
http://www.epanorama.net/documents/wiring/twistedpair.html
• G ARRISON, J.: What Kind of Ethernet (Cat-5/e/6/a) Cable Should I Use? HowToGeek, August 16, 2011. URL: http://www.howtogeek.com/70494/what-kind-of-ethernetcat-5e6a-cable-should-i-use/
• G OODNIGHT, E.Z.: The How-To Geek Guide to Making Your Own Custom Ethernet
Cables. HowToGeek, April 25, 2011. URL: http://www.howtogeek.com/60486/how-tomake-your-own-custom-length-network-cables/
• Application and Installation Videos. CableOrganizer.com Learning Center. URL:
http://www.cableorganizer.com/videos/
3.2.3
RJ-45 connectors – crimping
There are cables with connectors in all computer
shops, but we sometimes need something special – the most often a cable with non-standard
length. We want:
• cable (UTP with required length or a bit
longer)
• two connectors RJ-45 suitable for the given
type of a cable (Cat 5 or Cat 6; Cat 6 are
a bit longer)
Figure 3.3: RJ-45 Crimping tool
• crimping tool and cutting tool
• Ethernet cable tester
• knife
When training, you need a longer cable and more than two connectors (but only one
crimping tool).
Remark:
How to arrange the wires? As we can see on Figure 3.4 on page 79, there are two types
of their arrangement. When crimping normal straight cable, we use one of them only
(the first one, TIA/EIA 568-B, is recommended, but the both ways are correct). When
crimping cross-over cable, one end should be crimped according to 568-A and the second
one according to 568-B.
C HAPTER 3
N ETWORK
79
Figure 3.4: RJ-45 Cat 5e and 6 wiring diagrams – TIA/EIA 568-B and 568-A1
Cable crimping is not difficult, but we should to practise
it. The procedure is the following:
1. strip cca 2 of the outer cover at the end of the cable
wires with a knife or s stripping tool
2. untwist the wires
3. arrange them in accordance with one of the pictures in
Figure 3.4 (probably as 568-B) and straighten them by
a cutting tool
4. hold the RJ-45 connector next to the cable, all wires
must go to the end of the connector slots
5. use a crimping tool
6. test it by a tester
Ethernet testers usually consist of two parts. We connect
different ends of our crimped cable supplied with RJ-45 con1
Source: http://www.elitelex.com/NetworkComponents.html
Figure 3.5: Ethernet tester
C HAPTER 3
N ETWORK
80
nectors into the plugs at these two parts. If we worked well, the LED diodes on the both
parts sequentially flash according to connecting the particular wires.
C
Labs
Look at some of the sources below and try to crimp a RJ-45 connector.
C
More information:
•
•
•
•
http://www.groundcontrol.com/galileo/ch5-ethernet.htm
http://www.youtube.com/watch?v=v7H8OoKA4F8
http://mcb.berkeley.edu/labs/krantz/pdf/guide to crimping cat5 cat6 connectors.pdf
Category 6 UTP Connector Termination – Giganet. YouTube. URL:
http://www.youtube.com/watch?v=Sw1XRffMry0
3.3
Network commands in Windows
3.3.1
Files related to network
Windows staff big amount of network data to registery, but a piece of configuration is in
several important files. These files are in folder ...\system32\drivers\etc:
•
•
•
•
networks –
hosts – for
services –
protocol –
domain and IP addresses of LANs,
mapping IP addresses into known domain addresses,
known network services,
known network protocols.
In 64bit Windows these files are in folder ...\sysWOW64\drivers\etc.
C
Labs
Examine the above mentioned files networks, hosts, services and protocol.
C
3.3.2
Basic working with IP and MAC address
ipconfig can display information about our IP addresses, network card, etc.
ipconfig /?
ipconfig /all
(or ipconfig -?) displays help
writes out detailed information (IP and MAC address, gateway, network
mask)
ipconfig /release network_card
releases/deactivates the given network card
C HAPTER 3
N ETWORK
ipconfig /release
81
releases/deactivates all network cards
ipconfig /renew network_card
displays all used DNS records including their TTL
ipconfig /displaydns
ipconfig /flushdns
M
renews IP address for the given card
empties DNS cache
Example 3.1
If we are unable to establish a network connection or our network connection is not
working properly (for example, when our network card by mistake received an IP address
that is already assigned to another device, or DNS servers were not properly obtained),
new IP address obtaining may help. We apply the following commands:
ipconfig /flushdns
cleans DNS cache
ipconfig /release
ipconfig /renew
ipconfig /all
checks if everything is all right
This procedure is useful only if we have dynamic IP addresses.
M
ARP is a protocol for mapping IP addresses into physical (MAC) addresses. MAC
addresses are discovered by sending ARP packets with queries. Each network card keeps
its own buffer with the established pairs of IP and MAC addresses (ARP tables). We work
with this mapping using the command arp.
arp -a
displays ARP table
displays ARP table of the network card with the given IP ad-
arp -a -n 10.0.128.10
dress
arp -s 123.123.123.123 00-12-34-56-78-9A
arp -d 123.123.123.123
arp -d *
adds new (static) entry to our ARP table
removes the given entry
removes all entries
The next useful command is nslookup. We use it to map domain addresses into IP
addresses.
nslookup www.google.com
displays IP addresses and aliases for the given domain ad-
dress
nslookup 77.76.75.3
nslookup
reverse mapping
switching to the interaction mode, we exit it by the command exit
The whole help for this command is only in the interaction mode (by the inner command
? or help).
If we send data to an IP address, the packets usually (not always) pass through a
gateway to the Internet or another network. Therefore, each node including common
C HAPTER 3
N ETWORK
82
computers knows the gateway address and other routing information (i.e. which way to
send data to a certain (sub)networks), it keeps its own routing table. Records can be
inserted into this table manually (static records) or dynamically (performed by routing
protocols).
The command route allows to work with this table.
route
displays help
displays our routing table, in the newest versions it displays two tables –
separately for IPv4 and IPv6
route print
displays only those destinations which correspond to the given expression (we can use “*” and “?” too)
route print 193.*
route add 193.84.197.0 mask 255.255.255.128 193.84.195.8 metric 4 adds new sta-
tic record with the given destination, mask, gateway and metric
the same
as the previous example, but this record remains in the table after restart of computer
route -p add 193.84.197.0 mask 255.255.255.128 193.84.195.8 metric 4
route change 193.84.197.0 mask 255.255.255.128 193.84.195.9 metric 3 if 2 we
change one record
route del 193.84.197.0
C
erases the record
Labs
1. Obtain your IP address, mask, gateway address, DNS server address.
2. Do you have static or dynamic IP address? If you have a dynamic address, deactivate your network card and then activate it (renew your IP address).
3. Display your ARP table.
4. Find out IP address of the web microsoft.com.
5. Find out your DNS server (its IP address).
6. Display your routing table.
C
3.3.3
Testing and statistics
The command ping allows to test whether a device with the given domain or IP address
is accessible. This command send ICMP packets with ICMP Echo Request message.
ping www.google.com
finds out if the given server is accessible
ping -n 2 www.google.com
we assigned number of testing ICMP packets sent to the
given server
number of testing packets is unlimited, these packets are
sent till pressing Ctrl+C
ping -t www.google.com
C HAPTER 3
M
N ETWORK
83
Example 3.2
We can use the command ping for testing of functionality of our network card too:
ping loopback
or
ping 127.0.0.1
M
M
Example 3.3
If our network connection seems to be right, but in fact it does not work, we should verify
DNS translation functionality:
ping www.google.com
probably produces an error message
the same, but we use one of the IP addresses of such server instead of its domain address (so, we communicate without DNS mechanism)
ping 74.125.79.104
If the second command is successfull, we probably use an address of non-functional DNS
server. We should get an address of a correct DNS server (e.g. at our connection provider)
or we can use an address of a public DNS server.
There are several public DNS servers – e.g. Google provides these servers with addresses 8.8.8.8 and 8.8.4.4.
M
We use tracert when we want to find the path of our sent packets (addresses of routers
through the path). Windows tracert uses ICMP packets sent inside IP datagrams with a
gradually increasing value of TTL.
help (yes, it is correct, UNIX syntax of switches, as for nearly all network
commands)
tracert -?
tracert www.google.com
what is the route to the given server?
We can assign IP addresses too.
The program pathping gives similar results (the whole path to the given server –
router addresses), and in addition pathping calculates the statistic information similar
to ping.It works on the principle of ICMP Echo Request and ICMP Echo Reply messages,
just as ping.
pathping -?
writes out help
pathping www.google.com
router addresses and the related statistic information
The fist stage (listing router addresses) may be faster than by tracert, but the second
stage (statistics) is very slow – it may take more than 100 seconds. If it costs too long
time, we can press Ctrl+C .
netstat is very powerful tool to get statistic information related to the TCP/IP proto-
cols. This program is in effect the same as the identically named command in UNIX-like
C HAPTER 3
N ETWORK
84
systems. The command keeps the same UNIX syntax, and it even enables to group oneletter type switches after one dash. The set of switches supported in different Windows
versions is not the same!
writes out basic statistics (only TCP connections, and without those applications which listen)
netstat
netstat -a
writes out whole statistics
whole statistics, and one additional column – PID of the working process for each entry
netstat -a -o
netstat -ao
the same (switches are grouped)
writes IP addresses instead of domain addresses; it is faster, and it works
also if we have malfunctioning DNS servers
netstat -ano
all processes (names and PID) communicating on network,
the output is directed into the given file
netstat -ab > seznam.log
basic statistics for Ethernet (number of sent and received packets, number
of errors, etc. – TCP/IP protocols
netstat -e
netstat -es
detailed statistics for all TCP/IP protocols
netstat -sp tcp
detailed statistics for the protocol TCP (we can use the parameters
tcp, udp or ip)
works repeatedly every 2 seconds, we finish it by pressing Ctrl+C (we can
combine it with other switches)
netstat 2
netstat -r
M
displays our routing table, such as route print
Example 3.4
The command netstat -osp tcp writes out detailed statistics for the TCP protocol, and
displays the column with PID of a communicating process (switch -o). First, the statistic
information is displayed. The table with process entries follows:
C:\Windows>netstat -osp tcp
Proto
TCP
TCP
...
Local Address
10.0.0.139:49206
10.0.0.139:49210
Foreign Address
111.221.74.19:33033
db3msgr6011410:https
State
ESTABLISHED
ESTABLISHED
PID
3736
3736
The processes with established connection may be e.g. Skype, a mail client, web browser,
antivirus software. We can find out the process name corresponding to our PID by Task
Manager (press Ctrl+Shift+Esc , show the column with PID), or Process Explorer (to download on http://www.sysinternals.com) of by the command tasklist. In this case:
C:\Windows>tasklist
Image Name
PID Session Name
Session#
Mem Usage
========================================================================
...
Skype.exe
3736 Console
1
78 024 kB
...
M
C HAPTER 3
C
N ETWORK
85
Labs
1. Try ping on your DNS server IP address, and then on IP addresses of Google public
DNS servers. Compare time results.
2. Note difference (including the time stamps) in the outputs of these commands:
tracert www.google.com
pathping www.google.com
3. Find out PID of all processes which are communicating through network (or listening).
4. Write out statistics related to TCP/IP protocols.
5. Write out detailed statistics for the IP protocol.
6. Try both the commands used in the last example of this section.
C
3.3.4
Other commands
Other useful commands (we know some of them from Operating systems):
resources sharing in LAN, NTP server setting, users and groups management, etc.
net
WMI Console, we know this command
wmic
netsh
very unpopular command with its own inner subcommands, we know it too
FTP client
ftp
ipseccmd
IPSec protocol configuration, this command is available on servers
management of files open remotely through LAN on our or foreign computer
(there are some variants of net for these reasons, see net file)
openfiles
There are several commands installed on Windows Server which are not accessible on
desktop editions – commands to manage Active Directory (e.g. ntdsutil or netdom), to
manage DNS server (e.g. dnsutil), etc.
More information:
• http://technet.microsoft.com/en-us/library/cc772390%28WS.10%29.aspx
• http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us
/ntcmds.mspx?mfr=true.
• http://commandwindows.com/
3.4
3.4.1
Network commands in Linux
Files related to network
The most “network” files can be found in the directory /etc/sysconfig/network and its
subdirectories, alternatively /etc/sysconfig/network-scripts or for some distributions
C HAPTER 3
N ETWORK
86
the directory /etc/rc.d/rc.inet1 (Slackware), /etc/conf.d/net (Gentoo) or /etc/network
(Debian).
M
Example 3.5
Suppose that our network configuration is in /etc/sysconfig/network-scripts. In this
directory, there would be placed the file ifcfg-eth0 with the configuration of the first
network interface card – IP address, mask, way of obtaining IP address (if we get IP
address dynamically, this address is not stated in this file), etc. If we have more network
cards, every network interface has such file in this directory.
M
M
Example 3.6
Other interesting file is /etc/resolv.conf – we set DNS server addresses here. An entry
related to a DNS server (we can have more similar entries) is of the form
nameserver address, for example
nameserver 193.84.192.10
The given DNS server will be used immediately after saving this file.
M
M
Example 3.7
Suppose that we want to create a router from a computer. With Linux, it is not hard.
We just need to have a device with more than one network interface, and we have to
carry out a few settings. One of them is permitting of forwarding. We do it in the file
/etc/sysctl.conf:
• find the row net.ipv4.ip_forward=0 (or net/ipv4/ip_forward=0)
• change it to net.ipv4.ip_forward=1 (or with slashes)
• restart the system or make the daemon sysctl to reread its configuration files:
sysctl -p
Permitting of forwarding does not suffice. We have to set the address of this devide as
gateway on all computers in the given LAN, and then we configure firewall and other
security mechanismes.
Note that we do not need to restart whole the system, although we made essential
changes in system settings.
M
There is large amount of useful files in the directory /etc, for example /etc/networks,
/etc/hosts, /etc/ethers.
Dynamic network settings can be found in subdirectories and files in /proc, for example /proc/net/arp.
C HAPTER 3
M
N ETWORK
87
Example 3.8
Some of the files in /proc allow writing in text mode (without file locking), such as
echo 1 > /proc/sys/net/ipv4/ip_forward
switches on forwarding (well, we ought to have more than one network interface). If the
value 0 is in this file, forwarding is off, the value 1 means working forwarding. However,
this setting is valid only to reboot (of course, we are in /proc), so we have to save this
command into a suitable configuration file, for example /etc/rc.d/rc.local, according
to our distribution.
M
C
Labs
Examine the above mentioned files including the network parts of /proc.
C
3.4.2
Older address commands
First we look at the commands used to work with addresses used in UNIX-like systems for
decades. In the newer distributions, instead of the below mentioned commands ifconfig,
route and arp, we often use new command ip.
ifconfig allows to configure network interfaces of kernel.
ifconfig
displays information about all network interfaces
ifconfig eth0
displays information about the network interface eth0
“throws down” the network interface eth0 (deactivates this interface); we use it, if we want to assign a new IP address
ifconfig eth0 down
ifconfig eth0 up
activates eth0
ifconfig eth0 down hw ether 00:00:00:00:00:02
deactivates eth0 and sets new MAC
address
ifconfig eth0 172.19.124.104 netmask 255.255.255.0 up
sets IP address and sub-
net mask for eth0 and activates it
ifconfig eth0 promisc
ifconfig eth0 -promisc
sets promiscuous mode for eth0
switches off promiscuous mode
There are another switches (determination of multicast and broadcast addresses, assigning hardware resources (I/O memory, IRQ, etc.), setting metrics, and others.
M
Example 3.9
The output of the command ifconfig on device with one network interface:
[email protected]:˜$ ifconfig
C HAPTER 3
eth0
N ETWORK
88
Link encap:Ethernet HWaddr 00:0a:31:8a:75:72
inet addr:172.28.124.128
Bcast:172.28.124.255
Mask:255.255.255.0
inet6 addr: fe52::126a:24af:ff8b:818b/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST
MTU:1500 Metric:1
RX packets:3612 errors:3558 dropped:0 overruns:0 frame:0
TX packets:2344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:384534 (375.5 KiB)
TX bytes:798863 (780.1 KiB)
Interrupt:19
Base address:0x2024
M
There exist shorten versions of this command:
ifdown eth0 deactivation of network interface
ifup eth0 activation
Command route is intended for working with the main routing table.
route
writes out the main routing table
numeral (IP) addresses are displayed instead of domain addresses,
the second switch means IPv4 addresses only (no IPv6 addresses are written); for
IPv6 addresses we use -A inet6
route -n -A inet
route add -net 193.90.100.0 netmask 255.255.255.128 gw 193.90.220.3 dev eth0
we add new entry to the main routing table (destination network address, mask,
gateway, interface)
route add default gw 193.88.50.10 dev eth0
we set the default gateway for the given
network interface
we remove
this entry from the routing table (it would be enough to write network address only)
route del -net 193.90.100.0 netmask 255.255.255.128 gw 193.90.220.3
we remove information about the default gateway (we probably
want to set another one)
route del default
route -Cn
we display routing cache with numeral IP addresses
Instead of the command route we should use the command ip route.
The next command, arp, has very similar syntax to arp from Windows:
arp -a -n
displays ARP table with numeral (IP) addresses
arp -n -i eth1
displays ARP table of the given network interface
arp -s 123.123.123.123 00:12:34:56:01:08 -i eth1
we add new static entry into the
ARP table of the network interface eth1
arp -d 123.123.123.123 -i eth1
network interface eth1
removing the given entry from the ARP table of the
C HAPTER 3
C
N ETWORK
89
Labs
If possible, try the above mentioned commands.
C
3.4.3 iproute2 and command ip
Command ip (the part of the package iproute2) is very complex and besides others it is
considered as successor of the above shortly described commands ifconfig, route a arp.
Its configuration files can be found in /etc/iproute2. The following subsections mainly
show usage of the command ip.
More information:
•
•
•
•
•
•
•
man ip
http://linux-ip.net/gl/ip-cref/
http://linux-ip.net/html/index.html
http://www.policyrouting.org/iproute2-toc.html
http://lartc.org/howto/index.html
http://www.faqs.org/docs/Linux-mini/Remote-Bridging.html
http://www.linuxhomenetworking.com/wiki/index.php/Quick HOWTO : Ch03 : Linux Networking
3.4.4
Network interface and addresses
The first purpose of this command is setting network interfaces and IP addresses.
we work on L2 (data-link) layer (and a bit L1 too) – MAC addresses and
network interface
ip link ...
displays the connection status, the network interface status of all
interfaces (it is possible to use list or ls instead of show, or we can shorten it
into sh
-s link show eth0
only for the interface eth0; the parameter -s means more
detailed output
link set dev eth0 up
activates the eth0 interface
link set dev eth0 down
deactivates the eth0 interface
link set dev eth0 mtu 1500
changes the MTU value to 1500 octets (MTU
means Maximum Transmission Unit, it is the maximal IP datagram length
which is allowed to be transmitted through this device)
link set dev eth0 address 02:00:00:00:11:22
we change MAC address of
the network interface eth0
ip link show
ip
ip
ip
ip
ip
ip addr ...
now we work on L3 (network) layer – IP addresses (instead of addr we can
write address or a)
C HAPTER 3
N ETWORK
displays IP address and all related information; it is possible to add
an interface name too (one network interface can have multiple IPv6 addresses
– one primary and another ones secondary)
address show
the same; or we can write ip a show or ip a ls
addr show dev eth0 primary
what is the primary address of the interface eth0?
addr add 193.90.220.42/25 brd + dev eth0
setting IP address of the interface eth0 (brd + means broadcast address setting to default; otherwise we write
out the particular address instead of +)
addr del 193.90.220.42/25 brd + dev eth0
we take the entered address away
for the interface eth0; in case that the address is primary, all secondary addresses are taken away too
addr flush dev eth0
flushing all the addresses of the given interface (only
IPv6 address obtained through autoconfiguration process remains)
-f inet6 addr flush dynamic
we work only with IPv6 addresses (the first parameter, instead of -f inet6 we can write shortly -6); for IPv4 addresses we
write
ip -f inet addr flush dynamic or
ip -4 addr flush dynamic or
ip addr show
ip
ip
ip
ip
ip
ip
ip -4 a flush dynamic
M
90
Example 3.10
We will take a look at outputs of several commands.
[email protected]:˜$ ip link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:72:31:0a:a0 brd ff:ff:ff:ff:ff:ff
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
[email protected]:˜$ ip -s link show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
24914
270
0
0
0
0
TX: bytes packets errors dropped carrier collsns
24914
270
0
0
0
0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:72:31:0a:a0 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
379366
562
0
0
0
9
TX: bytes packets errors dropped carrier collsns
100799
557
0
0
0
0
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
RX: bytes packets errors dropped overrun mcast
0
0
0
0
0
0
TX: bytes packets errors dropped carrier collsns
0
0
0
0
0
0
C HAPTER 3
N ETWORK
91
Note the set signs (loopback, up, broadcast, etc.) following the interface name.
[email protected]:˜$ ip addr show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:72:31:0a:a0 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.2/24 brd 10.0.0.255 scope global eth0
inet6 fe80::21d:72ff:fe31:aa0/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
In case that we are interesting in the eth0 interface only, we would write
ip addr show dev eth0
M
C
Labs
1. Display information about your network interface, and then the same, but including
statistics (detailed information). Compare the both outputs. What value is MTU,
what are your MAC addresses, what is the broadcast MAC address, what is traffic?
2. Write out your all IP addresses (the both IPv4 and IPv6). Have you got any secondary
addresses?
C
3.4.5
Routing and filtering
In Linux, we have more than one routing table, and each routing table has its own name
and number:
• main routing table (this table is default too) – number 254
• local routing table (containing loobpack, broadcasts and multicasts) – number 255
• other routing tables created by admin, numbers 1–252.
We have two possibilities to work with routing tables – the command route allows process
the main table, and the command ip can work with any routing table.
M
Example 3.11
List of all defined routing tables is in file /etc/iproute2/rt_tables. The default content
of this file is
255
254
253
0
local
main
default
unspec
C HAPTER 3
N ETWORK
92
(and some comments).
A new routing table can be created by adding particular row into this file:
echo number table_name >> /etc/iproute2/rt_tables
for example:
echo 15 tabaccountants >> /etc/iproute2/rt_tables
M
Subcommands:
ip route ...
we work with routing tables – layer L3 (above the IP protocols)
show
shows the main routing table (not all tables)
show table local
displays the local routing table
show table 12
writes out the routing table number 12
show cache
routing cache (very long output), it is recommended to filter
it by grep or similarly
ip -s route show cache 193.90.102.36
we want only the entries with the given
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
M
route
route
route
route
IP address, and we want detailed information (routing statistics for this address)
route add default via 193.90.220.1
default gateway setting
route add 193.90.100.0/25 via 193.90.220.3
new static row
route add 193.90.100.0/25 via 193.90.220.3 table 15
the new row is added
into the routing table number 15, not into the main table
route delete 193.90.100.0/25
removing one row from a routing table (but
we can enter a table too)
route add prohibit 193.221.88.0/28
prohibition of routing to the given address, the given subnet or device is marked by ICMP messages by “no route to
host”
route add prohibit 193.221.88.0/28 from 193.90.102.29
similar, but we
block access only from one entered device
route add blackhole 69.63.189.11
if somebody from LAN sends a packet to
this address (by the way – it is one of the Facebook addresses), the packet will
be dropped and the sender will not be informed
route add unreachable 69.63.189.11
similar, but the sender is informed of
the fact that his/her packet has not arrived by the ICMP message “Destination unreachable” (packets can be dropped in three different ways – prohibit,
blackhole, unreachable)
route add nat 192.205.120.56 via 193.90.102.29
creates NAT for incoming
packets (DNAT): if this router obtains a packet with the first (“virtual”) destination address, it rewrites this address to the second one (real in our LAN) and
passes it on
Example 3.12
What is the difference between the main and local routing table?
[email protected]:˜$ ip route show
C HAPTER 3
N ETWORK
193.84.195.0/25 dev eth0 proto kernel
default via 193.84.195.1 dev eth0
93
scope link
src 193.84.195.30
[email protected]:˜$ ip route show table local
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 193.84.195.0 dev eth0 proto kernel scope link src 193.84.195.30
local 193.84.195.30 dev eth0 proto kernel scope host src 193.84.195.30
broadcast 193.84.195.127 dev eth0 proto kernel scope link src 193.84.195.30
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
M
Advanced Routing means filtering and detailed routing control in accordance to given
rules (policies). Command ip rule is able to influence routing by other fields of a transmitted IP datagram, not all addresses.
ip rule ...
we work with routing rules (policies)
routing rules listing, we have at least these three rows:
ip rule show
0:
32766:
32767:
from all lookup local
from all lookup main
from all lookup default
The number at the beginning of rows is rule priority. This number would be
unique for each rule (less number means higher priority)
echo 12 auxtab >> /etc/iproute2/rt_tables
new routing table
ip rule add from 195.200.94.0/24 table 12 priority 354
all packets with the
given address as source address will be routed according to the routing table
12 (the priority is chosen automaticaly)
ip rule show
what are the changes?
0:
354:
32766:
32767:
from
from
from
from
all lookup local
195.200.94.0/24 lookup newtab
all lookup main
all lookup 253
all packets from the first
given interface will be routed according to the main routing table:
ip rule add from 195.80.94.0/24 to 194.200.24.0/24
353:
from 195.200.94.0/24 to 194.200.24.0/24 lookup main
ip rule add from 193.90.102.29 nat 192.205.120.56
NAT for outcomming pack-
ets – source NAT (SNAT)
separates routing of the traffic generated by this device (lo, loopback) from routing forwarded traffic, so traffic
generated by this device will be routed by the table 10; one new row in tables
listing is added
ip rule add iif lo table 10 priority 560
560:
from all iif lo lookup newtab
C HAPTER 3
N ETWORK
94
ip rule del priority 560
removing the given rule (the rule is identified by its
priority)
M
Example 3.13
We create a simple stateless NAT (it means that we have one inner and one outer IP
address).
Supppose that we want to make the device with the IP address 195.159.200.28 accessible outside over the address 207.189.240.28 (some server in DMZ):
ip route add nat 207.189.240.28 via 195.159.200.28
first, DNAT (Destination NAT)
is activated
ip rule add nat 207.189.240.28 from 195.159.200.28
we activate SNAT (Source NAT)
ip route flush cache
we flush old entries in cache
ip route show table all
the following row should be on output:
nat 207.189.240.28 via 195.159.200.28 table local scope host
ip rule show
32386:
the following row should be on output:
from 195.159.200.28 lookup main map-to 207.189.240.28
(probably with different priority)
Other way to make stateles NAT is by NetFilter.
M
M
Example 3.14
Suppose that we have two ISPs connected to the same router with Linux. We want to
create two routing tables, separately for each ISP. The situation is shown on Figure 3.6.
our
LANs
Internet
ISP1
gateway: 10.1.1.1
eth1
eth0
Router
eth2
ISP2
gateway: 10.32.32.1
Figure 3.6: More ISP and one router
First of all, we create two routing tables:
echo 10 ISPfirst >> /etc/iproute2/rt_tables
echo 20 ISPsecond >> /etc/iproute2/rt_tables
Now we have to decide traffic deviding, for example:
C HAPTER 3
N ETWORK
95
ip route add default via 10.32.32.1 dev eth2
default gateway for everything not
listed in other tables
ip route add default via 10.1.1.1 dev eth1 table 10
new entry into the table 10
(default gateway for everything routed by this table)
ip route add default via 10.32.32.1 dev eth2 table 20
similarly for the second ta-
ble
ip rule add from 10.192.0.0/24 table 10
all packets incoming from the given LAN,
is routed in accordance with the table 10
ip rule add from 10.192.128.0/24 table 20
all packets incoming from the given LAN,
is routed in accordance with the table 20
M
C
Labs
1. Find out and display the file /etc/iproute2/rt_tables). What privileques are set to
this file?
•
•
•
•
ls -la /etc/iproute2/rt_tables basic permissions
getfacl /etc/iproute2/rt_tables lists POSIX ACLs
lsattr /etc/iproute2/rt_tables file attributes
getfattr /etc/iproute2/rt_tables extended attributes
2. Write out the main routing table and compare it with the output of the command
route. Display your local routing table too. Find out default gateway address. How
would you change this gateway address?
3. Display all the defined rules for advanced routing.
C
3.4.6
Neighbourhood
IPv4 protocols uses ARP protocol for network discovering, IPv6 uses NDP (Neighbour
Discovery Protocol) – NDis mechanism (Network Discovery).
The particular network nodes can be in some of the following states (we call it NUD,
Neighbour Unreachability Detection):
• none – state “non-filled”
• noarp – neighbour is valid and accessible, it does not have to be verified by ARP
queries, expiration date is determined
• permanent – similar to noarp, but without any expiration date (unlimited validation
time)
• reachable – valid and accessible, with expiration date, and after this date it is rediscovered by ARP queries (typical for dynamicaly discovered neighbours)
• incomplete – neighbour is just discovered
C HAPTER 3
N ETWORK
96
• stale – valid, but its accessibility is permanently discovered (this entry changes its
state to delay after each using)
• delay – it is necessary to verify this entry
• probe – the neighbour have not answered in time, kernel has to send ARP query
• failed – ARP query has failed, this entry is not valid
The most common states are reachable, stale or permanent.
Přı́kazy:
ip neighbour ...
we work with connections between L2 and L3 addresses of the same
network (with neighbours), we can shorten the word neighbour to neighbor, neigh
or n
ip
ip
ip
ip
neigh show
displays current status of ARP or NDP cache (tables)
neigh show dev eth0
list of neighbours connected to the interface eth0
neigh show to 193.168.200/24
neighbours from the given subnet
-s neigh show to 10.0.0.1
detailed information about the given neighbour
(number of users of this entry, and number of seconds passed since using/confirmation/update
ip neigh show nud permanent
all neighbours with the state je “permanent”
ip neigh add 193.168.200.1 lladdr 00:0a:1b:2c:3d:4e dev eth2 nud permanent
adding new static entry to the ARP table (IP and MAC address, interface, state),
nud value becomes one of the possibilities noarp, reachable, permanent or stale
ip neigh del 193.168.200.1 dev eth2
removing the given entry
C
Labs
1. Display your ARP/NDP cache. Try displaying with statistics (detailed information.
2. Add a “virtual” neighbour to your ARP cache – with MAC address 03:00:01:a5:b6:c7,
IP address is 10.0.0.12, and it is connected to eth0, state permanent. Display all
neighbours. Display all members with the state permanent. Remove the new entry.
3. Complete the whole interface activation procedure:
•
•
•
•
•
3.5
3.5.1
deactivate the interface
set new IP address
set gateway
set DNS server address
activate the interface
C
Network diagnosis
Wi-fi channels
As we know, too much Wi-fi access points (APs) mean errors in packets transmission,
necessity of their retransmission, so, slower traffic.
C HAPTER 3
N ETWORK
97
One of the most known tools to discover APs (a Wi-fi scanner) is InSSIDer of MetaGeek. This tool is freeware.
Figure 3.7: InSSIDer
Figure 3.8: InSSIDer – Time Graph
C HAPTER 3
N ETWORK
98
In the upper part of the window there is displayed list of all available access points.
Below, there are four tabs. The last two of them are the most important – they contain
graphical representation of AP signals over different channels (for 2.4 and 5GHz spectrum). We can check the signals strength too, and of course overlapping of the given
signals – see Figure 3.7. The second tab “Time Graph” is interesting too – it depicts the
APs activity. See Figure 3.8.
Figure 3.9: InSSIDer – filtering APs
We are able to filter APs over several criteria. One of the possibilities – filtering over
security level – is shown on Figure 3.9. APs with very weak security settings are dangerous for all our network, so sometimes we need to discover them.
More information:
• http://www.metageek.net/products/inssider/
C
Labs
1. Download and try InSSIDer.
2. MetaGeek produces more interesting applications. Try to find out properties of
• Chanalyzer (this tool is not free, we can only try a version with unchangable
data),
C HAPTER 3
N ETWORK
99
• Wi-Spy (commertial),
• Eye P.A. (downloadable fully functional version for 15 days),
• AirPcap (commertial), etc.
Some of the products require special hardware.
C
Sometimes we need to map Wi-fi signal coverage. There are several tools which can help
us with Wi-fi planning, for example Ekahau Site Survey (commercial), Ekahau HeatMapper (freeware after registration), MetaGeek VisiWave (free trial for 30 days), Meraki WiFi
Mapper (freeware), Aerohive Wi-Fi Planning Tool (freeware after registration).
More information:
•
•
•
•
•
http://www.ekahau.com/products/heatmapper/overview.html
http://www.metageek.net/products/visiwave/
http://www.meraki.com/products/wireless/wifi-mapper
http://www.aerohive.com/planner
http://www.youtube.com/watch?feature=player embedded&v=EaeMof51txg (video)
C
Labs
Choose and try some of the Wi-fi tools listed above.
C
We sometimes need to map (depict) our network. Well, we can use a piece of paper and a
pencil, but there are several applications for these purposes. Most of them are proprietary
(commercial), but some of them are free. The ones with manual handling allow to create
a network map by manually placing icons and connections, the automated ones generate
the maps by traversing the network and discovering the active devices.
One of the interesting very simple tools is Diagramly (free, web application) – see the
icons “Clipart/Networking” and “Clipart/Telecomunication”. The other one, Creately, is
more sophisticated, but commercial (it is possible try it free). Cade is one of the free
mapping tools.
More information:
•
•
•
•
•
https://www.draw.io/ (Diagramly)
http://creately.com/ (Creately)
http://www.weresc.com/home.php (Cade)
http://en.wikipedia.org/wiki/Comparison of network diagram software
http://www.idsia.ch/ãndrea/sim/simnet.html
C HAPTER 3
C
N ETWORK
100
Labs
Take a look at several mapping tools, choose two of them and try to create a simple
network.
C
3.5.2
Wireshark
Wireshark is the most common used packet sniffer. It is free software available
under GPL, and free for download. If we use Windows, this program works over
WinPCap – packet capture library for Windows. WinPCap is API for Windows that allows
to capture network data, using filters and setting network card to the promiscuous mode.
Wireshark (because of WinPCap) supports great amount of various protocols and is very
easy to use.
More information:
• http://www.wireshark.org/
For Windows and MacOS X – we download the installation package from the web mentioned above and install it as usual. For Linux – installation packages are very probably
available over your package manager, so click, click and click, or for example in Debianbased Linuxes write
apt-get install wireshark (with root privileges – use su or sudo).
First of all, we need to choose the network interface to track. The procedure is hinted
on Figure 3.10 (menu Capture ï Interfaces). We ought to switch our network card to
the promiscuous mode (in order to capture all packets, not only those intended to us) in
Options, see Figure 3.11. Then we click to Start. The entire procedure is the following:
1. choose the network interface, set it to the promiscuous mode,
2. start capturing,
3. wait a minute (not too long),
4. stop capturing – menu Capture ï Stop, or the corresponding icon.
C HAPTER 3
N ETWORK
Figure 3.10: Wireshark – choosing interface to capture
Figure 3.11: Wireshark – setting promiscuous mode
101
C HAPTER 3
N ETWORK
102
Figure 3.12: Wireshark – captured packets
Remark:
We will use Wireshark for discovering and learning various protocol headers.
We can capture our own real traffic, or we can take a look at some else captures. Well, it
is possible to save the captured traffic to a file, and to read up saved captures from a file
(menu File ï . . . ). It is useful when we want to examine captures on a computer different
of the capturing device, or simply when we want to examine some foreign captures.
Where to get capture files to discover:
More information:
• http://wiki.wireshark.org/SampleCaptures
• http://nostarch.com/packet2.htm
• http://packetlife.net/captures/
C HAPTER 3
N ETWORK
103
Figure 3.13: Discovering DNS traffic with Wireshark
C
Labs
1. Download the file dhcp.pcap from http://wiki.wireshark.org/SampleCaptures. Closely
examine the structure of all packets that make up the DHCP conversation, expand
all rows in the lower pane – discover all nested headers and their content.
2. Similarly examine some of the other files (e.g. dns.cap, smtp.pcap, imap.cap, stp.pcap,
PPPHandshake.cap).
3. Take a look at captures downloaded from http://nostarch.com/packet2.htm, e.g.
tcp handshake.pcap, facebook login.pcap, icmp echo.pcap, icmp traceroute.pcap,
the files with Wi-fi authentication.
4. Open the third mentioned address – http://packetlife.net/captures/, focus on the category Authentication, e.g. RADIUS.cap.
5. Capture your own traffic. Disconnect and then connect again your network card,
observe the process of obtaining IP address. Work with your web browser, e-mail
client, etc. to get common traffic.
C
C HAPTER 3
3.5.3
N ETWORK
104
Where to place it?
First of all, we would like to become conscious of collision and broadcast domain ranges.
Have a look at Figures 3.14 and 3.15.
= Collision domains
Hub
Switch
Collision domain
=
Broadcast domain
Broadcast
domain
Figure 3.14: Hub and switch – collision and broadcast domains
Router
= Collision domains
Switch
Hub
Broadcast
domain
Collision domain
=
Broadcast domain
Figure 3.15: Router – collision and broadcast domains
Hub does not separate neither collision nor broadcast domains. Switch separates
collision domains, but it does not block broadcast messages. Router separates the both
collision and broadcast domains – it means that we have less opportunity to place our
sniffing device.
Remark:
So, we are interested in our visibility window. Visibility window is amount of devices that
are visible for us; it is usually identical to our collision domain.
C HAPTER 3
N ETWORK
105
Well, but nearly nobody uses hubs in todays networks, we mostly encounter switches in
Ethernet networks, or routers in Wi-fi networks. What are the possible solutions?
Port mirroring (or Port spanning). If we want to capture traffic on a port X, we set
mirroring of this port X to a port Y, and we connect our sniffing device into the port Y.
Not all switches allow this possibility, we configure port mirroring in the administration
interface of such switch.
M
Example 3.15
Some switches provide port mirroring over their web interface, but sometimes we have
to use the appropriate commands (destination port is our sniffer):
• Cisco:
set span <source port> <dest port>
• Enterasys:
set port mirroring create <source port> <dest port>
• Nortel:
port-mirroring mode mirror-port <source port> monitor-port <dest port>
M
Hubbing out.
We need a hub and access to the switch of our LAN (and also some
cables). But it is very hard to get a real hub (try it :-), and we should know that hubs
need power supply.
Switch
Switch
Hub
Sniffer
Broadcast
domain
Sniffer
Broadcast
domain
Figure 3.16: Port mirroring and Hubbing out
More information:
• When is an Ethernet Hub Better than an Ethernet Switch? Contemporary Controls,
February 2011. URL: http://www.ccontrols.com/enews/0211story2.htm
C HAPTER 3
N ETWORK
106
Network tap.
Network taps are simple devices
to monitor network traffic – they send packets between two ports (as if no tap was there), but in addition it sends all these packets into the “monitor”
port. So, taps have at least three ports (or four,
some of them allow to connect two monitoring devices, or additionaly use more methods of monitoring). This device is mainly used to connect IDSs,
Figure 3.17: Ethernet tap
packet sniffers or simply any monitoring tools.
There two types of network (Ethernet) taps – for
aggregated and non-aggregated monitoring, see Figure 3.18. Taps for aggregated monitoring are applicable only if we have a monitoring device with two network interfaces,
each interface for one captured traffic.
Aggregational tap
Non-aggregational tap
Traffic A
Traffic B
Traffic B
Traffic A
Monitor
port
Figure 3.18: Network tap
More information:
• http://www.netoptics.cz/products/products networktaps.php
• http://www.fte.com/products/NetworkTap-userguide.aspx
Chapter
4
Servers
4.1
4.1.1
Windows Server
Editions
Windows Server in all versions contain the same kernel as Windows NT systems for
desktops. Similarly as on desktops, server versions occur in more editions too, but the
newest version is “less cut” than the previous versions.
Windows Server 2008 (kernel as Windows Vista) was accessible in these editions:
• Standard
• Enterprise
• Datacenter
• Foundation – for smaller companies, OEM only
• Web Server, Storage Server
• Server for Itanium-based Systems
Other editions are Small Business Server, Essential Business Server and HPC Server
(Compute Cluster).
Windows Server 2008 R2 provide similar editions, their kernel is the same as in
Windows 7.
Windows Server 2012 (or Windows Server 8) have the same kernel as Windows 8, and
there are a bit less editions:
• Standard
• Datacenter
• Foundation
• Essentials
There are more differencies among these editions – number of supported processors or
whole hardware architectures, maximum RAM, parallely connected users, server roles,
etc.
107
C HAPTER 4
S ERVERS
108
More information:
• http://www.microsoft.com/en-us/server-cloud/windows-server/buy.aspx (follow “Get Licencing Details”)
• http://chakkaradeep.wordpress.com/2008/02/06/windows-server-2008-edition-feature-differences/
• http://technet.microsoft.com/en-us/library/dd459191.aspx
• http://technet.microsoft.com/en-us/library/dd349801%28v=ws.10%29.aspx
• http://en.wikipedia.org/wiki/Comparison of Microsoft Windows versions
C
Labs
Find out possibilities of such editions, their comparison. What editions have or have not
these properties:
• support of 64 processor chips
• user limit 25 users
• DHCP role and DNS role
• Server Core mode
• Hyper-V (hypervisor)
• IIS (web server role)
C
4.1.2
Roles
A role is a primary duty (service) provided by the given Windows Server installation. Some
of the main roles are:
• File Services – storage network management, file replication, quotas, NFS, etc.
• DHCP Server
• DNS Server
• Print Services – print server
• Application Server – deployment and managing of applications (mainly .NET apps) –
only inside intranet
• Terminal Services – enables users to access applications remotely from anywhere by
the RDP protocol (RDP is encapsulated in HTTPS packets)
• Web Server – running IIS (Internet Information Services)
• Active Directory Domain Services (previously AD) – storing and managing information
about users, computers etc., providing security access to this information
• Active Directory Lightweight Directory Services – compatibility of Microsoft AD with
non-Microsoft directory services
C HAPTER 4
S ERVERS
109
• other AD roles (AD Certificate Services, AD Rights Management Services, AD Federation Services)
• Hyper-V – creating and managing virtual machines and their resources
• Network Policy and Access Services – managing secure access to network for users
(VPN server, RADIUS server, proxy, remote access profiles, etc.
• Windows Deployment Services (WDS) – we know it (remember Operating systems),
managing WIM files with Windows images, deploying them
• etc.
Server Core is an installation option which means installation without “needless” parts
of Windows Server (GUI, Internet Explorer, etc.). But some applications with windows
are accessible in Windows Core too, such as Registery editor (regedt32.exe), Notepad
(notepad.exe), Task manager (taskmgr.exe), System information (msinfo32.exe), Windows installer (msiexec.exe), Microsoft support diagnostic tool (msdt.exe) and of course
Cmd (cmd.exe).
No .NET applications can run on Server Core (so we are not able to use e.g. PowerShell – Win Server 2008). Some of roles are not available too (e.g. Terminal Services
and Application Server), some roles are limited (e.g. Web Server role does not support
ASP.NET).
Well, but is any reason to deploy Server Core? Yes, security.
More information:
• http://www.microsoft.com/en-us/server-cloud/windows-server/overview.aspx
• http://www.windowsitpro.com/article/john-savills-windows-faqs/q-what-are-the-server-roles-inwindows-server-2008–99274
• http://technet.microsoft.com/en-us/library/dd184075.aspx (What is Server Core)
C
Labs
Follow the link http://secunia.com/advisories/product/10/?task=advisories (Secunia Advisories
for Internet Explorer 5.5). Are there any unpatched or only partially patched problems?
Is there any vulnerability which can lead to allow system acces for remote users, security
bypass, expose important or sensitive information, execute a script code remotely, do
CSS (Cross-Site-Scripting) attack?
As you can see, this is only one application in GUI. Other applications contain some
vulnerabilities too. So, there is a point in using Server Core.
C
C HAPTER 4
4.1.3
S ERVERS
110
Installation
Windows Server installation itself is not hard. The first stage is similar to a desktop
installation. We just set ProductID, select a disk partition to install on, enter passwords,
etc. It takes more time than installing desktop versions. After booting we set up all
needful properties.
More information:
• http://www.petri.co.il/how-to-install-windows-server-2008-step-by-step.htm
• http://www.petri.co.il/installing-windows-server-2012-rc.htm
• http://www.youtube.com/watch?v=YG7RCayLgfM (Windows Server 2012 Datacenter installation; video)
• Lowe, S.: Ten first steps with Windows Server 2012. TechRepublic, September 18,
2012. URL: http://www.techrepublic.com/blog/networking/ten-first-steps-with-windows-server2012/6006
Then, we activate and configure all server roles which we need. We usually use some of
MSC consoles. Starting from 2008 version, we can use a new complex console named
Server Manager. This console allows to install or remove server roles, various features,
add role services.
One more thing – Windows Server is not allowed in Czech, only in English.
More information:
• http://technet.microsoft.com/en-us/library/cc732131%28v=ws.10%29.aspx (Server Manager)
• http://www.zdnet.com/windows-server-2012-rtm-review-7000004213/
• http://www.youtube.com/watch?v=pfozG7aY WQ (Installing and Configuring a DHCP
Server – Windows Server 2008 R2; video)
• http://blogs.technet.com/b/teamdhcp/archive/2012/08/31/installing-and-configuring-dhcprole-on-windows-server-2012.aspx
• http://technet.microsoft.com/en-us/library/hh831669.aspx
• http://www.windowsnetworking.com/articles-tutorials/windows-server-2008/configure-WindowsServer-2008-advanced-firewall-MMC-snap-in.html
• http://www.windowsitpro.com/article/server-systems/control-windows-server-2008-roles-and
-features-98303
C
Labs
We will install Windows Server and try to install and set some roles.
C
C HAPTER 4
S ERVERS
111
Figure 4.1: Server Manager (Windows Server 2012)
4.2
Linux Server
Linux is very good system for servers. It supports big amount of hardware architectures,
it is stable and scalable (and we are not forced to restart as often as in Windows), more
secure. TCO (Total Cost of Ownership) is lower than for Windows, although Microsoft
speaks otherwise. And it is free.
Linux is UNIX-like system. Unlike other UNIX-like systems, Linux supports more
hardware platforms, and it is very important benefit, especially in large heterogenous
networks created by acquisitions of large companies.
Linux systems are able to cooperate in very complicated networks (complicated by
hardware and desktop operating systems too), they even can cooperate with Windows
desktops and servers.
C HAPTER 4
S ERVERS
112
More information:
• http://www.pcworld.com/article/204423/why linux beats windows for servers.html
• http://smashingtips.com/6-reasons-why-linux-servers-are-more-secure
We know how to manage Linux on desktop (remember Operating systems), now we
look at how to manage Linux on servers.
4.2.1
Distributions
First of all, we need to choose one of the large amount of Linux distributions. Technically speaking, it does not matter – what distribution we choose, almost every Linux
distribution can be installed as a server. But some of the distributions are more suitable
and require less work when changing configuration and additionally install some typical
server tools.
The second important criterion is support. Not every distribution producer provides
technical support. Some commercial Linuxes have their community (freely available)
branch, so we can try this community system and than go over to the commercial system.
This procedure is quite regular and it is the main reason why the commercial companies
support their community branches.
The best Linux distributions to install as server:
• Debian – very stable distribution for large amount of hardware architectures, without official support; great if we have good Linux experts or we do not want to invest
for now,
• Red Hat Enterprise Linux – distribution with good official support (commercial), its
community (freely available) branch is Fedora,
• SUSE Linux Enterprise Server (by Novell) – commercial Linux too, its community
colleague is OpenSUSE,
• Gentoo – community distribution with large amount of supported hardware architectures,
• etc.
Remark:
Red Hat uses its packaging system RPM, and most of commercial Linux providers took
over this system (including SUSE). So, RPM is the most commonly used, but sometimes
we can meet one unpleasant thing – dependency hell between packages.
Debian uses its packaging system DEB, as all its descendants (such as Ubuntu,
Knoppix, Damn Small Linux, etc.). DEB solves dependencies among packages better
than RPM.
The both packaging systems provide automated upgrade/patching.
C HAPTER 4
S ERVERS
113
More information:
•
•
•
•
http://www.debian.org/
http://www.redhat.com/products/enterprise-linux/server/
https://www.suse.com/
http://www.gentoo.org/
Hardware architectures marking:
• i386: old 32bit Intel architecture
• amd64 (or sometimes x64): the most common hardware architecture for Intel and
AMD processors (amd64 is for Intel 64bit processors too!)
• IA-64: Intel Itanium (server processors architecture, not for desktop)
• MIPS, SPARC: server processors
• ARM: mostly mobile architectures
C
Labs
Find out typical hardware architectures in some web computer store. If you have some
virtualization software (VMWare Workstation/Player, VirtualBox, etc.), check to see what
hardware architecture is simulated by it.
C
4.2.2
Installation
Linux installation is as simple as Windows installation (but it depends on the distribution), but one of very important steps is disk partitioning.
The root partition contains all directories without their own partition. So, we have to
reserve partitions for all “problematic” directories used by common users (/home, /var,
/tmp). The directory /var/log with system and application logs would have its own partition too, because it can grow rapidly and decrease free space in /var. Some directories
require special settings (sharing, or e.g. read-only), primarily /usr is often installed as
read-only (we only remount it for writing while installing new software).
More information:
• Unix/Linux Disk Partitioning Guide.
URL: http://content.hccfl.edu/pollock/aunix1
/partitioning.htm
• http://www.linkedin.com/groups/What-is-best-disk-partition-49301.S.127067390
C HAPTER 4
S ERVERS
114
Now we will focus on Debian Linux installation. It
is similar to desktop installation, but we ought to
choose the software collections what we want (e.g.
File Server, Web Server or SQL database). We can
use one of Debian installers – the installer with GUI
(the graphical installer) or the character-based installer (with pseudo-GUI). Figure 4.2 shows the second possibility.
The software collections choice is the part of the
installation process (see Figure 4.2).
We can install them later (in Debian we use
Figure 4.2: Debian installation:
the command apt-get as we know. The command
choosing server software
tasksel helps us to know what collections are available, and to work with them. tasksel works with
tasks – metapackages composed of more packages.
M
Example 4.1
First we find out all tasks (software collections):
$ tasksel --list-tasks
i
i
i
u
u
i
u
i
i
u
desktop
web-server
print-server
dns-server
file-server
mail-server
database-server
ssh-server
laptop
manual
Desktop environment
Web server
Print server
DNS server
File server
Mail server
SQL database
SSH server
Laptop
manual package selection
Now we want to know what packages are contained in mail-server task:
$ tasksel --task-packages mail-server
procmail
qpopper
spamassassin
mutt
exim4
sa-exim
mailagent
uw-imapd
M
Some tasks can be collected to multipackages too, for example LAMP server (Apache,
MySQL and PHP) can be installed as follows:
apt-get install lamp-serverˆ
Note the symbol ˆ at the end of the command. This symbol is necessary!
C HAPTER 4
S ERVERS
115
Remark:
While installing LAMP, we have to configure it to the secure state. See one of the below
mentioned sources.
More information:
•
•
•
•
•
•
http://www.debian.org/releases/stable/amd64/index.html.en
http://www.youtube.com/watch?v=sJuJbqxxhos
http://wiki.debian.org/LaMp (LAMP configuration)
http://www.lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/
http://stevenbenner.com/2010/06/setting-up-an-ubuntu-lamp-server-part-1-initial-setup/
http://wiki.debian.org/SecurityManagement
C
Labs
1. Find out packages contained in the task web-server.
2. Try to install Debian server into a virtual server (choose some of the offered server
collections).
C
Download