Chapter 6:
Network Layer
Introduction to Networks
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
1
Chapter 6: Objectives
Students will be able to:
 Explain how network layer protocols and services
support communications across data networks.
 Explain how routers enable end-to-end connectivity in
a small to medium-sized business network.
 Determine the appropriate device to route traffic in a
small to medium-sized business network.
 Configure a router with basic configurations.
 Configure the Default Gateway on network devices.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
2
Chapter 6
6.1 Network Layer Protocols
6.2 Routing
6.3 Routers
6.4 Configuring a Cisco Router
6.5 Summary
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
3
Network Layer
Network Layer
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
4
Network Layer Protocols
Network Layer in Communication
Addressing
Encapsulating
De-encapsulating
Routing
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
5
Network Layer in Communication
The Network Layer
End to End Transport processes
 Addressing end devices: An end device configured
with an IP address is
referred to as a host.
 Encapsulation: The network layer encapsulates by adding IP header
information, such as source (sending) and destination (receiving) IP
address. It’s now called a packet.
 Routing: The network layer provides services to direct packets to a destination
host on another network. Packet is processed by a routers. Router selects paths
for and direct packets toward the destination host; the process is known
as routing. A packet may cross many intermediary devices before reaching the
destination host. Each route the packet takes to reach the destination host is
called a hop.
 De-encapsulating:
When the packet arrives at the network layer of the
destination host. If the destination IP address matches its own IP address, the IP
header is removed from the packet, the resulting Layer 4 segment is passed
up to the appropriate service at the transport layer.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
6
Network Layer in Communication
Network Layer Protocols
Common Network Layer Protocols
 Internet Protocol version 4 (IPv4) – 32 binary bits
 Internet Protocol version 6 (IPv6) – 128 binary bits
Legacy Network Layer Protocols
 Novell Internetwork Packet Exchange (IPX)
 AppleTalk
 Connectionless Network Service (CLNS/DECNet)
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
7
Characteristics of the IP protocol
Characteristics of IP
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
8
Characteristics of the IP protocol
IP - Connectionless
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
9
Characteristics of the IP protocol
IP - Connectionless
The role of the network layer is to transport packets between hosts while
placing as little burden on the network as possible.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
10
Characteristics of the IP protocol
IP – Best Effort Delivery
If out-of-order or missing packets create problems for the application using the data, then upper
layer services, such as TCP, must resolve these issues. This allows IP to function very efficiently.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
11
Characteristics of the IP protocol
IP – Media Independent
It is the responsibility of the OSI layer 2 to take an IP packet and prepare it for transmission
over the communications medium.
•This means that the transport of IP packets is not limited to any particular medium
***Exception: The network layer considers: the maximum size of the Packet that each
medium can transport (Maximum Transmission Unit; MTU)
A router, must split up a packet when forwarding it from one medium to a another medium
with a smaller MTU.
•This process is called fragmenting the packet or fragmentation.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
12
IPv4 Packet
Encapsulating IP
IP encapsulates, or packages, the transport layer segment by adding an IP header.
This header is used to deliver the packet to the destination host.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
13
IPv4 Packet
IPv4 Packet Header
Version, Differentiated Services (Priority), Time-to-Live (TTL),
Protocol [ICMP (0x01), TCP (0x06), and UDP (0x11)], Source IP Address
and Destination IP Address (each address is 4 Bytes, 32 bits)
Byte 1
Version
Byte 2
IP Header
Length
Byte 3
Differentiated Services
Total Length
DSCP
ECN
Identification
Time To Live
Byte 4
Flag
Protocol
Fragment Offset
Header Checksum
Source IP Address
Destination IP Address
Options (optional)
Padding
Usually Header size is 20 Bytes (12 fields)
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
14
IPv4 Packet
IPv4 Header Fields
Internet Header Length (IHL, 4 bits long), Total Length (2 Bytes),
Header Checksum, Identification, Flags, Fragment Offset (deals
with fragments)
Byte 1
Version
Byte 2
IP Header
Length
Byte 3
Differentiated Services
Total Length
DSCP
ECN
Identification
Time To Live
Byte 4
Flag
Protocol
Fragment Offset
Header Checksum
Source IP Address
Destination IP Address
Options (optional)
Presentation_ID
Padding
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
15
IPv4 Packet
Sample IPv4 Headers
Figure displays the contents of a captured packet. Note that the Source is listed as 192.168.1.109
and the Destination is listed as 192.168.1.1. The middle window contains information about the
IPv4 header, such as the header length, total length, and any flags that are set.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
16
Network Layer in Communication
Limitations of IPv4
 IP Address depletion
IPv4 has a limited number of unique public IP
addresses available
 Internet routing table expansion
As the number of servers (nodes) connected to the
Internet increases, so too does the number of
network routes.
IPv4 routes consume a great deal of memory and
processor resources on Internet routers
 Lack of end-to-end connectivity
NAT can be problematic for technologies that require
end-to-end connectivity.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
17
Network Layer in Communication
Introducing IPv6
 Increased address space (128 instead of 32 binary bits)
 Improved packet handling (simplified with fewer fields. This improves packet
handling
 Eliminates the need for NAT (Private IP addresses no longer needed)
 Integrated security (IPv6
natively supports authentication and privacy capabilities)
 4 billion IPv4 addresses
4,000,000,000
 340 Undecillion IPv6 addresses
340,000,000,000,000,000,000,000,000,000,000,000,000
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
18
IPv6 Packet
Encapsulating IPv6
The IPv6 simplified header offers several advantages over IPv4:
•Better routing efficiency for performance and forwarding-rate scalability
•No requirement for processing checksums
•Simplified and more efficient extension header mechanisms (as opposed to the IPv4
Options field)
•A Flow Label field for per-flow processing with no need to open the transport inner packet
to identify the various traffic flows
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
19
IPv6 Packet
IPv6 Packet Header
Byte 1
Version
Byte 2
Byte 3
Traffic Class
Payload Length
Byte 4
Flow Label
Next
Header
Source IP Address
128 bits
Destination IP Address
128 bits
Hop Limit
Next Header
•Indicates the data payload type
that the packet is carrying
•Enables the network layer to
pass the data to the appropriate
upper-layer protocol.
•Also used if there are optional
extension headers added to the
IPv6 packet.
The IPv6 header consists of 40 octets (largely due to the length of the source and
destination IPv6 addresses) and 8 header fields (3 IPv4 basic header fields and 5
additional header fields).
The IPv4 header consists of 20 octets and 12 basic header fields
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
20
IPv6 Packet
Sample IPv6 Header
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
21
Routing
Host Routing Tables
Another role of the network layer
is to direct packets between hosts.
A host can send a packet to:
Itself - This is a special IP address of
127.0.0.1 which is referred to as the
loopback interface. This loopback
address is automatically assigned to
a host when TCP/IP is running, is
useful for testing purposes. Any IP
within the network 127.0.0.0/8 refers
to the local host.
Local host - This is a host on the
same network as the sending host.
The hosts share the same network
address.
Remote host - This is a host on a
remote network. The hosts do not
share the same network address
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
22
Host Routing Tables
Host Packet Forwarding Decision
Whether a packet is destined for a local host or a remote host is determined
by the IP address and subnet mask combination of the source (or sending)
device compared to the IP address and subnet mask of the destination device.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
23
Host Routing Tables
Default Gateway
Hosts must maintain their own, local, routing table to ensure
that network layer packets are directed to the correct
destination network.
The local table of the host typically contains:
 Direct connection - This is a route to the loopback interface (127.0.0.1).
R
 Local network route - The network which the host is connected to is
automatically populated in the host routing table.
 Local default route –
• The default route represents the route that packets must take to reach
all remote network addresses.
• The default gateway address is the IP address of the router that is
connected to the local network.
• The default gateway address can be configured on the host
manually or learned dynamically.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
24
Host Routing Tables
IPv4 Host Routing Table
Host’s
Default
Gateway
Host’s default
route to remote
networks
Host’s default
route to local
network
Broadcast
address
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
25
Host Routing Tables
Sample IPv4 Host Routing Table
A routing table is a data file in RAM that is used to store route information about directly
connected network, as well as entries of remote networks the device has learned about.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
26
Host Routing Tables
Sample IPv6 Host Routing Table
Note: Interfaces in IPv6
commonly have two IPv6
addresses: a link local
address and a global
uncast address.
Also, notice that there are
no broadcast addresses in
IPv6. IPv6 addresses will
be discussed further in the
next chapter.
IPv6 Route Table - Lists all known IPv6 routes, including direct connections, local
network, and local default routes
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
27
Router Routing Tables
Router Packet Forwarding Decision
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
28
Router Routing Tables
IPv4 Router Routing Table
192.168.10.0/24
.10
PC1
.1
G0/1
.10
PC2
10.1.1.0/24
G0/0
.1
.10
209.165.200.224 /30
R1
.225
S0/0/0
.1
.226
R2
.1
.10
10.1.2.0/24
192.168.11.0/24
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
D
D
C
L
C
L
C
L
R1#
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
192.168.10.0/24 is directly connected, GigabitEthernet0/0
192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
192.168.11.0/24 is directly connected, GigabitEthernet0/1
192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
209.165.200.224/30 is directly connected, Serial0/0/0
209.165.200.225/32 is directly connected, Serial0/0/0
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Directly-connected
routes – These
routes come from the
active router
interfaces.
Remote routes These routes come
from remote networks
connected to other
routers
Cisco Confidential
29
Router Routing Tables
Directly Connected Routing Table Entries
192.168.10.0/24
.10
PC1
.1
G0/1
.10
PC2
64.100.0.1
G0/0
.1
.10
209.165.200.224 /30
R1
.225
S0/0/0
.1
.226
R2
.1
C
L
.10
10.1.2.0/24
192.168.11.0/24
A
10.1.1.0/24
C
B
192.168.10.0/24 is directly connected, GigabitEthernet0/0
192.168.10.1/32 is directly connected, GigabitEthernet0/0
A
Identifies how the network was learned by the router.
B
Identifies the destination network and how it is connected.
C
Identifies the interface on the router connected to the destination network.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
30
Router Routing Tables
Remote Network Routing Table Entries
192.168.10.0/24
.10
PC1
.1
G0/1
.10
PC2
64.100.0.1
G0/0
.1
.10
209.165.200.224 /30
R1
.225
S0/0/0
.1
.226
R2
.1
.10
10.1.2.0/24
192.168.11.0/24
D
10.1.1.0/24
10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
A
Identifies how the network was learned by the router.
B
Identifies the destination network.
C
Identifies the administrative distance (trustworthiness) of the route source.
D
Identifies the metric (cost) to reach the remote network.
E
Identifies the next hop IP address to reach the remote network.
F
Identifies the amount of elapsed time since the network was discovered.
G
Identifies the outgoing interface on the router to reach the destination network.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
31
Router Routing Tables
Next-Hop Address
192.168.10.0/24
.10
PC1
.1
G0/1
.10
PC2
64.100.0.1
G0/0
.1
.10
209.165.200.224 /30
R1
.225
S0/0/0
10.1.1.0/24
.1
.226
R2
.1
.10
10.1.2.0/24
192.168.11.0/24
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
D
D
C
L
C
L
C
L
R1#
Presentation_ID
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
192.168.10.0/24 is directly connected, GigabitEthernet0/0
192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
192.168.11.0/24 is directly connected, GigabitEthernet0/1
192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
209.165.200.224/30 is directly connected, Serial0/0/0
209.165.200.225/32 is directly connected, Serial0/0/0
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
32
Routers
Anatomy of a Router
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
33
Anatomy of a Router
A Router is a Computer
There are many types of infrastructure routers available. In fact, Cisco routers
are designed to address the needs of:
Branch - Teleworkers, small business, and medium-size branch sites. Includes Cisco
800, 1900, 2900, and 3900 Integrated Series Routers (ISR) G2 (2nd generation).
WAN - Large businesses, organizations, and enterprises. Includes the Cisco Catalyst
6500 Series Switches and the Cisco Aggregation Service Router (ASR) 1000.
Service Provider - Large service providers. Includes Cisco ASR 1000, Cisco ASR
9000, Cisco XR 12000, Cisco CRS-3 Carrier Routing System, and 7600 Series routers.
Regardless of their function, size or complexity, all router models are essentially
computers. Routers also require: an IOS, a CPU, RAM, Flash, and NVRAM
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
34
Anatomy of a Router
Router CPU and OS
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
35
Anatomy of a Router
Router Memory
Memory
Volatile /
Non-Volatile
Stores
Volatile
•
•
•
•
Running IOS
Running configuration file
IP routing and ARP tables
Packet buffer
ROM
Non-Volatile
•
•
•
Bootup instructions
Basic diagnostic software
Limited IOS
NVRAM
Non-Volatile
•
Startup configuration file
Flash
Non-Volatile
•
•
IOS
Other system files
RAM
Most Cisco routers come with external Compact Flash slots. Slot can support
high-speed storage upgradeable to 4GB in density.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
36
Anatomy of a Router
Inside a Router
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
37
Anatomy of a Router
Router Backplane
(EHWIC) Enhanced high-speed WAN
interface card
eHWIC 0
Double-wide eHWIC slots
LAN
interfaces
Console
RJ45
Management
Interface
Two 4 GB flash card slots
Compact flash can store the Cisco IOS software image, log files,
voice configuration files, HTML files, backup configurations, or any
other file needed for the system.
Presentation_ID
AUX
port
USB
Ports
Console
USB Type B
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
38
Anatomy of a Router
Connecting to a Router
WAN
Interface
AUX
port
LAN
interfaces
Console
RJ45
Console
USB Type B
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
39
Anatomy of a Router
LAN and WAN Interfaces
Serial interfaces
LAN interfaces
light emitting diode (LED) indicators to provide
status information
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
40
Router Boot-up
Cisco IOS
Cisco IOS for routers provides
the following:
•Addressing
•Interfaces
•Routing
•Security
•QoS
•Resources Management
The IOS file itself is several
megabytes in size and similar to
Cisco IOS switches, is stored in
flash memory.
Using flash allows the IOS to be
upgraded to newer versions or
to have new features added.
During bootup, the IOS is copied
from flash memory into RAM.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
41
Router Boot-up
Bootset Files
The IOS image
file is stored in
flash memory
The startup
configuration
file is stored
in NVRAM.
When changes are made to the running-config
file, it should be saved to NVRAM as the startup
configuration file, in case the router is restarted
or loses power.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
42
Router Boot-up
Router Bootup Process
•When the router is powered on, software
on the ROM chip conducts the POST
•After the POST, the bootstrap program is
copied from ROM into RAM.
1.Perform the POST
and load the
bootstrap program
2.Locate and load the
Cisco IOS software
3.Locate and load the
startup configuration
file or enter setup
mode
System Bootstrap, Version 15.0(1r)M15, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
<output omitted>
6.3.2.5 Video Demonstration - The Router Boot Process
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
43
Router Boot-up
Show Versions Output
Router# show version
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.2(4)M1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thu 26-Jul-12 19:34 by prod_rel_team
ROM: System Bootstrap, Version 15.0(1r)M15, RELEASE SOFTWARE (fc1)
Router uptime is 10 hours, 9 minutes
System returned to ROM by power-on
System image file is "flash0:c1900-universalk9-mz.SPA.152-4.M1.bin"
Last reload type: Normal Reload
Last reload reason: power-on
<Output omitted>
Cisco CISCO1941/K9 (revision 1.0) with 446464K/77824K bytes of memory.
Processor board ID FTX1636848Z
2 Gigabit Ethernet interfaces
2 Serial(sync/async) interfaces
1 terminal line
DRAM configuration is 64 bits wide with parity disabled.
255K bytes of non-volatile configuration memory.
250880K bytes of ATA System CompactFlash 0 (Read/Write)
<Output omitted>
Technology Package License Information for Module:'c1900'
----------------------------------------------------------------Technology
Technology-package
Technology-package
Current
Type
Next reboot
-----------------------------------------------------------------ipbase
ipbasek9
Permanent
ipbasek9
security
None
None
None
data
None
None
None
Configuration register is 0x2142 (will be 0x2102 at next reload)
Router#
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
44
Network Layer
Configuring a Cisco Router
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
45
Configure Initial Settings
Router Configuration Steps
192.168.10.0/24
PC1
PC2
.10
G0/0
.1
.1
G0/1
.10
.10
209.165.200.224 /30
R1
10.1.1.0/24
.1
.226
.225
S0/0/0
R2
.1
10.1.2.0/24
192.168.11.0/24
Router> enable
Router# configure terminal
Enter configuration commands, one per line.
End with CNTL/Z.
Router(config)# hostname R1
R1(config)#
R1(config)# enable secret class
R1(config)#
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)#
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)#
R1(config)# service password-encryption
R1(config)#
Presentation_ID
.10
OR
Router> en
Router# conf t
Enter configuration commands, one per line.
End with CNTL/Z.
Router(config)# ho R1
R2(config)#
R1(config)# banner motd #
Enter TEXT message. End with the character '#'.
***********************************************
WARNING: Unauthorized access is prohibited!
***********************************************
#
R1(config)#
R1# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
46
Configure Interfaces
Configure LAN Interfaces
192.168.10.0/24
PC1
PC2
.10
10.1.1.0/24
G0/0
.1
.1
G0/1
.10
.10
209.165.200.224 /30
R1
.225
S0/0/0
.1
.226
R2
.1
.10
10.1.2.0/24
192.168.11.0/24
R1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#
R1(config)# interface gigabitethernet 0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# description Link to LAN-10
R1(config-if)# no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0,
changed state to up
R1(config-if)# exit
R1(config)#
R1(config)# int g0/1
R1(config-if)# ip add 192.168.11.1 255.255.255.0
R1(config-if)# des Link to LAN-11
R1(config-if)# no shut
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,
changed state to up
R1(config-if)# exit
R1(config)#
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
47
Configure Interfaces
Verify Interface Configuration
192.168.10.0/24
PC1
PC2
.10
10.1.1.0/24
G0/0
.1
.1
G0/1
.10
.10
209.165.200.224 /30
R1
.1
.226
.225
S0/0/0
R2
.1
10.1.2.0/24
192.168.11.0/24
R1# show ip interface brief
Interface
IP-Address
GigabitEthernet0/0
192.168.10.1
GigabitEthernet0/1
192.168.11.1
Serial0/0/0
209.165.200.225
Serial0/0/1
unassigned
Vlan1
unassigned
R1#
R1# ping 209.165.200.226
.10
OK? Method Status
YES
YES
YES
YES
YES
manual
manual
manual
NVRAM
NVRAM
Protocol
up
up
up
up
up
up
administratively down down
administratively down down
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.226, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms
R1#
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
48
Configuring a Cisco Router
Configuring the Default Gateway
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
49
Configuring the Default Gateway
Default Gateway on a Host
PC1
PC2
.10
192.168.10.0/24
.1
G0/0
.10
R1
G0/1
.1
PC3
PC4
PC1
.10
.10
192.168.11.0/24
PC2
.10
192.168.10.0/24
.1
G0/0
.11
R1
G0/1
.1
PC3
PC4
Presentation_ID
.10
.11
© 2008 Cisco Systems, Inc. All rights reserved.
192.168.11.0/24
Cisco Confidential
50
Configuring the Default Gateway
Default Gateway on a Switch
S1#show running-config
Building configuration...
!
<output omitted>
service password-encryption
!
hostname S1
!
Interface Vlan1
ip address 192.168.10.50
!
ip default-gateway 192.168.10.1
<output omitted>
PC1
PC2
.10
192.168.11.0/24
192.168.10.0/24
.11
.1
G0/0
S1
.50
R1
.1
G0/1
S2
If the default gateway were not configured on S1, response packets from
S1 would not be able to reach the administrator at 192.168.11.10. The
administrator would not be able to mange the device remotely.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
51
Network Layer
Summary
In this chapter, you learned:
 The network layer, or OSI Layer 3, provides services to allow
end devices to exchange data across the network.
 The network layer uses four basic processes: IP addressing
for end devices, encapsulation, routing, and deencapsulation.
 The Internet is largely based on IPv4, which is still the most
widely-used network layer protocol.
 An IPv4 packet contains the IP header and the payload.
 The IPv6 simplified header offers several advantages over
IPv4, including better routing efficiency, simplified extension
headers, and capability for per-flow processing.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
52
Network Layer
Summary
In this chapter, you learned:
 In addition to hierarchical addressing, the network layer is
also responsible for routing.
 Hosts require a local routing table to ensure that packets are
directed to the correct destination network.
 The local default route is the route to the default gateway.
 The default gateway is the IP address of a router interface
connected to the local network.
 When a router, such as the default gateway, receives a
packet, it examines the destination IP address to determine
the destination network.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
53
Network Layer
Summary
In this chapter, you learned:
 The routing table of a router stores information about directlyconnected routes and remote routes to IP networks. If the
router has an entry in its routing table for the destination
network, the router forwards the packet. If no routing entry
exists, the router may forward the packet to its own default
route, if one is configured, or it will drop the packet.
 Routing table entries can be configured manually on each
router to provide static routing or the routers may
communicate route information dynamically between each
other using a routing protocol.
 In order for routers to be reachable, the router interface must
be configured.
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
54
Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential
55