Docstoc

Contents

Document Sample
Contents Powered By Docstoc
					                                                http://www.wordwendang.com/en/

Contents


    This word document was downloaded from the website: http://www.wordwendang.com/en/, please
                  remain this link information when you reproduce , copy, or use it.
             <a href='http://www.wordwendang.com/en'>word documents</a>


1      Review .................................................................................................................................................. 2
2      WANs & Routers .................................................................................................................................. 5
3      OSI Model............................................................................................................................................43
4      Layer 3 – Protocols ..............................................................................................................................50
5      Layer 4 – The Transport Layer ............................................................................................................61
6      Layer 5 – The Session Layer................................................................................................................65




    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                        http://www.wordwendang.com/en/



1 Review
This review chapter reinforces the concepts you have already learned related to the OSI reference model, LANs & IP addressing.
Understanding these complex topics is the first step toward understanding the Cisco Internetwork Operating System (IOS), which is a
major topic in this curriculum. You need to have a firm grasp of the internetworking principles surveyed in this chapter before
attempting to understand the complexities of the Cisco IOS.

Enterprises need:
      interconnected LANs that provide access to computers or file servers in other locations
      higher bandwidth onto the LANs to satisfy the needs of the end users
      support technologies that can be relayed for WAN service

1.1 The OSI Model
Layered network model
Data flows from upper-level user applications to lower-level bits that are then transmitted through network
media. The task of most wide area network managers is to configure the three lowest layers.

Peer-to-peer functions use encapsulation & de-encapsulation as the interface for the layers.


There are seven layers in the OSI reference model. The Transmission Control Protocol/Internet Protocol
(TCP/IP) models' functions fit into five layers.
Reasons for layered network model:
     Reduce complexity
     Standardizes interfaces
     Facilitates modular engineering
     Ensures interoperable technology
     Accelerates evolution
     Simplifies teaching & learning

The OSI Model                               (in the PAST he Never Did Pass)

7. Application  provides network processes to applications  (eg: sod processing application is
serviced by file transfer services. Browsers, telnet & electronic mail)
6. Presentation  provides data representation & code formatting. Ensures received data can be used by
application & sent info can be transmitted by network  (common data format & negotiates data transfer
syntax for application layer)
5. Session  interhost communication  (establishes, manages & terminates session between
applications, + does exception reporting & class of service)
4. Transport  end-to-end communication  (info flow control & fault detection, + establishes,
maintains & terminates virtual circuits & does error correction) – (TCP is one of the transport layer
protocols used with IP.)
3. Network  address & best path  (connectivity & path selection between end systems, routing &
domain & addressing) – (IP addressing scheme is found at this layer)
2. Data Link  access to media  (frames & media access control, reliable transfer of data over media)
– (prepares datagram/packet for physical transmission)
1. Physical  binary transmission  (signals, timing & media + voltage, data rates etc)
[note: Layer 1-3 deal with hardware; Layers 4-7 deal with software.]




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

The OSI model layer functions

Each layer of the seven-layer OSI reference model serves a specific function. The functions are defined by
the OSI & can be used by any network products vendor.




Data packet  a logically grouped unit of info that moves between computer systems
International Organization for Standardization (ISO)  researches network schemes (like TCP/IP) &
created the OSI (Open Systems Interconnection) reference model (1984) to set standards/ensure
compatibility (within a multi-vendor environment).

Encapsulation  process of packaging data
so it can be sent from one computer to
another.
Encapsulation wraps data with the necessary
protocol info before network transit. , as
the data packet moves down through the
layers of the OSI model, it receives headers,
trailers, & other info.
[note: the word "header"  means address
info has been added.]

Five stage Process

Build the data  user sends e-mail;
alphanumeric characters are converted to
data that can travel across internetwork.
Package the data for end-to-end transport  data is packaged into segments  ensures the message hosts
at both ends can reliably communicate.
Append (add) network address to the header  data is put into a packet or datagram that contains a
network header with source & destination logical addresses. These addresses help network devices send the
packets across the network along a chosen path.
Append (add) local address to the data link header  each network device must put the packet into a
frame  each device in the chosen network path requires framing for it to connect to the next device.
Convert to bits for transmission  The frame is converted to bits for transmission, & a clocking function
enables devices to distinguish these.
note: The physical medium can vary along path (eg: e-mail message originates on a LAN, crosses a
campus backbone, goes out a WAN link & reaches its destination on another remote LAN). Headers &
trailers are added as data moves down through the layers of the OSI model.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

The application, presentation & session layers present data to
the transport layer, where it is converted to segments 
passed down to network layer; gain header info & become
packets  passed down to the data link layer; gain additional
info & become frames  passed to the physical layer; are
converted to bits – voltage or light pulses (0 & 1s).


Peer-to-peer communications
In order for data packets to travel from source to destination,
each OSI layer at the source must communicate with its peer
layer at the destination  “Peer-to-Peer
Communications”. During this process, each layer’s protocol
exchanges info, called protocol data units (PDUs), between peer
layers.

As data packets travel, each layer depends on the service
function of the OSI layer below it  the lower layer uses
encapsulation to put the PDU from the upper layer into its data
field; then it adds whatever headers & trailers the lower layer
needs to perform its function.
[note: Layer 4 PDU = “segment”.]




1.2 LANs

1.3 TCP/IP Addressing

1.4 Host layers (the upper 4 layers of OSI)




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/



2 WANs & Routers
2.1 WANs
WANs & devices
A WAN operates at the physical & data link layer of
OSI – it interconnects LANs (usually separated by
large geographic areas). WANs provide for the
exchange of data packets/frames between
routers/bridges & the LANs they support.

The major characteristics of WANs are:
 They operate beyond the local LANs geographic
    scope. They use the services of carriers such as
    the Regional Bell Operating Companies
    (RBOCs) & Sprint & MCI.
 They use serial connections (of various types) to access bandwidth over wide-area geographies.
 By definition, WANs connect devices separated by wide geographical areas. Such devices include:
     routers -- offer many services, including
         internetworking & WAN interface ports
     switches -- connect to WAN bandwidth for voice,
         data, & video communication
     modems -- interface voice-grade services; channel
         service units/digital service units (CSU/DSUs) that
         interface T1/E1 services; & Terminal
         Adapters/Network Termination 1 (TA/NT1s) that
         interface Integrated Services Digital Network (ISDN)
         services
     communication servers -- concentrate dial-in & dial-
         out user communication



2.1.2 WAN

WAN physical layer protocols describe how to provide
electrical, mechanical, operational, & functional connections
for WAN services. These services are most often obtained
from WAN service providers such as RBOCs, alternate
carriers, post-telephone, & telegraph (PTT) agencies.
WAN data link protocols describe how frames are carried
between systems on a single data link. They include protocols
designed to operate over dedicated point-to-point, multipoint,
& multi-access switched services such as Frame Relay. WAN
standards are defined & managed by a number of recognized
authorities, including the following agencies:
      International Telecommunication Union-
          Telecommunication Standardization Sector (ITU-T)
          – [formerly the Consultative Committee for International Telegraph & Telephone (CCITT)]
      International Organization for Standardization (ISO)
      Internet Engineering Task Force (IETF)
      Electronic Industries Association (EIA)


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

WAN standards typically describe both physical layer & data link layer requirements. The WAN physical
layer describes the interface between the data terminal equipment (DTE) & the data circuit-terminating
equipment (DCE). Typically, the DCE is the service provider & the DTE is the attached device. In this
model, the services offered to the DTE are made available through a modem or a CSU/DSU.
Several physical layer standards specify this interface:
     EIA/TIA-232
     EIA/TIA-449
     V.24
     V.35
     X.21
     G.703
     EIA-530

     High-Level Data Link Control
      (HDLC) -- an IEEE standard; may
      not be compatible with different
      vendors because of the way each
      vendor has chosen to implement it.
      HDLC supports both point-to-point
      & multipoint configurations with
      minimal overhead.
     Frame Relay -- uses high-quality
      digital facilities; uses simplified
      framing with no error correction mechanisms, which means it can send Layer 2 info much more
      rapidly than other WAN protocols
     Point-to-Point Protocol (PPP) -- described by RFC 1661; two standards developed by the IETF;
      contains a protocol field to identify the network layer protocol
     Simple Data Link Control Protocol (SDLC) -- an IBM-designed WAN data link protocol for System
      Network Architecture (SNA) environments; largely being replaced by the more versatile HDLC
     Serial Line Interface Protocol (SLIP) -- an extremely popular WAN data link protocol for carrying IP
      packets; being replaced in many applications by the more versatile PPP
     Link Access Procedure Balanced (LAPB) -- a data link protocol used by X.25; has extensive error
      checking capabilities
     Link Access Procedure D-channel (LAPD) -- the WAN data link protocol used for signalling & call
      setup on an ISDN D-channel. Data transmissions take place on the ISDN B channels
     Link Access Procedure Frame (LAPF) -- for Frame-Mode Bearer Services; a WAN data link
      protocol, similar to LAPD, used with frame relay technologies

2.1.3 WAN technologies
Following is a brief description of the most common WAN technologies. They have been grouped into
circuit-switched, cell-switched, dedicated digital, & analog services. For more info click on the Web links
that are included.

Circuit-Switched Services
     POTS (Plain Old Telephone Service) -- not a computer data service, but included for two reasons:
         (1) many of its technologies are part of the growing data infrastructure, (2) it is a model of an
         incredibly reliable, easy-to-use, wide-area communications network; typical medium is twisted-
         pair copper wire
     Narrowband ISDN (Integrated Services Digital Network) -- a versatile, widespread, historically
         important technology; was the first all-digital dial-up service; usage varies greatly from country to
         country; cost is moderate; maximum bandwidth is 128 kbps for the lower cost BRI (Basic Rate
         Interface) & about 3 Mbps for the PRI (Primary Rate Interface); usage is fairly widespread, though
         it varies considerably from country to country; typical medium is twisted-pair copper wire



    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                 http://www.wordwendang.com/en/

Packet-Switched Services
    X.25 -- an older technology, but still
        widely used; has extensive error-
        checking capabilities from the days
        when WAN links were more prone to
        errors, which make it reliable but limits
        its bandwidth; bandwidth may be as
        high as 2 Mbps; usage is fairly
        extensive; cost is moderate; typical
        medium is twisted-pair copper wire
    Frame Relay -- a packet-switched
        version of Narrowband ISDN; has
        become an extremely popular WAN
        technology in its own right; more
        efficient than X.25, but with similar
        services; maximum bandwidth is
        44.736 Mbps; 56kbps & 384kbps are
        extremely popular in the U.S.; usage is
        widespread; cost is moderate to low;
        Typical media include twisted-pair
        copper wire & optical fiber

Cell-Switched Services
     ATM (Asynchronous Transfer Mode) -
        - closely related to broadband ISDN;
        becoming an increasingly important
        WAN (& even LAN) technology; uses
        small, fixed length (53 byte) frames to
        carry data; maximum bandwidth is
        currently 622 Mbps, though higher
        speeds are being developed; typical media are twisted-pair copper wire & optical fiber; usage is
        widespread & increasing; cost is high
     SMDS (Switched Multimegabit Data Service) -- closely related to ATM, & typically used in
        MANs; maximum bandwidth is 44.736 Mbps; typical media are twisted-pair copper wire &
        optical fiber; usage not very widespread; cost is relatively high

Dedicated Digital Services
    T1, T3, E1, E3 -- the T series of services in the U.S. & the E series of services in Europe are
        extremely important WAN technologies; they use time division multiplexing to "slice up" &
        assign time slots for data transmission; bandwidth is:
    T1 -- 1.544 Mbps
    T3 -- 44.736 Mbps
    E1 -- 2.048 Mbps
    E3 -- 34.368 Mbps
    other bandwidths are available




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

The media used are typical twisted-pair copper wire & optical fiber. Usage is extremely widespread; cost is
moderate.
     xDSL (DSL for Digital Subscriber Line & x for a family of technologies) -- a new & developing
         WAN technology intended for home use; has a bandwidth which decreases with increasing
         distance from the phone companies equipment; top speeds of 51.84 Mbps are possible near a
         phone company office, more common are much lower bandwidths (from 100s of kbps to several
         Mbps); usage is small but increasing rapidly; cost is moderate & decreasing; x indicates the entire
         family of DSL technologies, including:
     HDSL -- high-bit-rate DSL
     SDSL -- single-line DSL
     ADSL -- asymmetric DSL
     VDSL -- very-high-bit-rate DSL
     RADSL -- rate adaptive DSL
     SONET (Synchronous Optical Network) -- a family of very high-speed physical layer
         technologies; designed for optical fiber, but can also run on copper cables; has a series of data
         rates available with special designations; implemented at different OC (optical carrier) levels
         ranging from 51.84 Mbps (OC-1) to 9,952 Mbps (OC-192); can achieve these amazing data rates
         by using wavelength division multiplexing (WDM), in which lasers are tuned to slightly different
         colors (wavelengths) in order to send huge amounts of data optically; usage is widespread among
         Internet backbone entities; cost is expensive (not a technology that connects to your house)
Other WAN Services
     dial-up modems (switched analog) -- limited in speed, but quite versatile; works with existing
         phone network; maximum bandwidth approx. 56 kbps; cost is low; usage is still very widespread;
         typical medium is the twisted-pair phone line
     cable modems (shared analog) -- put data signals on the same cable as television signals;
         increasing in popularity in regions that have large amounts of existing cable TV coaxial cable
         (90% of homes in U.S.); maximum bandwidth can be 10 Mbps, though this degrades as more
         users attach to a given network segment (behaving like an unswitched LAN); cost is relatively
         low; usage is small but increasing; the medium is coaxial cable.
     wireless -- no medium is required since the signals are electromagnetic waves; there are a variety
         of wireless WAN links, two of which are:
 terrestrial -- bandwidths typically in the 11 Mbps range (e.g. microwave); cost is relatively low; line-
    of-sight is usually required; usage is moderate
 satellite -- can serve mobile users (e.g. cellular telephone network) & remote users (too far from any
    wires or cables); usage is widespread; cost is high


WANs & Routers
2.2.1 Router Basics

Computers have four basic components: a CPU, memory, interfaces, & a bus.
A router also has these components; it can be called a computer. However, it is a special purpose
computer. Instead of having components that are dedicated to video & audio output devices, keyboard &
mouse inputs, & all of the typical easy-to-use GUI software of a modern multimedia computer, the router is
dedicated to routing.
Just as computers need operating systems to run software applications, routers need the Internetworking
Operating Software (IOS) to run configuration files. These configuration files control the flow of traffic to
the routers. Specifically, by using routing protocols to direct routed protocols & routing tables, they make
decisions regarding best path for packets. To control these protocols & these decisions, the router must be
configured.
You will spend most of this semester learning how to build configuration files from IOS commands in
order to get the router to perform the network functions that you desire. While at first glance the router
configuration file may look complex, by the end of the semester you will be able to read & completely
understand them, as well as write your own configurations.

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/

The router is a computer that selects the best paths & manages the switching of packets between two
different networks. Internal configuration components of a router are as follows:
      RAM/DRAM -- Stores routing tables, ARP cache, fast-switching cache, packet buffering (shared
          RAM), & packet hold queues. RAM also provides temporary and/or running memory for the
          router’s configuration file while the router is powered on. RAM content is lost when you power
          down or restart.
      NVRAM -- nonvolatile RAM; stores a router’s backup/startup configuration file; content remains
          when you power down or restart.
      Flash -- erasable, reprogrammable ROM; holds the operating system image & microcode; allows
          you to update software without removing & replacing chips on the processor; content remains
          when you power down or restart; multiple versions of IOS software can be stored in Flash
          memory
      ROM -- contains power-on diagnostics, a bootstrap program, & operating system software;
          software upgrades in ROM require replacing pluggable chips on the CPU
      interface -- network connection through which packets enter & exit a router; it can be on the
          motherboard or on a separate interface module




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

2.2.2 The function of a router in a WAN

While routers can be used to segment LAN devices, their major
use is as WAN devices.

Routers have both LAN & WAN interfaces. In fact, WAN
technologies are frequently used to connect routers. They
communicate with each other by WAN connections, & make up
autonomous systems & the backbone of the Internet. Since
routers are the backbone devices of large intranets & of the
Internet, they operate at Layer 3 of the OSI model, making
decisions based on network addresses (on the Internet, by using
the Internet Protocol, or IP). The two main functions of routers
are the selection of best paths for incoming data packets, & the switching of packets to the proper outgoing
interface. Routers accomplish this by building routing tables & exchanging the network info contained
within them with other routers.

You can configure routing tables, but generally they are
maintained dynamically by using a routing protocol that
exchanges network topology (path) info with other routers.
If, for example, you want any computer (x) to be able to
communicate with any other computer (y) anywhere on earth,
& with any other computer (z) anywhere in the moon-earth
system, you must include a routing feature for info flow, &
redundant paths for reliability. Many network design decisions
& technologies can be traced to this desire for computers x, y,
& z to be able to communicate, or internetwork. However, any
internetwork must also include the following:
       consistent end-to-end addressing
       addresses that represent network topologies
       best path selection
       dynamic routing
       switching




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

2.2.3 Semester 2 lab topology

The Semester 2 lab topology should be thought of as an
enterprise WAN for a medium-sized company with
offices around the world. It is not connected to the
Internet; it is the company's private network. Also, the
topology, as shown, is not redundant -- a failure of any
router along the chain will break the network. This
network of networks, under a common administration
(the company) is called an autonomous system.

***
The Internet is a network of autonomous systems, each
of which has routers that typically play one of four
roles. (I Am Baby Bumpking)
      internal routers -- internal to one area
      area border routers -- connect two or more
         areas
      backbone routers -- primary paths for traffic
         that is most often sourced from, & destined for, other networks
      autonomous system (AS) boundary routers -- communicate with routers in other autonomous
         systems

While no one entity controls them, the typical entities are:
    corporations (e.g. MCI Worldcom, Sprint, AT&T, Qwest, UUNet, France Telecom)
    universities (e.g. University of Illinois, Stanford University)
    research institutes (e.g. CERN in Switzerland)
    Internet Service Providers (ISPs)




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

Note that each router has an Ethernet LAN attached to it. Typical devices on Ethernet LANs, hosts are
shown along with their console cables to allow configuration & display of the routers' contents. Also note
that four of the routers have wide-area serial connections between them.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/




In this chapter, you will learn about operating a router to ensure delivery of data on a network with routers.
You will become familiar with the Cisco CLI (command line interface). You will learn to:
      login with the user password
      enter privileged mode with the enable password
      disable or quit
In addition, you will learn how to use the following advanced help features:
      command completion & prompting
      syntax checking
Lastly, you will learn how to use the following advanced editing features:
      automatic line scrolling
      cursor controls
      history buffer with command recall
      copy & paste, which are available on most computers

3.1 Router User Interface

3.1.1 User & privileged modes
To configure Cisco routers, you must either access the user
interface on the router with a terminal or access the router
remotely. When accessing a router, you must login to the
router before you enter any other commands.

For security purposes, the router has two levels of access to
commands
     user mode --Typical tasks include those that check
         the router status. In this mode, router configuration
         changes are not allowed.
     privileged mode --Typical tasks include those that
         change the router configuration.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

When you first login to a router, you see a user mode prompt. Commands available at this user level are a
subset of the commands available at the privileged level. For the most part, these commands allow you to
display info without changing router configuration settings.

To access the full set of commands, you must first enable the privileged mode. At the ">" prompt, type
"enable". At the "password" prompt, enter the password that has been set with the "enable secret"
command. Once you have completed the login steps, the prompt changes to a # (pound sign) because you
are now in the privileged mode. From the privileged mode, you can access modes such as the global
configuration mode & other specific modes including:
      interface
      subinterface
      line
      router
      route-map
      several additional configuration modes
To logout of the router, type exit.
Screen output varies with the specific Cisco IOS software level & router configuration
          3.1.2 User mode command list
Typing a question mark (?) at the user mode prompt or the privileged mode prompt displays a handy list of
commonly used commands. Notice the "--More-
-" at the bottom of the sample display. The screen
displays 22 lines at one time. So sometimes you
will get the -- More -- prompt at the bottom of the
display. It indicates that multiple screens are
available as output; that is, more commands follow.
Here, or anywhere else in Cisco IOS software,
whenever a --More-- prompt appears, you can
continue viewing the next available screen by
pressing the space bar. To display just the next
line, press the Return key (or, on some keyboards,
the Enter key). Press any other key to return to the
prompt.
Note: Screen output varies, depending on Cisco
IOS software level & router configuration.




                                                                         3.1.3 Privileged-mode command
                                                                         list
                                                                         To access privileged mode, type
enable (or as shown in the figure, the abbreviation ena).   You will be prompted for a password. If you

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

type a "?" (question mark) at the privileged mode prompt, the screen displays a longer list of commands
than it would at the user mode prompt.

3.1.4 User router help functions
Suppose you want to set the router clock. If you do not know the command to do so, use the help command
to check the syntax for setting the clock. The following exercise illustrates one of the many functions of the
help command. Your task is to set the router clock. Assuming that you do not know the command, proceed
using the following steps:
     1. Use help to check the syntax for setting the clock. The help output shows that the clock command
          is required.
     2. Check the syntax for changing the time.
     3. Enter the current time by using hours, minutes, & seconds, as shown. The system indicates that
          you need to provide additional info to complete the command. The help output in Figure shows
          that the set keyword is required.
     4. Check the syntax for entering the time & enter the current time using hours, minutes, & seconds.
             As shown in Figure , the system indicates that you need to provide additional info to complete
          the command.
     5. Press Ctrl-P (or the up arrow) to repeat the previous command entry automatically. Then add a
          space & a question mark (?) to reveal the additional arguments. Now you can complete the
          command entry.
     6. The caret symbol (^) & help response indicate an error. The placement of the caret symbol shows
          you where the possible problem is located. To input the correct syntax, re-enter the command up
          to the point where the caret symbol is located & then enter a question mark (?).
     7. Enter the year, using the correct syntax, & press Return to execute the command.
The user interface provides syntax checking by placing a ^ where the error occurred. The ^ appears at the
point in the command string where you have entered an incorrect command, keyword, or argument. The
error location indicator & interactive help system enable you to find & correct syntax errors easily.

3.1.5 Using IOS editing commands




The user interface includes an enhanced editing mode that provides a set of editing key functions that allow
you to edit a command line as it is being typed. Use the key sequences indicated in Figure to move the
cursor around on the command line for corrections or changes. Although enhanced editing mode is
automatically enabled with the current software release, you can disable it if you have written scripts that
do not interact well while enhanced editing is enabled. To disable enhanced editing mode, type "terminal
no editing" at the privileged mode prompt.
The editing command set provides a horizontal scrolling feature for commands that extend beyond a single
line on the screen. When the cursor reaches the right margin, the command line shifts 10 spaces to the left.
You cannot see the first 10 characters of the line, but you can scroll back & check the syntax at the
beginning of the command. To scroll back, press Ctrl-B or the left arrow key repeatedly until you are at the
beginning of the command entry, or press Ctrl-A to return directly to the beginning of the line.
3.1.6 Using IOS command history


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/

                                                            The user interface provides a history, or
                                                            record, of commands that you have entered.
                                                            This feature is particularly useful for
                                                            recalling long or complex commands or
                                                            entries. With the command history feature
                                                            you can complete the following tasks:
                                                                  Set the command history buffer
                                                                      size.
                                                                  Recall commands.
                                                                  Disable the command history
                                                                      feature.
                                                            By default, the command history is enabled
                                                            & the system records 10 command lines in
                                                            its history buffer. To change the number of
                                                            command lines the system records during a
                                                            terminal session, use the terminal history
                                                            size or the history size command. The
maximum number of commands is 256.
To recall commands in the history buffer, beginning with the most recent command, press Ctrl-P or the up
arrow key repeatedly to recall successively older commands. To return to more recent commands in the
history buffer, after recalling commands with Ctrl-P or the up arrow, press Ctrl-N or the down arrow key
repeatedly to recall successively more recent commands.
When typing commands, as a shortcut, you may enter the unique characters for a command, press the Tab
key, & the interface will finish the entry for you. The unique letters identify the command, the Tab key
simply acknowledges visually that the router has understood the specific command that you intended.
On most computers you may also have additional select & copy functions available. You can copy a
previous command string & then paste or insert it as your current command entry, & press Return. You can
use Ctrl-Z to back out of configuration mode

3.2 Using The Router Interface & Interface Modes

3.2.1 Lab: Router user interface




3.2.2 Lab: Router user interface modes



 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

When using router operating systems such as Cisco IOS, you will have to know each of the different user
modes a router has & what each one of them is for. Memorizing every command in all of the user modes
would be time consuming & pointless. Try to develop an understanding of what commands & functions are
available with each of the modes. In this lab, you will work with the topology & the six main modes
available with most routers:
     1. User EXEC Mode
     2. Privileged EXEC Mode (also known as Enable Mode)
     3. Global Configuration Mode
     4. Router Configuration Mode
     5. Interface Configuration Mode
     6. Sub-interface Configuration Mode

Chapter Summary
You can configure Cisco routers from the user interface that runs on the router console or terminal. For
security purposes, Cisco routers have two levels of access to commands: user mode & privileged mode.
Using a user interface to a router, you can:
      Login with a user password
      Enter privileged mode with the enable password
      Disable or quit
You can use advanced help features to perform the following:
      Command completion & prompting
      Syntax checking
The user interface includes an enhanced editing mode that provides a set of editing key functions. The user
interface provides a history, or record, of commands you have entered.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/




Now that you have an understanding of the router command line interface, it is time to examine the router
components that ensure efficient & effective delivery of data on a network. In this chapter, you will learn
the correct procedures & commands to access a router, examine & maintain its components, & test its
network connectivity.
4.1 Router Components

          4.1.1 External router configuration sources
In this section, you will learn about the router components that play a key role in the configuration process.
Knowing which components are involved in the
configuration process gives you a better understanding
of how the router stores & uses your configuration
commands. Being aware of the steps that take place
during router initialization will help you determine
what & where problems may occur when you start up
your router.

You can configure a router from many external
locations as shown in the Figure, including the
following:
      from the console terminal (a computer
         connected to the router through a console port)
         during its installation
      via modem by using the auxiliary port
      from Virtual Terminals 0-4, after it has been
         installed on the network
      from a TFTP server on the network




4.1.2 Internal router's configuration components




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/




The internal architecture of the Cisco router supports components that play an important role in the startup
process, as shown in the Figure. Internal router configuration components are as follows:
     RAM/DRAM -- stores routing tables, ARP cache, fast-switching cache, packet buffering (shared
         RAM), & packet hold queues; RAM also provides temporary &/or running memory for a router's
         configuration file while the router is powered; RAM content is lost during a power down or restart
     NVRAM -- non-volatile RAM stores the router's backup/startup configuration file; NVRAM
         content is retained during power down or restart
     Flash -- erasable, reprogrammable ROM that holds the operating system image & microcode;
         Flash memory enables software updates without removing & replacing processor chips; Flash
         content is retained during power down or restart; Flash memory can store multiple versions of IOS
         software
     ROM -- contains power-on diagnostics, a bootstrap program, & operating system software;
         software upgrades in ROM require removing & replacing pluggable chips on the CPU
     Interfaces -- network connections on the motherboard or on separate interface modules, through
         which packets enter & exit a router

         4.1.3 RAM for working storage in the router

                                                                        RAM is the working storage area
                                                                        for a router. When you turn a router
                                                                        on, the ROM executes a bootstrap
                                                                        program. This program performs
                                                                        some tests, & then loads the Cisco
                                                                        IOS software into memory. The
                                                                        command executive, or EXEC, is
                                                                        one part of the Cisco IOS software.
                                                                        EXEC receives & executes
                                                                        commands you enter for the router.
                                                                        As shown in the Figure, a router
                                                                        also uses RAM to store an active
                                                                        configuration file & tables of
                                                                        network maps & routing address
                                                                        lists. You can display the
                                                                        configuration file on a remote or
                                                                        console terminal. A saved version
                                                                        of this file is stored in NVRAM. It

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

is accessed & loaded into main memory each time a router initializes. The configuration file contains
global, process, & interface info that directly affects the operation of a router & its interface ports.
An operating system image cannot be displayed on a terminal screen. An image is usually executed from
the main RAM & loaded from one of several input sources. The operating software is organized into
routines that handle the tasks associated with different protocols, such as data movement, table & buffer
management, routing updates, & user command execution.
4.1.4 Router modes
Whether accessed from the console or by a Telnet session through a TTY port, a router can be placed in
several modes. (see Figure) Each mode provides different functions:
      user EXEC mode -- This is a look-only mode in which the user can view some info about the
          router, but cannot make changes.
      privileged EXEC mode -- This mode supports the debugging & testing commands, detailed
          examination of the router, manipulation of configuration files, & access to configuration modes.
      setup mode -- This mode presents an interactive prompted dialog at the console that helps the new
          user create a first-time basic configuration.
      global configuration mode -- This mode implements powerful one-line commands that perform
          simple configuration tasks.
      other configuration modes -- These modes provide more detailed multiple-line configurations.
      RXBOOT mode -- This is the maintenance mode that you can use, among other things, to recover
          from lost passwords.




4.2 Router Show Commands

4.2.1 Examining router status by using router status commands
In this section, you will learn basic commands that you can issue to determine the current status of a router.
These commands help you obtain vital info you need when monitoring & troubleshooting router operations.

It is important to be able to monitor the health & state of your router at any given time. As shown in the
Figure, Cisco routers have a series of commands that allow you to determine whether the router is
functionally correct or where problems have occurred. Router status commands & their descriptions are
shown below.
       show version -- displays the configuration of the system hardware, the software version, the
          names & sources of configuration files, & the boot image
       show processes -- displays info about the active processes
       show protocols -- displays the configured protocols; shows the status of all configured Layer 3
          protocols
       show memory -- shows statistics about the router's memory, including memory free pool statistics

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

        show stacks -- monitors the stack use of processes & interrupt routines & displays the reason for
         the last system reboot
        show buffers -- provides statistics for the buffer pools on the router
        show flash -- shows info about the Flash memory device
        show running-config (write term on Cisco IOS Release 10.3 or earlier) -- displays the active
         configuration file
        show startup-config (show config on Cisco IOS Release 10.3 or earlier) -- displays the backup
         configuration file
        show interfaces -- displays statistics for all interfaces configured on the router




4.2.2 The show running-config & show startup-config commands

Among the most used Cisco IOS software EXEC commands are show running-config & show startup-
config.    They allow an administrator to see the current running configuration on the router or the startup
configuration commands that the router will use on the next restart.

(Note: The commands, write term & show config, used with Cisco IOS Release 10.3 & earlier, have been
replaced with new commands. The commands that have been replaced continue to perform their normal
functions in the current release but are no longer documented. Support for these commands will cease in a
future release.)
You can recognize an active configuration file by the words current configuration at the top. You can
recognize a backup configuration file when you see a message at the top that tells you how much non-
volatile memory you have used.
4.2.3 The show interfaces, show version & show protocols commands

The show interfaces command displays configurable parameters & real-time statistics related to all
interfaces configured on the router (see Figure ).
The show version command displays info about the Cisco IOS software version that is currently running
on the router (see Figure ).
You use the show protocols command to display the protocols configured on the router. This command
shows the global & interface-specific status of any configured Level 3 protocols (for example, IP, DECnet,
IPX, & AppleTalk).
4.3 Router's Network Neighbors


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

4.3.1 Gaining access to other routers by using Cisco Discovery Protocol (CDP)

                                                               Cisco Discovery Protocol (CDP) provides a
                                                               single proprietary command that enables
                                                               network administrators to access a summary of
                                                               what the configurations look like on other
                                                               directly-connected routers. CDP runs over a
                                                               data link layer that connects lower physical
                                                               media & upper network layer protocols, as
                                                               shown in the Figure. Because it operates at this
                                                               level, CDP devices that support different
                                                               network layer protocols can learn about each
                                                               other. (Remember that a data link address is
                                                               the same as a MAC address.)

                                                            When a Cisco device that is running Cisco IOS
                                                            (Release 10.3 or later) boots up, CDP starts up
automatically, which then allows the device to detect neighboring Cisco devices that are also running CDP.
Such devices extend beyond those using TCP/IP, & include directly-connected Cisco devices, regardless of
which Layer 3 & 4 protocol suite they run.

4.3.2 Showing CDP neighbor entries

The primary use of CDP is to discover
platforms & protocols on your
neighboring devices. Use the show cdp
neighbors command to display the
CDP updates on the local router.

The Figure displays an example of how
CDP delivers its collection of info to a
network administrator. Each router that
is running CDP exchanges info
regarding any protocol entries with its
neighbors. The administrator can
display the results of this CDP info
exchange on a console that is connected
to a router configured to run CDP on its
interfaces.

The network administrator uses a show command to display info about the networks directly connected to
the router. CDP provides info about each CDP neighbor device. Values include the following:
      device identifiers -- e.g. the router's configured host name & domain name (if any)
      address list -- at least one address for SNMP, up to one address for each supported protocol
      port identifier -- e.g. Ethernet 0, Ethernet 1, & Serial 0
      capabilities list -- e.g. if the device acts as a source route bridge as well as a router
      version -- info such as that provided by the local command show version
      platform -- the device's hardware platform, e.g. Cisco 7000
Notice that the lowest router in the figure is not directly connected to the administrator's console router. To
obtain CDP info about this device, the administrator would need to Telnet to a router that is directly
connected to this target.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

4.3.3 A CDP configuration example




CDP begins automatically upon a device's system startup. The CDP function normally starts by default
when a Cisco product boots up with Cisco IOS Release 10.3 or later.

  Only directly connected neighbors exchange CDP frames. A router caches any info it receives from its
CDP neighbors. If a subsequent CDP frame indicates that any of the info about a neighbor has changed, the
router discards the older info & replaces it with the new info.

Use the command show cdp interface, as shown in Figure , to display the values of the CDP timers, the
interface status, & the encapsulation used by CDP for its advertisement & discovery frame transmission.
Default values for timers set the frequency for CDP updates & for aging CDP entries. These timers are set
automatically at 60 seconds & 180 seconds, respectively. If the device receives a more recent update, or if
this hold-time value expires, the device must discard the CDP entry
4.3.4 Showing CDP entries for a device & CDP neighbors

CDP was designed & implemented as a very simple, low-overhead protocol. A CDP frame can be small yet
retrieve a lot of useful info about neighboring routers. You use the command show cdp entry {device
name} to display a single cached CDP entry. Notice that the output from this command includes all the
Layer 3 addresses present in the neighbor router, Router B. An administrator can view the IP addresses of
the targeted CDP neighbor (Router B) with the single command entry on Router A. The hold-time value
indicates the amount of elapsed time since the CDP frame arrived with this info. The command includes
abbreviated version info about Router B.

You use the command show cdp neighbors, as shown in Figure , to display the CDP updates received on
the local router. Notice that for each local port, the display shows the following:
      neighbor device ID
      local port type & number
      decremental hold-time value, in seconds
      neighbor device capability code
      neighbor hardware platform
      neighbor remote port type & number
To display this info as well as info like that from show cdp entry, you use the optional show cdp
neighbors detail.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

4.4 Basic Networking Testing

4.4.1 Testing process that uses the OSI model

                                              The most common problems that occur on IP networks result
                                              from errors in the addressing scheme. It is important to test
                                              your address configuration before continuing with further
                                              configuration steps. Basic testing of a network should proceed
                                              in sequence from one OSI reference model layer to the next.
                                              Each test presented in this section focuses on network
                                              operations at a specific layer of the OSI model. As shown in
                                              the Figure, telnet, ping, trace, show ip route, show interfaces
                                              & debug are commands that allow you to test your network

4.4.2 Testing the application layer by using telnet
Another way to learn about a remote router is to connect to it. Telnet, a virtual terminal protocol that is part
of the TCP/IP protocol suite, allows connections to be made to hosts. You can set a connection between a
router & a connected device. Telnet allows you to verify the application-layer software between source &
destination stations. This is the most complete test mechanism available. A router can have up to five
simultaneous incoming Telnet sessions.
Let's begin testing by initially focusing on upper-layer applications. As shown in Figure , the telnet
command provides a virtual terminal so administrators can use Telnet operations to connect with other
routers running TCP/IP.
With Cisco's implementation of TCP/IP, you do not need to enter the command connect or telnet to
establish a Telnet connection. If you prefer, you can just enter the learned host name. To end a Telnet
session, use the EXEC commands exit or logout.
The following list shows alternative commands for the operations listed in the figure:
      Initiate a session
          from Denver:
          Denver> connect
          paris
          Denver> paris
          Denver>
          131.108.100.152
      Resume a session
          (enter session
          number or name):
          Denver>1
          Paris>
      End a session:
          Paris> exit
As you have already learned,
the Telnet application
provides a virtual terminal
so that you can connect to
other hosts that are running
TCP/IP. You can use Telnet to perform a test to determine whether or not you can access a remote router.
As is shown in Figure , if you can successfully use Telnet to connect the York router to the Paris router,
then you have performed a basic test of the network connection.
If you can remotely access another router through Telnet, then you know that at least one TCP/IP
application can reach the remote router. A successful Telnet connection indicates that the upper-layer
application (& the services of lower layers, as well) function properly.
If we can Telnet to one router but not to another router, it is likely that the Telnet failure is caused by
specific addressing, naming, or access permission problems. These problems can exist on your router or on
the router that failed as a Telnet target. The next step is to try ping, which is covered in this section. This
command lets you test end-to-end at the network layer

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

4.4.3 Testing the network layer using the ping command

As an aid to diagnosing basic network
connectivity, many network protocols
support an echo protocol. Echo
protocols are used to test whether
protocol packets are being routed.
The ping command sends a packet to
the destination host & then waits for a
reply packet from that host. Results
from this echo protocol can help
evaluate the path-to-host reliability,
delays over the path, & whether the
host can be reached or is functioning.
In the Figure, the ping target
172.16.1.5 responded successfully to
all five datagrams sent. The
exclamation points (!) indicate each
successful echo. If you receive one or
more periods (.) instead of
exclamations on your display, the
application on your router timed out waiting for a given packet echo from the ping target. You can use the
ping user EXEC command to diagnose basic network connectivity. The ping uses the ICMP (Internet
Control Message Protocol).

4.4.4 Testing the network layer with the trace command
The trace command is the ideal tool for finding where data is being sent in your network. The trace
                                                                                   command is similar to the
                                                                                   ping command, except
                                                                                   that instead of testing end-
                                                                                   to-end connectivity, trace
                                                                                   tests each step along the
                                                                                   way. This operation can
                                                                                   be performed at either the
                                                                                   user or privileged EXEC
                                                                                   levels.
                                                                                   The trace command takes
                                                                                   advantage of the error
                                                                                   messages generated by
                                                                                   routers when a packet
                                                                                   exceeds its Time To Live
                                                                                   (TTL) value. The trace
                                                                                   command sends several
                                                                                   packets & displays the
                                                                                   round-trip time for each.
                                                                                   The benefit of the trace
command is that it tells which router in the path was the last one to be reached. This is called fault isolation.
In this example, we are tracing the path from York to Rome. Along the way the path must go through
London & Paris. If one of these routers had been unreachable, you would have seen three asterisks (*)
instead of the name of the router. The trace command would continue attempting to reach the next step
until you escaped using the Ctrl-Shift-6 escape sequence.

4.4.5 Testing network layer with the show ip route command




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/




The router offers some powerful tools at this point in the search. You can actually look at the routing table -
the directions that the router uses to determine how it will direct traffic across the network.
The next basic test also focuses on the network layer. Use the show ip route command to determine
whether a routing table entry exists for the target network. The highlight in the graphic shows that Rome
(131.108.33.0) is reachable by Paris (131.108.16.2) via the Enternet1 interface

4.4.6             Using the show interfaces serial command to test the
physical & data link layers




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/




         The hardware -- such as cables, connectors, & interfaces -- must make the actual connection
          between the devices.
      The software is the messages -- such as keepalive messages, control info, & user info -- that are
          passed between adjacent devices. This info is data being passed between two connected router
          interfaces.
When you test the physical & data link, you ask these questions:
      Is there a Carrier Detect signal?
      Is the physical link between devices good?
      Are the keepalive messages being received?
      Can data packets be sent across the physical link?
One of the most important elements of the show interfaces serial command output is display of the line &
data link protocol status. Figure indicates the key summary line to check the status meanings.

The line status in this example is triggered by a Carrier Detect signal, & refers to the physical layer status.
However, the line protocol, triggered by keepalive frames, refers to the data link framing.

4.4.7 The show interfaces & clear counters commands

The router tracks statistics that provide info about the interface. You use the show interfaces command to
display the statistics as shown in the figure. The statistics reflect router operation since the last time the
counters were cleared, as shown in the top highlighted line in the graphic. This graphic shows that it was
two weeks & four days earlier. The bottom set of highlights shows the critical counters. Use the clear
counters command to reset the counters to 0. By starting from 0, you get a better picture of the current
status of the network.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

4.4.8 Checking real-time traffic with debug

The router includes hardware & software to aid it
in tracking down problems, on it, or on other
hosts in the network. The debug privileged
EXEC command starts the console display of the
network events specified in the command
parameter. Use the terminal monitor command
to forward debug output to your Telnet session
terminal.
In this example, data link broadcasts received
by the router are displayed. Use the undebug all
command (or no debug all) to turn debugging
off when you no longer need it. Debugging is
really intended for solving problems.
(Note: Be very careful with this tool on a live
network. Substantial debugging on a busy
network will slow down the network
significantly. Do not leave debugging turned on;
use it to diagnose a problem, & then turn it off.)
                                                                         By default, the router sends
                                                                         system error messages &
                                                                         output from the debug
                                                                         EXEC command to the
                                                                         console terminal.
                                                                         Messages can be redirected
                                                                         to a UNIX host or to an
                                                                         internal buffer. The
                                                                         terminal monitor command
                                                                         gives you the capability to
                                                                         redirect these messages to a
                                                                         terminal.




Chapter Summary
In this chapter, you learned that:
      The router is made up of configurable components & has modes for examining, maintaining, &
          changing the components.
      show commands are used for examination.
      You use CDP to show entries about neighbors.
      You can gain access to other routers by using Telnet.
      You should test network connectivity layer by layer.
      Testing commands include telnet, ping, trace, & debug.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/




In the "Router Components" chapter, you learned the correct procedures & commands to access a router,
examine & maintain its components, & test its network connectivity. In this chapter, you will learn how to
start a router for the first time by using the correct commands & startup sequence to do an initial
configuration of a router. In addition, this chapter explains the startup sequence of a router & the setup
dialog that the router uses to create an initial configuration file.

5.1 Router Boot Sequence & Setup Mode

         5.1.1 Router startup routine

                                                                                          A router
                                                                                          initializes by
                                                                                          loading the
                                                                                          bootstrap, the
                                                                                          operating system,
                                                                                          & a configuration
                                                                                          file. If the router
                                                                                          cannot find a
                                                                                          configuration
                                                                                          file, then it enters
                                                                                          setup mode. The
router stores, in NVRAM, a backup copy of the new configuration from setup mode.

The goal of the startup routines for Cisco IOS software is to start the router operations. The router must
deliver reliable performance in its job of connecting the user networks it was configured to serve. To do
this, the startup routines must:
      Make sure that the router comes up with all its hardware tested.
      Find & load the Cisco IOS software that the router uses for its operating system.
      Find & apply the configuration statements about the router, including protocol functions &
           interface addresses.
When a Cisco router powers up, it performs a power-on self test (POST). During this self test, the router
executes diagnostics from ROM on all hardware modules. These diagnostics verify the basic operation of
the CPU, memory, & network interface ports. After verifying the hardware functions, the router proceeds
with software initialization.




5.1.2 Router startup sequence

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                   http://www.wordwendang.com/en/


                                                                         After the power-on self test on the
                                                                         router, the following events occur as the
                                                                         router initializes:
                                                                              Step 1 -- The generic bootstrap
                                                                                   loader, in ROM, executes on
                                                                                   the CPU card. A bootstrap is a
                                                                                   simple, preset operation to load
                                                                                   instructions that in turn cause
                                                                                   other instructions to be loaded
                                                                                   into memory, or cause entry
                                                                                   into other configuration
                                                                                   modes.
                                                                              Step 2 -- The operating system
                                                                                   (Cisco IOS) can be found in
                                                                                   one of several places. The
                                                                                   location is disclosed in the
          boot field of the configuration register. If the boot field indicates a Flash, or network load, boot
          system commands in the configuration file indicate the exact location of the image.
      Step 3 -- The operating system image is loaded. Then, when it is loaded & operational, the
          operating system locates the hardware & software components & lists the results on the console
          terminal.
      Step 4 -- The configuration file saved in NVRAM is loaded into main memory & executed one
          line at a time. These configuration commands start routing processes, supply addresses for
          interfaces, set media characteristics, & so on.
      Step 5 -- If no valid configuration file exists in NVRAM, the operating system executes a
          question-driven initial configuration routine referred to as the system configuration dialog, also
          called the setup dialog.
Setup is not intended as the mode for entering complex protocol features in the router. You should use
setup to bring up a minimal configuration, then use various configuration-mode commands, rather than
setup, for most router configuration tasks.
5.1.3 Commands related to router startup

The top two commands in the Figure -- show startup-config & show running-config -- display the
backup & active configuration files. The erase startup-config command deletes the backup configuration
file in NVRAM. The reload (reboot) command reloads the router, causing it to run through the entire
startup process. The last command, setup, is used to enter setup mode from the privileged EXEC prompt.
* Note: The commands show config, write term, & write erase, used with Cisco IOS Release 10.3 &
earlier, have been replaced with new commands. The old commands continue to perform their normal
functions in the current release, but are no longer documented. Support for these commands will cease in a
future release.
5.2 System Configuration Dialog

5.2.1 Using the setup command

One of the routines for initial configuration is the setup mode. As you've already learned in this lesson, the
main purpose of the setup mode is to bring up, quickly, a minimal configuration for any router that cannot
find its configuration from some other source.
For many of the prompts in the system configuration dialog of the setup command facility, default answers
appear in square brackets [ ] following the question. Press the Return key to use these defaults. If the
system has been previously configured, the defaults that will appear will be the currently configured values.
If you are configuring the system for the first time, the factory defaults will be provided. If there is no
factory default, as in the case of passwords, nothing is displayed after the question mark [?]. During the
setup process, you can press Control+C at any time to terminate the process & start over. Once setup is
terminated, all interfaces will be administratively shutdown.


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

When you complete the configuration process in setup mode, the screen will display the configuration that
you have just created. You will then be asked whether you want to use this configuration. If you enter
"yes", the configuration will be executed & saved to NVRAM. If you answer "no", the configuration will
not be saved & the process will begin again.
If a --More-- prompt appears, press the space bar to continue.
5.2.2 Setting up global parameters

After viewing the current interface summary, a prompt will appear on your monitor, indicating that you are
to enter the global parameters for your router. These parameters are the configuration values you select.
A prompt appears on your monitor, as illustrated in Figure . It indicates that you are to enter the global
parameters that you set for your router. These parameters are the configuration values you decided on.
The first global parameter allows you to set the router host name. This host name will be part of the Cisco
IOS prompts for all configuration modes. At initial configuration, the router name default will be displayed
between square brackets as [Router].
Use the next global parameters shown in the graphic to set the various passwords used on the router. You
must enter an enable password. When you enter a string of password characters for the prompt, "Enter
enable secret"; the characters are processed by Cisco proprietary encryption. This enhances the security of
the password string. Whenever anyone lists the contents of the router configuration file, this enable
password appears as a meaningless string of characters.
Setup recommends, but does not require, that the "enable password" be different from the "enable secret
word". The "enable secret word" is a one-way cryptographic secret word that is used instead of the "enable
password" when it exists. The "enable password" is used when no "enable secret word" exists. It is also
used when using older versions of the IOS. All passwords are case sensitive & can be alphanumeric.
When you are prompted for parameters for each installed interface, as shown in Figure , use the
configuration values that you have selected for your router. Whenever you answer yes to a prompt,
additional questions may appear regarding the protocol.
5.2.3 Setting up interface parameters
When you are prompted for parameters for each installed interface, you need to use the configuration
values you have determined for your interface to enter the interface parameters at the prompts.

5.2.4 Setting up script review & use
When you complete the configuration process for all installed interfaces on your router, the setup
command program will display the configurations that you have created. The setup process will then ask if
you want to use this configuration. If you answer yes, the configuration will be executed & saved to
NVRAM. If you answer no, the configuration will not be saved, & the process will begin again. There is no
default for this prompt; you must answer either yes or no. After you have answered yes to the last question,
your system will be ready to use. If you want to modify the configuration you have just established, you
must do the configuration manually.
The script tells you to use the configuration mode to change any commands after setup has been used. The
script file generated by setup is additive; you can turn features on with setup, but you cannot turn them off.
Also, setup does not support many of the advanced features of the router, or features that require a more
complex configuration.
Chapter Summary
      The router initializes by loading a bootstrap, the operating system, & a configuration file.
      If the router cannot find a configuration file, the router enters setup mode.
      The router stores a backup copy of the new configuration from setup mode in NVRAM.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/




In the "Router Startup & Setup" chapter, you learned how to start a router for the first time by using the
correct commands & startup sequence to do an initial configuration of a router. In this chapter, you will
learn to use router modes & configuration methods to update a router's configuration file with current &
prior versions of Cisco Internetwork Operating System (IOS) software.
6.1 Router Configuration Files

6.1.1 Router configuration file info




In this section, you will learn how to work with configuration files that can come from the console,
NVRAM, or TFTP server. A router uses the following info from the configuration file when it starts up:
      Cisco IOS software version
      Router identification
      Boot file locations
      Protocol info
      Interface configurations
The configuration file contains commands to customize router operation. The router uses this info when it
starts up. If there is no configuration file available, the system configuration dialog setup guides you
through the process of creating one.




                                                                             6.1.2 Working with Release
                                                                             11.x configuration files
                                                                             Router configuration info can
                                                                             be generated by several means.
                                                                             You can use the privileged

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/

EXEC configure command to configure from a virtual (remote) terminal, a modem connection, or a
console terminal. This allows you to enter changes to an existing configuration at any time. You can also
use the privileged EXEC configure command to load a configuration from a network TFTP server, which
allows you to maintain & store configuration info at a central site. The following list describes briefly some
of the configuration commands:
      configure terminal -- configures manually from the console terminal
      configure memory -- loads configuration info from NVRAM
      copy tftp running-config -- loads configuration info from a network TFTP server into RAM
      show running-config -- displays the current configuration in RAM
      copy running-config startup-config -- stores the current configuration from RAM into NVRAM
      copy running-config tftp -- stores the current configuration from RAM on a network TFTP
         server
      show startup-config -- displays the saved configuration, which is the contents of NVRAM
      erase startup-config -- erases the contents of NVRAM

6.1.3 Working with pre-Release 11.0 configuration files

The commands shown in the Figure are used with Cisco IOS, Release 10.3 & earlier. They have been
replaced with new commands. The old commands that have been replaced continue to perform their normal
functions in the current release, but are no longer documented. Support for these commands will cease in a
future release.

6.1.4 Using the copy running-config tftp & copy tftp running-config commands

You can store a current copy of the configuration on a TFTP server. You use the copy running-config tftp
command, as shown in Figure , to store the current configuration in RAM, on a network TFTP server. To
do so, complete the following tasks:
      Step 1 -- Enter the copy running-config tftp command.
      Step 2 -- Enter the IP address of the host that you want to use to store the configuration file.
      Step 3 -- Enter the name you want to assign to the configuration file.
      Step 4 -- Confirm your choices by answering yes each time.
You can configure the router by loading the configuration file stored on one of your network servers. To do
so, complete the following tasks:
     1. Enter configuration mode by entering the copy tftp running-config command.
     2. At the system prompt, select a host or network configuration file. The network configuration file
         contains commands that apply to all routers & terminal servers on the network. The host
         configuration file contains commands that apply to one router in particular. At the system prompt,
         enter the optional IP address of the remote host from which you are retrieving the configuration
         file. In this example, the router is configured from the TFTP server at IP address 131.108.2.155.

    3.  At the system prompt, enter the name of the configuration file or accept the default name. The
        filename convention is UNIX-based. The default filename is hostname-config for the host file &
        network-config for the network configuration file. In the DOS environment, the server filenames
        are limited to eight characters plus a three-character extension (for example, router.cfg). Confirm
        the configuration filename & the server address that the system supplies. Notice in the figure that
        the router prompt changes to tokyo immediately. This is evidence that the reconfiguration happens
        as soon as the new file is downloaded.
6.1.5 Describe using NVRAM with Release 11.x.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                              http://www.wordwendang.com/en/

                                                                   These commands manage the
                                                                   contents of NVRAM: (see Figure)
                                                                        configure memory --
                                                                            Loads configuration info
                                                                            from NVRAM.
                                                                        erase startup-config --
                                                                            Erases the contents of
                                                                            NVRAM.
                                                                        copy running-config
                                                                            startup-config -- Stores
                                                                            the current configuration
                                                                            from RAM (the running
                                                                            configuration) into
                                                                            NVRAM (as the startup or
                                                                            backup configuration).
                                                                        show startup-config --
                                                                            Displays the saved
                                                                            configuration, which is the
                                                                            contents of NVRAM.



6.1.6 Using NVRAM with Pre-11.0 IOS software
                                                                     The commands shown in the
                                                                     Figure are used with Cisco IOS,
                                                                     Release 10.3 & earlier. These
                                                                     commands have been replaced
                                                                     with new commands. The
                                                                     commands that have been
                                                                     replaced continue to perform
                                                                     their normal function in the
                                                                     current release, but are no longer
                                                                     documented. Support for these
                                                                     commands will cease in a future
                                                                     release.




6.2 Router Configuration Modes

6.2.1 Using router configuration modes
The EXEC mode interprets the commands you type & carries out the corresponding operations. You must
log into the router before you can enter an EXEC command. There are two EXEC modes. The EXEC
commands available in user mode are a subset of the EXEC commands available in privileged mode. From


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

privileged mode, you can also access global configuration mode & specific configuration modes, some of
which are listed here:
      Interface
      Subinterface
      Controller
      Map-list
      Map-class
      Line
      Router
      IPX-router
      Route-map
If you type exit, the
router will back out one
level, eventually
allowing you to log out.
In general, typing exit
from one of the specific
configuration modes
will return you to global
configuration mode.
Pressing Ctrl-Z leaves
configuration mode
completely & returns
the router to privileged
EXEC mode.



6.2.2 Global configuration modes
Global configuration commands apply to
features that affect the system as a whole. You
use the privileged EXEC command configure
to enter global configuration mode. When you
enter this command, the EXEC prompts you for
the source of the configuration commands.
You can then specify the terminal, NVRAM, or
a file stored on a network server as the source.
The default is to type in commands from the
terminal console. Pressing the return key begins
this configuration method.
Commands to enable a particular routing or
interface function begin with global
configuration commands:
       To configure a routing protocol
           (indicated by the prompt config-
           router) you first enter a global router
           protocol command type.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/




       To configure an interface (indicated by the prompt
        config-if) you first enter the global interface type &
        number command. After entering commands in any
        of these modes, you finish with the command exit.




6.2.3 Configuring routing protocols

                                                                  After a routing
                                                                  protocol is enabled
                                                                  by a global
                                                                  command, the
                                                                  router configuration
                                                                  mode prompt
                                                                  Router (config-
                                                                  router)# is
                                                                  displayed as shown
                                                                  in the figure. You
                                                                  type a question
                                                                  mark (?) to list the
                                                                  routing protocol
                                                                  configuration sub-
                                                                  commands.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/




6.2.4 Interface configuration commands

Because all router interfaces are
automatically in the administratively
down mode, many features are enabled on
a per-interface basis. Interface
configuration commands modify the
operation of an Ethernet, a Token Ring, or
a serial port. In addition, interface
subcommands always follow an interface
command because the interface command
defines the interface type.




6.2.5 Configuring a specific interface




The Figure shows commands that are examples of how to complete common interface tasks. The first set of
commands is associated with interfaces. On serial links, one side must provide a clocking signal, a DCE;
the other side is a DTE. By default, Cisco routers are DTE devices, but in some cases they can be used as
DCE devices. If you are using an interface to provide clocking, you must specify a rate with the clockrate
command. The bandwidth command overrides the default bandwidth that is displayed in the show
interfaces command & is used by some routing protocols such as IGRP.
The second set of commands is associated with the Cisco 4000 series routers. On the Cisco 4000, there are
two connections on the outside of the box for Ethernet interfaces-an attachment unit interface (AUI)
connector & a 10BASE-T connector. The default is AUI, so you must specify media-type 10BASE-T if
you want to use the other connection.




6.3 Configuration methods
6.3.1 Release 11.x configuration methods




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/




The Figure shows a way you can:
      Enter configuration statements
      Examine the changes you have made
      If necessary, modify or remove configuration statements
      Save the changes to a backup in NVRAM that the router will use when it starts up
6.3.2 Pre-Release 11.0 configuration methods




The commands shown in the Figure are used with Cisco IOS, Release 10.3 & earlier. They have been
replaced with new commands. The old commands that have been replaced continue to perform their normal
function in the current release, but are no longer documented. Support for these commands will cease in a
future release.
6.3.3 Password configuration methods




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/




You can secure your system by using passwords to restrict access. Passwords can be established both on
individual lines & in the privileged EXEC mode.
      line console 0 -- establishes a password on the console terminal
      line vty 0 4 -- establishes password protection on incoming Telnet sessions
      enable password -- restricts access to privileged EXEC mode
      enable secret password (from the system configuration dialog to set up global parameters -- uses a
         Cisco proprietary encryption process to alter the password character string
You can further protect passwords from being displayed by using the service password-encryption
command. This encryption algorithm does not match the Data Encryption Standard (DES).
6.3.4 Router identification configuration


The configuration of network devices determines
the network's behavior. To manage device
configurations, you need to list & compare
configuration files on running devices, store
configuration files on network servers for shared
access, & perform software installations &
upgrades.
One of your first basic tasks is to name your
router. The name of the router is considered to be
the host name & is the name displayed by the
system prompt. If you do not configure a name,
the system default router name will be Router.
You can name the router in global configuration
mode. In the example shown in the Figure, the
router name is Tokyo.
You can configure a message-of-the-day banner
to be displayed on all connected terminals. This



 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/

banner will be displayed at login & is useful for conveying messages that affect all router users (e.g.
impending system shutdowns). To configure this message, use the banner motd command in the global
configuration mode.
Chapter Summary
Configuration files can come from the console, NVRAM, or TFTP server. The router has several modes:
     privileged mode -- used for copying & managing entire configuration files
     global configuration mode -- used for one-line commands & commands that change the entire
        router
     other configuration modes -- used for multiple command lines & detailed configurations
The router provides a host name, a banner, & interface descriptions that aid in identification.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                        http://www.wordwendang.com/en/




Please go to http://www.wordwendang.com/en/, where you can download million word
                                  documents .
                        http://www.wordwendang.com/en/




Please go to http://www.wordwendang.com/en/, where you can download million word
                                  documents .
                                 http://www.wordwendang.com/en/



3 OSI Model
3.1 Layers of communication
Data packet  a logically grouped unit of info that moves between computer systems
International Organization for Standardization (ISO)  researches network schemes (like TCP/IP) &
created the OSI (Open Systems Interconnection) reference model (1984) to set standards/ensure
compatibility (within a multi-vendor environment).

3.2 OSI Model
(in the PAST he Never Did Pass)
7. Application  network processes to applications  (eg: browsers, telnet & electronic mail)
6. Presentation  data representation  (common data format & negotiates data transfer syntax for
application layer)
5. Session  interhost communication  (establishes, manages & terminates session between
applications, + does exception reporting & class of service)
4. Transport  end-to-end communication  (info flow control & fault detection, + establishes,
maintains & terminates virtual circuits & does error correction)
3. Network  address & best path  (connectivity & path selection between end systems, routing &
domain & addressing)
2. Data Link  access to media  (frames & media access control, reliable transfer of data over media)
1. Physical  binary transmission  (signals, timing & media + voltage, data rates etc)
[note: Layer 1-3 deal with hardware; Layers 4-7 deal with software.]

Encapsulation  process of packaging data
so it can be sent from one computer to
another.
Encapsulation wraps data with the necessary
protocol info before network transit. , as
the data packet moves down through the
layers of the OSI model, it receives headers,
trailers, & other info.
[note: the word "header"  means address
info has been added.]


Build the data  user sends e-mail;
alphanumeric characters are converted to
data that can travel across internetwork.
Package the data for end-to-end transport
 data is packaged into segments  ensures the message hosts at both ends can reliably communicate.
Append (add) network address to the header  data is put into a packet or datagram that contains a
network header with source & destination logical addresses. These addresses help network devices send the
packets across the network along a chosen path.
Append (add) local address to the data link header  each network device must put the packet into a
frame  each device in the chosen network path requires framing for it to connect to the next device.
Convert to bits for transmission  The frame is converted to bits for transmission, & a clocking function
enables devices to distinguish these.
note: The physical medium can vary along path (eg: e-mail message originates on a LAN, crosses a
campus backbone, goes out a WAN link & reaches its destination on another remote LAN). Headers &
trailers are added as data moves down through the layers of the OSI model.


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

In order for data packets to travel from source to destination, each OSI layer at the source must
communicate with its peer layer at the destination  “Peer-to-Peer Communications”. During this process,
each layer’s protocol exchanges info, called protocol data units (PDUs), between peer layers.

As data packets travel, each layer depends on the service function of the OSI layer below it  the lower
layer uses encapsulation to put the PDU from the upper layer into its data field; then it adds whatever
headers & trailers the lower layer needs to perform its function.
[note: Layer 4 PDU = “segment”.]


3.3 OSI model compared to TCP/IP
The historical & technical open standard of the Internet is Transmission Control Protocol/Internet Protocol
(TCP/IP).

The four layers: (A TIN)
Application Layer  handles: high-level protocols, issues of representation, encoding, & dialog control
 combining all application-related issues & assures data is properly packaged for the next layer.

Transport Layer  deals with quality-of-service issues: reliability, flow control, & error correction. TCP
is a connection-oriented protocol  provides flexible ways to create reliable, well-flowing, low-error
network communications. It dialogues between source & destination while packaging application layer
info into units called segments. Connection-oriented means that Layer 4 segments travel back & forth
between two hosts to acknowledge the connection exists for some period  this is known as packet
switching.

Internet Layer  sends packets over internetwork & have them arrive independent of the path &
networks they took to get there. The specific protocol that governs this layer = Internet protocol (IP). Best
path determination & packet switching occur at this layer.

Network Access Layer  (also called the host-to-network layer)  concerned with how IP packets make
physical links. It includes the LAN & WAN technology details, & all the details in the OSI physical & data
link layers.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/


     FTP - File Transfer Protocol
     HTTP - Hypertext Transfer Protocol
     SMTP - Simple Mail Transfer protocol
     DNS - Domain Name System
     TFTP - Trivial File Transfer Protocol




This chapter described: how layers are used for general forms of communication. You learnt that: Data
travels from a source to a destination over media. A protocol is a formal description of a set of rules &
conventions that govern how devices on networks exchange info.
You learned:
      The OSI reference model is a descriptive network scheme whose standards ensure greater
          compatibility & interoperability between various types of network technologies.
      The OSI reference model organizes network functions into 7 numbered layers:
          o 7  application layer
          o 6  presentation layer
          o 5  session layer
          o 4  transport layer
          o 3  network layer
          o 2  data link layer
          o 1  physical layer
      Encapsulation is the process in which data is wrapped in a particular protocol header before it is
          sent across the network.
      During Peer-to-Peer Communications, each layer's protocol exchanges info, called protocol data
          units (PDUs), between peer layers.
You learned: about the TCP/IP model & how it compares to the OSI model.




3.4 IP address classes
IP address classes
There are 3 classes of IP addresses that an organization can receive from the American Registry for Internet
Numbers (ARIN) (or the organization's ISP):            Class A, B & C




    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                  http://www.wordwendang.com/en/

ARIN now reserves Class A addresses for governments throughout the world (although a few large
companies, including Hewlett Packard, have received one in the past) & Class B addresses for medium-
sized companies. All other requestors are issued Class C addresses.

Class A                              eg: 124.95.44.15.
 First (leftmost) bit is 0.
 First octet = 0 to 126             (127 does start with 0 bit, but is reserved for special purposes.)

     First octet (8 bits) = network portion  assigned by ARIN & identifies network number
     Last three octets (24 bits) = host portion  assigned by internal administrators of network
     Every Class A network has 16,777,214 {224 – 2} possible IP addresses/network devices.

Class B                           eg: 151.10.13.28.
 First 2 bits = 1 0 (one & zero)
 First octet = 128 to 191

     First two octets (16 bits) = network portion  assigned by ARIN & identifies network number
     Last two octets (16 bits) = host portion  assigned by internal administrators of network
     Every Class B network has 65,534 {216 – 2} possible IP addresses/network devices.

Class C                            eg: 201.110.213.28
 First 3 bits = 1 1 0 (one, one & zero).
 First octet = 192 to 223

     First three octets (24 bits) = network portion  assigned by ARIN & identifies network number
     Last octet (8 bits) = host portion  assigned by internal administrators of network
     Every Class B network has only 254 {28 – 2} possible IP addresses/network devices.




3.5 Reserved address space
Purposes for network IDs & broadcast addresses
An IP address with binary 0s in all host bits is reserved for the network address (or wire address).
                 eg: 113.0.0.0 is the IP address of the (Class A) network containing the host 113.1.2.3.

    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                 http://www.wordwendang.com/en/

                  eg: 176.10.0.0 (Class B).

For broadcast address (data sent to & looked at by all devices on particular network)  IP address has
binary 1s in all host bits.
                  eg: For (176.10.0.0) use 176.10.255.255

note: for security, the all networks all hosts address (255.255.255.255) is not forwarded beyond local
network by routers.

A network ID enables a router to put a packet onto the appropriate network segment (think ZIP code). The
host ID helps the router address the Layer 2 frame (encapsulating the packet) to the specific host on that
network (think street address).


3.6 The basics of subnetting
Subnetwork
note: outside world sees our network as a single network & has no detailed knowledge of internal structure.
This helps keep routing tables small because the rest of the world only needs to know one network number
to reach us.

Network administrators sometimes need to divide networks (especially large ones) into smaller networks.
These smaller divisions are called subnetworks (or “subnets”) & provide addressing flexibility.

Similar to the host # portion of Class A, B, &C addresses, subnet addresses are assigned locally (usually by
the network administrator). Like other IP addresses, each subnet address is unique.

Primary reason for subnetting: to reduce the size of a broadcast domain (especially when broadcast traffic
begins to consume too much available bandwidth & network delays become significant).

Subnet mask
The subnet mask (formal term: extended network
prefix), is not an address, but determines which part of
an IP address is the network field & which part is the
host field. A subnet mask is 32 bits long & has 4 octets,
just like an IP address.
To determine the subnet mask follow these steps:
          (1) Express subnetwork IP address in binary
          form. (2) Replace network & subnet portion of
          the address with all 1s. (3) Replace host
          portion of the address with all 0s. (4) As the
          last step convert the binary expression back to
          dotted-decimal notation.

note: The extended network prefix includes the class A,
B, or C network number, plus the subnet field (or subnet number) that is being used to extend the routing
info (which is otherwise just the network number).




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                   http://www.wordwendang.com/en/

Boolean operations: AND, OR, & NOT
Decimal number operations include addition, subtraction, multiplication & division. There are related, but
different, operations for binary numbers. The basic Boolean operations are: AND, OR, & NOT.
      AND  is like multiplication
      OR is like addition
      NOT  changes 1 to 0, & 0 to 1


Performing the & function
The lowest numbered address in an IP network is the network
address (the network number &0 in the entire host field). This
also applies to a subnet: the lowest numbered address is the
address of the subnet.

In order to route a data packet, the router must first determine
the destination network/subnet address by performing a logical
& using the destination host's IP address & the subnet mask 
the result will be the network/subnet address.
[In the Figure, the router has received a packet for host
131.108.2.2 - it uses the & operation to learn that this packet
should be routed to subnet 131.108.2.0.]

                                                                                            (see: prac 10.6.6?)

3.7 Creating a subnet
                                                                                  (remember prac exercises)
Range of bits needed to create subnets

To create subnets: must extend routing portion of address (so routers within your organization can
recognize different locations, or subnets, within the whole network).
    1. Q: In the address 131.108.0.0, which are the routing bits?
         A: 131.108 – (Class B ).
    2. Q: What are the other two octets (16 bits) of the address 131.108.0.0 used for?
         A: host field.

     To create subnets  must divide original host field (16 bits for Class B) into two parts - the subnet
      field & the host field  "borrowing" original host bits to create the subnet field.
     The minimum # of bits that you can borrow (for subnet) is 2 – regardless of class (A, B, or C).
     At least 2 bits must remain for host numbers ie:
                                  Address Size of Default   Max #
                                  Class   Host Field        Subnet Bits
                                  A        24               22
                                  B        16               14
                                  C        8                6




    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                 http://www.wordwendang.com/en/




The subnet mask is the tool used by the router to determine
which bits are routing bits & which bits are host bits.

For any subnet of length N bits:
      The lowest value (all 0s) is part of the network address & the highest value (all 1s) would be part
         of the network broadcast address. These two value are reserved/unusable subnets.
       there can be (2N) possible subnet, BUT only (2N – 2) useable/valid subnets.
      note: 1 bit long subnet has 0 useable subnets  this is why subnets always borrow at least 2 bits.


Determining subnet mask size
Subnet masks use the same format as IP addresses (32 bits long & divided into 4 octets, represented in
dotted decimal format).
note: By default, (if you borrow no bits) the subnet mask for a Class B network would be 255.255.0.0.

eg1: subnet mask = 255.255.255.0 (for Class B) & address = 130.5.2.144
         8 bits borrowed  router will route this packet to subnet 130.5.2.0.

eg2: subnet mask = 255.255.255.224 (Class C) & address = 197.15.22.131 (last octet = 10000011)
         network portion has been extended by 3 bits (= total 27 bits). The 131 in the last octet now
        represents the third usable host address (100) in the subnet 197.15.22.128.
        [note: routers in the Internet (unaware of subnet mask) will only worry about routing to the Class
        C network 197.15.22.0, while routers inside that network, knowing the subnet mask, will look at
        27 bits to make a routing decision]




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/



4 Layer 3 – Protocols
4.1 Layer 3 devices
Revision: There are two addressing schemes: one uses MAC addresses at Layer 2; the other uses an
address at Layer 3 (eg: IP addresses  sometimes called “protocol addresses” or “network addresses” 
implemented in software)
A router uses Layer 3 addresses  & has the ability to make intelligent decisions regarding best path.

MAC addresses/physical addresses
   usually assigned by the NIC manufacturer & hard-coded into the NIC
   used (primarily) to connect network segments

IP addresses
     usually assigned by network administrator (implemented in software & easy to change).
     used to connect separate networks & to access the Internet, by using end-to-end routing.
     often a network administrator will group devices together in the IP addressing scheme, according
         to their geographical location, department, or floor (within building).




Unique network numbers
Routers connect 2 or more networks, each of which must have a unique network number (which is
incorporated into the IP address that is assigned to each device attached to that network).

eg: A network has a unique network number - A. It has four devices attached to it - IP addresses A2, A3,
A4, & A5. Since the interface where the router connects to a network is considered to be part of that
network, the interface where the router connects to
network A has an IP address of A1.

eg: You want to send data from network A to network
B (see diagram). When data frames, coming from
network A, reaches the router, the router performs the
following functions:
     1. It strips off the data link header, carried by the
         frame.
     2. It examines the network layer address to
         determine destination network.
     3. It consults its routing tables to determine
         which of its interfaces to send the data.
     4. It encapsulated data into appropriate data link
         frame & sends



 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

note: A router’s attachment to a network is called an interface (or
port). In IP routing, each interface must have a separate, unique
network (or subnetwork) address


4.2 Network-to-network
    communications
Methods for assigning an IP address

After determining addressing scheme, you must choose the method for assigning addresses to hosts.
There are 2 methods for assigning IP addresses  static addressing & dynamic addressing.
(either way, all IP addresses must be unique)

Static Addressing  you must go to each individual device & configure it with an IP address  
meticulous records imperative (duplicate IP addresses = problems). Some operating systems, such as
Windows 95 & Windows NT, send an ARP request to check for duplicate IP addresses when attempting to
initialize TCP/IP. If duplicates discovered  error message generated & OS does not initialize TCP/IP.

Dynamic Addressing  there are a few different methods for dynamically assigning IP addresses.
Examples:

     Reverse Address Resolution Protocol (RARP)  binds MAC addresses to IP addresses – allowing
      some network devices to encapsulate data before sending on the network.
      eg: a source (perhaps a diskless workstation) wants to send data to another device…. it knows its own
      MAC address, but is unable to locate its own IP address in its ARP table (cannot pass data to higher
      layers  problem).

      The source sends a RARP request packet using a broadcast IP address (so all devices will see it). [note:
      RARP uses the same packet format as ARP, except the MAC headers, IP headers & “operation code”
      are different]
      The RARP packet format contains places for
      MAC addresses of both destination & source.
      The source IP address field is empty & the
      destination IP address is all 1s.
      Devices using RARP require that a RARP server
      be present on the network to answer RARP
      requests. Workstations running RARP have
      codes in ROM that direct them to start the RARP
      process, & locate the RARP server.

     BOOTstrap Protocol (BOOTP)  used by devices to obtain IP
      address when they start up.
      BOOTP uses UDP to carry messages; the UDP message is
      encapsulated in an IP datagram. A computer uses BOOTP to
      send a broadcast IP datagram (using destination IP address
      255.255.255.255 – all 1s)  a BOOTP server receives the
      broadcast & then sends a broadcast. The client receives a
      datagram & checks the MAC address  if it finds its own MAC
      address in the destination address field, then it takes the IP
      address in that datagram.

      Like RARP, BOOTP operates in a client-server environment, &
      only requires a single packet exchange. However, unlike RARP,
      which only sends back a 4 octet IP address, BOOTP datagrams

    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                   http://www.wordwendang.com/en/

      can include the IP address, the address of a router (default gateway), the address of a server, & a
      vendor-specific field. One of the problems with BOOTP is that it was not designed to provide dynamic
      address assignment. With BOOTP you create a configuration file that specifies the parameters for each
      device.

     Dynamic Host Configuration Protocol (DHCP)  proposed as a successor to BOOTP.
      Unlike BOOTP, DHCP allows a host to obtain an IP address quickly &
      dynamically. All that is required using DHCP is a defined range of IP addresses
      on a DHCP server. As hosts come online they contact the DHCP server &
      request an address. The DHCP server chooses an address & allocates it to that
      host. With DHCP, the entire computer’s configuration can be obtained in one
      message (eg: along with the IP address, the server can also send a subnet mask)

      DHCP initialization sequence
      When a DHCP client boots, it enters an initialize state. It sends
      DHCPDISCOVER broadcast messages, which are UDP packets with the port
      number set to the BOOTP port. Next, the client moves into the select state &
      collects DHCPOFFER responses from DHCP server. The client then selects the
      first response it receives & negotiates lease time (length of time it can keep the
      address without renewing it) with the DHCP server by sending a
      DHCPREQUEST packet. The DHCP server acknowledges a client request with
      a DHCPACK packet. The client can now enter the bound state & begin using
      the address.

IP key components
To communicate: sending devices need IP addresses & MAC addresses of destination  when they try to
communicate with devices whose IP addresses they know, they must determine the MAC addresses.
The TCP/IP suite has a protocol, called ARP, that can automatically obtain MAC address. ARP enables a
computer to find the MAC address of the computer that is associated with an IP address.

Note: The basic unit of data transfer in IP = the IP packet (unique to IP). Packet processing occurs in
software, which means that content & format are not hardware dependent. A packet is divided into two
major components: the header (which includes source & destination addresses); & the data. Other types of
protocols have their own formats.

Note: Another major component of IP is Internet Control Message Protocol (ICMP)  used by a device to
report a problem to the sender of a message. [eg: if a router receives a packet that it cannot deliver, it sends
a message back to the sender of the packet]. One of the many features of ICMP is echo-request/echo-reply,
which is a component that tests whether a packet can reach a destination by pinging the destination.




    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                  http://www.wordwendang.com/en/

Function of the address resolution protocol (ARP)
A data packet must contain both a destination MAC address & a destination IP address  if it lacks either
the data will never pass from Layer 3 to the upper
layers. note: In this way, MAC addresses & IP
addresses act as checks & balances for each other. After
devices determine the IP addresses of the destination
devices, they can add the destination MAC addresses to
the data packets.

To determine MAC addresses (needed in data
encapsulation), some devices keep ARP tables.

Address Resolution Protocol (ARP) tables  contain
all MAC & IP addresses of other devices connected to
the same LAN  ARP tables are sections of RAM
memory in which cached memory is maintained
automatically on each of the devices. [note: it is a rare
occasion when you must make an ARP table entry
manually]. Each computer on a network maintains its
own ARP table. Whenever sending data across a
network, a source device consults its ARP table to
locate the MAC address for the destination  if it
locates an entry (destination IP address to destination MAC
address), it binds, or associates, the IP address to the MAC
address & uses it to encapsulate the data. The data packet is
then sent.


ARP operation within a subnet
If a source is unable to locate a MAC address for the destination in its
own ARP table, the host initiates a process called an ARP request.

ARP request  enables source to discover the destination MAC address.
A host builds an ARP request packet & sends it to all devices on the
network using a broadcast MAC address.
If the IP address of a device matches the destination IP address in the
ARP request, that device responds by sending the source its MAC address
 this is known as the ARP reply.

eg: Source device 197.15.22.33 wants the MAC address of the destination
with IP address 197.15.22.126. The destination picks up ARP request &
sends ARP reply containing its MAC address.
The source receives this & extracts the MAC address from the MAC
header, & updates its ARP table  it can now properly address &
encapsulate its data with a destination MAC & IP address.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/



4.3 Advanced ARP concepts
Default gateway
In order for a device to communicate with another device on
another network, you must supply it with a default gateway 
that is: the IP address of the interface on the router that connects
to the network segment on which the source host is located. (the
default gateway’s IP address must be in the same network
segment as the source host).
If no default gateway is defined: communication is possible only
on the device’s own logical network segment. The computer that
sends the data does a comparison between the IP address of the destination & its own ARP table. If it finds
no match, it must have a default IP address to use. without a default gateway, the source has no
destination MAC address, & the message is undeliverable.


Problems with sending data to nodes on different subnets
Major networking problem: how to communicate with devices on different physical network segments.
There are two parts to the problem:
     the first is obtaining the MAC address of the destination host &
     the second is transferring the data packets from one network segment to another, to get to the
         destination host.

How ARP sends data to remote networks
ARP uses broadcast packets to accomplish its function. Routers, however, do not forward broadcast
packets.
In order for source to send data to the address of a device on another network segment, the source device
sends the data to a default gateway (ie: the IP address of the router interface that is connected to the same
physical network segment as the source). The source host compares the destination IP address & its own IP
address to determine if the two IP addresses are located on the same segment  if not, source will send
data to the default gateway.

Proxy ARP
Proxy ARP  a variation of the ARP protocol. In this case, an intermediate device (eg: router) sends an
ARP response, on behalf of an end node, to the requesting host. Routers running proxy ARP capture ARP
packets.
When router picks up an ARP request it compares the IP destination address with the IP subnet address to
determine if destination IP address is on the same subnet as the source.
If subnet address is the same, router discards packet.
If subnet address is different, router responds with its own MAC address for the interface directly
connected to the segment containing source host  this is the proxy ARP. Since the MAC address is
unavailable for the destination host, the router supplies its MAC address in order to get the packet. Then the
router can forward the ARP request (based on the destination IP address) to the proper subnet for delivery.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/



4.4 Routable protocols
IP is a network layer protocol, & because of that, it can be routed over an internetwork (a network of
networks). Protocols that provide support for the network layer are called routed or routable protocols.

IP is the most common routable protocol – two others are: IPX/SPX & AppleTalk.

Protocols that do not support Layer 3 are classed as non-routable protocols  the most common of these is
NetBEUI – a small, fast, & efficient protocol limited to running on one segment.




Characteristics of a routable protocol
In order for a protocol to be routable, it must provide ability to assign a network number & host number, to
each individual device. Some protocols, such as IPX, only require that you assign a network number,
because they use a host’s MAC address for the physical number. Other protocols, such as IP, require that
you provide a complete address, as well as a subnet mask  the network address is obtained by ANDing
the address with the subnet mask.


4.5 Routing protocols
Examples of routing protocols
Routing protocols (note: Different from routed protocols) determine the paths that routed protocols follow
to their destinations.
Examples of routing protocols include:
           RIP - Routing Information Protocol
           IGRP - Interior Gateway Routing Protocol
           EIGRP - Enhanced Interior Gateway Routing Protocol
           OSPF - Open Shortest Path First

Routers use routing protocols to exchange routing tables & share routing info  enabling connected
routers to create a map, internally, of other routers in the network or on the Internet. This allows routing (ie:
best path & switching) to occur.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/

Definition of routing protocol
Routing Information Protocol (RIP)  (which is an Interior Gateway Protocol (IGP)).
 Is the most common protocol to transfer routing info between routers on the same network.
 Allows routers to determine which path to use, using distance-vector concept  it calculates distances
    (to destination host) in hops.
 note: hop count = how many routers data must go through (&  how many new network number). If
    multiple paths  one with least # hops is chosen.
 Routers (using RIP) update their routing tables at programmable intervals – usually every 30 seconds.
 One disadvantage: routers are constantly connecting to neighboring routers (to update their routing
    tables)  much network traffic.
 note: hop count alone doesn’t necessarily select fastest
    path  other routing protocols use many other metrics
    (besides hop count) to find the best path. Nevertheless,
    RIP (one of the earliest routing protocols) remains very
    popular & widely implemented.
 Another problem of using RIP: the max # of hops that
    data can be forwarded = 15   if a destination is >
    15 hops away then it is unreachable.


Revision: A router receives a frame, strips off the frame header, then checks the destination IP address in
the IP header. The router then looks for that destination IP address in its routing table, encapsulates the data
in a data link layer frame, & sends it out to the
appropriate interface. If it does not find the
destination IP address, it may drop the packet.

Multi-protocol routing
Routers are capable of concurrently supporting
multiple independent routing protocols, & of
maintaining routing tables for several routed
protocols. This capability allows a router to
deliver packets from several routed protocols
over the same data links.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/



4.6 Other network layer services
Connectionless network services
Connectionless delivery system  (referred to as packet
switched)  destination is not contacted before a packet is sent.
 Used by most network services
 They treat each packet separately, & send it on its way
    through the network. Packets may take different paths
    through network & (possibly) arrive out of order, but are
    reassembled when they arrive at the destination.
 Analogy: Postal system – recipient is not contacted before a
    letter is sent – recipient learns of the letter when it arrives.
 Devices make path determination for each packet based on a
    variety of criteria – & some of the criteria (eg: available
    bandwidth) may differ from packet to packet.

Connection-oriented network services
Connection-oriented systems  (referred to as circuit switched)
 a connection is established between sender & recipient before
any data is transferred.
 All packets travel sequentially across the same physical
    circuit, or more commonly, across the same virtual circuit.
 eg: Telephone system  you place a call, a connection is established, & then communication occurs.

note: The Internet is one huge connectionless network where all packet deliveries are handled by IP. TCP
(Layer 4) adds connection-oriented services on top of IP (Layer 3). TCP segments are encapsulated into IP
packets for transport across the Internet. TCP provides connection-oriented session services to reliably
deliver data.

IP & the transport layer
IP is a connectionless system; it treats each packet independently. eg: if you use an FTP program to
download a file, IP does not send the file in one long stream of data. Each sent packet independently &
some may even get lost. IP relies on the transport layer protocol to determine whether packets have been
lost, & to request retransmission. The transport layer is also responsible for reordering the packets


4.7 ARP tables
Internetworking devices that have ARP tables

revision: the port, or interface, where a router connects to a
network, is considered part of that network; the router
interface connected to the network has an IP address for that
network. Routers, just like every other device on the network,
send & receive data on the network, & build ARP tables
that map IP addresses to MAC addresses.

Comparing router ARP tables with ARP tables kept
by other networking devices
Routers can be connected to multiple networks, or
subnetworks. Generally speaking, network devices map
the IP addresses & MAC addresses that they see on a
regular & repeated basis  a typical device contains
mapping info only about devices on its own network.

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                   http://www.wordwendang.com/en/


Routers build tables that describe all networks connected to them. ARP tables kept by routers can contain
IP addresses & MAC addresses of devices located on more than one network.
In addition to mapping IP addresses to MAC addresses, router tables also map ports.
Destination Network         Router Port
201.100.100.0               201.100.100.1
201.100.101.0               201.100.101.1
201.100.120.0               201.100.120.1
201.100.150.0               201.100.150.1


Other router table addresses
A router has IP & MAC addresses of devices located on its connected networks & the IP & MAC addresses
of other routers.
If a data packet reaches a router that does not connect to destination network: it forwards it to another
router that most likely does contain info about the destination host in its routing table.

ARP requests & ARP replies
revision: ARP is used only on a local network.
When a router does not know the MAC address of the next-hop router (a non-local router), the source
router (router that has the data to be sent on) issues an ARP request. A router that is connected to the same
segment as the source router receives the ARP request. This router issues an ARP reply to the router that
originated the ARP request containing the MAC address of the non-local router.

Proxy ARP
A device on one network cannot send an ARP request to a device on another network.
However, a device on one subnetwork can find the MAC address of a device on another subnetwork,
provided the source directs its question to the router. Working through a third party is called proxy ARP, &
allows the router to act as a default gateway.

Indirect routing
revision: Sometimes a source resides on a network that has
a different network number than the (desired) destination. If
the source doesn’t know the MAC address of the destination
it must use the services of a router  a router that is used
for this purpose is called a default gateway.

To obtain the services of a default gateway, a source
encapsulates the data so it contains the destination MAC
address of the router. A source uses the destination IP
address of the host device, & not that of a router, in the IP
header, because it wants the data delivered to the host
device & not to a router.

When a router picks up data, it strips off the data link layer
info & examines destination IP address. It compares the
destination IP address with info contained in its routing
tables.
If the router locates the mapped destination IP address & the MAC address, & learns that the location of the
destination network is attached to one of its ports, it encapsulates the data with the new MAC address info,
& forwards it to the correct destination. If the router cannot locate the mapped destination address & MAC
address of the device of the final target device, it locates the MAC address of another router that can
perform this function, & forwards the data to that router. This type of routing is referred to as indirect
routing.




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/


4.8 IGP & EGP
Routed protocols & routing protocols
revision: IP is a network layer protocol & because IP is routed over an internetwork, it is a routed protocol.
Other examples of routed protocols include: Novell's IPX, & Appletalk.

Routers use routing protocols to exchange routing tables & share routing info. In other words, routing
protocols determine how routed protocols are routed.




IGPs & EGPs
Two types of routing protocols are:
 Exterior Gateway Protocols  route data between autonomous systems
        o [eg: BGP (Border Gateway Protocol)  the primary exterior routing protocol of the Internet].
 Interior Gateway Protocols  route data inside an autonomous (independent) system.
        o [eg: RIP, IGRP, EIGRP & OSPF]

IGRP & EIGRP
IGRP & EIGRP are routing protocols that were developed by Cisco
Systems, are considered proprietary routing protocols.
IGRP  developed specifically to address problems associated with
routing in large multi-vendor networks beyond the scope of protocols
like RIP. Like RIP, IGRP is a distance-vector protocol; however, when
determining the best path, it also takes into consideration bandwidth,
load, delay & reliability. Network administrators can determine the
importance given to any one of these metrics, or, allow IGRP to
automatically calculate the optimal path.
EIGRP  is an advanced version of IGRP. It provides superior
operating efficiency & combines the advantages of link-state protocols
with those of distance-vector protocols.

OSPF
OSPF  means “open shortest path first” (although “determination of
optimum path” is better description)  uses several criteria to determine
best route. These criteria include cost metrics, which factor in such things
as route speed, traffic, reliability, & security




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/


How routers recognize networks
 The network administrator can manually enter the info in the
   router  manual entries in routing tables are called “static
   routes”.
 Routers can learn info from each other on the fly  routes
   learned automatically are called “dynamic routes”


Examples of static routing
Manual entries can be useful when a network administrator wants to control which path a router will select.
[eg: routing tables based on static info can be used to test a particular link, or conserve wide area
bandwidth]
Static routing is also the preferred method for maintaining routing tables when there is only one path to a
destination network  stub network  only one way to get to this network (best path), so it is important
to indicate this to prevent routers from trying to find another way to this stub network if its connection fails.

Example of dynamic routing
revision: Dynamic (or adaptive) routing occurs when routers send periodic routing update messages to
each other. Each time a router receives a message containing new info, it recalculates the new best route, &
sends the new updated info to other routers. By using dynamic routing, routers can adjust to changing
network conditions.

note: Before dynamic updating of routing tables, most vendors had to maintain router tables for their clients
(ie: had to manually enter network numbers, their associated distances, & port numbers into router tables).
As networks grew  very time-consuming & $$$.
Dynamic routing eliminates manual entry of info into routing tables. It works best when bandwidth & large
amounts of network traffic are not issues. Without dynamic routing protocols  Internet would be
impossible.
                                          (see: 11.8.9 for example of RIP sending data through network)

4.9 Protocol analyzer software
                                                                                      (single lab activity only)

This chapter, you learned that:
     internetworking functions of the network layer include network addressing & best path selection
        for traffic
     all devices on the LAN are required to look at an ARP request, but only the device whose IP
        address matches the destination IP address carried in the ARP request must respond by providing
        its MAC address to the device that originated the request
     when a source is unable to locate the destination MAC address in its ARP table, it issues an ARP
        request in broadcast mode to all devices on the local network
     when a device does not know its own IP address, it uses RARP or BootP
     when the device that originated a RARP request receives a RARP reply, it copies its IP address into
        its memory cache, where it will reside for as long as the session lasts.
     routers (like every other device on) send & receive data on the network, & build ARP tables that
        map IP addresses to MAC addresses
     if the source resides on a network with a different network number than destination, & if the
        source does not know MAC address of destination, it will have to use the router as a default
        gateway for its data to reach the destination.
     routed protocols direct user traffic, whereas routing protocols work between routers to maintain
        path tables
     network discovery for distance-vector routing involves exchange of routing tables


 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/



5 Layer 4 – The Transport Layer

5.1 The transport layer
Purpose of the transport layer
The transport layer (Layer 4)  “quality of service”  primary duties are to transport & regulate info flow
from source to destination, reliably & accurately  end-to-end control, provided by sliding windows, &
reliability in sequencing numbers & acknowledgments.

analogy: a student studies a foreign language for one year & is visiting that country. In conversation
he/she must ask people to repeat their words (for reliability) & to speak slowly, so he/she can catch the
words (flow control).

Layer 4 protocols
The TCP/IP protocol of the OSI model Layer 4 (transport layer) has two protocols: TCP & UDP.

TCP supplies a virtual circuit between end-user applications  characteristics:
    connection-oriented
    reliable
    divides outgoing messages into segments
    reassembles messages at the destination station
    re-sends anything not received
    reassembles messages from incoming segments

UDP transports data unreliably between hosts 
characteristics:
     connectionless
     unreliable
     transmit messages (called user datagrams)
     provides no software checking for message delivery (unreliable)
     does not reassemble incoming messages
     uses no acknowledgments
     provides no flow control

Comparing TCP & IP
IP is a Layer 3 protocol – a connectionless service that provides
best-effort delivery across a network.
TCP is a Layer 4 protocol – a connection-oriented service that
provides flow control & reliability. Pairing the protocols enables
them to provide a wider range of services. Together, they represent
the entire suite. TCP/IP is the Layer 3 & Layer 4 protocol on which
the Internet is based




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                http://www.wordwendang.com/en/



5.2 TCP & UDP

TCP
Transmission Control Protocol (TCP) is a connection-oriented Layer 4 (transport layer) protocol that
provides reliable full-duplex data transmission. TCP is part of the TCP/IP protocol stack.




Following are the definitions of the fields in the TCP segment:
     source port -- number of the calling port
     destination port -- number of the called port
     sequence number -- number used to ensure correct sequencing of the arriving data
     acknowledgment number - next expected TCP octet
     HLEN -- number of 32-bit words in the header
     reserved -- set to zero
     code bits -- control functions (such as setup & termination of a session)
     window -- number of octets that the sender is willing to accept
     checksum -- calculated checksum of the header & data fields
     urgent pointer -- indicates the end of the urgent data
     option-one option -- maximum TCP segment size
     data -- upper-layer protocol data

UDP Segment Format
User Datagram Protocol (UDP) is the connectionless transport protocol in the TCP/IP protocol stack. UDP
is a simple protocol that exchanges datagrams, without acknowledgments or guaranteed delivery. Error
processing & retransmission must be handled by other protocols.
UDP uses no windowing or acknowledgments, application layer protocols provide reliability. UDP is
designed for applications that do not need to put sequences of segments together.
Protocols that use UDP include:
       TFTP (Trivial File Transfer Protocol)
       SNMP (Simple Network Management
         Protocol)
       DHCP (Dynamic Host Control Protocol)
       DNS (Domain Name System)




 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                  http://www.wordwendang.com/en/



5.3 TCP connection methods
Port Numbers
Both TCP & UDP use port (or socket) numbers to pass info to
upper layers. Port numbers are used to keep track of different
conversations that cross the network at the same time.
Application software developers have agreed to use the well-
known port numbers that are defined in RFC1700. Any
conversation bound for the FTP application uses the standard
port number 21. Conversations, that do not involve applications
with well-known port numbers, are assigned port numbers that
have been randomly selected from within a specific range 
these port numbers are used as source & destination addresses in
the TCP segment.
Some ports are reserved in both TCP & UDP, although
applications might not be written to support them. Port numbers
have the following assigned ranges:
      Numbers below 255 - for public applications
      Numbers from 255-1023 - assigned to companies for
         marketable applications
      Numbers above 1023 - are unregulated

End systems use port numbers to select proper applications.
Originating source port numbers are dynamically assigned by
the source host  usually a number greater than 1023.

                               (note: see 12.3.1 for complete list of reserved TCP & UDP port numbers)


Three-way handshake/open connection
Connection oriented services involve three phases:
 In the connection establishment phase, a single path between the source & destination is determined.
   Resources are typically reserved at this time to ensure a consistent grade of service.
 During the data transfer phase, data is transmitted sequentially over the established path, arriving at
   destination in the order in which it was sent.
 The connection termination phase consists of terminating the connection between the source &
   destination when it is no longer needed.

TCP hosts establish a connection-oriented session with one
another using a three-way handshake.
A three-way handshake/open connection sequence synchronizes
a connection at both ends before data is transferred  this
exchange of introductory sequence numbers, during the
connection sequence ensures any data lost, due to transmission
problems, can be recovered.

First: one host initiates connection by sending a packet
indicating its initial sequence number of x (with a certain bit in
the header set to indicate a connection request). Second: the
other host receives the packet, records x, replies with an
acknowledgment of x + 1, & includes its own initial sequence
number of y.
[note: acknowledgment number x + 1 means host has received
all octets up to & including x, & is expecting x + 1 next]

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                 http://www.wordwendang.com/en/


Positive acknowledgment & retransmission (PAR)  (common technique many protocols use to provide
reliability)  source sends a packet (a certain amount of data), starts a timer, & waits for acknowledgment
before sending next packet  Windowing.
If timer expires before source receives acknowledgment, source retransmits packet & restarts timer.




Window size number (in bytes/octets) determines amount of data that you can transmit at one time between
receiving acknowledgments.
[eg: with window size = 3, source can send 3 octets at a time (between acknowledgments). If, for some
reason, destination does not receive the three octets, [eg: due to
overflowing buffers] it does not send an acknowledgment
source knows the octets should be retransmitted & the
transmission rate should be slowed]

TCP uses expectational acknowledgments, meaning that the
acknowledgment number refers to the octet that is next expected.
The “sliding” part, of sliding window, refers to the fact that the
window size is negotiated dynamically during the TCP session
 this results in inefficient use of bandwidth by the hosts.

TCP provides sequencing of segments with a forward reference
acknowledgment. Each datagram is numbered before
transmission. At the receiving station, TCP reassembles the
segments into a complete message. If a sequence number is
missing in the series, that segment is re-transmitted. Segments
that are not acknowledged within a given time period result in
re-transmission

This chapter, you learned about: the functions of the transport layer & the different processes that occur as
data packets travel through this layer. More specifically:
      The transport layer regulates info flow to ensure end-to-end connectivity between host
          applications reliably & accurately
      The TCP/IP protocol of Layer 4 (transport layer) has two protocols: TCP & UDP
      TCP & UDP use port (or socket) numbers to keep track of different conversations that cross the
          network at the same time, to pass info to the upper layers
      The three-way handshake sequence synchronizes a logical connection between the endpoints of a
          network
Also: you should have a firm understanding of how the transport layer provides transport services from the
host to the destination, often referred to as end-to-end services.



 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                                         http://www.wordwendang.com/en/



6 Layer 5 – The Session Layer

6.1 The basics of the session layer
The session layer overview
Analogy: You are chatting online (ie: a rap session/session) using Internet Relay Chat (IRC). Two problems may interfere with your
session: First problem: your messages may cross during conversation (typing at same time,  interrupting). Second problem: you
need to pause (to save your current conversation as a file) or to check previous conversation, or re-synchronize communication after
an interruption.

To solve first problem: establish a protocol to dictate communication rules  1 solution: take turns to avoid interruptions  two-way
alternate communication. Another solution: send whenever (regardless of who is transmitting) & assume more info is on the way 
two-way simultaneous communication.

To solve second problem: send a checkpoint to each other, meaning: each person should save the conversation as a file. Then, each
person should re-read the last part of his/her conversation & check the time on the clock  synchronization.
Two very important checkpoints are how the conversation starts & ends. This is referred to as orderly initiation & termination of the
conversation. (eg: using Instant Mail or Internet Relay Chat, good-byes signal session termination).

Analogy: Communicating with a pen pal (via postal service) the same problems might occur. Messages could pass each other because
you use two-way simultaneous communication rather than two-way alternate communication (you haven’t synchronized conversation
subjects).

Session layer analogies
Functions of Session Layer (“interhost communication”):
     Major synchronizations
     Minor synchronizations
     Coordinates applications as they interact on two communicating hosts
     Choice of two-way alternate (TWA) & two-way simultaneous (TWS) dialogs
     Establishes, manages, & terminates sessions between applications  this includes: starting,
         stopping, & re-synchronizing two computers that are having a “rap session”.

     Data communications travel on packet-switched networks (unlike phone calls which travel on circuit-
      switched networks).
     Communication (between two computers) involves many mini-conversations, thus ensuring the two
      computers can communicate effectively.
     1 requirement of these mini-conversations: each host plays dual roles: requesting service – like a
      client; &, replying with service – like a server……  determining which role they are playing at any
      given moment is called dialogue control

Dialogue control
The session layer decides whether to use two-way simultaneous conversation or two-way alternate
communication  dialogue control.

Two-way simultaneous communication  session layer does little in managing conversation – the
conversation is managed by other layers.

[note: Session layer [Layer 5] collisions are possible, but these different than media-collisions [Layer 1]. At
session layer, collisions can only occur as two messages pass each other, & cause confusion in either, or
both, communicating hosts].
If these session layer collisions are intolerable, dialogue control has another option  two-way alternate
communication.

Two-way alternate communication  involves the use of a session layer data token that allows each host
to take turns (similar to how Layer 2 Token Ring handles Layer 1 collisions)

    Please go to http://www.wordwendang.com/en/, where you can download million word
                                      documents .
                                 http://www.wordwendang.com/en/



Dialogue separation
Dialogue separation  the orderly initiation, termination, &
managing of communication. [note: graphic illustrates a minor
synchronization]. At the “Time Axis, t = checkpoint”, the host A
session layer sends a synchronization message to host B, at
which time both hosts perform the following routine:
     1. back up the particular files
     2. save the network settings
     3. save the clock settings
     4. make note of the end point in the conversation

A major synchronization would involve more back-&-forth steps
& conversation than is shown in this diagram.
Checkpointing is similar to the way a word processor on a stand-
alone computer pauses for a second when it performs an
AutoSave of the current document. However, these checkpoints
are used, instead, to separate parts of a session previously
referred to as dialogues.

note: synchronization is important in data communication because 
in order to reliable send large # bits over great distances, often
important to know locations of both host (at any point during
communication session) so they can exchange synchronization info.

Layer 5 Protocol
Layer 5 has a number of important protocols – you should recognize
these when they appear in a login procedure or application.
Examples of Layer 5 protocols are:
     Network File System (NFS)
     Structured Query Language (SQL)
     Remote Procedure Call (RPC)
     X-Window System
     AppleTalk Session Protocol (ASP)
     Digital Network Architecture Session Control Protocol
         (DNA SCP)


This chapter, you learned about: the functions of the session layer & the different processes that occur as
data packets travel through this layer. More specifically:
      The session layer establishes, manages, & terminates sessions between applications
      Communication sessions consist of mini-conversations that occur between applications located in
          different network devices
      Requests & responses are coordinated by protocols implemented at the session layer
      The session layer decides whether to use two-way simultaneous communication or two-way
          alternate communication by using dialogue control
      The session layer uses dialogue separation to orderly initiate, terminate, & manage
          communication
Also: you should have a firm understanding of how the session layer provides transport services from the
host to the destination.



  This word document was downloaded from the website: http://www.wordwendang.com/en/, please

 Please go to http://www.wordwendang.com/en/, where you can download million word
                                   documents .
                          http://www.wordwendang.com/en/

             remain this link information when you reproduce , copy, or use it.
      <a href='http://www.wordwendang.com/en'>word documents</a>




Please go to http://www.wordwendang.com/en/, where you can download million word
                                  documents .

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:3
posted:8/23/2012
language:English
pages:67