Doyle, Ch. 2 Highlights

Download Report

Transcript Doyle, Ch. 2 Highlights

Doyle, Ch. 2 Highlights
• p. 32, IP Packet Header, TTL (Time to
Live) basis for traceroute aka tracert
aka trace
• p. 36, Cisco trace (also extended vers.)
• p. 40-62 IP Addresses, last lecture
• p. 63, ARP
• p. 73, ICMP, types 0,3,5,8,11
Doyle Reading Assignments
• pages 91-101 for Thursday 1/13 (Ch 3.
Static Routing)
• pages 101-120 and pages 137-160 for
Tuesday 1/18 (Ch 3. cont. and Ch 4.
Dynamic Routing Protocols)
What does an IP node do with
a packet?
• Match destination IP to longest prefix in
its routing table
• If longest prefix match is a directly
connected network, use that data link
• Otherwise, send to gateway IP address
for longest prefix match
Routing Table
•
•
•
•
•
Networks
Masks
Gateway Address
Device
Code, Administrative Distance, Metric
(cisco)
IP Node
128.186.121.200 /24
192.168.0.200 /24
If both network interfaces are up,
these two networks will be in the routing table
128.186.121.200 /24
192.168.0.200 /24
Consider the addition of 2 routes, as follows
ip route 172.16.0.0 255.255.0.0 128.186.121.1
ip route 172.16.1.0 255.255.255.0 192.168.0.254
ip route 172.16.0.0 255.255.0.0 128.186.121.1
ip route 172.16.1.0 255.255.255.0 192.168.0.254
Which gateway address for 172.16.22.2 ?
Which gateway address for 172.16.1.32 ?
How about 172.0.4.55?
We may desire a prefix that will match any
destination.
Shorter prefixes match more
• The prefix 172.0.0.0 /8 matches all the
previous 172.x.x.x addresses
• The prefixes 128.0.0.0 /1 and 0.0.0.0 /1
match the top and bottom half of the IP
address space
• The prefix 0.0.0.0 /0 matches the entire
IP address space
Default Route
• ip route 0.0.0.0 0.0.0.0 128.186.121.1
• The 0-length prefix matches all
destinations, so
• If you don’t have a better gateway to
use, use the default gateway
Default Route
• An IP node (host or router) can function
perfectly well without a default route.
• If route knowledge is limited, part of the
Internet is unreachable.
• But core backbone routers know all the
network routes. No default route is
needed or desired.
Unix Routing Table
Destination
-------------146.201.68.64
192.168.111.0
224.0.0.0
default
127.0.0.1
Mask
--------------255.255.255.192
255.255.255.0
240.0.0.0
0.0.0.0
255.255.255.255
Gateway
---------------146.201.68.126
192.168.111.1
146.201.68.126
146.201.68.65
127.0.0.1
Device
-----eri0
eri0:1
eri0
lo0