Download Basic Networking, Part I

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Data vault modeling wikipedia , lookup

Transcript
Part I - Basic Networking
Configuring Basic Networking
 Most linux systems are connected to a network, either as
clients or servers (often as both). (see pic)
 Setting up Linux’s basic networking tools is necessary for
fully configuring Linux
 You must first understand the basics of modern networking,
such as the nature of network addresses and the type of
tools that are commonly used on networks. . .From there you
can move on to Linux network configuration, including tasks
such as setting a computer’s address, routing, and name
resolution
 Unfortunately, network configuration sometimes goes wrong;
understanding the tools and techniques used to diagnose and
fix network problems is a necessary part of network
configuration
Understanding TCP/IP Networking:
 Networking involves quite a few components that are built
atop one another, like:
 Network hardware
 Data packets
 and Protocols for data exchange
o Together, these components make up a “network stack”
o The most common “network stack” today is the
“Transmission Control Protocol/Internet
Protocol(TCP/IP), but it’s not the only stack
available
o Understanding the basics of TCP/IP theory will help
you to configure and manage networks
 Knowing the Basic Functions of Network Hardware
 Network hardware is designed to enable two or more
computers to communicate with one another
 Modern computers have network interfaces built into their
motherboards, but internal network cards and external
network interfaces are also available
 Many networks rely on wires or cables to transmit data
between machines as electrical impulses, but network
protocols that use radio waves or even light to do the job
are growing rapidly in popularity
 At its core, network hardware is hardware that facilitates
the transfer of data between computers
 Investigating Types of Network Hardware
 Linux supports several types of common network hardware.
.the most common is “Ethernet”, which comes in several
varieties (see ex):
 Other types of network hardware exist, but most are less
common than Ethernet, such as:
 Token Ring
 LocalTalk
 Fiber Distributed Data Interface (FDDI)
 High-Performance Parallel Interface (HIPPI)
 Fibre Channel
 Wireless networking (aka Wi-Fi_ is an exception to
Ethernet’s dominance.
 Common wireless protocols include:
 802.11a
 802.11b
 802.11g
 802.11n
o These protocols support maximum speeds of 11Mbps (for
802.11b), 54Mbps (for 802.11a and 802.11g), or
300Mbps (for 802.11n)
o With the exception of the rarely used 802.11a, Wi-Fi
protocols are compatible with one another
o WARNING: If you use wireless protocol, your data are
transmitted via radio waves, which are easily
intercepted



pic
 Wireless protocols include optional encryption,
but this feature is sometimes disabled by default
and some varieties of wireless encryption are
notoriously poor
 If you use Wireless network products, be sure to
enable Wi-Fi Protected Access(WPA) or better,
WPA2 encryption. The weaker Wired Equivalent
Privacy(WEP) encryption is easily broken.
 For added protection, use a strong encryption
protocol, such as the Secure Shell(SSH) login
tool or Secure Sockets Layer(SSL) encryption,
when transferring any data that’s even remotely
sensitive
In addition to the network hardware in your computers, you
need network hardware outside the computers
With the exception of wireless networks, you need some form
of network cabling that’s unique to your hardware type
Many network types require the use of a central device
known as a “hub” or a “switch” (INCLUDE IMAGE on PAGE
384..Fig 8.1) (see ex)
of switch:
 You plug every computer on a local network into this
central device. . .the hub or switch then passes data
between the computers
Network that includes a Switch and hub:
 As a general rule, switches are superior to hubs
 “Hubs” mirror all traffic to all computers
 “Switches” are smart enough to send packets only to the
intended destination… Switches also allow “full-duplex”
transmission, in which both parties can send data at the
same time. . .”Hubs” permit only half-duplex transmission,
in which the two computers must take turn (like 2 people
using walkie-talkies)
Picture of Full and Half duplex transmission:
 Results: switches let two pairs of computers engage in
full-speed data transfers with each other; with a hub,
these two transfers would interfere with each other
 Computers with Wi-Fi adapters can be configured to
communicate directly with one another, but it’s more common
to employ a wireless router, which links together both
wireless and Ethernet devices. . .Such routers also provide
connections to an outside network—typically the Internet,
sometimes via a broadband connection
 Understanding Network Packets:
 Modern networks operate on discrete chunks of data known as
“packets”.
 Suppose you want to send a 100KiB file from one computer
to another. Rather than send the file in one burst of
data, your computer breaks it down into smaller chunks. .
.The system might send 100 packets of 1KiB each…this way,
if there’s an error sending one packet, the computer can
resend just that one packet rather than the entire file
 When the recipient system receives packets, it must hold
on to them and reassemble them in the correct order to
re-create the complete data stream.
Examples of Packet Transmission:
 There are several types of packets, and they can be stored
within each other.
 For instance, Ethernet includes its own packet type
(known as frame), and the packets generated by networking
protocols that run atop Ethernet, are stored within
Ethernet frames
 A data transfer can involve several layers of wrapping
and unwrapping data. .each layer, packets from the
adjacent layer may be merged or split up
 Understanding Network Protocol Stacks
 It's possible to think of network data as various levels of
abstractness.
 at one level, a network carries data packets for a specific
network type (such as Ethernet). .the data packets are
addressed to specific computers on a local network
 The addresses used at different levels also vary, that will
be explained in the upcoming section "Using Network
Addresses"
 The protocol stack is a set of software that converts and
encapsulates data between layers of abstraction. .For
example, the stack can take the commands of email transfer
protocols, and the email messages that are transferred, and
package them into packets.
o Another layer of the stack can take these packets and
repackage them into Ethernet frames
o There are several layers to any protocol stack, and
they interact in highly specified ways.
o It's often possible to swap out one component for
another at any given layer
 For Example: at the top of each stack is aprogram
that uses the stack, such as an email client. .You
can switch from one email client to another without
too much difficulty; both rest atop the same stack
 Likewise, if you change a network card, you have to
change the driver for that card, which constitutes
a layer very low in the stack. .Applications above
that drive can remain the same
o Each computer in a transaction requires a compatible
protocol stack.
o When they communicate, the computers pass data down
their respective stacks and then send data to the
partner system, which passes the data up its stack
o Each layer on the receiving system sees the data as
packaged by its counterpart on the sending computer
Picture of TCP/IP Protocol stack, that dominates the Internet
today, is shown below:
 As shown above, client programs at the application layer
initiate data transfers. . .These requests pass through the
transport, internet, and link layers on the client
computer, whereupon they leave the client system and pass
to the server system
 On the server, the process reverses itself, with the server
program running at the application layer replying to the
client program. . .This reply reverses the journey,
traveling down the server computer's stack, across the
network, and up the stack on the client
 A full-fledged network connection can involve many backand-forth data transfers
 Each component layer of the sending system is equivalent to
a layer on the receiving system, but these layers need not
be absolutely identical
o For example: you can have different models of network
card at the link layer, or you can even use entirely
different network hardware types, such as Ethernet and
Token Ring, if some intervening system translates
between them.
 It's important that the stacks operate in compatible ways
 Linux was designed with TCP/IP in mind, and the Internet is
built atop TCP/IP
 Other protocols stacks are available and you may
occasionally run into them, such as:
o NetBEUI (the original Microsoft and IBM protocol stack
for Windows)
o AppleTalk (Apple's initial protocol stack
o Internet Packet Exchange/Sequenced Packet Exchange
(IPX/SPX) (was Novell's favored protocol stack
 All 3 are now fading in importance
o Linux supports AppleTalk and IPX/SPX, but not NetBEUI