(3)data
(3)data
Course Contents
• Introduction to Data Networks
• Network Devices
• OSI Model
• Types of Network Media
• TCP/IP Model
• TCP/IP Math
• Router Internal Components
• Basic Router Configuration
• Routing principles
• Static Routing
2
• Dynamic Routing Categories
• Routing Information Protocol (RIP)
• RIP version 2
• Switching Basics
• Basic Switch Configuration
• Virtual Local Area Networks (VLANs)
• VLAN Configuration
• VLAN Trunk Protocol (VTP)
• VTP Configuration
• VTP Pruning
• Router On Stick Design
3
Cisco Icons and Symbols
4
Data Networks
5
Networking Devices
Equipment that connects directly to a network
segment is referred to as a device.
6
Network Interface Card
7
Hub
Connects a group of Hosts
8
Switch
9
Router
10
Internetworking Basics
Two Domains:
Collision Domain
- Every Switch port
- The Whole Hub
Broadcast Domain
- Every Router port
- The Whole Switch
12
Why do we need the OSI Model?
To address the problem of networks increasing in
size and in number, the International Organization for
Standardization (ISO) researched many network
schemes and recognized that there was a need to
create a network model
14
The OSI Reference Model
7 Application The OSI Model will be used
throughout your entire
6 Presentation
networking career!
5 Session
4 Transport
3 Network
Memorize it!
2 Data Link
1 Physical
15
OSI Model
Application
Application
(Upper) Presentation
Layers
Session
Transport
Network
Data Flow
Layers
Data-Link
Physical
16
16-Nov-20
Layer 7 - The Application Layer
7 Application This layer deal with
6 Presentation networking applications.
5 Session Examples:
4 Transport Email
Web browsers
3 Network
2 Data Link PDU - User Data
1 Physical
19
Layer 5 - The Session Layer
7 Application This layer establishes, manages, and
terminates sessions between two
communicating hosts.
6 Presentation Creates Virtual Circuit
Coordinates communication between systems
5 Session Organize their communication by offering
three different modes
4 Transport Simplex
Half Duplex
3 Network Full Duplex
2 Data Link
Example:
1 Physical Client Software
( Used for logging in)
22
Layer 4 - The Transport Layer
7 Application This layer breaks up the data from
the sending host and then
6 Presentation reassembles it in the receiver.
23
Layer 3 - The Network Layer
End to End Delivery
Provide logical addressing that
7 Application routers use for path determination
Segments are encapsulated
6 Presentation Internetwork Communication
Packet forwarding
5 Session Packet Filtering
Makes “Best Path Determination”
4 Transport Fragmentation
3 Network
2 Data Link PDU – Packets – IP/IPX
1 Physical
24
Layer 2 - The Data Link Layer
Performs Physical Addressing
7 Application This layer provides reliable transit
of data across a physical link.
6 Presentation Combines bits into bytes and
bytes into frames
5 Session Access to media using MAC
address
4 Transport Error detection, not correction
LLC and MAC
3 Network Logical Link Control performs
Link establishment
2 Data Link MAC Performs Access method
1 Physical PDU - Frames
26
Data Encapsulation
Application
Presentation
PDU
Upper-Layer Data Session
Transport Segment
TCP HeaderUpper-Layer Data
Network Packet
IP Header Data
Physical Bits
0101110101001000010
27
OSI Model Analogy
Application Layer - Source Host
Call your friend and make sure you have his correct
address.
30
OSI Model Analogy
Transport Layer - Source Host
33
OSI Model Analogy
Physical Layer - Media
34
OSI Model Analogy
Data Link Layer - Destination
35
OSI Model Analogy
Network Layer - Destination
Your friend calls you and tells you he got all 3 boxes and
he is having another friend named BOB reassemble the
bicycle.
37
OSI Model Analogy
Session Layer - Destination
38
OSI Model Analogy
Presentation Layer - Destination
40
Data Flow Through a Network
41
Layer 2
MAC Layer—802.3
Number of Bytes 8 6 6 2 Variable 4
Preamble Destination Address Source Address Length Data FCS
Ethernet II uses
“Type” here and
0000.0C xx.xxxx does not use
802.2.
IEEE Assigned Vendor
Assigned
MAC Address
synchronize senders and receivers
42
The Networking Media
43
10 Mbps IEEE Standards - 10BaseT
44
Twisted Pair Cables
46
Straight-through cable pinout
47
Crossover cable
48
Crossover cable
49
Rollover cable
50
Rollover cable pinout
51
Straight-Thru or Crossover
53
Introduction to TCP/IP
54
TCP/IP and the DoD Model
The figure shows a comparison of the DoD model
and the OSI reference model. As you can see, the
two are similar in concept, but each has a
different number of layers with different names.
55
The TCP/IP Protocol Suite
The DoD and OSI models are alike in design and concept
and have similar functions in similar layers.
56
Transport Layer
Host-to-Host Layer or End-to-End Delivery
Source Destination
…
Port Port
Telnet Z
Host A Host Z
58
TCP Port Numbers
59
TCP Three-Way Handshake/Open Connection
Host A Host B
Send SYN
1 (seq = 100 ctl = SYN)
SYN Received
60
Opening & Closing Connection
61
User Datagram Protocol (UDP)
64
Port Numbers
F T S D T S R
T E M N F N I
Application P
P L T S T M
Layer
N P P P
E
T
65
IP Datagram
Bit
1 0 Bit 15 Bit 16 Bit 31
Version Header Priority &Type
(4) Length (4) Total Length (16)
of Service (8)
Flags
Identification (16) (3) Fragment Offset (13)
Options (0 or 32 if Any)
66
Address Resolution Protocol
I need the I heard that broadcast.
Ethernet address The message is for me.
of 176.16.3.2. Here is my Ethernet
address.
172.16.3.1 172.16.3.2
IP: 172.16.3.2
Ethernet: 0800.0020.1111
• Map IP MAC
• Local ARP
Reverse ARP
I heard that
broadcast.
What is my
Your IP
IP
address is
address?
172.16.3.25.
Ethernet: 0800.0020.1111
IP: 172.16.3.25
• Map MAC IP
TCP/IP Math
69
Decimal to Binary
172
172 – Base 10
1 2
100 = 1
10 70 101 = 10
100 100 102 = 100
1000
172 103 = 1000
10101100
20 = 1
21 = 2
10101100– Base 2 0
1
2 0 22 = 4
4 4 23 = 8
8 8
16 0
24 = 16
32 32 25 = 32
64 0 26 = 64
128 128
27 = 128
172
70
Base 2 Number System
101102 = (1 x 24 = 16) + (0 x 23 = 0) + (1 x 22 = 4) +
(1 x 21 = 2) + (0 x 20 = 0) = 22
71
Converting Decimal to Binary
Convert 20110 to binary:
201 / 2 = 100 remainder 1
100 / 2 = 50 remainder 0
50 / 2 = 25 remainder 0
25 / 2 = 12 remainder 1
12 / 2 = 6 remainder 0
6 / 2 = 3 remainder 0
3 / 2 = 1 remainder 1
1 / 2 = 0 remainder 1
When the quotient is 0, take all the remainders in reverse
order for your answer: 20110 = 110010012
72
Binary to Decimal Chart
73
Introduction to TCP/IP Addresses
172.18.0.1 172.16.0.1
172.18.0.2 172.16.0.2
HDR SA DA DATA
10.13.0.0 192.168.1.0
10.13.0.1 172.17.0.1 172.17.0.2 192.168.1.1
128
8
64
32
16
4
2
1
128
8
64
32
16
4
2
1
128
128
8
8
4
64
32
16
4
2
1
64
32
16
2
1
Example
Decimal
172 16 122 204
Example 10101100 00010000 01111010 11001100
Binary
75
IP Address Classes
8 Bits 8 Bits 8 Bits 8 Bits
•Class D: Multicast
•Class E: Research
IP Address Classes
Bits: 1 8 9 16 17 24 25 32
0NNNNNNN
0NNNNNNN Host
Host Host Host
Class A:
Range (1-126)
Bits: 1 8 9 16 17 24 25 32
10NNNNNN Network Host Host
Class B:
Range (128-191)
1 8 9 16 17 24 25 32
Bits:
110NNNNN Network Network Host
Class C:
Range (192-223)
1 8 9 16 17 24 25 32
Bits:
1110MMMM Multicast Group Multicast Group Multicast Group
Class D:
Range (224-239)
77
Host Addresses
172.16.2.2 10.1.1.1
10.6.24.2
E1
172.16.3.10 E0 10.250.8.11
172.16.2.1
172.16.12.12 10.180.30.118
Routing Table
172.16 . 12 . 12 Network Interface
Network Host 172.16.0.0 E0
10.0.0.0 E1
78
Classless Inter-Domain Routing (CIDR)
• Basically the method that ISPs (Internet Service
Providers) use to allocate an amount of
addresses to a company, a home
• Ex : 192.168.10.32/28
• The slash notation (/) means how many bits are
turned on (1s)
79
CIDR Values
80
Determining Available Host Addresses
Network Host
172 16 0 0
N
13
1
16
15
14
12
11
10
8
7
6
4
3
2
10101100 00010000 00000000 00000000 1
00000000 00000001 2
00000000 00000011 3
...
...
...
11111111 11111101 65534
11111111 11111110 65535
11111111 11111111 65536
– 2
2N – 2 = 216 – 2 = 65534 65534
81
IP Address Classes Exercise
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10
82
IP Address Classes Exercise Answers
256.241.201.10 Nonexistent
83
Subnetting
84
Formula
Number of subnets – 2x
Where X = number of bits borrowed
85
Subnetting
Classful IP Addressing SNM are a set of 255’s and 0’s.
In Binary it’s contiguous 1’s and 0’s.
SNM cannot be any value as it won’t follow the rule of
contiguous 1’s and 0’s.
Possible subnet mask values
– 0
– 128
– 192
– 224
– 240
– 248
– 252
– 254
– 255
86
Addressing Without Subnets
…...
172.16.0.0
• Network 172.16.0.0
Addressing with Subnets
172.16.3.0
172.16.4.0
172.16.1.0 172.16.2.0
• Network 172.16.0.0
Subnet Addressing
172.16.2.200 172.16.3.5
172.16.3.1
E1
172.16.2.2 E0 172.16.3.100
172.16.2.1
172.16.2.160 172.16.3.150
89
Subnet Addressing
172.16.2.200 172.16.3.5
172.16.3.1
E1
172.16.2.2 E0 172.16.3.100
172.16.2.1
172.16.2.160 172.16.3.150
90
Subnet Mask Without Subnets
Network Host
Network 172 16 0 0
Number
128
252
192
224
240
248
254
255
Network
Number 172 16 2 0
128
252
128
252
192
224
240
248
254
255
192
224
240
248
254
255
Network
Number 172 16 2 128
172.16.2.10 255.255.255.0
10.6.24.20 255.255.240.0
10.30.36.12 255.255.255.0
94
Subnet Mask Exercise Answers
95
Broadcast Addresses
172.16.3.0
172.16.4.0
172.16.1.0
172.16.3.255 172.16.2.0
(Directed Broadcast)
255.255.255.255
(Local Network Broadcast)
X
172.16.255.255
(All Subnets Broadcast)
96
Class B Subnet Example
IP Host Address: 172.16.2.121
Subnet Mask: 255.255.255.0
192.168.5.16
Other
Subnets
192.168.5.32 192.168.5.48
98
Class C Subnet Planning Example
IP Host Address: 192.168.5.121
Subnet Mask: 255.255.255.248
Network Network Network Subnet Host
? – SNM
? – Block Size
?- Subnets
100
Exercise
• /27
? – SNM – 224
? – Block Size = 256-224 = 32
?- Subnets
? – SNM
? – Block Size
?- Subnets
102
Exercise
• /30
? – SNM – 252
? – Block Size = 256-252 = 4
?- Subnets
106
Exercise
192.168.10.54 /29
Mask ?
Subnet ?
Broadcast ?
107
Exercise
192.168.10.130 /28
Mask ?
Subnet ?
Broadcast ?
108
Exercise
192.168.10.193 /30
Mask ?
Subnet ?
Broadcast ?
109
Exercise
192.168.1.100 /26
Mask ?
Subnet ?
Broadcast ?
110
Exercise
192.168.20.158 /27
Mask ?
Subnet ?
Broadcast ?
111
Class B
172.16.0.0 /19
Subnets ?
Hosts ?
Block Size ?
112
Class B
172.16.0.0 /19
Subnets 23 -2 = 6
Hosts 213 -2 = 8190
Block Size 256-224 = 32
114
Class B
172.16.0.0 /27
Subnets 211 -2 = 2046
Hosts 25 -2 = 30
Block Size 256-224 = 32
116
Class B
172.16.0.0 /23
Subnets 27 -2 = 126
Hosts 29 -2 = 510
Block Size 256-254 = 2
118
Class B
172.16.0.0 /24
Subnets 28 -2 = 254
Hosts 28 -2 = 254
Block Size 256-255 = 1
120
Class B
172.16.0.0 /25
Subnets 29 -2 = 510
Hosts 27 -2 = 126
Block Size 256-128 = 128
• 172.16.85.30/29
123
Find out Subnet and Broadcast Address
• 172.30.101.62/23
124
Find out Subnet and Broadcast Address
• 172.20.210.80/24
125
Exercise
• Find out the mask which gives 100 subnets for
class B
126
Exercise
• Find out the Mask which gives 100 hosts for
Class B
127
Class A
10.0.0.0 /10
Subnets ?
Hosts ?
Block Size ?
128
Class A
10.0.0.0 /10
Subnets 22 -2 = 2
Hosts 222 -2 = 4194302
Block Size 256-192 = 64
130
Class A
10.0.0.0 /18
Subnets 210 -2 = 1022
Hosts 214 -2 = 16382
Block Size 256-192 = 64
201.222.10.60 255.255.255.248
15.16.193.6 255.255.248.0
128.16.32.13 255.255.255.252
153.50.6.27 255.255.255.128
132
Broadcast Addresses Exercise
Answers
133
VLSM
• VLSM is a method of designating a different subnet mask for
the same network number on different subnets (it’s allows a
network to be divided into variously sized subnets)
• Can use a long mask on networks with few hosts and a shorter
mask on subnets with many hosts
134
Variable Length Subnetting
VLSM allows us to use one class C address to
design a networking scheme to meet the
following requirements:
Khartoum 60 Hosts
Medani 28 Hosts
PortSudan 12 Hosts
Nyala 12 Hosts
WAN 1 2 Hosts
WAN 2 2 Hosts
WAN 3 2 Hosts
135
Networking Requirements
Khartoum 60
WAN 2
WAN 1
WAN 3
PortSudan12 Nyala 12
Medani 28
In the example above, a /26 was used to provide the 60 addresses for
Khartoum and the other LANs. There are no addresses left for WAN links
136
Networking Scheme
Khartoum 192.168.10.0/26
60
192.168.10.128/30 192.168.10.132/30
2 2
2 WAN 192.198.10.137 and 138
192.168.10.136/30
28 12 12
25
192.168.1.0
138
VLSM Exercise
192.168.1.8/30 192.168.1.16/28
192.168.1.64/26
12
2
40 2
2
192.168.1.12/30
192.168.1.4/30
25
192.168.1.32/27
192.168.1.0
139
VLSM Exercise
2
8 5
2
2
2
35
15
192.168.1.0
140
Summarization
• Summarization, also called route aggregation, allows
routing protocols to advertise many networks as one
address.
• The purpose of this is to reduce the size of routing tables
on routers to save memory
• Route summarization (also called route aggregation or
supernetting) can reduce the number of routes that a
router must maintain
• Route summarization is possible only when a proper
addressing plan is in place
• Route summarization is most effective within a
subnetted environment when the network addresses are
in contiguous blocks
141
Summarization
142
Supernetting
143
Supernetting
172.16.12.0/24
172.16.13.0/24 172.16.12.0/22
172.16.14.0/24
172.16.15.0/24
144
Supernetting Question
What is the most efficient summarization that R1 can use to advertise its
networks to R2?
146
Cisco IOS
147
The Purpose of Cisco IOS
148
Introduction to Routers
A router is a special type of computer. It has the same basic components as a standard desktop
PC. However, routers are designed to perform some very specific functions. Just as computers
need operating systems to run software applications, routers need the Internetwork Operating
System software (IOS) to run configuration files. These configuration files contain the
instructions and parameters that control the flow of traffic in and out of the routers. The many
parts of a router are shown below:
149
Router Memory Components
150
ROM
Read-Only Memory
151
RAM
152
NVRAM
Non-Volatile RAM
153
Flash
Flash memory has the following characteristics and
functions:
Types of interfaces:
Ethernet
Fast Ethernet
Serial
ISDN BRI
Loopback
Console
Aux
155
Router Internal Components
156
Router Power-On/Bootup Sequence
157
Loading the Cisco IOS Software
From Flash Memory
160
Internal Components of a 2600 Router
161
Computer/Terminal Console Connection
162
HyperTerminal Session Properties
164
Establishing a
HyperTerminal Session
Take the following steps to connect a terminal to the console port on the router:
First, connect the terminal using the RJ-45 to RJ-45 rollover cable and an RJ-45 to
DB-9 or RJ-45 to DB-25 adapter.
Then, configure the terminal or PC terminal emulation software for 9600 baud, 8
data bits, no parity, 1 stop bit, and no flow control.
165
Router Command Line Interface
166
IOS File System Overview
167
Router LED Indicators
168
Router Configuration
169
Router User Interface Modes
The Cisco command-line interface (CLI) uses a hierarchical structure. This structure
requires entry into different modes to accomplish particular tasks.
Each configuration mode is indicated with a distinctive prompt and allows only
commands that are appropriate for that mode.
As a security feature the Cisco IOS software separates sessions into two access
levels, user EXEC mode and privileged EXEC mode. The privileged EXEC mode is
also known as enable mode.
170
Overview of Router Modes
171
Router Modes
172
CLI Command Modes
All command-line interface (CLI) configuration changes to a Cisco router are made
from the global configuration mode. Other more specific modes are entered
depending upon the configuration change that is required.
The following command moves the router into global configuration mode
When specific configuration modes are entered, the router prompt changes to
indicate the current configuration mode.
Typing exit from one of these specific configuration modes will return the router to
global configuration mode. Pressing Ctrl-Z returns the router to all the way back
privileged EXEC mode.
173
Show Version Command
wg_ro_a#show version
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Mon 08-Feb-99 18:18 by phanguye
Image text-base: 0x03050C84, data-base: 0x00001000
174
Viewing the Configuration
175
show running-config and
show startup-config Commands
In RAM In NVRAM
wg_ro_c#show running-config wg_ro_c#show startup-config
Building configuration... Using 1359 out of 32762 bytes
Current configuration: !
! version 12.0
version 12.0 !
! -- More --
-- More --
176
Saving Configurations
Configurations in two locations - RAM and NVRAM.
177
Command Abbreviation
Show Configuration – sh run
Sh ip int br - sh history
Configure Terminal – conf t
Line auxillary – line aux
Line console – line con
178
Configuring a Router’s Name
A router should be given a unique name as one of the first
configuration tasks.
Router(config)#hostname Sudacad
Sudacad(config)#
179
Setting
the Clock
with Help
180
Privileged Mode Command
# show startup-config
# show running-config
# show version
# show flash
# show interfaces
# show interfaces s 0
# show history
# show terminal
# terminal history size 25
181
Password
182
Passwords
There are five passwords for Router
Privileged Mode Password – 2
Line Console Password
Auxiliary Port Password
Telnet Password
183
Privileged Mode Password
Gates(config)# enable password cisco
Encrypted privilege mode password
Gates(config)# enable secret cisco1
184
Line Password
Gates(config)# line console 0
Gates(config- line)# password cisco
Gates(config- line)# login
185
Aux Port Password
Gates(config)# line aux 0
Gates(config- line)# password cisco
Gates(config- line)# login
186
Configuring a Telnet Password
187
Telnet Password
Gates(config)# line vty 0 4
Gates(config-line)# password cisco
Gates(config-line)# login
188
Encrypting Passwords
Only the enable secret password is encrypted by default
Need to manually configure the user-mode and enable
passwords for encryption
To manually encrypt your passwords, use the service
password-encryption command
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#service password-encryption
189
Disable Passwords
Gates(config)# no enable password
Gates(config)# no enable secret
For the Console
Gates(config)# line con 0
Gates(config)# no password
Gates(config)# line vty 0 4
Gates(config)# no password
190
Routing
191
Objectives
Upon completion of this chapter, you will
be able to complete the following tasks:
Distinguish the use and operation of static and
dynamic routes
Configure and verify a static route
Identify how distance vector IP routing protocols
such as RIP and IGRP operate on Cisco routers
Enable Routing Information Protocol (RIP)
Enable Interior Gateway Routing Protocol (IGRP)
Verify IP routing with show and debug commands
192
Routing
194
What is Routing?
10.120.2.0 172.16.1.0
E0
S0
197
IP Routing Process
10.0.0.1 20.0.0.1
E0 E1
A B 20.0.0.2
10.0.0.2
198
IP Routing
The different types of routing are:
Static routing
Default routing
Dynamic routing
199
Static Routes
Benefits
No overhead on the router CPU
No bandwidth usage between routers
Adds security
Disadvantage
Administrator must really understand the internetwork
If a network is added to the internetwork, the
administrator has to add a route to it on all routers
Not feasible in large networks
200
Static Route Configuration
203
LAB – Static Route Configuration
20.0.0.1 30.0.0.2
20.0.0.2 30.0.0.1
S0
10.0.0.1 E0
S0 S0 S1
E0 40.0.0.1
R2# config t
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2
10.0.0.2
A B 40.0.0.2
R1# config t
R3# config t
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2
R3(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1
R1(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.2
R3(config)#ip route 20.0.0.0 255.0.0.0 30.0.0.1
204
What is a Routing Protocol?
10.120.2.0 172.16.1.0
E0
Routing protocols are S0
used between
routers to determine
paths and maintain
routing tables.
Once the path is
Network Destination Exit 172.17.3.0
determined a router can Protocol Network Interface
route a routed protocol.
Connected 10.120.2.0 E0
RIP 172.16.2.0 S0
IGRP 172.17.3.0 S1
Routed Protocol: IP
Routing protocol: RIP, IGRP
Routing Categories
An Autonomous System (AS) is a group of IP networks, which has a
Autonomous System single and clearly defined routing policy.
Group of routers which can exchange updates
AS are identified by numbers
All Routing protocols are categorized as IGP or EGP
EGP
Exterior Gateway
Protocols are used
for routing between
Autonomous Systems
AS 1000 AS 3000
IGP
Interior Gateway Protocols are
used for routing decisions
AS 2000 within an Autonomous System.
206
Routing Categories
Interior Gateway Protocol Exterior Gateway Interior Gateway Protocol
(IGP) Protocol (EGP) (IGP)
AS 1000 AS 3000
EGP
EGP IGP
EGP
AS 2000
207
Autonomous Systems: Interior or Exterior
Routing Protocols
209
Types or Classes of Routing Protocols
Distance Vector
RIP V1
IGRP
RIP V2
Link state
OSPF
IS-IS
Hybrid
EIGRP
210
Classful Routing Overview
Classful routing protocols do not include the subnet mask with the
route advertisement.
211
Classless Routing Overview
Classless routing protocols include the subnet mask with
the route advertisement.
Classless routing protocols support variable-length
subnet masking (VLSM) and subnetting
Examples of classless routing protocols:
RIP Version 2 (RIPv2)
EIGRP
OSPF
IS-IS
212
Distance Vector Routing Protocols
192.168.20.1
192.168.10.1
214
Distance Vector
192.168.20.1
192.168.10.1
There are two Distance Vector Protocol, Both uses different metric
RIP – Hops
IGRP – Composite (Bandwidth + Delay).
215
Distance Vector
2
1
R1 3
0
192.168.10.1
2
192.168.20.1
1
216
Distance Vector
IGRP 10 1 Mbps
1 Mbps
R1 1 Mbps
10
10
192.168.10.1
56 kbps
192.168.10.1 30 192.168.20.1
30
56 kbps
217
Routing Loops
218
Sources of Information and
Discovering Routes
• Each node maintains the distance from itself to each possible destination network.
Inconsistent Routing Entries (Cont.)
227
Split Horizon
• It is never useful to send information about a route back in the direction from which the
original information came.
Split Horizon
Solution to the Routing Loop problem
Split Horizon is a rule that routing
information cannot be sent back in the
direction from which it was received
Had split horizon been used in our
example, Router B would not have
included information about network
10.4.0.0 in its update to Router C.
229
Route Poisoning
• Route Poisoning. Usually used in conjunction with split
horizon
• Route poisoning involves explicitly poisoning a routing
table entry for an unreachable network
• Once Router C learned that network 10.4.0.0 was
unavailable it would have immediately poisoned the
route to that network by setting its hop count to the
routing protocol’s infinity value
• In the case of RIP, that would mean a hop count of 16.
230
Triggered Updates
New routing tables are sent to neighboring routers on a regular basis.
231
Triggered Updates Graphic
232
Holddowns
• Holddowns are a technique used to ensure that a route recently
removed or changed is not reinstated by a routing table update
from another route
• Holddown prevents regular update messages from reinstating a
route that is going up and down (called flapping)
• Holddowns prevent routes from changing too rapidly by allowing
time for either the downed route to come back up
• Holddowns make a router wait a period of time before accepting an
update for a network whose status or metric has recently changed
233
Solution: Holddown Timers
234
RIP Timers
• Route update timer Sets the interval (typically 30 seconds)
between periodic routing updates
• Route flush timer Sets the time between a route becoming invalid
and its removal from the routing table (240 seconds).
235
Routing Information Protocol (RIP)
236
Router Configuration
The router command starts a routing process.
Gates(config)#router rip
Gates(config-router)#network 172.16.0.0
192.168.20.1 192.168.30.1
S0
S0 S1
192.168.10.1 E0 S0
192.168.30.2 E0 192.168.40.1
192.168.20.2
R2# config t
R2(config)#router rip 192.168.40.2
A R2(config)#network 192.168.20.0 B
192.168.10.2 R2(config)#network 192.168.30.0
238
Verifying RIP Configuration
239
Displaying the
IP Routing Table
240
debug ip rip Command
241
RIP Version 2 (RIPv2)
R1# config t
R1(config)# )#router rip
R1(config)#network 192.168.10.0
R1(config)#network 192.168.20.0
R1(config)#version 2
242
Example of Discontiguous Networks in RIPV1
243
Example of Discontiguous Networks in RIPV1
244
Exercise - RIP Version 2 Configuration
192.168.0.4/30 192.168.0.8/30
S0
S0 S1
E0 S0
E0
192.168.0.16/29 192.168.0.32/28
A B
245
Exercise - RIP Version 2 Configuration
192.168.0.5 192.168.0.9
255.255.255.252 255.255.255.252
S0
S0 S1
E0 S0 192.168.0.33
192.168.0.10 E0 255.255.255.240
192.168.0.17 192.168.0.6 255.255.255.252
255.255.255.248 255.255.255.252
192.168.0.34
A B 255.255.255.240
192.168.0.18
255.255.255.248
246
Exercise - RIP Version 2 Configuration
192.168.0.4/30 192.168.0.8/30
S0
S0 S1
E0 S0
E0
R2# config t
192.168.0.16/29 R2(config)#router rip 192.168.0.32/28
R2(config)#network 192.168.0.4
R2(config)#network 192.168.0.8
R2(config)#version 2
A B
247
Switching
248
Layer 2 Switching
Switching breaks up large collision domains into
smaller ones
249
Switching Services
Unlike bridges that use software to create and manage a
filter table, switches use Application Specific Integrated
Circuits (ASICs)
Layer 2 switches and bridges are faster than routers
because they don’t take up time looking at the Network
layer header information.
They look at the frame’s hardware addresses before
deciding to either forward the frame or drop it.
layer 2 switching so efficient is that no modification to
the data packet takes place
250
How Switches and Bridges
Learn Addresses
Bridges and switches learn in the following ways:
251
Ethernet Access with Hubs
252
Ethernet Access with Switches
253
Ethernet Switches and Bridges
Address learning
Forward/filter decision
Loop avoidance
254
Switch Features
There are three conditions in which a switch will flood a
frame out on all ports except to the port on which the
frame came in, as follows:
Unknown unicast address
Broadcast frame
Multicast frame
255
MAC Address Table
256
Learning Addresses
259
Broadcast and Multicast Frames
261
VLANs
262
VLANs
A VLAN is a logical grouping of network users and
resources connected to administratively defined ports on
a switch.
Ability to create smaller broadcast domains within a layer
2 switched internetwork by assigning different ports on
the switch to different subnetworks.
Frames broadcast onto the network are only switched
between the ports logically grouped within the same
VLAN
By default, no hosts in a specific VLAN can communicate
with any other hosts that are members of another VLAN,
For Inter VLAN communication you need routers
263
VLANs
This limits the size of the broadcast domains and uses the router to
determine whether one VLAN can talk to another VLAN.
NOTE: This is the only way a switch can break up a broadcast domain!
264
VLAN Overview
• Segmentation
• Flexibility
• Security
266
How VLANs Simplify Network Management
267
VLAN Memberships
VLAN created based on port is known as Static VLAN.
268
VLAN Membership Modes
269
VLAN Operation
270
Types of Links
Access links
This type of link is only part of one VLAN
It’s referred to as the native VLAN of the port.
Any device attached to an access link is unaware of a VLAN
Switches remove any VLAN information from the frame before
it’s sent to an access-link device.
Trunk links
Trunks can carry multiple VLANs
These carry the traffic of multiple VLANs
272
Trunk links
273
Frame Tagging
Can create VLANs to span more than one connected switch
Hosts are unaware of VLAN
When host A Create a data unit and reaches switch, the switch adds a
Frame tagging to identify the VLAN
Frame tagging is a method to identify the packet belongs to a particular
VLAN
Each switch that the frame reaches must first identify the VLAN ID from the
frame tag
It finds out what to do with the frame by looking at the information in the
filter table
Once the frame reaches an exit to an access link matching the frame’s VLAN
ID, the switch removes the VLAN identifier
274
Frame Tagging Methods
There are two frame tagging methods
Inter-Switch Link (ISL)
IEEE 802.1Q
Inter-Switch Link (ISL)
proprietary to Cisco switches
used for Fast Ethernet and Gigabit Ethernet links only
IEEE 802.1Q
Created by the IEEE as a standard method of frame
tagging
it actually inserts a field into the frame to identify the VLAN
If you’re trunking between a Cisco switched link and a
different brand of switch, you have to use 802.1Q for the
trunk to work.
275
ISL Tagging
ISL trunks enable VLANs across a backbone.
Performed with ASIC
ISL header not seen
by client
Effective between
switches, and
between routers and
switches
276
LAB-Creating Trunk
24 12
1 2 3 4 1 2 3 4
10.0.0.1 11.0.0.4
11.0.0.2
10.0.0.3
278
Verifying the VLAN Configuration
Switch#show vlan [id | name] [vlan_num | vlan_name]
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
51 enet 100051 1500 - - - - - 0 0
52 enet 100052 1500 - - - - - 0 0
…
• Displays the MAC address table information for the specified interface in
the specified VLAN
280
VTP “VLAN Trunking Protocol”
Features
A messaging system that advertises VLAN configuration information
Maintains VLAN configuration consistency throughout a common
administrative domain
Sends advertisements on trunk ports only
281
VLAN Trunking Protocol (VTP)
Benefits of VTP
Consistent VLAN configuration across all switches in
the network
Accurate tracking and monitoring of VLANs
Dynamic reporting of added VLANs to all switches in
the VTP domain
282
VTP Modes
•Creates VLANs
•Modifies VLANs
•Deletes VLANs
•Sends/forwards
advertisements
•Synchronizes
•Saved in NVRAM
•Creates VLANs
• Forwards •Modifies VLANs
advertisements •Deletes VLANs
• Synchronizes •Forwards
• Not saved in advertisements
NVRAM •Does not
synchronize
•Saved in NVRAM
283
VTP Operation
• VTP advertisements are sent as multicast frames.
• VTP servers and clients are synchronized to the latest update identified
revision number.
• VTP advertisements are sent every 5 minutes or when there is a change.
284
VTP Pruning
• VTP pruning provides a way for you to preserve
bandwidth by configuring it to reduce the amount of
broadcasts, multicasts, and unicast packets.
285
VTP Pruning
• Increases available bandwidth by reducing unnecessary flooded traffic
• Example: Station A sends broadcast, and broadcast is flooded only toward any switch
with ports assigned to the red VLAN
286
VTP Configuration Guidelines
– Configure the following:
• VTP domain name
• VTP mode (server mode is the default)
• VTP pruning
• VTP password
287
VLAN to VLAN
If you want to connect between two
VLANs you need a layer 3 device
288
Router on Stick
10.0.0.1
20.0.0.1
FA0/0
9
24 12
1 2 3 4 1 2 3 4
10.0.0.2 20.0.0.3
20.0.0.2 10.0.0.3
289
Router On Stick (creating Vlans)
Create two VLAN's on each switches
#vlan database
sw(vlan)#vlan 2 name red
sw(vlan)#vlan 3 name blue
sw(vlan)#exit
sw#config t
sw(config)#int fastethernet 0/1
sw(config-if)#switch-port access vlan 2
sw(config)#int fastethernet 0/4
sw(config-if)#switch-port access vlan 3
To see Interface status
#show interface status
290
Router On Stick (Trunk Configuration)
• Trunk Port Configuration
• sw#config t
• sw(config)#int fastethernet 0/24
• sw(config-if)#switchport trunk encapsulation dot1q
• sw(config-if)#switchport mode trunk
291
Router On Stick (Router Configuration)
• Router Configuration
• R1#config t
• R1(config)#int fastethernet 0/0
• R1(config-if)# no shut
• R1(config)#int fastethernet 0/0.1
• R1(config-if)#encapsulation dot1q 2
• R1(config-if)#ip address 10.0.0.1 255.0.0.0
• R1(config-Iif)# EXIT
• R1(config)#int fastethernet 0/0.2
• R1(config-if)# encapsulation dot1q 3
• R1(config-if)#ip address 20.0.0.1 255.0.0.0
292
Router On Stick (Switch-Router Port
Configuration)
• Router-Switch Port to be made as Trunk
• sw(config)#int fastethernet 0/9
• sw(config-if)#switchport trunk enacapsulation dot1q
• sw(config-if)#switchport mode trunk
293