Quiz
How does the network layer use the MTU value?
A) The MTU is passed to the network layer by the data link layer.
What are 2 functions that are provided by the network layer?
1) providing end devices with a unique network identifier
2) directing data packets to destination hosts on other networks
During the boot process, in what memory location will the router bootstrap program look for the IOS image if a TFTP server is not used?
A) flash
When transporting data from real-time applications, such as streaming audio and video, which field in the IPv6 header can be used to inform the routers and switches to maintain the same path for the packets in the same conversation
A) Flow Label
Within a production network, what is the purpose of configuring a switch with a default gateway address?
A) The default gateway address is used to forward packets originating from the switch to remote networks.
Chapter 6 Notes
routing - communication between networks
Network Layer
Provides services to allow end devices to exchange data across the network
-OSI Layer 3
-4 basic processes
-Addressing (end devices)
end device with configured IP is called a host
-Encapsulation
Receives PDU from transport layer. Adds header. Now called a Packet
-Routing - services to direct packets to a destination host on another network
-each route the packet takes to reach the destination is called a hop
-Deencapsulation - process of removing headers from lower layers
Operates without knowing/caring of the data being carried
Media/Path is irrelevant. Satelite, wireless, cable modem, serial.. doesn't matter
Network Layer protocols
IPv4
IPv6
Characteristics of IP protocols
-low overhead
-connectionless
-best effort (unreliable)
-media independant
Connectionless - no dedicated end to end connection created before sending. Kind of like mail.
-send at any time
-unaware of the state of the recipient
-unaware if the receiver can understand the data
-no error correction
-no guarantee packets will arrive in order
Best Effort Delivery
can't recover from failed/corrupt packets
bad packets are dropped
trouble with transmission handled by upper layers if the layer desires
Media Independent
Data link layer responsible for transmitting over media.
maximum size packet that can be sent is the MTU (maxium transmission unit)
-data link layer passes the MTU value up to the network layer
-network layer uses information to determine packet size
-breaks packets to fit the MTU.
-Fragmentation is necessary to split packet size so it will fit on a device with a smaller MTU
IPv4 Packet
-In use since 1983
Packet has 2 parts
1) IP header
Significant portions of the header
-Version - packet version. Constant at 0100
-Differentiated services (formerly Type of Service) - used for QoS. 1st 6 bits used by QoS. last 2 bits used to prevent dropping
-TTL (Time to Live) 8 bit value to limit the lifetime of the packet. Reduced at each hop. If hits 0, router discards packet and returns ICMP Time Exceeded message to the source IP address
-Protocol - indicates data payload
-Source IP address
-Destination IP address
2) Payload
Remaining fields of the IPv4 header
-Internet Header Length (IHL) - 4 bit value identifying the number of 32 bit words in the header
-total length - defines entire packet size, including header and data
-header checksum - used for error checking IP header. If values do not match, packet is discarded
If the packet is fragmented, other fields are used to keep track of the data
-Identification - unique identifier of a fragment
-flags - identifies how a packet is fragmented
-fragment offset - identifies the order in which to place the packet when it arrives at the destination
IPv6 packet
Limitations of IPv4
-IP address depletion - only 4 billion available IP addresses. Quickly running out due to always-on connections
-Internet Routing Table Expansion - more networks, more routes, more waiting
-Lack of end-to-end connectivity - Troublesome when NAT and PAT are used.
Encapsulating
-simplification of the IPv6 header
IPv4 had 20 octets and 12 basic header fields
IPv6 has 40 octets and 8 basic header fields
advantages over IPv4
-better routing efficiency for performance and forwarding rate
-no requirement for processing checksums
-simplified and more efficient extension header mechanisms
-flow label field for per-flow processing with no need to dencapsulate to identify various traffic flows
IPv6 packet header
-Version- 4 bit binary. Constantly set to 0110
-Traffic Class - equivelant of the differentiaed services field
-flow label - used to inform routers and switches to maintain the same path for packet flow so that packets are not reordered
-payload length
-next header - equivelent of the IPv4 protocol field. indicates data being carried
-hop limit
-source address
-destination address
IPv6 addresses
-128 bit address
-colons separate entries into a series of 16-bit hexadecimal blocks
Routing
How a host routes
Host forwarding decision
hosts can send a packet to ...
-itself
-local host
-remote host
local host vs remote host is based on IP address and subnet mask comparison between sender and receiver
devices beyond the local network segment referred to as remote hosts
Default Gateway
the device that routes traffic from the local network to devices on remote networks
if a host is sending to remote network, it sends to default gateway
default gateway maintains a routing table
-data file in RAM that stores route information from directly connected networks
-also knows remote networks the device has learned
host must maintain a local routing table to ensure proper delivery
hosts routing table typically contains of...
-direct connection
-local network route
-local default route
default route only used to connect outside of the local network
IPv4 routing
If a host wants to send a packet inside the local network
1) consult the IPv4 route table
2) match the destination IP address and identify it as being in the same network
3) send the packet using the local interface
If a host wants to send a packet outside the local network
1) consult the IPv4 route table
2) find there is no exact match for the destination IP address
3) choose the local default route to pick the forwarding location
4) send the packet to the gateway using the local interface
IPv6 routing
View routing table in Windows with netstat -r or route print
If - lists the interface numbers from the interface list
metric - lists the cost of each route to a destination. Lower numbers are preferred routes
network destination - lists the reachable networks
gateway - lits the address used by local host to forward outside the network
::/0 - IPv6 equivalent of the local default route
::1/128 - IPv6 equivalent of the loop back address
200::/32 - global unicast network prefix
fe80::/64 local link network route address; represents all computers in the local network
ff00::/8 multicast address
no broadcast addresses in IPv6
Router Routing Tables
routers store information about
directly connected routes
-known from interfaces physically plugged into the router
remote routes
-routes that come from other routers.
-manually configured or dynamically configured through the device learning from other routers
routing table of a router
-destination network
-metric associated with the destination
-gateway to get to the destination
show ip route
when a packet arrives at the router, the router examines the routing table. if the destination network matches a route in the routing table, the router forwards the packet to that route
if multiple paths to the same location, then lowest metric wins
directly connected routing table entries
routers have 2 rotus after IP address is assigned
route source: - how the route was learned
C: directly connected
L - local route
Destination network and how reached
identifies the address of the network and how a packet can reach the destination
outgoing interface
what interface is used to connect to that network
routers generally have multiple interfaces configured
common codes for remote networks
-S: route was manually created by an admin. Static route
-D: learned dynamically using EIGRP
-O: learned dynamically using OSPF
remote network routing table entries
route source- how the route was learned
destination network - the address of the remote network
administrative distance - trustworthiness of the route source
metric - value assigned to reach the remote network. Lower wins
next hop - ip address of the next router to forward packets to
route timestamp - when the route was last heard from
outgoing interface - physical interface to forward a packet
next hop address
address of the device that will process the packet next.
packets can not be forwarded by the router without a route for the destination network.
if no route, packet is dropped
router can be configured with a gateway of last resort if the destination is unknown
Routers -
a router is a computer
branch - small business, medium business, teleworkes
WAN - large business
Service provider - large service providers
router CPU and OS
Router memory
RAM - store applications and process including
-IOS - copied during bootup
-running config
-ip routing table
-ARP cache
-packet buffer
routers use DRAM
volatile memory and requires continual power to maintain information
all content lost when powered down
ROM
used to store:
-bootup instruction
-basic diagnostic software
-limited IOS
firmware embedded on an integrated circuit inside the router
doesn't lose contents when powered down
NVRAM
used as permanent storage for the startup config file
doesn't lose contents when powered off
flash
used as permanent storage for IOS and system related fields
router backplane
has the following connections
-console ports
-aux port
-LAN interfaces
-Enhanced high-speed WAN interface card (EHWIC) slot
modular enhancement slot. Different interface, different card
connecting to a router
routers interconnect many devices
connections grouped into two categories
management ports - used to configure/manage/troubleshoot. not used for packet forwarding
in-band router interfaces - LAN and WAN interfaces configured with IP addressing to carry traffic
two interfaces can't belong to the same network
router bootup
bootset files - loaded into RAM when booted
-IOS image file
-start config file
router bootup process
1) perform POST and load the bootstrap program
2) locate and load the Cisco IOS software
3) locate and load the startup config file or enter setup mode
locating/loading config file
can be saved in NVRAM.
if not, can be loaded from a TFTP server
show version
CPU and amount of RAM
some versions write the amount of ram with XXXX/YYYY. add those two numbers together
has config register as 0x2102. changing to other used for password recovery
general config steps
1)give hostname
2) set passwords
-enable
-console
-VTY
-use service password-encryption to encrypt password
3) setup a banner motd
4) exit config
5) save configuration
configuring interfaces
1) conf t
2) interface whatever
3) ip address xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy where x is IP address, y is subnet mask
4) description blah
5) no shutdown
6) exit config
7) save
verify interface configuration
show ip interface brief
show ip route
show interfaces
show ip interface
default gateway on a switch
1) interface blah
2) ip address xxx yyy (x is IP, y is subnet)
3) no shutdown
4) ip default-gateway xxx.xxx.xxx.xxx (x is IP address)
IP address on a switch is only used to mange the switch
if you want it accessible from anywhere, it needs a default gateway