Cisco 1 Review: Lecture Notes Week 1 01/09/2003
Cisco 1 Review: Lecture Notes Week 1 01/09/2003
Week 1
01/09/2003
Cisco 1 Review
Reduces complexity
Standardizes interfaces
Facilitates modular engineering
Ensure interoperability
Accelerates evolution
Simplifies teaching and learning
Application
Host Presentation
Session
Transport
Network
Physical
The host layers provided accurate data delivery between computers
The media layers control all physical delivery of data
Application
Presentation
Session
Transport
Network
Physical
Bridge
Switch
Layer 2, Data Link, device
Same functionality as a bridge, only multiported
Also used as a hub that allows full-duplex, dedicated full-bandwidth to segments
and desktops, resulting in a collision free domain
Hub
Router
Media Types
Coax
UTP
Fiber Optic
Common Technologies
Ethernet/802.3
Cable Requirements
Characteristics
TCP
UPD
IP Addressing
Class A
Class B
Class C
WANs
Devices
Provide for the exchange of data packets/frames between router/bridges and the
LANs they support
Interconnect LANs separated by wide geographic areas
Routers
Internetworking
WAN serial interfaces
Functions:
Modems
Communications Server
WAN Standards
Standards that describe the Physical and Data Link Layers
Physical Layer
Typically DCE is the service provider and DTE is the attached device
Services offered by DTE are made available through a modem or a DSU/CSU
Encapsulation Methods
HDLC
Cisco default
Streamlined, no windowing or flow control
May not be compatible with other vendors
Supports both Point-to-Point and Multi-Point configurations with minimal overhead
Frame Relay
PPP (Point-to-Point)
Developed by IETF (Internet Engineering Task Force), replaces SLIP (Serial Line
Internet Protocol)
Can check link quality during the connection
Supports PAP (Password Authentication Protocol) and CHAP (Challenge Handshake
Authentication Protocol)
WAN Technology
Dedicated Line
Uses time division multiplexing to slice up data and assign time slots for
transmission
Uses twisted pair wire
Extremely popular
Moderately priced
New WAN technology for home use; decreasing bandwidth as distance from phone
company equipment increases
Provides data rates as high as 51.84 Mbps
Many varieties of DSL technologies
SONET (Synchronous Optical Network)
Analog
Dial up Modem
56 kbps
Works with Plain Old Telephone System (POTS)
Wide spread use at a low cost
Cable Modems
Wireless
Terrestrial Satellite
Can serve remote and mobile
Bandwidth
users
Low cost Very high cost
Line of sight usually
required
Moderate usage Widespread usage
Switched Services
Circuit Switched
POTS
- not a computer data service
ISDN
- 1st all digital dialup service
- Moderate cost
- 128 Kbps possible using BRI; 2B channels for signals, 1 D channel for data
Packet Switched
X.25
- Connection Orientated
- Reliable
- Uses store and forward technology
Frame Rely
- Connectionless
- Packet switched version of ISDN
- Data rates up o 44.736 Mbps
- Low cost
Cell Switched
ROUTERS
RAM
NVRAM
Nonvolatile RAM
Stores backup/startup configuration
Contents remain when powered down or restarted
Flash
Uses EEPROM
Holds the IOS (Internet Operating System)
Can hold multiple versions of the IOS
ROM
COMMANDS
There are two basic Router Interface Modes, USER and PRIVILEGED.
User mode
Full power to configure
Enter "enable" while in User EXEC mode to access
Prompt = routername#
Command Lists
In either the User EXEC or Privileged mode, type a ? at the prompt for a list of
available commands
If the list exceeds the screen size, "more" will be displayed at the bottom of the
screen. Use the space bar to advance to the next screen or the enter key to
advance one line at a time
Command Help
Type a "?" after the command help is needed on to get a list of options that can
be used. For example:
routername>show ? Will display a list of options to use with the
"show" command.
To get help with a command, type a partial command followed by a "?". For
example:
When an error is made in the command string, a carat (^) symbol will indicate
where in the string the error is. An error message will also be displayed. For
example:
routername>show runnig-config
^
ROUTER BASICS
Configuration Instruments
The easiest way to do the configuration is use a rollover cable attached to the COM 1 or
COM 2 port on a PC. On the PC, run a HyperTerminal session to log in to the router.
Router RAM
When a router is powered on, ROM starts and performs the POST and starts up
the bootstrap program stored in RAM.
If the Bootstrap can find the IOS, it is loaded into RAM
The command EXEC is also loaded in RAM. This is the command interpreter
which translates key input into a router readable format
The Active Configuration File is loaded into RAM and executed one line at a time
All configuration tables are loaded to RAM
Any left over RAM is turn into Buffer space for incoming and outgoing packets
Router Modes
The following table illustrates different router modes that can be used for configuration
or viewing:
The "show" command gets its information from various system files as shown in the
diagram below.
Displays the configuration of the system hardware,
software version, names and sources of configuration
show version files, the boot images, and displays the reason for the
last system reboot
show startup-config Displays the backup configuration file
show flash Shows information about the Flash memory device
show interface Displays statistics for all interfaces configured on the
router
show processes Displays information about the active processes
show protocols Displays the configured protocols. This command
show the status of any configured Layer 3 (Network)
protocol
show running-config Displays the active configuration file
show memory Shows statistics about the router’s memory, including
memory free pool statistics
show stacks Monitors the stack use of processes and interrupt
routines
show buffers Provides statistics for the buffer pools on the router
Port Identifier
Port Status
Timers
Resends CDP information every 60 seconds
Holdtime is 180 seconds, information is discarded after 180 seconds
If no CDP information is received, router is assumed gone or down
Only shows information about the router that is directly attached to the router
requesting the information.
Device identifiers
The routers configured hostname and domain name (if any)
Address list
Ay least one address for SNAP, and up to one address for each supported
protocol
Port identifier
For example, Ethernet 0, Ethernet 1, and Serial 0
Capabilities list
For example, information on whether the device acts as a source route bridge as
well as a router
The routers configured hostname and domain name (if any)
The routers configured hostname and domain name (if any)
TESTING METHODS
Basic testing of a network should proceed in sequence from one OSI model layer to
the next
Application Layer
Telnet
Part of the TCP/IP protocol suite
Virtual terminal protocol that allows connections to be made to hosts
A router can have five simultaneous incoming Telnet sessions
The show sessions command will display all active connections
A successful Telnet test indicates that all seven layers are functioning
correctly for the associated source and destination
An unsuccessful test can mean a bad address, a bad name or a problem with
access permissions
Telnet Operations
Network Layer
PING
Trace
Tests each step along the path, every router the packet passes through will
send information back
Takes advantage of the error messages generated by routers when a packet
exceeds its Time-To-Live (TTL) or hop count value
If one of the routers fails to respond, an * (asterisk) takes the place of the
router name
The Trace command will continue to try and reach the destination until it is
reached, the hop count limit is reached or the command is terminated using
Ctrl-Shift-6 escape sequence
Some routers are set up not to respond, so a failed response does not
necessarily indicate a problem
Show IP Route
Look at the routing table directions that the router uses to determine how it
will direct traffic across the network
The hardware includes cables, connectors and interfaces, must make the
actual connection between the devices
The software is responsible for the messages such as keepalive messages,
control information, and user information that are passed between the two
connected router interfaces
One of the most important elements of the command is the display of the line
and data link protocol status
The Clear Counters command should be used to reset the counters to zero to
get a better picture of the current status of the network
Router# show int s 1
Carrier Detect
(Line status)
Keepalives
POST
Similar to the POST on a PC. Makes sure the router starts with all of its hardware tested
BOOTSTRAP
If the configuration file can not be found, a question driven initial configuration setup
dialog is started
This dialog is not intended for anything complex and is only providing a minimal setup
for startup
STARTUP COMMANDS
Show startup-config
Show running-config
Erase Startup-config
Reload
Setup
The main purpose for the setup process is to supply enough information to get a minimal
startup file
All default answers are enclosed in brackets
When the configuration is complete, the file created will be displayed on the terminal for
review. If it is OK, answer yes, if not, answer no
Router name
Password -- enable secret will encrypt the password and it will not show up as plain text
Interface config must be done for each installed interface with the established values
When the configuration is complete, review the script created and save or start over
SCRIPT REVIEW
After the initial setup is complete, the configuration mode is used to make changes to the
script
The script file is additive, it can be added to, but nothing can be removed
CONFIGURATION FILES
Console
NVRAM
TFTP server
Mode
Privileged
Global Config
Other
If configuring in the privileged EXEC mode it can be done via the console, modem or a
virtual (remote) terminal. The copy command can also be used to load a
configuration from a network TFTP server.
These commands still work, but they are not documented in the newer IOS versions.
config term
config mem
write term
write mem
show config
write erase
Confirm yes or no
Enter the name of the config file (uses DOS 8.3 naming convention)
Confirm yes or no
NVRAM COMMANDS
config memory
erase startup-config
show startup-config
ROUTER CONFIGURATION
The diagram above shows how the levels of the configuration mode is separated. The
EXEC commands available in user mode are a subset of the EXEC commands available
in privileged mode. From the privileged mode the global configuration mode and the
specific configuration modes can be accessed. To exit the specific configuration
mode and get to the global configuration mode type "exit". To get from the privileged
mode, type "exit" again.
Router(config-if) router rip This will configure the routing protocol used, in this
case rip.
Pouter(config-if) interface ethernet 0 This will start the configuration for the type,
Ethernet, on port 0.
All interfaces, for instance serial and Ethernet, start administratively down. After
configuring the interface, the command "no shutdown" is used to bring the interface
up.
CONFIGURATION METHODS
The diagram below show the steps that should be followed when making changes for
IOS version 11.X and newer. If an error is found in a line or lines, the command "no"
will backout specific lines.
PASSWORD CONFIGURATION
The "line console 0" command establishes a password on the console terminal.
The "line vty 0 4" command establishes password protection on incoming Telnet
sessions
ROUTER BOOT
The order that the router uses to look for it's Operating System depends on a value in
the configuration register. This can be changed using the command "config-register" .
Value Description
0x100 Use ROM monitor mode (manually boot using the b command
0x101 Automatically boot from ROM (default if router has no Flash memory
0x102 to Examine the NVRAM for boot system commands (0x102 is the default if the
0x10F router has Flash memory
NOTE: At Cascadia, these values all start with a "2" so 0x100 would be 0x2100.
All routers have a default "fallback" sequence they will try to use for the boot if the
IOS can't be located where the register value points it to.
The "boot system" command can also be used to specify the fallback sequence.
To check the register setting the "show version" command is used. This will also show
the IOS_filename and where is was booted from last.
On the router, check the Flash to make sure there is enough free space for the IOS
image and ping the TFTP server, make sure it is there
Router# show flash This will display the available memory and what is
currently there
On the TFTP server, make sure the filename and the path are known
Hopefully this is something that will not be done routinely, but as a recovery in case
the password is "lost". Lost can mean many things, maybe the person that previously
maintained the routers has suddenly left the company and no one knows the
passwords or maybe they have just plain been forgotten. In any case, the following
procedure can be done to either change all the passwords or change only one. This
procedure will change the console login password only and uses values appropriate for
Cascadia Community College.
History
The TCP/IP protocol suite was developed by the Department of Defense and Defense
Advanced Research Projects Agency (DARPA) to ensure that in the event of some
national catastrophic event, emergency communications would still be possible.
Later, the Berkeley Software Distribution of UNIX included the TCP/IP protocol
suite. Currently, TCP/IP is the Internetwork communications standard and the
Transport protocol for the Internet.
Compared to the OSI model, the TCP/IP protocol stack has some differences. Instead
of a seven layer model, TCP/IP used a four layer model. TCP/IP provides all the
functionality, but may use different methods.
Application Layer
In the TCP/IP model, this layer combines the Application, Presentation and Session
layers of the OSI model. This layer includes protocols for File Transfer, E-mail,
Remote Login, Network Management and Name Management.
The Application also includes the utilities, traceroute and ping which can be used for
troubleshooting. There are also some Windows based utilities at this layer, nbtstat,
netstat and ipconfig/winipcfg. The illustrations below show the output for the
traceroute, nbtstat and netstat commands.
Transport Layer
The Transport layer gives us two very important protocols, TCP and UDP.
Fields
UDP Segment
The size of the different segments alone should explain part of reason UDP is faster!
Fields
TFTP
SNMP
NFS (Network File System)
DNS (Domain Name System)
Ports
As seen in the above TCP and UDP segment diagrams, both use port numbers in the
source and destination fields, not IP addresses. These port numbers are used to pass
information to upper layers and also to keep track of different simultaneous network
conversations. Port numbers identify the upper layer protocol that is using the
transport.
In the example above, some of the "Well Known Ports" are displayed. As an example,
when a host needs to transfer a file, FTP port 21 will be used to set and control the
connection and FTP port 20 will be used to transfer the data. These ports are widely
known and therefore easily hacked into. Most administrators will change these
numbers so they are more secure and the hackers will have to work harder to find
them.
For a connection to be established, the two end stations must synchronize on each
other's initial TCP sequence numbers. This initial exchange ensures that lost data can
be recovered. The following steps are followed in this initial synchronization:
Because step 2 and 3 are combined into one message, it is called a three-way
handshake. The following diagram might better illustrate this process.
TCP/IP Windowing
TCP/IP uses a "sliding window" technique for flow control and communication
efficiency. The window size specifies the number of packets, starting with the
acknowledgment number, that the receiving host's TCP layer is currently prepared to
receive.
Simply stated, once the window fills with data, the destination host sends an ACK for
the packets received in that window. The window on the sending host slides over to
select new data to send.
The sliding part of the sliding window refers to the fact that the window size is
negotiated dynamically during the TCP session. A sliding window results in more
efficient use of bandwidth because a lager window size allows more packets to be
transmitted pending acknowledgment.
The diagram below illustrates the sliding window. Note, that even though the
Receiver has an advertised window of C - G, the Network will only support C - F,
therefore a window size of C - F will be used.
Internet Layer
This layer corresponds to the Network Layer of the OSI Model and is responsible for
getting packets through a network using software addressing.
Fields
VERS - Version number
HLEN - Header length, in 32-bit words
Type of Service - How the datagram should be handled
Total Length - Total length, header + data
Identification, Flags, Frag. Offset - Provides fragmentation of datagrams to allow
differing MTU's in the Internetwork
TTL - Time-To-Live
Protocol - The upper-layer (Layer 4) protocol sending and receiving the datagram
Header Checksum - An integrity check on the header
Source IP Address and Destination IP Address - 32-bit IP addresses
IP Options - Network testing, debugging, security, and other options
Data - Data
ICMP messages are carried in IP datagrams and are used to send error and control
messages between 2 TCP/IP hosts or between a host server and a gateway to the
Internet. The following are the defined messages used by ICMP:
Destination unreachable
Time-to-live exceeded
Parameter problem
Source quench
Redirect
Echo request
Echo reply
Timestamp request
Timestamp reply
Information request
Information reply
Address mask request
Address mask reply
Probably the most common use of ICMP messages is done by the PING utility. As
illustrated below, PING uses the Echo Request and Echo Reply message.
ARP - Address Resolution Protocol
ARP maps IP addresses to MAC addresses. Networked devices maintain the detail of
the MAC and IP addresses of other devices on the network in an ARP table or
cache. This table or cache is maintained in RAM. If a device needs to send data to
another device, it checks its cache to see if the MAC address is cached. If it is not
there, the device will initiate an ARP request to the local network as follows:
Source sends the IP information in a broadcast to network
If the IP address is on the local network, the destination will send back its MAC
address
If the IP address is not on the local network, the router will send its MAC address to
the source
The source will use the routers MAC address to send it's information and the router
will forward it on
The example below illustrates the process the source computer would use if it can't
locate the MAC address in it's own cache and needs to broadcast the request on the
local network.
There are two types of ARP addresses, static and dynamic. Static ones have been
manually added to the table and dynamic ones have been cached from previous ARP
requests. To view the table currently on a system, the command arp -a is used.
This works very similar to ARP except the MAC address is known and the IP address
needs to be resolved. This process is normally used for a diskless workstation and
requires a server. The server maintains a table of MAC to IP addresses. During the
bootup process, the client will ask the RARP server for their IP address.
Section 1
Answer 125.12.127.254
Answer 125.12.96.1
Known:
Solve For:
A. Network Address for the Network Subnet 99
The first available address in the network is when the last octet = 1. So the first
address is
B. 125.12.96.1
The last available address in the network is when the network and subnet portion
stays the same and the host portion is all 1's EXCEPT the last bit in the last
octet. (01111101.00001100.01111111.11111110)
C. 125.12.127.254
Solve For:
A. Network Address for the Network Subnet 140
B. First Available Address the Network Subnet 140
This number also represents the network address for subnet 140
A. 125.17.128.0
The first available address in the network is when the last octet = 1. So the first
address is
B. 125.17.128.1
The last available address in the network is when the network and subnet portion
stays the same and the host portion is all 1's EXCEPT the last bit in the last octet.
C. 125.17.159.254
Solve For:
A. Network Address for the Network Subnet 200
Answer 125.12.96.0
B. First Available Address the Network Subnet 200
This number also represents the network address for subnet 200
A. 125.25.0.0
The first available address in the network is when the last octet = 1. So the first
address is
B. 125.25.0.1
The last available address in the network is when the network and subnet portion
stays the same and the host portion is all 1's EXCEPT the last bit in the last octet.
C. 125.25.31.254
Solve For:
A. Network Address for the Network Subnet 120
Answer 125.17.128.0
Answer 125.25.0.0
Answer 125.15.0.0
Answer 125.15.31.254
Answer 125.15.0.1
Answer 125.25.0.1
Answer 125.25.31.254
Answer 125.17.128.1
Answer 125.17.159.254
This number also represents the network address for subnet 120
A. 125.15.0.0
The first available address in the network is when the last octet = 1. So the first
address is
B. 125.15.0.1
The last available address in the network is when the network and subnet portion
stays the same and the host portion is all 1's EXCEPT the last bit in the last octet.
C. 125.15.31.254
Section 2
The problems below are more complex and require more conversions to complete
23
Known:
IP Address: 199. 241. 154. 251
Subnet Mask: 255. 255. 255. 224
24
Known:
IP Address: 199. 241. 154. 239
Subnet Mask: 255. 255. 255. 248
25
Known:
IP Address: 199. 241. 154. 241
Subnet Mask: 255. 255. 255. 192
26
Known:
IP Address: 199. 241. 154. 198
Subnet Mask: 255. 255. 255. 252
27
Known:
Another way of doing the above problem is by using the Magic Number (MR).
The Magic Number = 2bits remaining
Known:
Magic Number 8 23 = 8
28
Known:
Another way of doing the above problem is by using the Magic Number (MR).
The Magic Number = 2bits remaining
Known:
IP Address: 220. 241. 154. ___
Subnet Mask: 255. 255. 255. ___
Bits Borrowed: 4
Subnet Number: 14
Subnet Host Number: 14
Magic Number 16 24 = 16
29
Known:
Another way of doing the above problem is by using the Magic Number (MR).
The Magic Number = 2bits remaining
Known:
Magic Number 4 22 = 4
30
Known:
Another way of doing the above problem is by using the Magic Number (MR).
The Magic Number = 2bits remaining
Known:
Magic Number 64 26 = 64
IP Addressing
Each node using the TCP/IP protocol suite has a unique 32-bit logical address. This
address is known as the IP address and is expressed in 32-bit dotted-decimal
format.
Each router interface or device must be configured with an IP address.
The address can not be all one's or zero's.
Each company on the Internet is viewed as a single unique network that must be
reached before an individual host on that network can be reached.
Private addressing can be used internally, but at least one public address is
required to get out to the Internet. This is usually known as the gateway.
Routers all have routing tables containing addresses to networks, no host
information is usually contained.
An IP address and a subnet mask in an IP network host address achieve three
purposes:
1. Enables the host to process the receipt and transmission of packets
2. Specify the host's local IP address
3. Specify a range of IP addresses that share the cable with the
host
Broadcast messages are intended to be seen by every host on the network
Flooded broadcast messages, 255.255.255.255, will not be forwarded by the router
and are considered a local broadcast
Directed broadcast messages are directed to a specific network are allowed and
forwarded
Router Address Configuration Commands
The term ip command, in the interface configuration mode, is used to specify the
format of the network masks in all interfaces for the current session
Bit count
Dotted decimal (the default)
Hexadecimal
The ip host command makes a name to address conversion in the routers
configuration table
The ip name-server command defines which hosts can provide the name
service. Up to six servers can be specified.
Router(config-if)# no ip domain-lookup
Router(config-if)# ip domain-lookup (This command will enable domain
lookup)
The show hosts command displays the cached list of hostnames and addresses
Since address problems are the most common problems that occur on IP networks, it
is important to verify the addresses before completing the configuration.
The three commands used to verify addressing are:
telnet Verifies the application layer software between source and destination
stations. This is the most complete testing
mechanism available.
ping Uses the ICMP protocol to verify the hardware connection and the logical
address at the Internet layer. This is a
very basic command and the most common means of testing IP
connectivity.
trace Uses TTL values to generate messages from each router used along the
path. This is a very powerful command used
to locate failures in the path from the source to the destination.
Extended ping mode is used to specify supported Internet header options which are
valuable for advanced troubleshooting.
The trace command reaches the target destination, as asterisk (*) is reported at the
display. In other cases, the asterisk indicates a timeout in response to one of the
probe packets. Other response values are included in the table below.
Solve for the unknowns in the problems below using the "Magic Number"
process. The unknowns are highlighted in yellow, all given values are in
black.
IP Address: 199.241.154.153
Subnet Mask: 255.255.255.192
Class: C
Bits Borrowed: 2
Subnets
4
Created:
Hosts Created: 64
Magic Number: 64
Useable
2
Subnets:
Useable Hosts: 62
Network
Subnet 2
Number:
Network
Subnet Host 25
Number:
Subnet
Network 199.241.154.128
Address:
Subnet
Broadcast 199.241.154.191
Address:
1. The first thing needed to solve the problem is the address class. This
will determine how many octets will be involved in the process. Since
the fist octet of the IP Address is 199, we know this is a class C
address.
2. Based on the 4th octet of the Subnet Mask, 192, we know the 2 bits
were borrowed.
3. To find the Subnets Created, the formula 2 # of bits borrowed is used. 22 =
4
4. To find the Hosts Created, the formula 2 # of bits remaining is used. 26 =
64
5. The Magic Number is simply equal to the number of hosts, 64
6. The Usable Subnets is 4 - 2 = 2
7. The Usable Hosts is 64 - 2 = 62
8. To find the Network Subnet and Subnet Network Host Number, the
formula below is used:
9. The Subnet Broadcast Address is found using the formula, (MR x
Subnet #) + (MR -1)
10. That gives us, (64 x 2) + (64 - 1) = 128 + 63 = 191
IP Address: 199.241.154.167
Subnet Mask: 255.255.255.248
Class: C
Bits Borrowed: 5
Subnets
32
Created:
Hosts Created: 8
Magic Number: 8
Useable
30
Subnets:
Useable Hosts: 6
Network
Subnet 20
Number:
Network
Subnet Host 7
Number:
Subnet
Network 199.241.154.160
Address:
Subnet
Broadcast 199.241.154.167
Address:
1. The first thing needed to solve the problem is the address class. This
will determine how many octets will be involved in the process. Since
the fist octet of the IP Address is 199, we know this is a class C
address.
2. Based on the 4th octet of the Subnet Mask, 248, we know the 5 bits
were borrowed.
3. To find the Subnets Created, the formula 2 # of bits borrowed is used. 25 =
32
4. To find the Hosts Created, the formula 2 # of bits remaining is used. 23 = 8
5. The Magic Number is simply equal to the number of hosts, 8
6. The Usable Subnets is 32 - 2 = 30
7. The Usable Hosts is 8 - 2 = 6
8. To find the Network Subnet and Subnet Network Host Number, the
formula below is used:
9. The Subnet Broadcast Address is found using the formula, (MR x
Subnet #) + (MR -1)
10. That gives us, (8 x 20) + (8 - 1) = 160+ 7 = 167
47
IP Address: 220.241.154.68
Subnet
255.255.255.240
Mask:
Class: C
Bits
4
Borrowed:
Subnets
16
Created:
Hosts
16
Created:
Magic
16
Number:
Useable
14
Subnets:
Useable
14
Hosts:
Network
Subnet 4
Number:
Network
Subnet Host 4
Number:
Subnet
Network 220.241.154.64
Address:
Subnet
Broadcast 220.241.154.79
Address:
1. The first thing needed to solve the problem is the address class. This
will determine how many octets will be involved in the process. Since
the fist octet of the IP Address is 220, we know this is a class C
address.
2. It is given that 4 bits were borrowed, so the 4th octet of the subnet
would be 240
3. To find the Subnets Created, the formula 2 # of bits borrowed is used. 24 =
16
4. To find the Hosts Created, the formula 2 # of bits remaining is used. 24 =
16
5. The Magic Number is simply equal to the number of hosts, 16
6. The Usable Subnets is 16 - 2 = 14
7. The Usable Hosts is 16 - 2 = 14
8. To find the Subnet Network Address the formula, MR x Subnet
Number. 16 x 4 = 64
9. The Subnet Broadcast Address is found using the formula, (MR x
Subnet #) + (MR -1)
10. That gives us, (16 x 4) + (16 - 1) = 64 + 15 = 79
11. To find the 4th octet of the IP address the formula is, MR x
Subnet # + Host #. 16 x 4 + 4 = 68
48
IP Address: 220.241.154.125
Subnet Mask: 255.255.255.248
Class: C
Bits Borrowed: 5
Subnets
32
Created:
Hosts Created: 8
Magic Number: 8
Useable
30
Subnets:
Useable Hosts: 6
Network
Subnet 15
Number:
Network
Subnet Host 5
Number:
Subnet
Network 220.241.154.120
Address:
Subnet
Broadcast 220.241.154.127
Address:
1. The first thing needed to solve the problem is the address class. This
will determine how many octets will be involved in the process. Since
the fist octet of the IP Address is 220, we know this is a class C
address.
2. It is given that 5 bits were borrowed, so the 4th octet of the subnet
would be 248
3. To find the Subnets Created, the formula 2 # of bits borrowed is used. 25 =
32
4. To find the Hosts Created, the formula 2 # of bits remaining is used. 23 = 8
5. The Magic Number is simply equal to the number of hosts, 8
6. The Usable Subnets is 32 - 2 = 30
7. The Usable Hosts is 8 - 2 = 6
8. To find the Subnet Network Address the formula, MR x Subnet
Number. 8 x 15 = 120
9. The Subnet Broadcast Address is found using the formula, (MR x
Subnet #) + (MR -1)
10. That gives us, (8 x 15) + (8 - 1) = 120 + 7 = 127
11. To find the 4th octet of the IP address the formula is, MR x
Subnet # + Host #. 8 x 15 + 5 = 125
All of the 3rd octet and some of the 4th octet. Complexity = medium
All of the 3rd octet and none of the 4th octet. Complexity = low
Some the 3rd octet and none of the 4th octet. Complexity = high
Solve for the unknowns in the problems below using the "Magic Number"
process. The unknowns are highlighted in yellow, all given values are in
black.
67
IP Address: 155.10.15.123
Subnet Mask: 255.255.255.224
Class: B
Bits Borrowed: 11
Subnets
2048
Created:
Hosts Created: 32
Magic Number: 32
Useable
2046
Subnets:
Useable Hosts: 30
Network
Subnet 123
Number:
Network
Subnet Host 27
Number:
Subnet
Network 155.10.15.96
Address:
Subnet
Broadcast 155.10.15.127
Address:
1. The first thing needed to solve the problem is the address class. This
will determine how many octets will be involved in the process. Since
the fist octet of the IP Address is 155, we know this is a class B
address.
2. Based on the 3rd and 4th octet of the Subnet Mask, 255 and 224, we
know the 11 bits were borrowed.
3. To find the Subnets Created, the formula 2 # of bits borrowed is used. 211 =
2048
4. To find the Hosts Created, the formula 2 # of bits remaining is used. 25 =
32
5. The Magic Number is simply equal to the number of hosts, 32
6. The Usable Subnets is 2048 - 2 = 2046
7. The Usable Hosts is 32 - 2 = 30
8. To find the IP Address for the 3rd and 4th Octet, the formula below is
used:
The easiest Class B formula is when all of the 3rd octet is borrowed and
none of the 4th.
IP Address:
155. 10.
15.123
Subnet Mask: 255.255.255.0
Class: B
Bits Borrowed: 8
Subnets Created: 256
Hosts Created: 256
Useable Subnets: 254
Useable Hosts: 254
Network Subnet
Number:
15
Network Subnet
123
Host Number:
Subnet Network
155.10.15.0
Address:
Subnet Broadcast
155.10.15.255
Address:
In the diagram below, each line number represents a address that a router
will use for forwarding packets
The router uses the network address to identify the destination network of
a packet within an internetwork
The router uses the network portion of the address to select the most
appropriate path to pass the packet to the next router and the switching
function allows the router to forward the packet from one interface to
another
At each router hop, the routers network layer examines the incoming
packets layer 3 header to determine the destination network and then
references the routing table, encapsulates the packet again and queues for
delivery to the next hop
A default route directs packets to the next hop when that hop is not
explicitly listed in the routing table
In the above diagram, each router discovers the best path to destination
networks based on the information they receive from each neighbor. Each
network table entry has an accumulated distance vector to show how far
away that network is in a given direction.
In most cases running link-state routing protocols use more memory and
perform more processing than distance-vector routing protocols
Distance-Vector Link-State
LAN-to-LAN Routing
The LAN hosts depend on the router and its consistent network addressing
to find the best path. Although the lower layer framing must change as the
router passes packet traffic from Ethernet on Network 1 to Token Ring on
Network 2, the Layer 3 addressing for source and destination remains the
same.
LAN-to-WAN Routing
The network layer must relate to and interface with various lower level
layers for LAN-to-WAN traffic. Routers enable LAN-to-WAN packet flow by
keeping the end-to-end source and destination addresses constant while
encapsulating the packet in data link frames, as appropriate, for the next
hop along the path.
Routers are extremely versatile devices that are responsible for the very
existence of the Internet.
ROUTING PROTOCOLS
ip default-network network-number
Exterior routing protocols are used for communication between
autonomous systems
Global tasks include selecting a routing protocol, either RIP or IGRP, and
indicating IP network number by way of specific subnet entries
network-
This is a directly connected network
number
The router rip command selects RIP as the routing protocol and starts the
dynamic routing process
The show ip route command displays the contents of the IP routing table
along with a code that indicates how that information was learned
The IGRP routing protocol uses two metrics: bandwidth and delay
- Bandwidth
- Delay
- Load
- Reliability
The router igrp command selects IGRP as a routing protocol and starts
the dynamic routing process
The show ip protocol command will display the algorithm used to calculate
the routing metric for IGRP
By default, the values of the constants K1 and K3 are set to 1. K2, K4 and
K5 values are defaulted to 1.
Router> show ip protocols
The show ip route command displays the contents of the IP routing table
The debug ip rip command displays RIP routing updates as they are sent
and received
Caution should be used running the debug commands; they are processor
intensive and can decrease network performance or cause loss of
connectivity
To turn off debug, the command no debug ip rip or no debug all can be
used
TROUBLESHOOTING
Disconnected cables
Wrong cables used for the tasks at hand (must use cross-
connects, rollovers, and straight-through cables correctly)
Transceiver problems
Layer 2 Data
Improperly configured serial interfaces
Link
Faulty NIC
Layer 3
Routing protocol not enabled
Network
Step 1: Define the problem. What are the symptoms and the potential
causes?
Step 5: Implement the action plan. Perform each step carefully while
testing to see if the symptom
disappears.
Step 7: Repeat the process. If you did not resolve the problem, move to
the next most likely cause on
your list. Return to step 4, and repeat the process until you solve
the problem.
ARP Problems:
show ip route
ping
show int s0 (or s2,e1,etc.)
show arp
show run
traceroute
ipconfig
winipcfg
tracert
ping
telnet
netstat -rn
route add
arp -a
C:\>netstat -rn
Route Table
Active Routes:
Network Address Netmask Gateway
Address Interface Metric
0.0.0.0 0.0.0.0 168.71.8.10
168.71.8.2 1
168.71.8.0 255.255.255.0 168.71.8.1
168.71.8.2 1
168.71.8.2 255.255.255.255 127.0.0.1
127.0.0.1 1
168.71.0.0 255.255.0.0 168.71.8.1
168.71.8.2 1
168.71.255.255 255.255.255.255 168.71.8.2
168.71.8.2 1
127.0.0.0 255.0.0.0 127.0.0.1
127.0.0.1 1
224.0.0.0 255.0.0.0 168.71.8.2
168.71.8.2 1
255.255.255.255 255.255.255.255 168.71.8.2
168.71.8.2 1
Active Connections
Proto Local Address Foreign Address State
The following will flush existing gateways and add a new gateway
dynamically at the DOS prompt:
C:\>netstat -rn
Route Table
Active Routes:
Network Address Netmask Gateway
Address Interface Metric
0.0.0.0 0.0.0.0 168.71.8.1
168.71.8.2 1
168.71.8.0 255.255.255.0 168.71.8.1
168.71.8.2 1
168.71.8.2 255.255.255.255 127.0.0.1
127.0.0.1 1
168.71.0.0 255.255.0.0 168.71.8.1
168.71.8.2 1
168.71.255.255 255.255.255.255 168.71.8.2
168.71.8.2 1
127.0.0.0 255.0.0.0 127.0.0.1
127.0.0.1 1
224.0.0.0 255.0.0.0 168.71.8.2
168.71.8.2 1
255.255.255.255 255.255.255.255 168.71.8.2
168.71.8.2 1
Active Connections
Proto Local Address Foreign Address State