Week 1 Network Fundamentals

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 232

CCNAx 200 – 125

Routing & Switching

1
Course Contents:
 1.0 Basics of Networking

 2.0 LAN Switching Technologies

 3.0 Routing and NAT Technologies

 4.0 Service and Security

 5.0 TCP and SSL


 Network
o Group of two or more computers or electronic devices connected togather to
share information and resources.

Router

Switch PC1

User1 User2 Printer


 Network types

o LAN  Local Area Network

o WAN  Wide Area Network

o MAN  Metro-politan Area Network

o PAN  Personal area network

o CAN  Campus Area network

4
 Local area networks (LAN)
Set of devices connected with the same location (office/building)

5
 Wide Area Network (WAN)
Set of devices connected in two or more different locations. Two or more LAN.)

6
 Metro-politan Area Network (MAN)
Set of devices connected in city limits

7
 Personal area network (PAN)
two or more computer systems within 4 to 6 meters.

8
 Campus Area network (CAN)
A campus network, campus area network, corporate area network or CAN is a
computer network made up of an interconnection of local area networks (LANs) within
a limited geographical area..

9
 Physical Components of Networks

o Servers

o Laptops

 Hosts o Desktops

o Tablets

o Smartphones

10
o Hubs

 Network Access Devices o Switches

o Access Points

o Routers
 Network Infrastructure Device

o Firewalls
Copyright © Netmetric-solutions.com

11
Communication Media / Cables

o Types of cables used in networks


• Unshielded Twisted Pair (UTP) 
• Shielded Twisted Pair (STP)
• Coaxial Cable
• Fiber Optic Cable
• Wireless LANs

12
oUnshielded Twisted Pair (UTP)
• Categories of UTP Cable

13
o UTP Cable Connector

RJ-45 connector

14
o Coaxial Cable

Coaxial Cable Connectors

15
o Rollover Cable
A rollover cable is a network cable that
connects a computer terminal to a network
router’s console port. It is also referred to as a
Cisco console cable and is normally flat and
light blue so as to distinguish it from other
network cable types.

16
 Broadcast Domain
• A broadcast domain is a collection of devices that receive broadcast
traffic from each other.
• Switches will forward broadcast traffic to all interfaces, except the one
where it originated from.
• A lot of broadcast traffic might impact your network performance so
reducing the size of the broadcast domain is something to consider.
• Routers do not forward broadcast traffic, they break broadcast
domains.
• VLANs on switches also allow you to break broadcast domains.
Collision Domain

• A term collision is described as an event that usually happens on an


Ethernet network when we use a "Shared Media" to connect the devices
in an Ethernet network. A "Shared Media" is a type of connecting media
which is used to connect different network devices, where every device
share the same media.
• In a "Shared Media" there are no separate channels for sending and
receiving the data signals, but only one channel to send and receive the
data signals.
• Collisions will happen in an Ethernet Network when two devices
simultaneously try to send data on the Shared Media, since Shared Media
is half-duplex and sending and receiving is not supported at same time. 
E.G. of Broadcast and Collision Domain
Devices in Collision And Broadcast
Domain
• HUB – 
We start with a hub because we should get rid of it as soon as possible. The reason being, it neither breaks a
collision domain nor a broadcast domain,i.e a hub is neither a collision domain separator nor a broadcast domain
separator. All the devices connected to a hub is in a single collision and single broadcast domain. Remember, hubs
do not segment a network, they just connect network segments.
• SWITCH – 
Coming to switches, we have an advantage over the hub. Every port on a switch is in a different collision domain,
i.e a switch is a collision domain separator. So messages that come from devices connected to different ports
never experience a collision. This helps us during designing networks but there is still a problem with switches.
They never break broadcast domains, means it is not a broadcast domain separator. All the ports on the switch are
in still in a single broadcast domain. If a device sends a broadcast message, it will still cause congestion.
• ROUTER – 
Last, but not least, we have our savior. A router not only breaks collision domains but also break broadcast
domains, means it is both collision as well as broadcast domain separator. A router creates a connection between
two networks. A broadcast message from one network will never reach the other one as the router will never let
it pass. 
HUB
• When referring to a network, a hub is the most basic networking 
device that connects multiple computers or other network devices
together. Unlike a network switch or router, a network hub has no
routing tables or intelligence on where to send information and 
broadcasts all network data across each connection. Most hubs can
detect basic network errors, such as collisions, but having all
information broadcast to multiple ports is a security risk and cause
bottlenecks. In the past, network hubs were popular because they
were cheaper than a switch or router. Today, switches do not cost
much more than a hub and are a much better solution for any
network.
Switch
• A switch operates in the layer 2, i.e. data link layer of the OSI model.
• It uses MAC addresses (addresses of medium access control sublayer) to send data packets to
selected destination ports.
• It uses packet switching technique to receive and forward data packets from the source to the
destination device.
• It supports unicast (one-to-one), multicast (one-to-many) and broadcast (one-to-all)
communications.
• Transmission mode is full duplex, i.e. communication in the channel occurs in both the directions
at the same time. Due to this, collisions do not occur.
• Switches are active devices, equipped with network software and network management
capabilities.
• The number of ports is higher – 24/48.
• By creating VLAN, it can break the broadcast domain.
Type of Switches
• Unmanaged Switch − These are inexpensive switches commonly used in home networks and
small businesses. They can be set up by simply plugging in to the network, after which they
instantly start operating. When more devices needs to be added, more switches are simply
added by this plug and play method.
• Managed Switch − These are costly switches that are used in organizations with large and
complex networks, since they can be customized to augment the functionalities of a standard
switch. The augmented features may be QoS (Quality of Service) like higher security levels,
better precision control and complete network management. Despite their cost, they are
preferred in growing organizations due to their scalability and flexibility. Simple Network
Management Protocol (SNMP) is used for configuring managed switches.
• PoE Switch − Power over Ethernet (PoE) switches are used in PoE Gigabit Ethernets. PoE
technology combine data and power transmission over the same cable so that devices
connected to it can receive both electricity as well as data over the same line. PoE switches
offer greater flexibility and simplifies the cabling connections
Router
• A router is a layer 3 or network layer device.
• It connects different networks together and sends data packets from one network to another.
• A router can be used both in LANs (Local Area Networks) and WANs (Wide Area Networks).
• It transfers data in the form of IP packets. In order to transmit data, it uses IP address mentioned in
the destination field of the IP packet.
• Routers have a routing table in it that is refreshed periodically according to the changes in the
network. In order to transmit data packets, it consults the table and uses a routing protocol.
• In order to prepare or refresh the routing table, routers share information among each other.
• Routers provide protection against broadcast storms.
• Routers are more expensive than other networking devices like hubs,bridges and switches.
Types of Routers
• Wireless Router − They provide WiFi connection WiFi devices like laptops, smartphones
etc. They can also provide standard Ethernet routing. For indoor connections, the range
is 150 feet while its 300 feet for outdoor connections.
• Broadband Routers − They are used to connect to the Internet through telephone and to
use voice over Internet Protocol (VoIP) technology for providing high-speed Internet
access. They are configured and provided by the Internet Service Provider (ISP).
• Edge Routers − They are low-capacity routers placed at the periphery of the networks.
They connect the internal network to the external networks, and are suitable for
transferring data packets across networks. They use Border Gateway Protocol (BGP) for
connectivity.
• Brouters − Brouters are specialized routers that can provide the functionalities of bridges
as well. Like a bridge, brouters help to transfer data within a network. And like a router,
they route the data between the networks.
IANA
• IANA : Internet Assigned Numbers Authority
• What does IANA do?
• The Internet Assigned Numbers Authority (IANA) is responsible
for maintaining a collection of registries that are critical in ensuring
global coordination of the DNS root zone, IP addressing, and other
Internet protocol resources.
IEEE
• Institute of Electrical and Electronics Engineers
• What does the IEEE do?
• IEEE is a membership organization working to foster technological
innovation and excellence to benefit humanity. As the world's largest
technical professional organization focused on technology
advancement, IEEE creates industry standards to establish best
practices in a broad range of technologies.
IETF
• Internet Engineering Task force
• What does the IETF do?
• The IETF is an open international community of network designers,
operators, vendors and researchers concerned with the evolution of
the Internet architecture and the smooth operation of the Internet.
• A Request for Comments (RFC) is a formal document from the
Internet Engineering Task Force ( IETF ) that is the result of
committee drafting and subsequent review by interested parties.
Some RFCs are informational in nature.
RFC
• What is RFC used for?
• In the computer network engineering and design realm, a Request for
Comments (RFC) is a memorandum published by the Internet
Engineering Task Force (IETF) describing methods, behaviors, research, or
innovations applicable to the working of the Internet, along with
Internet-connected systems
• RFC (stands for Request For Comments) is a document that describes the
standards, protocols, and technologies of the Internet and TCP/IP. Since
1969, about 2400 Requests for Comments (RFCs) have been published on
various networking protocols, procedures, applications, and concepts.
ARP
• ARP
• Address Resolution Protocol is one of the most important protocols of the
network layer in the OSI model which helps in finding the MAC(Media Access
Control) address given the IP address of the system i.e. the main duty of the ARP is
to convert the 32-bit IP address(for IPv4) to 48-bit address i.e. the MAC address.
• How does ARP work?
• At the network layer when the source wants to find out the MAC address of the
destination device it first looks for the MAC address(Physical Address) in the ARP
cache or ARP table. If present there then it will use the MAC address from there
for communication. If you want to view your ARP cache(in Windows Operating
System) then open Command Prompt and type command —‘arp -a’ (without
quotes). An ARP table looks something like this.
ARP
ARP
• If the MAC address is not present in the ARP table then the source device will generate an ARP Request message.
In the request message the source puts its own MAC address, its IP address, destination IP address and the
destination MAC address is left blank since the source is trying to find this.
• Sender's MAC Address 00-11-0a-78-45-AD Sender's IP Address 192.16.10.104 Target's MAC Address 00-00-00-00-
00-00 Target's IP Address 192.16.20.204. The source device will broadcast the ARP request message to the local
network.
• The broadcast message is received by all the other devices in the LAN network. Now each device will compare the
IP address of the destination with its own IP address. If the IP address of destination matches with the device's IP
address then the device will send an ARP Reply message. If the IP addresses do not match then the device will
simply drop the packet.
• The device whose IP address has matched with the destination IP address in the packet will reply and send the
ARP Reply message. This ARP Reply message contains the MAC address of this device. The destination device
updates its ARP table and stores the MAC address of the source as it will need to contact the source soon. Now,
the source becomes destination(target) for this device and the ARP Reply message is sent.
• Sender's MAC Address 00-11-0a-78-45-AA Sender's IP Address 192.16.20.204 Target's MAC Address 00-11-0a-78-
45-AD Target's IP Address 192.16.10.104. The ARP reply message is unicast and it is not broadcasted because the
source which is sending the ARP reply to the destination knows the MAC address of the source device.
• When the source receives the ARP reply it comes to know about the destination MAC address and it also updates
its ARP cache. Now the packets can be sent as the source knows destination MAC address.
ARP Terms
• The important terms associated with ARP are : 
 
• ARP Cache: After resolving MAC address, the ARP sends it to the source where it stores in a table
for future reference. The subsequent communications can use the MAC address from the table
• ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache can reside
• ARP request: This is nothing but broadcasting a packet over the network to validate whether we
came across destination MAC address or not. 
• The physical address of the sender.
• The IP address of the sender.
• The physical address of the receiver is FF:FF:FF:FF:FF:FF or 1’s.
• The IP address of the receiver
• ARP response/reply: It is the MAC address response that the source receives from the
destination which aids in further communication of the data. 
ARP request packet
ARP Reply packet
Types of ARP
• There are five types of Address Resolution Protocol, which is given
below:
• ARP
• Proxy ARP
• Gratuitous ARP
• Reverse ARP (RARP)
• Inverse ARP
1. ARP
• 1. Address Resolution Protocol (ARP) –
• Address Resolution Protocol is a communication protocol used for
discovering physical address associated with given network address.
Typically, ARP is a network layer to data link layer mapping process,
which is used to discover MAC address for given Internet Protocol
Address.
In order to send the data to destination, having IP address is
necessary but not sufficient; we also need the physical address of the
destination machine. ARP is used to get the physical address (MAC
address) of destination machine.
ARP example
2. RARP
• 2. Reverse Address Resolution Protocol (RARP) –
• Reverse ARP is a networking protocol used by a client machine in a local area
network to request its Internet Protocol address (IPv4) from the gateway-router’s
ARP table. The network administrator creates a table in gateway-router, which is
used to map the MAC address to corresponding IP address.
When a new machine is setup or any machine which don’t have memory to store
IP address, needs an IP address for its own use. So the machine sends a RARP
broadcast packet which contains its own MAC address in both sender and
receiver hardware address field.
• RARP is not being used in today’s networks. Because we have much great
featured protocols like BOOTP (Bootstrap Protocol) and DHCP( Dynamic Host
Configuration Protocol).
RARP example
3. InARP
•  Inverse Address Resolution Protocol (InARP) –
• Instead of using Layer-3 address (IP address) to find MAC address, Inverse
ARP uses MAC address to find IP address. As the name suggests, InARP is
just inverse of ARP. Reverse ARP has been replaced by BOOTP and later
DHCP but Inverse ARP is solely used for device configuration. Inverse ARP is
enabled by default in ATM(Asynchronous Transfer Mode) networks. InARP is
used to find Layer-3 address from Layer-2 address (DLCI in frame relay).
Inverse ARP dynamically maps local DLCIs to remote IP addresses when you
configure Frame Relay. When using inverse ARP, we know the DLCI of
remote router but don’t know its IP address. InARP sends a request to
obtain that IP address and map it to the Layer-2 frame-relay DLCI.
InARP example
4. Proxy ARP
•  Proxy ARP –
• Proxy ARP was implemented to enable devices which are separated into network
segments connected by a router in the same IP network or sub-network to resolve
IP address to MAC addresses. When devices are not in same data link layer network
but are in the same IP network, they try to transmit data to each other as if they
were on the local network. However, the router that separates the devices will not
send a broadcast message because routers do not pass hardware-layer broadcasts.
Therefore, the addresses cannot be resolved. Proxy ARP is enabled by default so
the “proxy router” that resides between the local networks responds with its MAC
address as if it were the router to which the broadcast is addressed. When the
sending device receives the MAC address of the proxy router, it sends the datagram
to the proxy router, which in turns sends the datagram to the designated device.
Proxy ARP example
5. Gratuitous ARP
• 5. Gratuitous ARP –
• Gratuitous Address Resolution Protocol is used in advance network scenarios. It is
something performed by computer while booting up. When the computer booted up
(Network Interface Card is powered) for the first time, it automatically broadcast its MAC
address to the entire network. After Gratuitous ARP MAC address of the computer is known
to every switch and allow DHCP servers to know where to send the IP address if requested.
Gratuitous ARP could mean both Gratuitous ARP request and Gratuitous ARP reply, but not
needed in all cases. Gratuitous ARP request is a packet where source and destination IP are
both set to IP of the machine issuing the packet and the destination MAC is the broadcast
address ff:ff:ff:ff:ff:ff ; no reply packet will occur.
Gratuitous ARP is ARP-Reply that was not prompted by an ARP-Request. Gratuitous Address
Resolution Protocol is useful to detect IP conflict. Gratuitous ARP is also used to update ARP
mapping table and Switch port MAC address table.
Gratuitous ARP Example
ICMP
• What is ICMP (Internet Control Message Protocol)?
• ICMP is a network level protocol within TCP/IP which communicates
information about network connectivity issues back to the source. It sends
control messages such as destination network unreachable, source route failed,
and source quench. It uses a data packet structure with an 8-byte header and
variable-size data section.
• How does ICMP work?
• ICMP is used by a device, like a router, to communicate with the source of a
data packet about transmission issues. For example, if a datagram is not
delivered, ICMP might report this back to the host with details to help discern
where the transmission went wrong. It's a protocol that believes in direct
communication in the workplace.
ICMP
• ICMP and Ping
• Ping is a utility which uses ICMP messages to report back information on
network connectivity and the speed of data relay between a host and a
destination computer. It's one of the few instances where a user can interact
directly with ICMP, which typically only functions to allow networked
computers to communicate with one another.
ICMP Attacks
• Attacker can use ICMP in DDoS attacks?
• ICMP flood attack
• A ping flood or ICMP flood is when the attacker attempts to overwhelm a
targeted device with ICMP echo-request packets. The target has to process
and respond to each packet, consuming its computing resources until
legitimate users cannot receive service.
Ping of Death
• Ping of death attack
• A ping of death attack is when the attacker sends a ping larger than
the maximum allowable size for a packet to a targeted machine,
causing the machine to freeze or crash. The packet gets fragmented
on the way to its target, but when the target reassembles the packet
into its original maximum-exceeding size, the size of the packet causes
a buffer overflow.
• The ping of death attack is largely historical at this point. However,
older networking equipment could still be susceptible to it.
ICMP Smurf Attack
• Smurf attack
• In a Smurf attack, the attacker sends an ICMP packet with a spoofed
source IP address. Networking equipment replies to the packet,
sending the replies to the spoofed IP and flooding the victim with
unwanted ICMP packets. Like the 'ping of death,' today the Smurf
attack is only possible with legacy equipment.
ICMP Error
• What is ICMP error?
• ICMP (Internet Control Message Protocol) is an error-reporting
protocol that network devices such as routers use to
generate error messages to the source IP address when network
problems prevent delivery of IP packets. ... Any IP network device has
the capability to send, receive or process ICMP messages.
ICMP Message Type
Type Name
0 Echo Reply
3 Destination Unreachable
4 Source Quench
This message indicates that either the destination host or an intermediary router (or device) is receiving more data than it can process. If a
source receives this error message, it can reduce the rate of transfer to solve this issue.
This error mostly occurs when a router connects a high bandwidth network (such as LAN) to a low-bandwidth network (such as dial-up). In such
a situation, a sender device may transmit more data than a device working in the low-bandwidth network can feed.

5 Redirect
8 Echo
11 Time Exceeded

When a router forwards a packet, it always decrements the hop limit by one. Remember, the hop limit makes sure that a packet does not
endlessly travel through a network. If a router receives a packet with a hop limit of one and decrements the limit to zero, it discards the
packet, generates a Time Exceeded message with a code value of zero, and sends this message back to the source host. This error can
indicate a routing loop or the fact that the sender’s initial hop limit is too low.
42 Extended Echo Request
ICMP Error Code
Type 3
Code Description
0 Net Unreachable
1 Host Unreachable
2 Protocol Unreachable
3 Port Unreachable
4 Fragmentation Needed and Don't Fragment was Set
5 Source Route Failed
6 Destination Network Unknown
7 Destination Host Unknown
Traceroute
• What is traceroute?
• Traceroute is a command that runs tools used for network diagnostics. These tools trace the
paths data packets take from their source to their destinations, allowing administrators to
better resolve connectivity issues. On a Windows machine, this command is called tracert;
on Linux and Mac, it’s called traceroute. Traceroute and tracert largely function in the same
way—they map the route data takes from one point in a network to a specific IP server.
When data is transmitted between two points, it must “hop” through several devices, like
switches and routers. Traceroute maps each hop, provides the details and round-trip time
(RTT).  
• While ping can tell you if there is a problem, traceroute can help you pinpoint where the
problem exists. For an example of how you might use traceroute, imagine you’re visiting a
website and its pages are taking a long time to load. In this instance, you can use traceroute
to determine where the longest delays are occurring to get to the route of the issue.
Working of Traceroute
• How traceroute works ?
• Before running a traceroute command, you should understand a
network mechanism called “time to live” (TTL). TTL limits how long
data can “live” in an IP network. Every packet of data is assigned a TTL
value. Every time a data packet reaches a hop, the TTL value is
decreased by one. 
Working of Traceroute
• How traceroute works ?
• Another key element to understand is “round-trip time” (RTT).
Traceroute ensures each hop on the way to a destination device drops
a packet and sends back an ICMP error message. This means
traceroute can measure the duration of time between when the data
is sent and when the ICMP message is received back for each hop—
giving you the RTT value for each hop.
Working of Traceroute
• How traceroute works ?
• let’s say you run a traceroute and specify a maximum of 30 hops. Traceroute will send
packets with a TTL of one to the destination server. The first network device the data
passes through will decrease the TTL to the value of zero, and a message informing you
the packets were dropped is sent. This gives you the RTT for hop number one. 
• From there, the data packets are sent to the destination server with a TTL of two. As the
packets pass through the first hop, the TTL decreases to one. When they pass through
the second hop, it decreases to zero. The message is sent again. This gives you the RTT
for hop number two. 
• This process will repeat until the data packets either reach the destination device or it
reaches the maximum number of hops. By the end of this test, you will know the
number of hops to the destination device, the RTT length for each hop, and the device
name and IP address for each hop. 
o Wireless LANs
WLAN Stands for "Wireless Local Area
Network." A WLAN, or wireless LAN, is a
network that allows devices to connect and
communicate wirelessly. Unlike a traditional
wired LAN, in which devices communicate over
Ethernet cables, devices on a WLAN
communicate via Wi-Fi.

59
 Network/Topology Diagrams

60
Topologies – Logical and Physical

o Logical Topology
• What the network looks like to the end-device

o Physical Topology
• How the network is actually cabled

61
Putting it all together

 Cisco’s Three-Layer Heirarchical Design

oAccess Layer

62
oDistribution-Layer

63
o Core Layer

64
o The Collapsed Core Design

65
 Describe the impact of infrastructure components in an
enterprise network

66
Firewalls
o Inline systems that enforce an access control policy between
various network segments defined as security zones
• Can be software or hardware

o Usually deployed at network edges (Internet, WAN links)

o It has to be resistant to attacks against itself


• Usually deployed as layer 3 hop, thus it is reachable by the attacker
• Attacker cannot take-over the firewall

67
o Cisco’s current line of Firewalls;

• ASA’s: Adaptive Security Appliances

68
• Firepower

69
How do Firewalls impact the network?

o If they operate correctly, they are a huge security benefit.

o If Firewalls become overloaded they could be a source of traffic


congestion, delays, or packet drops.

o Misconfigured Firewalls, or internal applications that are misbehaving,


could block access to legitimate resources.

o They add an additional element to the network that must be monitored

70
WiFi Componenets in Enterprise Networks

o Wireless Access Points (AP)


An access point is a device that creates a
wireless local area network, or WLAN, usually
in an office or large building. An access point
connects to a wired router, switch, or hub via
an Ethernet cable, and projects a Wi-Fi signal to
a designated area.

71
A variety of options for Access Points

o Indoor

o Outdoor

o Managed (Locally or Cloud-Based)

72
o WiFi NICs

o Controllers

• Standalone
• Modularized/Integrated
• Can control different maximum quantities of APs

73
Impacts of WiFi Components on Enterprise Networks
o Reduced cost of implementing wired cabling.
o Many devices don’t even support Wired LAN connections
(i.e. tablets, smartphones, etc.)
o Allow for roaming
o Can become overloaded with traffic causing latency or even
the inability to connect to the network.
o Typically recommended to pair with security…which can
bring its own problems.
o Can make troubleshooting more difficult.

74
Router IOS Feature & Initialization steps
Router Initialization Steps.
1. POST
2. loading Bootstrap program from ROM into RAM.
3. Loading IOS image from flash into RAM.
4. Loading Configuration file NVRAM into RAM.

 After POST is done the bootstrap program is loaded from


ROM Into RAM to be executed
 The main job of bootstrap program is HOW to get the
IOS loaded into RAM.
Router CPU and Memory

• CPU
•Executes operating system instructions
• RAM
•running copy of configuration file.
•routing table
•ARP cache
• Read-only memory (ROM)
•POST used when router is powered up.
•Router’s bootstrap program
•Scaled down version of operating system IOS
• Non-volatile RAM (NVRAM)
•Stores startup configuration. (including IP addresses, Routing
protocol)
• Flash memory - Contains the operating system (Cisco IOS)
Router Bootup Process
Bootup Process

Step 1: POST (Power On Self Test)


• Executes diagnostics from ROM on several hardware components,
including the CPU,RAM, NVRAM
Step 2: Loading Bootstrap Program
• Copied from ROM into RAM
• Executed by CPU
• Main task is to locate the Cisco IOS and load it into RAM
Step 3: Locating the IOS
• Typically stored in flash memory, but it can be stored in other places
such as a TFTP server.
• If a full IOS image cannot be located, a scaled-down version of the IOS
is copied from ROM
• This version of IOS is used to help diagnose any problems and try to
load a complete version of the IOS into RAM.
Boot up Process
Step 4: Loading the IOS
• Some of the older Cisco routers ran the IOS directly from flash
• Current models copy the IOS into RAM for execution
• Might see a string of pound signs (#) while the image decompresses.
Step 5: Locating the Config File
• Bootstrap program searches for the startup configuration file (startup-config), in
NVRAM.
• This file has the previously saved configuration commands and parameters,
Step 6: Loading the Config File
• If a startup configuration file is found in NVRAM, the IOS loads it into RAM as the
running-config file and executes the commands.
• If the startup configuration file cannot be located, prompt the user to enter setup mode
ROM Functions

• Contains microcode for basic functions


Flash Functions
Loading the Cisco IOS Image
from Flash Memory

• The flash memory file is decompressed into RAM.


Loading the Configuration

• Load and execute the configuration from NVRAM.


SECTION SUMMARY
1. Router hardware components
2. Cisco Software components
3. Router memory
4. Router Initialization Steps.
Router Access
ROUTER ACCESS METHODS
• Directly using the console port
•No configuration needed on the router
• Telnet – over the network
•Network connection
•Network configuration on both ends (IP address, subnet mask, etc.)
•Telnet password configured on router
• Modem (AUX PORT on the router)
• Web access
Console
• The console port is a management port that provides out-of-band access to a router.
• Examples of console use are:
•The initial configuration of the network device
•Disaster recovery procedures and troubleshooting where remote access is not
possible
•Password recovery procedures
AUXILIARY
Using HyperTerminal

Open a terminal connection from the laptop/desktop like putty/teraterm etc.


Select the serial port and click OK
Login to the device using the login credentials
AUX
• Another way to establish a CLI session remotely is via a telephone dialup connection
using a modem connected to the router's AUX port.

• Similar to the console connection, this method does not require any networking
services

• The AUX port can also be used locally, like the console port.

• Generally, the only time the AUX port is used locally instead of the console port is
when there are problems using the console port
Telnet and SSH
• Unlike the console connection, Telnet sessions require active networking services on
the device.

• A host with a Telnet client can access the z sessions running on the Cisco device.

• The Secure Shell (SSH) protocol is a more secure method for remote device access.

• SSH client software is not provided by default on all computer operating systems.
Setup mode

Permit the administrator to install a minimal configuration for a router -


( appeared if no saved configuration , Ctrl-C to skip )
Setup Mode

• The router will enter setup mode when:


•The contents of NVRAM have been erased with the “erase start” command
•When the router is “out of the box” and has not been initially configured
•After deleting the backup configuration and reloading the router
• You can make the router enter setup mode by entering:
• Router#setup
SECTION SUMMARY
1. ROUTER ACCESS METHODS
• Console , AUXILIARY , TELNET , WEB ACCESS
2. Using HyperTerminal
3. Telnet and SSH
4. Setup mode
ROUTER Modes

end

exit
User EXEC Mode

• The user EXEC mode allows only a limited number of basic


monitoring commands.
• This is often referred to as a view only mode.
• The user EXEC level does not allow any commands that
might change the configuration of the router.
• The user EXEC mode can be identified by the > prompt.
Privileged EXEC Mode

• The privileged EXEC mode provides access to all router


commands.
• This mode can be configured to require a password.
• Configuration and management commands require that the
network administrator be at the privileged EXEC level.
• Global configuration mode and all other more specific
configuration modes can only be reached from the privileged
EXEC mode.
• The privileged EXEC mode can be identified by the # prompt.
Moving between the User EXEC and Privileged EXEC Modes
Basic IOS command structure
• Identify the basic command structure for IOS
commands
Using CLI help
• Identify the types of help and feedback available while using
IOS and use these features to get help, take shortcuts and
ascertain success
Using CLI help
Using CLI help
Abbreviated commands (Router and Switch)

Router# sh inter

Same as

Router# show interfaces



IOS "examination" commands
• Identify the purpose of the show command and
several of its variations
This command will show all of the Cisco
IOS image files – not just the one that the
router booted from.
Might compare to a directory listing
IOS software and features

• The naming convention for the different Cisco IOS releases contains three
parts:
•The platform on which the image runs
•The special features supported in the image
•Where the image runs and whether it has been zipped or
compressed
show version Command

IOS version
Router up
time
System image file
Last restart & location
method

Number & type of


interfaces on the
NVRAM SPACE router
FLASH SPACE
Configuration
register setting
Verify the router boot-up process
IOS loading control
Router use the following logic to load an IOS
• Load minimized IOS from ROM based on the
config. Register setting for 0x2101
• Load the IOS based on the configuration of the
bootsystem command in the start –up config. File
• Load the first IOS file in the flash
• Load the IOS file from TFTP server
• Load minimized IOS from ROM
Boot system command

- beside the configuration register you can use the boot system
command to force booting location.

Router(config)# boot system flash


Router(config)# boot system rom
Router(config)# boot system tftp
Locating and Loading the IOS Image
Editing Commands

<Ctrl><A> Move to beginning of line


<Ctrl><E> Move to the end of the line
<Esc><B> Move back one word
<Ctrl><F> Move forward one character
<Ctrl><B> Move back on character
<Esc><F> Move forward one word
$ Sign means that the line has scrolled to the left
To disable enhanced editing mode, type terminal no
editing at the privileged EXEC mode prompt.
Router Command History
OSI REFERENCE MODEL

114
 What is a PROTOCOL

o Rules of operation

o May facilitate vendor interoperability

o Provides easier troubleshooting

o Governed by different standards bodies


• IEEE
• IETF
• IANA
115
OSI Layer
o Comprised of seven layers

o There are several benefits of using a layered approach which are:


• Provides easier troubleshooting
• Standardizes the networking architecture
• Allows vendor interoperability

116
Upper layer
o Application
o Presentation
o Session

Lower layer
o Transport
o Network
o Data link
o Physical

117
Application Layer

o Interacts with the user applications (Firefox, Outlook, etc.)

o Provides initial network connection for user applications

o Manages the application connections between hosts

118
Presentation Layer
o Performs compression, encryption within an application

o Ensures that data is presented correctly to the application used

o Performs translation of cross-platform standards that may be


understood by the local machine:
• Picture into .jpg file translation
• .wav into .mp3

119
Session Layer

o Dialog Control

o Session identifier is assigned

o Tracks connections between hosts and remote computers/servers

120
Transport Layer
o Segmentation

o Sequencing and reassembling

o Windowing, buffering, congestion avoidance

o Error control, Flow control

o Examples: TCP/UDP

121
o Well-known ports
• Ranges from 0 to 1023
• Port numbers used by well-known services
• Examples: HTTP(80), HTTPS(443), DNS(53), FTP(20,21),
TELNET(23), etc.

o Registered ports
• Reserved for the applications
• Ranges from 1024 to 65535

122
o Identifying services

• TCP
• Connection oriented
• Reliable
• Protocol number 6

• UDP
• Connectionless
• Unreliable
• Protocol number 17

123
Network Layer

o Segmentation of network topology into logical partitions

o Logical Addressing

o Path Discovery and Selection

124
o Network Layer Terminology
Routed protocol
• Protocols that are used for identification
• IP, IPX, AppleTalk

Routing protocol
• Protocols that determine best paths for the routed protocols
• EIGRP, OSPF, etc

Network Layer Devices


• Router, Multilayer Switch

125
Data Link Layer

o Media-Access Control

o Link-Layer Addressing

o Devices used at the Data Link layer


• Switches, Bridges

126
Physical Layer
o Electrical signals carried over the physical layer

Devices used at the physical layer


• Hubs

• Repeaters

• Network interface cards (NICs)

• Cables (Ethernet, fiber-optic, serial, etc.)

127
 PDUs
o Protocol Data Unit
• The final, structured data unit created by an OSI Layer

o PDUs created at one layer are meant to be read by the same layer on
receiving device

128
 Encapsulation / Decapsulation

o Encapsulation: As each layer receives a PDU from the


layer above it, headers are added

o Decapsulation: As each layer receives a PDU from the layer below


it, headers are inspected and then removed.

129
 PDU Transportation & Recognition

130
131
IPv4, UDP and TCP

132
Internet Protocol (IP) version 4
o Resides at OSI Layer-3 (Network Layer)
o IPv4 Header Format

133
A datagram of 3000 bytes (20 B of IP Header and 2980 B of IP payload reached at router and must be
forwarded to a link with MTU of 500 B. How many fragments will be generated and also write MF, offset,
Total length value for all.
20|2980 arrives on a Router
Router has a maximum of 500 B (20 B Header + 480 B Data)
P7 P6 P5 P4 P3 P2 P1
100+20 480+20 480+20 480+20 480+20 480+20
480+20
More Fragment
0 1 1 1 1 1 1
Offset (Fragment is represented in a scale of 8), 480/8
360 300 240 180 120 60 0
To find out how many data is there ahead of Packet7
360*8 = 2880 +100 bytes = 2980 bytes
o 32-bit addressing system

o Logical address for a network defined by IANA

o IPv4 addresses are comprised of 4 octets

o Dotted decimal notation is used to segment the octet

135
o IPv4 Communication Types

• Unicast

• Multicast

• Broadcast

136
 DNS
o Domain Name Service

o Used by computers to resolve names to IP


addresses.

o Typically uses UDP port 53.

o DNS server responds to DNS requests


• Host sends DNS A-Record query
• DNS server responds with A-Record query response

137
 DNS | Domain Name System

o Remembering IPv4/IPv6 addresses for


devices, websites, services, etc, is
cumbersome
o Easier to remember human-readable
names
o These names must be resolved to IP
addresses for network connectivity
o DNS is designed to do just that
138
 DNS Operation
o DNS Server IP typically learned via DHCP
o Client-Server Operation
o DNS Queries and Replies
• Use UDP Port 53
• “A” Record Lookup = IPv4
• “AAAA” Record Lookup = IPv6
o DNS Updates (copying of name-resolution tables
between DNS Servers)
• Uses TCP Port 53
139
 DNS for URL lookups
o Most common application of DNS is to resolve websites to IP
addresses

140
DHCP

o Dynamic Host Configuration Protocol


• Dynamic assignment of IP information

• Based on older BootP protocol

• Client / Server

• It uses UDP port no. 67

141
 DHCP|Dynamic Host Configuration Protocol
o Operates in application layer
o Provides dynamic method of leasing an IP
address to a host
o Uses UDP ports 67 (client to server) and 68
(server to client)
o Router can be used as a DHCP server for a
small networks where a dedicated DHCP
server is not available

142
DHCP Process

143
 Configuration
• Router(config)# service dhcp
• Router(config)# ip dhcp pool <pool-name>
• Router(config-dhcp)# network < network-id>
• Router(config-dhcp)# default-router <default gateway>
• Router(config-dhcp)# dns-server <dns-server address>
• Router(config-dhcp)# lease <duration>
• Router(config-dhcp)# end
o Configuring exclude list
• Router(config)# ip dhcp excluded-address
<start-ip> <end-ip>
144
o DHCP Relay Agent

• DHCP REQUEST is broadcast


• DHCP SERVER has to be on the same
broadcast domain
• Routers do not forward broadcast packets
o Verification
• Router# show ip dhcp binding

145
OSI Transport Layer - UDP
o Predominant protocols used at Layer-4
o TCP (Transmission Control Protocol)
o UDP (User Datagram Protocol)

o UDP
• Connectionless

146
OSI Transport Layer - TCP
o Transmission Control Protocol

• Connection-oriented

147
TCP History
o Developed by Stanford University in
1970’s
o Originally TCP and IP were part of the
same standard called TCP
o TCP was de-coupled from IP to stay
consistent with a layered approach to
networking

148
Connection-Oriented
o TCP verifies existence of peer prior to data
exchange
o TCP peers negotiate parameters used to control
data exchange
o TCP data is exchanged reliably using sequence
numbers, acknowledgements, flow-control,
and retransmissions
o TCP can gracefully inform peer of the need to
close a connection.

149
TCP – 3 Way Handshake
Step 1 (SYN) : In the first step, client wants to establish
a connection with server, so it sends a segment with
SYN(Synchronize Sequence Number) which informs
server that client is likely to start communication and
with what sequence number it starts segments with

Step 2 (SYN + ACK): Server responds to the client


request with SYN-ACK signal bits set.
Acknowledgement(ACK) signifies the response of
segment it received and SYN signifies with what
sequence number it is likely to start the segments with

Step 3 (ACK) : In the final part client acknowledges the


response of server and they both establish a reliable
connection with which they will start the actual data
transfer

150
DoD’s Model of TCP/IP
o The DoD model is a
condensed version
of the OSI model and
only has four layers.

151
o Process Application Layer
Defines protocols for node-to-node application communication and also controls
user interface specifications. Consists of a set of services that provide
ubiquitous access to all types of networks. Applications utilize the services to
communicate with other devices and remote applications
o Host-to-Host layer
This layer shields the upper layers from the process of sending data. Also
provides an end-to-end connection between two devices during communication
by performing sequencing, acknowledgments, checksums, and flow control.
Applications using services at this layer can use two different protocols: TCP
and UDP
o Internet layer
The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing
information and some control information that enables packets to be routed.
o Network access layer
The Network Access Layer monitors the data exchange between the host and the
network. Oversees MAC addressing and defines protocols for the physical transmission
of data

152
o IPv4

• 32-bit addressing system


• Logical address for a network defined by IANA
• IPv4 addresses are comprised of 4 octets
• Dotted decimal notation is used to segment the octet

153
Binary and Decimal

154
 Converting Between Decimal Numbers and Binary

155
 Range of IPv4 address

156
 IP Address Classification

157
 Types of communication

In an IPv4 network, the hosts can communicate one of three different ways

1. Unicast

2. Broadcast

3. Multicast
 

158
 Unicast Transmission
The process of sending a packet from one host to an individual host.

159
 Broadcast Transmission
The process of sending a packet from one host to all hosts in the network

160
 Multicast Transmission
• The process of sending a packet from one host to a selected group of hosts,
possibly in different networks.

• CLASS D 224-239 reserved for Multicasting

161
 Network & Host portions
IP address is divided into Network & Host Portion

CLASS A N.H.H.H

CLASS B N.N.H.H

CLASS C N.N.N.H

Network : Group of devices


Host : Specific device in the network

162
 Class C-Range N.N.N.H 192.168.1.X X= 0 - 255
First three portions has to be same in order to be in the same network.

192.168.1.0
192.168.1.1
192.168.1.2
192.168.1…
…………….
…………….
…………….
192.168.1.253
192.168.1.254
192.168.1.255
163
 Class B-Range N.N.H.H 172.16.X.X X= 0 - 255
First two portions has to be same in order to be in the same network .

172.16.0.0 172.16.1.0 172.16.2.0…… 172.16.255.0


172.16.0.1 172.16.1.1 172.16.2.1 172.16.255.1
172.16.0.2 172.16.1.2 172.16.2.2 172.16.255.2

172.16.0.253 172.16.1.253 172.16.2.253 172.16.255.253


172.16.0.254 172.16.1.254 172.16.2.254 172.16.255.254
172.16.0.255 172.16.1.255 172.16.2.255 172.16.255.255

164
 Class A-Range N.H.H.H 10.X.X.X X= 0 - 255
First one portions has to be same in order to be in the same network.

10.0.0.0 10.0.1.0 10.0.2.0 10.0.255.0 10.0.255.0


10.0.0.1 10.0.1.1 10.0.2.1 10.0.255.1 …………
10.0.0.2 10.0.1.2 10.0.2.2 10.0.255.2 … … … …

10.0.0.253 10.0.1.253 10.0.2.253 10.0.255.253 …………


10.0.0.254 10.0.1.254 10.0.2.254 10.0.255.254 …………
10.0.0.255 10.0.1.255 10.0.2.255 10.0.255.255 10.255.255.255

165
 Number of hosts address in each class

Class C – Range Hosts bit = 8 28 = 256


Class B – Range Hosts bit = 16 216 = 65536
Class A – Range Hosts bit = 24 224 = 16777216

 Number of valid hosts address

Class C – Range Hosts bit = 8 28 = 256-2 = 254


Class B – Range Hosts bit = 16 216 = 65536-2 = 65534
Class A – Range Hosts bit = 24 224 = 16777216-2 = 16777214
o First and last address in each range are reserved for Network ID and Broadcast ID.

166
 Network address broadcast address host address

167
 Network address broadcast address host address continued…

168
 Subnet Mask
o Helps identify network and host portion of network
o Default subnet masks:
• Class A: 255.0.0.0 or /8
• Class B: 255.255.0.0 or /16
• Class C: 255.255.255.0 or /24

o Typically called classful address

169
IPv4 Addresses: Public & Private

o IP addresses “leased” to a corporation are known as public IP


addresses.

o IP addresses that are unregistered and may overlap from one


company to the next, are known as private IP addresses.

170
Public IP Private IP
Used on public network( INTERNET) Used with the LAN or within the organization
Recognized on Internet Not recognized on internet

Given by the service provider (from IANA ) Given by the administrator

Globally unique Unique within the network or organization

Pay to service provider ( or IANA ) Free

Registered Unregistered IP

171
Where do Public IP Addresses Come From?

172
IPv4 Addresses: Private

o Defined in RFC 1918

o For internal use only

o Range of private address


• Class A : 10.0.0.0 through 10.255.255.255
• Class B : 172.16.0.0 through 172.31.255.255
• Class C : 192.168.0.0 through 192.168.255.255

173
IPv4 Addresses: Public

o Public IPv4 addresses


• Globally unique
• Should be purchased
• Usually used in Internet edge

174
IPv4 Addresses: Reserved

o Default or Unknown Address

• 0.0.0.0
o Loopback

• 127.anything

o APIPA

169.254.anything

175
 IPv4 Addressing; Configuration and Verification

176
IP addressing – Router Configuration

o Router(config-if)# ip address <address><mask>

o Verification

• Show interface <type><number>

• Show ip interface brief

177
What’s my IP?

178
 IPv4 Subnetting
o A subnet is a sub-network of a network that falls
within the class A, B or C range.

• Class A: 16777216 addresses in total

• Class B: 65536 addresses in total

• Class C: 256 addresses in total

179
180
181
182
183
184
185
186
187
188
189
CIDR

o Classless Interdomain Routing

o Beyond the classful behavior

o Ex: 10.0.0.0/24 [/24 is prefix-length from Class C]

190
191
 CIDR Exercises

/8

/9

/24

/25

/27

/30

192
Prefix address (Classless Inter-Domain Routing)

• Method that ISPs use to allocate a number of addresses to a company, a home – a customer.
• They provide address in certain block size example 192.168.10.32/28.
• / Notation means how many bits are turned on (1s).

Subnet mask Binary Value CIDR Value


255.0.0.0 11111111.00000000.00000000.00000000 /8
255.128.0.0 11111111.10000000.00000000.00000000 /9
255.192.0.0 11111111.11000000.00000000.00000000 /10
255.224.0.0 11111111.11100000.00000000.00000000 /11
255.240.0.0 11111111.11110000.00000000.00000000 /12
255.248.0.0 11111111.11111000.00000000.00000000 /13
255.252.0.0 11111111.11111100.00000000.00000000 /14
255.254.0.0 11111111.11111110.00000000.00000000 /15
255.255.0.0 11111111.11111111.00000000.00000000 /16
Class-C Subneting

Class-C CIDR

Subnet mask Binary Value CIDR Value


255.255.255.0 11111111.11111111.11111111.00000000 /24
255.255.255.128 11111111.11111111.11111111.10000000 /25
255.255.255.192 11111111.11111111.11111111.11000000 /26
255.255.255.224 11111111.11111111.11111111.11100000 /27
255.255.255.240 11111111.11111111.11111111.1111000 /28
255.255.255.248 11111111.11111111.11111111.11111000 /29
255.255.255.252 11111111.11111111.11111111.11111100 /30
255.255.255.254 11111111.11111111.11111111.11111110 /31
255.255.255.255 11111111.11111111.11111111.11111111 /32
Example -1 Class-C Subneting

Example: 200.10.10.0/27

Convert CIDR (/) notation to Subnet

/27----- Binary 8. 8. 8. 3 ------------ Last 3 binary 1110 0000= 224

255 255 255 224

Network address 200.10.10.0


Subnet mask 255.255.255.224
Example -1 Class-C Subneting
1) How many Subnet from subnet?= 2x
mask 255.255.255.224 (1110 0000)
x
2 where x is binary 1 (on) bits in subnet mask: 23= 8
y
2) How many hosts per Subnet? = 2 -2
y 5
2 where y is binary 0 (off) bits in subnet mask: 2 -2 = 32-2= 30 Valid Hosts
3) What is Valid Subnet or Block
Subnet size? 256-subnet
address Firstmask=
Host 256-224= 32 Last Host Broadcast
200.10.10.0 200.10.10.1 200.10.10.30 200.10.10.31
200.10.10.32 200.10.10.33 200.10.10.62 200.10.10.63
Block size 200.10.10.64 200.10.10.65 200.10.10.94 200.10.10.95
200.10.10.96 200.10.10.97 200.10.10.126 200.10.10.127
200.10.10.128 200.10.10.129 200.10.10.158 200.10.10.159
200.10.10.160 200.10.10.161 200.10.10.190 200.10.10.191
200.10.10.192 200.10.10.193 200.10.10.222 200.10.10.225
200.10.10.224 200.10.10.225 200.10.10.254 200.10.10.255
Example -2 Class-B Subneting

Example: 172.10.0.0/18

Convert CIDR (/) notation to Subnet

/27----- Binary 8. 8. 2. 0 2 binary(1) 1100 0000= 192

255 255 192 0

Network address 172.10.0.0/18


Subnet mask 255.255.192.0
Example -2 Class-B Subneting (Contd.)
1) How many Subnet from subnet?= 2x
mask 255.255.192.0 (3rd Octet= 1100 0000 4th Octet = 0000 0000)
x 2
2 where x is binary 1 (on) bits in subnet mask: 2 = 4
y
2) How many hosts per Subnet? = 2 -2
y 14
2 where y is binary 0 (off) bits in subnet mask: 2 -2 = 16384-2= 16382 Valid Hosts
3) What is Valid Subnet or Block
Subnet size? 3rd Octet
address 256-subnet
First Host mask= 256-192= 64, 4th Octet=256-0=256
Last Host Broadcast
172.10.0.0 172.10.0.1 172.10.63.254 172.10.63.255
172.10.64.0 172.10.64.1 172.10.127.254 172.10.127.255
Block size 172.10.128.0 172.10.128.1 172.10.191.254 172.10.191.255
172.10.192.0 172.10.192.1 172.10.255.254 172.10.255.255
Example -3 Class-B Subneting

Example: 170.20.0.0/25

Convert CIDR (/) notation to Subnet

/27----- Binary 8. 8. 8. 1 1 binary 1000 0000= 128

255 255 255 128

Network address 170.20.0.0/25


Subnet mask 255.255.255.128
Class-B Subneting (Contd.)
1) How many Subnet from subnet?= 2x
mask 255.255.255.128 (3rd Octet= 1111 1111 4th Octet = 1000 0000)
x 9
2 where x is binary 1 (on) bits in subnet mask: 2 = 512 Subnets
y
2) How many hosts per Subnet? = 2 -2
y 7
2 where y is binary 0 (off) bits in subnet mask: 2 -2 = 128-2= 126 Valid Hosts
3) What is Valid SubnetSubnet
or Block size? 3rd First
address OctetHost
256-subnet mask= Last
256-255=
Host 1, 4th Octet=256-12=128
Broadcast
172.20.0.0 172.20.0.1 172.20.0.126 172.20.0.127
172.20.0.128 172.20.0.129 172.20.0.254 172.20.0.255
Block size 172.20.1.0 172.20.1.1 172.20.1.126 172.20.1.127
172.20.1.128 172.20.1.129 172.20.1.254 172.20.1.255
172.20.2.0 172.20.2.1 172.20.2.126 172.20.2.127
………. …….. …….. ……..
172.20.255.0 172.20.255.1 172.20.255.126 172.20.255.127
Last Block
172.20.255.128 172.20.255.129 172.20.255.254 172.20.255.255
 Variable Length Subnet Mask (VLSM)
In previous subnetting examples and all our subnets had a “fixed size”. Each
subnet had the same size. For example we took a class C network 192.168.1.0
and divided it 4 blocks:

201
VLSM

202
 Requirements of Hosts
Site-A: 100 Site-B: 20 Site-C: 40 and Site-C: 10
Lets arrange it as the largest number of requirement first

For the Req. of 100 Host


2h-2 ≥ Required Hosts
27-2 ≥ 100
128-2 = 126 Valid Hosts
Here we are using 7 bits for hosts that means 1 bit from host portion should be converted to network bit
N.N.N.00000000
8bit .8bit. 8bit .1bit
255.255.255.128
/25 (25 bits for network 7 bits for hosts
192.168.1.0 – 127 /25 is my first Network

203
 Requirements of Hosts

For the Req. of 40 Host


2h-2 ≥ Required Hosts
26-2 ≥ 40
64-2 = 62 Valid Hosts
Here we are using 6 bits for hosts that means 2 bits from host portion should be converted to network bit
N.N.N.00000000
8bit .8bit. 8bit .2bit
255.255.255.192
/26 (26 bits for network 6 bits for hosts
192.168.1.128 – 191 /26 is my Second Network

204
 Requirements of Hosts

For the Req. of 20 Host


2h-2 ≥ Required Hosts
25-2 ≥ 20
32-2 = 30 Valid Hosts
Here we are using 5 bits for hosts that means 3 bits from host portion should be converted to network bit
N.N.N.00000000
8bit .8bit. 8bit .3bit
255.255.255.224
/27 (27 bits for network 5 bits for hosts
192.168.1.192 – 223 /27 is my third Network

205
 Requirements of Hosts

For the Req. of 10 Host


2h-2 ≥ Required Hosts
24-2 ≥ 20
16-2 = 14 Valid Hosts
Here we are using 4 bits for hosts that means 4 bits from host portion should be converted to network bit
N.N.N.00000000
8bit .8bit. 8bit .4bit
255.255.255.240
/28 (28 bits for network 4 bits for hosts
192.168.1.224 – 239 /28 is my fourth Network

206
192.168.1.192 – 223 /27

192.168.1.0 – 127 /25 192.168.1.128 – 191 /26

192.168.1.224 – 239 /28

207
208
209
210
VLSM Example-1

192.16.10.0/24

F0/0 F0/0
S0/1 S0/1

S0/0 S0/0

S0/0
S0/0
S0/1 S0/1

F0/0 F0/0
VLSM Example-1

Network Hosts Block Size Prefix Subnet


A 14 16 /28 255.255.255.240
B 30 32 /27 255.255.255.224
C 20 32 /27 255.255.255.224
D 6 8 /29 255.255.255.248
E 2 4 /30 255.255.255.252
F 2 4 /30 255.255.255.252
G 2 4 /30 255.255.255.252
H 2 4 /30 255.255.255.252
VLSM Example-1

32 B 192.16.10.0/27 —NA
192.16.10.31/27 ----BR

32 C 192.16.10.32/27 —NA
192.16.10.63/27 ---BR

16 A 192.16.10.64/28 —NA
192.16.10.79/28 ---BR

8 D 192.16.10.80/28 —NA
192.16.10.87/28 ---BR

E 192.16.10.88/30 —NA
4 192.16.10.91/30 ---BR

F 192.16.10.92/30 —NA
4 192.16.10.95/30 --BR

G 192.16.10.96/30 —NA
4 192.16.10.99/30 ---BR

4 H 192.16.10.100/30 —NA
192.16.10.103/30 —BR
VLSM Example-2

192.16.10.0/24
F0/2
F0/1
S0/2 S0/2
F0/0
S0/0 S0/1 F0/0

S0/0
S0/1
F0/1

F0/0
F0/1 F0/0
VLSM Example-2

192.16.10.0/24
Network Hosts Block Size Prefix Subnet
A 30 32 /27 255.255.255.224
B 10 16 /28 255.255.255.240
C 12 16 /28 255.255.255.240
D 2 4 /30 255.255.255.252
E 2 4 /30 255.255.255.252
F 2 4 /30 255.255.255.252
G 12 16 /28 255.255.255.240
H 60 64 /26 255.255.255.192
I 14 16 /28 255.255.255.240
J 60 64 /26 255.255.255.192
K 8 16 /28 255.255.255.240
VLSM Example-2

64 H 192.16.10.0/26 —NA
192.16.10.63/26 ----BR

64 J 192.16.10.64/26 —NA
192.16.10.127/26 ---BR

32 A 192.16.10.128/27 —NA
192.16.10.159/27 ---BR

16 B 192.16.10.160/28 —NA
192.16.10.175/28 ---BR

C 192.16.10.176/28 —NA
16 192.16.10.191/28 ---BR

G 192.16.10.192/28 —NA
16 192.16.10.207/28 --BR

I 192.16.10.208/28 —NA
16 192.16.10.223/28 ---BR

K 192.16.10.224/28 —NA
16 192.16.10.239/28 —BR

D 192.16.10.240/30 —NA
4 192.16.10.243/30 —BR

4 E 192.16.10.244/30 —NA
192.16.10.247/30 —BR

4 F 192.16.10.248/30 —NA
192.16.10.251/30 —BR
IPv4 Summarization
o Process of combining multiple subnetworks into a single
network advertisement.

o Network ID and subnet mask are referenced

o Usually called aggregation

o Efficient in large networks, provides addressing


hierarchy

217
 Summarization Example

Let’s say we want to create the most optimal summary for the following 4 networks:

192.168.0.0 / 24 subnet mask 255.255.255.0 The first 6 bits of the third


192.168.1.0 / 24 subnet mask 255.255.255.0 octet are the same. Now we
192.168.2.0 / 24 subnet mask 255.255.255.0 have enough information to
192.168.3.0 / 24 subnet mask 255.255.255.0 create our summary address.
Let’s convert these network addresses to binary
8 + 8 + 6 = 22 bits
192.168.0.0 11000000 10101000 00000000 00000000
192.168.1.0 11000000 10101000 00000001 00000000
192.168.2.0 11000000 10101000 00000010 00000000
192.168.3.0 11000000 10101000 00000011 00000000

Our summary address will be 192.168.0.0 /22 (subnet mask 255.255.252.0).


218
 IPv6
o History of IPv6
• 1992 – an impending shortage of IPv4 address space was first recognized.
• 1994 – IETF launches work into IPv6
• 1998 – First RFC (2460) for IPv6 written
• 2006 – RFC 4291 stabilized (address structure)
• 2008 – U.S. Federal Government mandates IPv6-compatibility of all backbone
devices of Federal Agencies
• 2015 – ARIN runs out of IPv4 addresses.

219
o Introduction to IPv6

• IPv6 is a long-term solution to IPv4 address depletion


• Drastically increases a number of available address
• Can be deployed in addition to IPv4, resulting in a mix-
mode environment (Dual Stack)
• In many aspects follows the same general rules as IPv4
• Does not require manual configuration or DHCP

220
o Introduction to IPv6
• 128-bit addressing system

• Expressed in hexadecimal instead of decimal

• Colon “:” used to separate group of four-hex characters (a “word”)

• 4 bits = 1 hex character

• Example: 2001:0000:0000:0000:0000:0001:1230:000A

221
 Hexadecimal to Decimal and Binary

o Binary is Base 2 _____ ______ ______ ______

o Decimal is Base 10 _____ ______ ______ ______

o Hexadecimal is Base 16 _____ ______ ______ ______

222
 IPv6 Address Structure
An IPv6 address is made of 128 bits divided into
eight 16-bits blocks. Each block is then converted
into 4-digit Hexadecimal numbers separated by
colon symbols.

0010000000000001 0000000000000000 0011001000111000 1101111111100001


0000000001100011 0000000000000000 0000000000000000 1111111011111011

0010 0000 0000 0001

2 0 0 1

2001:0000:3238:DFE1:0063:0000:0000:FEFB

223
 Shortening IPv6 Addresses

o Discard leading Zero(es)

o If two of more blocks contain consecutive zeroes, omit them all and replace
with double colon sign ::

o Consecutive blocks of zeroes can be replaced only once by ::


so if there are still blocks of zeroes in the address, they can be shrunk down
to a single zero, 

•Original: 2041:0000:140F:0000:0000:0000:875B:131B

•Short: 2041:0000:140F::875B:131B

•Shorter: 2041:0:140F::875B:131B

224
 Shortening IPv6 Addresses: Practice Exercise

225
 IPv4 and IPv6 Header

IPv4 Header IPv6 Header

226
IPv6: Interface-IDs

o Network/subnet portion (prefix)

o Interface Identifier

o Can also be dynamically-derived (EUI-64)

227
 Conversion of EUI-64 ID into IPv6 Interface Identifier

To convert EUI-64 ID into IPv6 Interface Identifier, the most significant 7th bit of EUI-64 ID
is complemented. For example:

228
 IPv6 Addresses type

229
 IPv6 Addresses type
o Unicast
• Global Unicast
The global unicast IPv6 addresses are similar to IPv4 public addresses.
These addresses can be used on the Internet. 
3 bits set to 001; ex: 2000::/3
• Unique Local
Unique local addresses work like the IPv4 private addresses.
You can use these addresses on your own network if you don’t intend
to connect to the Internet or if you plan to use IPv6 NAT.
Always begin with “FC00::/7”
o Link-Local
• Assigned automatically as an IPv6 host comes online
• Similar to the 169.254.x.x address of IPv4
• Always begin with “FE80::/10”
• Last 64 bits is the 48-bit MAC address with “FFFE”
inserted in the middle

230
o Multicast Address
• FF00::/8
• As long as the first 8-bits take the form of 1111 1111, that’s a
multicast address
• IPv6 nodes listen to several IPv6 Multicast Groups by default

o Anycast
• Two-or-more nodes using the same IPv6 address
• Used for load-balancing
• Any unicast address that you use on more than one device is suddenly
an anycast address.

231
o Loopback
• Written as ::1
• Also known as localhost
• Similar to the IPv4 127.0.0.1addresses
• Can be used to verify the IPv6 stack functionality
127 Zeros 1

0000 0000 0000 0000:0000 0000 0000 0000:0000 0000 0000 0000:0000 0000 0000 0000:
0000 0000 0000 0000:0000 0000 0000 0000:0000 0000 0000 0001

0000:0000:0000:0000:0000:0000:0000:0001
::1

232

You might also like