0% found this document useful (0 votes)
3 views

(3)data

The document outlines a course on data networks, covering topics such as network devices, the OSI model, TCP/IP protocols, and basic router and switch configurations. It emphasizes the importance of networking technology for efficient communication and resource management in businesses. Additionally, it details the layers of the OSI model and their functions, as well as various types of network media and cable configurations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

(3)data

The document outlines a course on data networks, covering topics such as network devices, the OSI model, TCP/IP protocols, and basic router and switch configurations. It emphasizes the importance of networking technology for efficient communication and resource management in businesses. Additionally, it details the layers of the OSI model and their functions, as well as various types of network media and cable configurations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 291

SUDACAD

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

Sharing data through the use of floppy disks is not an efficient


or cost-effective manner.

Businesses needed a solution that would successfully address


the following three problems:
• How to avoid duplication of equipment and resources
• How to communicate efficiently
• How to set up and manage a network

Businesses realized that networking technology could increase


productivity while saving money.

5
Networking Devices
Equipment that connects directly to a network
segment is referred to as a device.

These devices are broken up into two


classifications.
 End-user devices
computers, printers, scanners, and other
devices that provide services directly to the user.
 Network devices
All devices that connect the end-user devices
together to allow them to communicate.

6
Network Interface Card

A network interface card (NIC) is a printed circuit board


that provides network communication capabilities to and
from a personal computer. Also called a LAN adapter.

7
Hub
Connects a group of Hosts

8
Switch

Switches add more


intelligence to data transfer
management.

9
Router

Routers are used to connect networks together


Route packets of data from one network to another
Cisco became the de facto standard of routers because of their high-
quality router products
Routers, by default, break up a broadcast domain

10
Internetworking Basics
Two Domains:

Collision Domain
- Every Switch port
- The Whole Hub
Broadcast Domain
- Every Router port
- The Whole Switch

Switches can replace the hub, breaking up collision domains.


Switch : Intelligent, Expensive, Configurable, Commonly used
Hub: Dump, Cheap, Dummy, Not used nowadays .
11
The OSI Model

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

This would help network builders implement


networks that could communicate and work together

ISO therefore, released the OSI reference model in


1984.
13
Don’t Get Confused.

ISO - International Organization for Standardization

OSI - Open System Interconnection

IOS - Internetwork Operating System

To avoid confusion, some people say “International


Standard Organization.”

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

Each of the layers have Protocol Data Unit (PDU)


18
Layer 6 - The Presentation Layer
7 Application This layer is responsible for
presenting the data in the
6 Presentation
required format which may
5 Session include:
4 Transport Code Formatting
Encryption
3 Network Compression
2 Data Link
PDU - Formatted 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)

PDU - Formatted Data 20


Half Duplex
• It uses only one wire pair with a digital signal running in
both directions on the wire.

• It also uses the CSMA/CD protocol to help prevent


collisions and to permit retransmitting if a collision does
occur.

• If a hub is attached to a switch, it must operate in half-


duplex mode because the end stations must be able to
detect collisions.

• Half-duplex Ethernet—typically 10BaseT—is only about 30


to 40 percent efficient because a large 10BaseT network
will usually only give you 3 to 4Mbps—at most.
21
Full Duplex
In a network that uses twisted-pair cabling, one pair is used to carry the transmitted
signal from one node to the other node. A separate pair is used for the return or
received signal. It is possible for signals to pass through both pairs simultaneously.
The capability of communication in both directions at once is known as full duplex.

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.

5 Session It is also used to ensure reliable


data transport across the network.
4 Transport Can be reliable or unreliable
Sequencing
3 Network Acknowledgment
Retransmission
2 Data Link Flow Control

1 Physical PDU - Segments

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

Preamble DMAC SMAC Data length DATA FCS


25
Layer 1 - The Physical Layer
7 Application
6 Presentation
5 Session This is the physical media
through which the data,
4 Transport represented as electronic signals,
is sent from the source host to the
3 Network destination host.

2 Data Link Move bits between devices


Encoding
1 Physical PDU - Bits

26
Data Encapsulation
Application
Presentation
PDU
Upper-Layer Data Session

Transport Segment
TCP HeaderUpper-Layer Data

Network Packet
IP Header Data

LLC Header Data FCS


Data-Link Frame

MAC Header Data FCS

Physical Bits
0101110101001000010

27
OSI Model Analogy
Application Layer - Source Host

After riding your new bicycle a few times in Bangalore,


you decide that you want to give it to a friend who lives in
DADAR, Mumbai.
28
OSI Model Analogy
Presentation Layer - Source Host

Make sure you have the proper directions to disassemble


and reassemble the bicycle.
29
OSI Model Analogy
Session Layer - Source Host

Call your friend and make sure you have his correct
address.
30
OSI Model Analogy
Transport Layer - Source Host

Disassemble the bicycle and put different pieces in


different boxes. The boxes are labeled
“1 of 3”, “2 of 3”, and “3 of 3”.
31
OSI Model Analogy
Network Layer - Source Host

Put your friend's complete mailing address (and yours) on


each box.Since the packages are too big for your mailbox
(and since you don’t have enough stamps) you determine
that you need to go to the post office.
32
OSI Model Analogy
Data Link Layer – Source Host

Bangalore post office takes possession of the boxes.

33
OSI Model Analogy
Physical Layer - Media

The boxes are flown from Bangalore to Mumbai.

34
OSI Model Analogy
Data Link Layer - Destination

Dadar post office receives your boxes.

35
OSI Model Analogy
Network Layer - Destination

Upon examining the destination address, Dadar


post office determines that your boxes should be
delivered to your written home address.
36
OSI Model Analogy
Transport 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

Your friend hangs up because he is done talking to you.

38
OSI Model Analogy
Presentation Layer - Destination

BOB is finished and “presents” the bicycle to your friend.


Another way to say it is that your friend is finally getting
him “present”.
39
OSI Model Analogy
Application Layer - Destination

Your friend enjoys riding his new bicycle in Dadar.

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

• 10BaseT  10 Mbps, baseband, Unshielded twisted-pair


over Twisted-pair cable
• Running Ethernet over twisted-pair
wiring as specified by IEEE 802.3
• Configure in a star pattern
• Twisting the wires reduces EMI
• Fiber Optic has no EMI RJ-45 Plug and Socket

44
Twisted Pair Cables

 Unshielded Twisted Pair Cable (UTP)


most popular
maximum length 100 m
prone to noise

Category 1 Voice transmission of traditional telephone


Category 2 For data up to 4 Mbps, 4 pairs full-duplex
Category 3 For data up to 10 Mbps, 4 pairs full-duplex
Category 4 For data up to 16 Mbps, 4 pairs full-duplex
Category 5 For data up to 100 Mbps, 4 pairs full-duplex
Category 6 For data up to 1000 Mbps, 4 pairs full-duplex
45
Straight-through cable

46
Straight-through cable pinout

47
Crossover cable

48
Crossover cable

49
Rollover cable

50
Rollover cable pinout

51
Straight-Thru or Crossover

Use straight-through cables for the following cabling:


 Switch to router
 Switch to PC or server
 Hub to PC or server

Use crossover cables for the following cabling:


 Switch to switch
 Switch to hub
 Hub to hub
 Router to router
 PC to PC
 Router to PC
52
Cisco’s Three-Layer Model
The following are the three layers and their typical functions:
• The core layer: backbone
• The distribution layer: routing
• The access layer: switching

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

The main purpose of the Host-to-Host layer is to


shield the upper layer applications from the
complexities of the network.
“Just give me your data stream, with any
instructions, and I’ll begin the process of getting
your information ready to send.”
Two protocols at this layer:
• Transmission Control Protocol (TCP)
• User Datagram Protocol (UDP)
57
TCP Port Numbers

Source Destination

Port Port

Telnet Z
Host A Host Z

SP DP Destination port = 23.


Send packet to my
1028 23 …
Telnet
application.

58
TCP Port Numbers

59
TCP Three-Way Handshake/Open Connection

Host A Host B

Send SYN
1 (seq = 100 ctl = SYN)
SYN Received

Send SYN, ACK 2


SYN Received (seq = 300 ack = 101
ctl = syn,ack)
Established
3 (seq = 101 ack = 301
ctl = ack)

60
Opening & Closing Connection

61
User Datagram Protocol (UDP)

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 and
retransmission must be handled by higher layer protocols.

UDP is designed for applications that do not need to put sequences of


segments together.

The protocols that use UDP include:


• TFTP (Trivial File Transfer Protocol)
• SNMP (Simple Network Management Protocol)
• DHCP (Dynamic Host Control Protocol)
• DNS (Domain Name System)
62
UDP Segment Format
Bit
1 0 Bit 15 Bit 16 Bit 31

Source Port (16) Destination Port (16)


8
Bytes
Length (16) Checksum (16)

Data (if Any)

• No sequence or acknowledgment fields


TCP vs 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

21 23 25 53 69 161 520 Port


Transport Numbers
Layer TCP UDP

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)

Time-to-Live (8) Protocol (8) Header Checksum (16) 20


Bytes
Source IP Address (32)

Destination IP Address (32)

Options (0 or 32 if Any)

Data (Varies 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 = ???

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 = ???

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

– Unique addressing allows communication


between end stations.
– Path choice is based on destination address.
resented by an address
IP Addressing
32 Bits
Dotted
Decimal Network Host

Maximum 255 255 255 255


1 8 9 16 17 24 25 32

Binary 11111111 11111111 11111111 11111111

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 A: Network Host Host Host

•Class B: Network Network Host Host

•Class C: Network Network Network Host

•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

Address Class Network Host

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

Address Class Network Host

10.2.1.1 A 10.0.0.0 0.2.1.1

128.63.2.100 B 128.63.0.0 0.0.2.100

201.222.5.64 C 201.222.5.0 0.0.0.64

192.6.141.2 C 192.6.141.0 0.0.0.2


130.113.64.16 B 130.113.0.0 0.0.64.16

256.241.201.10 Nonexistent

83
Subnetting

Subnetting is dividing a network into two or


more networks.
Advantage
Can divide network in smaller parts
Restrict Broadcast traffic
Security
Simplified Administration

84
Formula
 Number of subnets – 2x
Where X = number of bits borrowed

 Number of Hosts – 2y-2


Where y = number of 0’s

 Block Size = Total number of Address


Block Size = 256-Mask

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.1 172.16.0.2 172.16.0.3 172.16.255.253 172.16.255.254

…...

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

New Routing Table


172.16 . 2 . 160 Network Interface
Network Host 172.16.0.0 E0
172.16.0.0 E1

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

New Routing Table


172.16 . 2 . 160 Network Interface
Network Subnet Host 172.16.2.0 E0
172.16.3.0 E1

90
Subnet Mask Without Subnets
Network Host

172.16.2.160 10101100 00010000 00000010 10100000

255.255.0.0 11111111 11111111 00000000 00000000

10101100 00010000 00000000 00000000

Network 172 16 0 0
Number

•Subnets not in use—the default


Subnet Mask with Subnets
Network Subnet Host

172.16.2.160 10101100 00010000 00000010 10100000

255.255.255.0 11111111 11111111 11111111 00000000

10101100 00010000 00000010 00000000

128

252
192
224
240
248
254
255
Network
Number 172 16 2 0

•Network number extended by eight bits


Subnet Mask with Subnets (cont.)
Network Subnet Host

172.16.2.160 10101100 00010000 00000010 10100000

255.255.255.192 11111111 11111111 11111111 11000000

10101100 00010000 00000010 10000000

128

252

128

252
192
224
240
248
254
255

192
224
240
248
254
255
Network
Number 172 16 2 128

•Network number extended by ten bits


Subnet Mask Exercise

Address Subnet Mask Class Subnet

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

Address Subnet Mask Class Subnet

172.16.2.10 255.255.255.0 B 172.16.2.0

10.6.24.20 255.255.240.0 A 10.6.16.0

10.30.36.12 255.255.255.0 A 10.30.36.0

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

Network Network Subnet Host

172.16.2.121: 10101100 00010000 00000010 01111001


255.255.255.0: 11111111 11111111 11111111 00000000

Subnet: 10101100 00010000 00000010 00000000


Broadcast: 10101100 00010000 0000001011111111

• Subnet Address = 172.16.2.0


• Host Addresses = 172.16.2.1–172.16.2.254
• Broadcast Address = 172.16.2.255
• Eight Bits of Subnetting
Subnet Planning
20 Subnets
5 Hosts per Subnet
Class C Address:
192.168.5.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

192.168.5.121: 11000000 10101000 00000101 01111001


255.255.255.248: 11111111 11111111 11111111 11111000

Subnet: 11000000 10101000 00000101 01111000


Broadcast: 11000000 10101000 00000101 01111111

• Subnet Address = 192.168.5.120


• Host Addresses = 192.168.5.121–192.168.5.126
• Broadcast Address = 192.168.5.127
• Five Bits of Subnetting
Exercise
• 192.168.10.0
• /27

? – SNM
? – Block Size
?- Subnets

100
Exercise
• /27

? – SNM – 224
? – Block Size = 256-224 = 32
?- Subnets

Subnets 10.0 10.32 10.64


FHID 10.1 10.33

LHID 10.30 10.62


Broadcast 10.31 10.63
Exercise
• 192.168.10.0
• /30

? – SNM
? – Block Size
?- Subnets

102
Exercise
• /30

? – SNM – 252
? – Block Size = 256-252 = 4
?- Subnets

Subnets 10.0 10.4 10.8


FHID 10.1 10.5

LHID 10.2 10.6


Broadcast 10.3 10.7
Exercise
Mask Subnets Host
/26 ? ? ?
/27 ? ? ?
/28 ? ? ?
/29 ? ? ?
/30 ? ? ?
104
Exercise
Mask Subnets Host
/26 192 4 62
/27 224 8 30
/28 240 16 14
/29 248 32 6
/30 252 64 2
105
Exam Question
• Find Subnet and Broadcast address
– 192.168.0.100/27

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

Subnets 0.0 32.0 64.0 96.0

FHID 0.1 32.1 64.1 96.1

LHID 31.254 63.254 95.254 127.254

Broadcast 31.255 63.255 95.255 127.255


Class B
172.16.0.0 /27
Subnets ?
Hosts ?
Block Size ?

114
Class B
172.16.0.0 /27
Subnets 211 -2 = 2046
Hosts 25 -2 = 30
Block Size 256-224 = 32

Subnets 0.0 0.32 0.64 0.96

FHID 0.1 0.33 0.65 0.97

LHID 0.30 0.62 0.94 0.126

Broadcast 0.31 0.63 0.95 0.127


Class B
172.16.0.0 /23
Subnets ?
Hosts ?
Block Size ?

116
Class B
172.16.0.0 /23
Subnets 27 -2 = 126
Hosts 29 -2 = 510
Block Size 256-254 = 2

Subnets 0.0 2.0 4.0 6.0

FHID 0.1 2.1 4.1 6.1

LHID 1.254 3.254 5.254 7.254

Broadcast 1.255 3.255 5.255 7.255


Class B
172.16.0.0 /24
Subnets ?
Hosts ?
Block Size ?

118
Class B
172.16.0.0 /24
Subnets 28 -2 = 254
Hosts 28 -2 = 254
Block Size 256-255 = 1

Subnets 0.0 1.0 2.0 3.0

FHID 0.1 1.1 2.1 3.1

LHID 0.254 1.254 2.254 3.254

Broadcast 0.255 1.255 2.255 3.255


Class B
172.16.0.0 /25
Subnets ?
Hosts ?
Block Size ?

120
Class B
172.16.0.0 /25
Subnets 29 -2 = 510
Hosts 27 -2 = 126
Block Size 256-128 = 128

Subnets 0.0 0.128 1.0 1.128 2.0 2.128

FHID 0.1 0.129 1.1 1.129 2.1 2.129

LHID 0.126 0.254 1.126 1.254 2.126 2.254

Broadcast 0.127 0.255 1.127 1.255 2.127 2.255


Find out Subnet and Broadcast Address

• 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

Subnets 10.0 10.64 10.128 10.192

FHID 10.0.0.1 10.64.0.1 10.128.0.1 10.192.0.1

LHID 10.63.255.254 10.127.255.254 10.191.255.254 10.254.255.254

Broadcast 10.63.255.255 10.127.255.255 10.191.255.255 10.254.255.255


Class A
10.0.0.0 /18
Subnets ?
Hosts ?
Block Size ?

130
Class A
10.0.0.0 /18
Subnets 210 -2 = 1022
Hosts 214 -2 = 16382
Block Size 256-192 = 64

Subnets 10.0.0.0 10.0.64.0 10.0.128.0 10.0.192.0

FHID 10.0.0.1 10.0.64.1 10.0.128.1 10.0.192.1

LHID 10.0.63.254 10.0.127.254 10.0.191.254 10.0.254.254

Broadcast 10.0.63.255 10.0.127.255 10.0.191.255 10.0.254.255


Broadcast Addresses Exercise

Address Subnet Mask Class Subnet Broadcast

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

Address Subnet Mask Class Subnet Broadcast

201.222.10.60 255.255.255.248 C 201.222.10.56 201.222.10.63


15.16.193.6 255.255.248.0 A 15.16.192.0 15.16.199.255

128.16.32.13 255.255.255.252 B 128.16.32.12 128.16.32.15

153.50.6.27 255.255.255.128 B 153.50.6.0 153.50.6.127

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

• With VLSMs we can have different subnet masks for different


subnets.

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

WAN 192.168.10.129 and 130 WAN 192.198.10.133 and 134

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

Medani PortSudan 192.168.10.96/28


192.168.10.64/27
Nyala 192.168.10.112/28
137
VLSM Exercise
2
12
40 2

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

Network Network Network Subnet


16 8 4 2 1
172.16.12.0 11000000 10101000 00001100 00000000
172.16.13.0 11000000 10101000 00001101 00000000
172.16.14.0 11000000 10101000 00001110 00000000
172.16.15.0 11000000 10101000 00001111 00000000

255.255.255.0 11111111 11111111 11111111 00000000

143
Supernetting

Network Network Network Subnet


16 8 4 2 1
172.16.12.0 11000000 10101000 00001100 00000000
172.16.13.0 11000000 10101000 00001101 00000000
172.16.14.0 11000000 10101000 00001110 00000000
172.16.15.0 11000000 10101000 00001111 00000000

255.255.252.0 11111111 11111111 11111100 00000000

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?

A. 172.1.4.0/24 172.1.5.0/24 172.1.6.0/24 172.1.7.0/24


B. 172.1.0.0/22
C. 172.1.4.0/25 172.1.4.128/25 172.1.5.0/24 172.1.6.0/24
172.1.7.0/24
D. 172.1.0.0/21
E. 172.1.4.0/22
145
Routers & Cisco IOS

146
Cisco IOS

Cisco technology is built around the Cisco


Internetwork Operating System (IOS), which is the
software that controls the routing and switching
functions of internetworking devices.

A solid understanding of the IOS is essential for a


network administrator.

147
The Purpose of Cisco IOS

As with a computer, a router or switch cannot function without an


operating system. Cisco calls its operating system the Cisco Internetwork
Operating System or 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

ROM - Read Only Memory – Bootstrap/POST

FLASH Memory- IOS Images are kept here


- Erasable reprogrammable ROM
- Contents are kept on Power down or reload

RAM - Random Access memory


- Routing Tables
- Running Configuration
- Contents are lost on reboot

NVRAM - Start up configuration


- Configuration Register
- Contents are kept on reload

150
ROM

Read-Only Memory

ROM has the following characteristics and functions:

 Maintains instructions for power-on self test


(POST) diagnostics
 Stores bootstrap program and basic operating
system software
 Mini IOS

151
RAM

Random Access Memory, also called dynamic RAM (DRAM)

RAM has the following characteristics and functions:

 Stores routing tables


 Holds ARP cache
 Performs packet buffering (shared RAM)
 Provides temporary memory for the configuration file of
the router while the router is powered on
 Loses content when router is powered down or restarted

152
NVRAM

Non-Volatile RAM

NVRAM has the following characteristics and functions:

Provides storage for the startup configuration file


Retains content when router is powered down or
restarted
Configuration Register – 16 bit register which decides
boot sequence

153
Flash
Flash memory has the following characteristics and
functions:

 Holds the operating system image (IOS)


 Allows software to be updated without
removing and replacing chips on the processor
 Retains content when router is powered down
or restarted
 Can store multiple versions of IOS software
 Is a type of electronically erasable,
programmable ROM (EEPROM)
154
Interfaces
Interfaces have the following characteristics and functions:

Connect router to network for frame entry and exit


Can be on the motherboard or on a separate module

Types of interfaces:

 Ethernet
 Fast Ethernet
 Serial
 ISDN BRI
 Loopback
 Console
 Aux
155
Router Internal Components

156
Router Power-On/Bootup Sequence

1. Perform power-on self test (POST).


2. Load and run bootstrap code.
3. Find the Cisco IOS software.
4. Load the Cisco IOS software.
5. Find the configuration.
6. Load the configuration.
7. Run the configured Cisco IOS software.

157
Loading the Cisco IOS Software
From Flash Memory

• The flash memory file is decompressed into RAM.


158
Loading the Configuration

• Load and execute the configuration from NVRAM.


• If no configuration is present in NVRAM, enter setup mode.
159
External Components of a 2600 Router

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

Cisco routers use LED indicators to provide status information. Depending


upon the Cisco router model, the LED indicators will vary. An interface LED
indicates the activity of the corresponding interface. If an LED is off when
the interface is active and the interface is correctly connected, a problem
may be indicated. If an interface is extremely busy, its LED will always be
on. The green OK LED to the right of the AUX port will be on after the
system initializes correctly.

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.

Global configuration mode commands are used in a router to apply configuration


statements that affect the system as a whole.

The following command moves the router into global configuration mode

Router#configure terminal (or config t)


Router(config)#

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

ROM: System Bootstrap, Version 11.0(10c), SOFTWARE


BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE(fc1)

wg_ro_a uptime is 20 minutes


System restarted by reload
System image file is "flash:c2500-js-l_120-3.bin"
(output omitted)
--More--

Configuration register is 0x2102

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 --

• Displays the current and saved configuration

176
Saving Configurations
Configurations in two locations - RAM and NVRAM.

•The running configuration is stored in RAM.


•Any configuration changes to the router are made to the
running-configuration and take effect immediately after the
command is entered.
•The startup-configuration is saved in NVRAM and is loaded into
the router's running-configuration when the router boots up.
• To save the running-configuration to the startup configuration,
type the following from privileged EXEC mode (i.e. at the
"Router#" prompt.)

Router# copy run start

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.

This task is accomplished in global configuration mode using


the following commands:

Router(config)#hostname Sudacad
Sudacad(config)#

As soon as the Enter key is pressed, the prompt changes from


the default host name (Router) to the newly configured host
name (which is Sudacad in the example above).

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

Passwords restrict access to routers.


Passwords should always be configured for virtual terminal
lines and the console line.
Passwords are also used to control access to privileged EXEC
mode so that only authorized users may make changes to the
configuration file.

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

A password must be set on one or more of the virtual


terminal (VTY) lines for users to gain remote access to the
router using Telnet.

Typically Cisco routers support five VTY lines numbered 0


through 4.

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

The process of transferring data from one local area


network to another
Layer 3 devices
Routed protocol is a protocol by which data can
be routed– Ex – IP, IPX
Routing protocol sends and receives routing
information packets to and from other routers – Ex -
RIP, OSPF , IGRP
Routing protocols gather and share the routing
information used to maintain and update routing
tables.
That routing information is in turn used to route a
routed protocol to its final destination
193
Routing
From To
Raj Ram
House #213, 4th Street House #452, 2nd Street
Jayanagar, Bangalore Dadar, Mumbai

194
What is Routing?
10.120.2.0 172.16.1.0

To route, a router needs to know:


Destination addresses
Sources it can learn from
Possible routes
Best route
195
What is Routing? (cont.)
10.120.2.0 172.16.1.0

E0
S0

Network Destination Exit


Protocol Network Interface

Connected 10.120.2.0 E0 Routed Protocol: IP


Learned 172.16.1.0 S0

Routers must learn destinations that are not


directly connected
Route Types

 Static routing - network administrator configures


information about remote networks manually. They are
used to reduce overhead and for security.

 Dynamic routing - information is learned from other


routers, and routing protocols adjust routes
automatically.

 Because of the extra administrative requirements, static


routing does not have the scalability of dynamic routing.

197
IP Routing Process

10.0.0.1 20.0.0.1
E0 E1

A B 20.0.0.2
10.0.0.2

 Step-by-step what happens when Host A wants to


communicate with Host B on a different network

 A user on Host A pings Host B’s IP address.

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

R1(config)#ip route network [mask]


{address | interface}[distance] [permanent]

– R1(config)# iproute DestAddress SNM Nexthop address


Static Route Configuration
ip route [destination_network] [mask] [next-hop_address or exitinterface]
[administrative_distance] [permanent

 ip route The command used to create the static route.


 destination_network The network you’re placing in the routing table.
 mask The subnet mask being used on the network.
 next-hop_address The address of the next-hop router that will receive the packet
and forward it to the remote network. This is a router interface that’s on a directly
connected network.
 exitinterface You can use it in place of the next-hop address if you want, but it’s
got to be on a point-to-point link, such as a WAN
 administrative_distance By default, static routes have an administrative distance
of 1 (or even 0 if you use an exit interface instead of a next-hop address)
 permanent If the interface is shut down, or the router can’t communicate to the
next-hop router, the route will automatically be discarded from the routing table.
Choosing the permanent option keeps the entry in the routing table no matter what
happens.

R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2


Verifying Static
Route Configuration

After static routes are configured it is important to verify that


they are present in the routing table and that routing is
working as expected.

The command show running-config is used to view the


active configuration in RAM to verify that the static route was
entered correctly.

The show ip route command is used to make sure that the


static route is present in the routing table.

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

An autonomous system is a collection of networks under a


common administrative domain.
IGPs operate within an autonomous system.
EGPs connect different autonomous systems.
208
Types or Classes of 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.

Within the same network, consistency of the subnet masks is


assumed.

Summary routes are exchanged between foreign networks.

Examples of classful routing protocols:


RIP Version 1 (RIPv1)
IGRP

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

• Routers pass periodic copies of routing table to neighbor


routers and accumulate distance vectors.
Distance Vector
 Uses Bellman Ford Algorithm
 It needs to find out the shortest path from one network to other
 How to determine which path is best?

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

 DV protocol are known as Routing by rumor


 RIP uses only Hop count
 RI routing table metric for 192.168.20.1 network will be
3
2

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

• IGRP uses bandwidth and delay as Metric


• R1 routing table metric for 192.168.20.1 network will be
– 30
– 60

217
Routing Loops

A network problem in which packets continue to be routed in an endless circle

218
Sources of Information and
Discovering Routes

• Routers discover the best path to


destinations from each neighbor.
Inconsistent Routing Entries

• Each node maintains the distance from itself to each possible destination network.
Inconsistent Routing Entries (Cont.)

• Slow convergence produces inconsistent routing.


Inconsistent Routing Entries (Cont.)

• Router C concludes that the best path to network 10.4.0.0 is


through router B.
Inconsistent Routing Entries (Cont.)

• Router A updates its table to reflect the new but


erroneous hop count.
Count to Infinity

Hop count for network 10.4.0.0 counts to infinity.


Routing Loops

• Packets for network 10.4.0.0 bounce (loop) between routers B


and C.
Defining a Maximum

• Define a limit on the number of hops to prevent infinite loops.


Maximum Hop Count
• One way of solving routing loop problem is to define a
maximum hop count.

• RIP permits a hop count of up to 15, so anything that


requires 16 hops is deemed unreachable

• The maximum hop count will control how long it takes


for a routing table entry to become invalid

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.

RIP updates occur every 30 seconds

However a triggered update is sent immediately in response to some


change in the routing table.

The router that detects a topology change immediately sends an update


message to adjacent routers that, in turn, generate triggered updates
notifying their adjacent neighbors of the change.

Triggered updates, used in conjunction with route poisoning, ensure that


all routers know of failed routes.

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 invalid timer Determines the length of time (180 seconds)


before a router determines that a route has become invalid

• Holddown timer This sets the amount of time during which


routing information is suppressed. This continues until either an
update packet is received with a better metric or until the holddown
timer expires. The default is 180 seconds

• 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)

 Routing Information Protocol (RIP) is a true distance-vector routing


protocol.
 It sends the complete routing table out to all active interfaces every
30 seconds
 RIP only uses hop count to determine the best way to a remote
network
 It has a maximum allowable hop count of 15
 AD is 120
 Bellman-ford algorithm
 Works well in small networks, but it’s inefficient on large networks
 RIP version 1 uses only classful routing, which means that all
devices in the network must use the same subnet mask
 RIP version 2 does send subnet mask information with the route
updates. This is called classless routing.

236
Router Configuration
The router command starts a routing process.

The network command is required because it enables the


routing process to determine which interfaces participate in
the sending and receiving of routing updates.

An example of a routing configuration is:

Gates(config)#router rip
Gates(config-router)#network 172.16.0.0

The network numbers are based on the network class


addresses, not subnet addresses or individual host addresses.
237
RIP Configuration

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

R1# config t R3# config t


R1(config)# )#router rip R3(config)# )#router rip
R1(config)#network 192.168.10.0 R3(config)#network 192.168.30.0
R1(config)#network 192.168.20.0 R3(config)#network 192.168.40.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

1. Find out the IP Address and SNM of each interfaces

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

R1# config t R3# config t


R1(config)# )#router rip R3(config)# )#router rip
R1(config)#network 192.168.0.4 R3(config)#network 192.168.0.8
R1(config)#network 192.168.0.16 R3(config)#network 192.168.0.32
R1(config)#version 2 R3(config)#version 2

247
Switching

248
Layer 2 Switching
 Switching breaks up large collision domains into
smaller ones

 Collision domain is a network segment with two or


more devices sharing the same bandwidth.

 A hub network is a typical example of this type of


technology

 Each port on a switch is actually its own collision


domain, you can make a much better Ethernet LAN
network just by replacing your hubs with switches

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:

• Reading the source MAC address of each


received frame or datagram

• Recording the port on which the MAC address


was received.

In this way, the bridge or switch learns which addresses


belong to the devices connected to each port.

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

• Initial MAC address table is empty.

256
Learning Addresses

• Station A sends a frame to station C.


• Switch caches the MAC address of station A to port E0 by learning the
source address of data frames.
• The frame from station A to station C is flooded out to all ports except
port E0 (unknown unicasts are flooded).
257
Learning Addresses (Cont.)

• Station D sends a frame to station C.


• Switch caches the MAC address of station D to port E3 by learning the
source address of data frames.
• The frame from station D to station C is flooded out to all ports except port
E3 (unknown unicasts are flooded).
258
Filtering Frames

• Station A sends a frame to station C.


• Destination is known; frame is not flooded.

259
Broadcast and Multicast Frames

• Station D sends a broadcast or multicast frame.


• Broadcast and multicast frames are flooded to all ports other
than the originating port.
260
Forward/Filter Decision
 When a frame arrives at a switch interface, the destination
hardware address is compared to the forward/ filter MAC database.

 If the destination hardware address is known and listed in the


database, the frame is sent out only the correct exit interface

 If the destination hardware address is not listed in the MAC


database, then the frame is flooded out all active interfaces except
the interface the frame was received on.

 If a host or server sends a broadcast on the LAN, the switch will


flood the frame out all active ports except the source port.

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

VLAN implementation combines Layer 2 switching and Layer 3 routing


technologies to limit both collision domains and broadcast domains.

VLANs can also be used to provide security by creating the VLAN


groups according to function and by using routers to communicate
between VLANs.

A physical port association is used to implement VLAN assignment.

Communication between VLANs can occur only through the router.

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

A VLAN = A Broadcast Domain = Logical Network (Subnet)


265
Security
 A Flat internetwork’s security used to be tackled by connecting hubs
and switches together with routers
 This arrangement is ineffective because
 Anyone connecting physical network could access network resources
located on that physical LAN
 Can observe the network traffic by plugging network analyzer into the
HUB
 Users could join a workgroup by just plugging their workstations into
the existing hub
 By creating VLAN’s administrators have control over each port and
user

266
How VLANs Simplify Network Management

 If we need to break the broadcast domain we need to connect a


router

 By using VLAN’s we can divide Broadcast domain at Layer-2

 A group of users needing high security can be put into a VLAN so


that no users outside of the VLAN can communicate with them.

 As a logical grouping of users by function, VLANs can be considered


independent from their physical locations.

267
VLAN Memberships
 VLAN created based on port is known as Static VLAN.

 VLAN assigned based on hardware addresses into a


database, is called a dynamic VLAN

268
VLAN Membership Modes

269
VLAN Operation

VLANs can span across multiple switches.


Trunks carry traffic for multiple VLANs.
Trunks use special encapsulation to distinguish between
different VLANs.

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

 A trunk link is a 100- or 1000Mbps point-to-point link between


two switches, between a switch and router.
271
Access links

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

Create two VLAN's on each switches


Trunk Port Configuration
sw#config t
sw(config)#vlan 10 sw#config t
sw(config)#vlan 20 sw(config)#int fastethernet 0/24
sw(config)#exit sw(config-if)#switchport mode trunk
sw(config)#int fastethernet 0/1 sw(config-if)# switchport trunk
sw(config-if)#switch-port access vlan 10 allowed VLAN 10
sw(config)#int fastethernet 0/4 sw(config-if)# switchport trunk
sw(config-if)#switch-port access vlan 20 allowed VLAN add 20
To see Interface status
#show interface * 2950 Only dot1q Encapsulation
277
Assigning Access Ports to a VLAN
Switch(config)#interface gigabitethernet 1/1

• Enters interface configuration mode

Switch(config-if)#switchport mode access

• Configures the interface as an access port

Switch(config-if)#switchport access vlan 3

• Assigns the access port to a VLAN

278
Verifying the VLAN Configuration
Switch#show vlan [id | name] [vlan_num | vlan_name]

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/5, Fa0/7
Fa0/8, Fa0/9, Fa0/11, Fa0/12
Gi0/1, Gi0/2
2 VLAN0002 active
51 VLAN0051 active
52 VLAN0052 active

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

Remote SPAN VLANs


------------------------------------------------------------------------------
Primary Secondary Type Ports
279
------- --------- ----------------- ------------------------------------------
Verifying the VLAN Port
Configuration
Switch#show running-config interface {fastethernet |
gigabitethernet} slot/port

• Displays the running configuration of the interface

Switch#show interfaces [{fastethernet | gigabitethernet}


slot/port] switchport

• Displays the switch port configuration of the interface

Switch#show mac-address-table interface interface-id [vlan


vlan-id] [ | {begin | exclude | include} expression]

• 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.

• If Switch A doesn’t have any ports configured for VLAN


5, and a broadcast is sent throughout VLAN 5, that
broadcast would not traverse the trunk link to Switch A.

• By default, VTP pruning is disabled on all switches.

• Pruning is enabled for the entire domain

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

Switch(config)#vtp mode server


Switch(config)#vtp domain gates
SwitchA#sh vtp status

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

You might also like