Cisco – Chapter 11 - YSU Computer Science & Information Systems

Download Report

Transcript Cisco – Chapter 11 - YSU Computer Science & Information Systems

Cisco – S1C10
Routers
All You Ever Wanted To Know
But Were Afraid to Ask
Routers – Intelligent Devices
• Make best path decisions
• Use Layer 3 addresses to make forwarding
decisions
• Facilitate ARP – Address Resolution Protocol to
learn MAC addresses
• Facilitate RARP – helping a device learn its IP
address
• Uses Routing Protocols (determine best path) on
Routed Protocols (protocols that can be routed)
Review of Layer 2 Devices
• Bridges and Switches operate at Layer 2
– Use MAC (Physical) address to filter and forward
– Used to connect segments of a network
• Routers operate at Layer 3
– Use IP (logical) addresses to forward and switch
– Used to connect separate networks and to access WWW
– Provide end-to-end routing
Router Connections
• Router Interfaces must have addresses
• Functions Performed
– Strips off data link header carried by frame (contains
MAC addresses)
– Examines network layer addresses (IP) to determine
destination network
– Consults routing tables to determine which interface
(port) to use to forward packet
• Each interface requires separate, unique network address
– Encapsulates packet into proper frame to route
• Token Ring, Ethernet, FDDI, etc.
Assigning IP Addresses
• Static
– Configure each device with IP address
• Keep meticulous records
– Some operating systems, such as Windows 95 and
Windows NT, send an ARP request to check for a
duplicate IP address when they attempt to initialize
TCP/IP
– Generate error message and won’t initialize TCP/IP if they
find duplicate IP address
Addressing
• Dynamic
– RARP – Reverse Address Resolution Protocol
• Binds MAC address to IP device
• Requires RARP server to answer RARP requests
• MAC and IP headers and operation code are difference from
ARP request
• Broadcast goes to all devices on network
– BOOTstrap Protocol (BOOTP)
• Uses UDP to carry messages; UDP encapsulated in IP
datagram
• Takes IP address that matches its MAC address
– Operates in a client-server environment
– Can contain IP address, router address, server address
Addressing - DHCP
• Dynamic Host Configuration Protocol
– Allows host to obtain an IP quickly
– Defined range of IP addresses reside on DHCP
server
– Hosts request address from server
– Server chooses address and assigns it
– Server can also send subnet mask
DHCP Process
• Sends CHCPDiscover broadcast message
– UDP packets with port number set to BOOTP port
– Client moves into select state and collects DCPOFFER
responses from server
– Client selects first response and negotiates lease time
(length of time to keep address without renewing it) by
sending DHCPREQUEST packet
– Acknowledgement from server enters client into
BOUND state
ARP Request and ICMP
• ARP
Address Resolution Protocol
– Uses to find IP address when MAC address is
known
• ICMP (Internet Control Message Protocol)
– Used to report a problem to sender of message
• E.g. undeliverable packet
• Echo request/echo reply - pinging
ARP Tables
• Contain MAC and IP addresses of devices
on same LAN – Map IP address to IP
address (in RAM )
• When source host locates entry in its table,
it binds or associates the IP address to the
MAC address and uses it to encapsulate the
data
Using ARP to Determine IP
Address
• If MAC-IP address bond is not in ARP table
– Host sends broadcast FF FF FF FF FF FF to all
hosts on network segment
– If IP address is on segment, host responds by
sending its MAC address – ARP Reply
• If IP address is not discovered
– Gateway IP is used
• Router sends ARP using its MAC address
Routers and ARP Requests
• If Gateway (router) recognizes that IP address is
on same subnet as source host, it discards packet
• If subnet address is different, router responds with
its MAC address (proxy ARP)
• Router then sends the ARP request to the proper
subnet
• If necessary, Router sends ARP request to another
router --- INDIRECT ROUTING
Routed or Routable Protocols
• Protocols that provide support for the
network layer
• IPX, IP, Appletalk, DecNET
• NOT ROUTABLE
– NetBEUI – small, fast, efficient, but limited to
running on one segment
Routing Algorithms
• Design goals include:
–
–
–
–
–
–
Optimization
Simplicity and low overhead
Robustness and stability
Rapid convergence
Flexibility
scalability
Routing Metrics
•
•
•
•
•
•
Bandwidth
Delay
Load
Reliability
Hop count
Cost
Routing Protocols
All Interior
• Determine the paths that routed protocols
follow to destinations
• RIP
Routing Information Protocol
– Hops
• IGRP Cisco – uses several metrics
• OSPF Open Shortest Path First
• EIGRP Cisco - hybrid
Exterior Gateway Protocol - EGP
• Used to connect to outside world
– Internet
– Other networks
– BGP – Border Gateway Protocol is primary
exterior routing protocol used on the Internet
RIP
• 15 hops is maximum
• Belongs to Interior Gateway Protocols
– Used only in autonomous networks
• Updates routing table every 30 seconds
• Create large amounts of network traffic
because are constantly connecting to
neighboring routers
• Uses one metric – distance vector
IGRP
• Cisco protocol
• Distance vector protocol
• Uses other metrics as well
–
–
–
–
Bandwidth
Load
Delay
reliability
EIGRP
• Enhanced Interior Gateway Routing
Protocol
• Hybrid of Link-State and Distance Vector
– Basic difference is way they update routing
tables and metrics used
• Provides superior operating efficiency
• Combines advantages of link-state protocols
and distance vector protocols
OSPF
LINK State Protocol
• Open Shortest Path First
– Determines optimum path
– Uses several criteria to determine best route
•
•
•
•
•
Cost
Route speed
Traffic
Reliability
Security
IS-IS
Link State
• Intermediate System – Intermediate System
– Based on Decnet
– Intermediate system is a router
– Uses CLNP – connectionless Network Protocol
in a CLNS – connectionless Network
environment
– Alternative to OSPF
• Mixes CLNP and IP routing in one protocol
Encapsulation
• If router strips frame header and can’t find
destination IP address, it may drop the
packet
IP Packet
•
•
•
•
•
•
•
•
•
•
•
Version
IP Header Length
TOS – type of service
Total length
ID
Flag
Fragment Offset
TTL – counter that decreases (increments of 1)
Protocol
Source and Destination IP address
Options, Padding, and Data
Multiple Protocols
• Routers can support many routed protocols
–
–
–
–
–
IPX, IP, AppleTalk, DecNet
IPX is Novell protocol
IP is Internet protocol
AppleTalk is Macintosh protocol
DecNet is DEC protocol
Static Routes
• Manual entries in routing tables
–
–
–
–
Entered by network administrator
Can be used to test a link on the network
Also used to conserve wide area bandwidth
Preferred way when there is only one path to
destination network
• Referred to as STUB network
Dynamic Routing
• Eliminates need for network administrators
to manually enter information
• Works best when bandwidth and large
amounts of network traffic are not issues
• RIP, IGRP, EIGRP, and OSPF can handle
dynamic routing
• Internet would be impossible without
dynamic routing
Connectionless vs Connection
Oriented
• Connectionless
– Destination not contacted before packet is sent
• Postal System – Packet Switched
• Connection Oriented
– Destination contacted before packet is sent
• Telephone system – Circuit Switched
Subnetting
• Borrows Host bits to form subnets
• Must borrow 2 bits and must leave 2 bits
• Class C
– Can borrow from 2-6 bits
• Class B
– Can borrow from 2-14 bits
• Class C
– Can borrow from 2-22 bits
Subnet Mask
• Network Address
all 1 bits
• Subnet address
all 1 bits
• Host portion of address
0 bits
•
•
•
•
Network is 192.16.20.0
Borrow 3 bits from host octet for subnets
11111111.11111111.11111111.11100000
255.255.255.224
Subnet Mask Examples
•
•
•
•
•
•
•
•
•
10.0.0.0
is network
Octets 2 and 3 are used for subnets
Subnet mask is 11111111.11111111.11111111.00000000
255.255.255.0
172.16.0.0 is network
Half of octet 3 is used for subnets
Subnet mask is
11111111.11111111.11110000.0000
255.255.240.0.0