Download midterm-review

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Wireless security wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Distributed firewall wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Network tap wikipedia , lookup

Internet protocol suite wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

AppleTalk wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

I²C wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Midterm Review
Lab 4: dynamic routing protocols
Typo on Page 144
• Table 4.2
– Should be router 4 instead of router 1
3
How Cost is Set on a Router
10.0.1.0/24
10.0.2.0/24
eth0
.2
.1
Router A
.2
10.0.3.0/24
eth1
.1
Router B
10.0.4.0/24
.2
.1
.2
Router C
• The default cost each router adds is 1.
• When Router B announces to Router C the network 10.0.2.0/24, the cost
metric is 1.
• Offset-list 0 in value Iface (increases the metric of incoming RIP packets)
• Offset-list 0 out value Iface (increases the metric of outgoing RIP packets)
• At router B, if we run offset-list 0 out 10 eth1, then the metric for
10.0.2.0/24 is 11; if we run offset-list 0 in 10 eth1, then the metric for the
network 10.0.3.0/24 announced by C becomes 11.
4
Exercise (4B): count-to-infinity
1
Router3
1
1
1
10
1 Router2
Router1
Router4
• Time consuming to reproduce, but interesting.
• Why does count-to-infinity still exist with split horizon?
• Lab report due after midterm
5
Why does count-to-infinity still exist with split
horizon?
Router3
1
1
1
Router4
PC3
10.0.1.0/24
1
X
Router1
10
1 Router2
Router3’s routing table:
10.0.1.0/24 ?? 1
Suppose updates happen in the following sequence:
1. The update from PC3 arrives at Router 3
2. The update from Router 3 arrives at Router 2
3. The update from Router 4 arrives at Router 2
Router2’s routing table:
10.0.1.0/24 ?? 1
Router4’s routing table:
10.0.1.0/24 Router3 3
Router2 is not Router4’s next hop.
Router4 sends to router2 the routing update
Router2’s routing table:
10.0.1.0/24 Router 4 4
This lie will be told to Router3 and
Circulates in the system  count-to-infinity
6
Midterm review
What you’ll be tested on
• Basic lab commands
– E.g., ping, traceroute, tcpdump, ethereal, ifconfig, how to
copy a file, how to list a directory
• Basic trouble shooting
– E.g., I cannot ping 128.195.1.150, why?
• Basic networking concepts
– E.g., layering principle, multiplexing, and encapsulation
• Protocols we’ve covered so far
– ARP
– ICMP
– IP
• How to design a protocol
8
Address translation protocol
•
•
•
•
What is it used for?
What is an ARP cache used for?
Proxy ARP
ARP is “hop-by-hop”
9
Address Translation with ARP
ARP Request:
Argon broadcasts an ARP request to all stations on the
network: “What is the hardware address of
128.143.137.1?”
Argon
128.143.137.144
00:a0:24:71:e4:44
Router137
128.143.137.1
00:e0:f9:23:a8:20
ARP Request:
What is the MAC address
of 128.143.71.1?
10
Address Translation with ARP
ARP Reply:
Router 137 responds with an ARP Reply which contains the
hardware address
Argon
128.143.137.144
00:a0:24:71:e4:44
Router137
128.143.137.1
00:e0:f9:23:a8:20
ARP Reply:
The MAC address of 128.143.71.1
is 00:e0:f9:23:a8:20
11
ARP Packet Format
Ethernet II header
Destination
address
Source
address
Type
0x8060
6
6
2
ARP Request or ARP Reply
28
10
Hardware type (2 bytes)
Hardware address
length (1 byte)
Padding
CRC
4
Protocol type (2 bytes)
Protocol address
length (1 byte)
Operation code (2 bytes)
Source hardware address*
Source protocol address*
Target hardware address*
Target protocol address*
* Note: The length of the address fields is determined by the corresponding address length fields
12
Example
• ARP Request from Argon:
Source hardware address:
Source protocol address:
Target hardware address:
Target protocol address:
00:a0:24:71:e4:44
128.143.137.144
00:00:00:00:00:00
128.143.137.1
• ARP Reply from Router137:
Source hardware address:
Source protocol address:
Target hardware address:
Target protocol address:
00:e0:f9:23:a8:20
128.143.137.1
00:a0:24:71:e4:44
128.143.137.144
13
ARP Cache
• Since sending an ARP request/reply for each IP datagram is
inefficient, hosts maintain a cache (ARP Cache) of current
entries. The entries expire after a time interval.
• Contents of the ARP Cache:
(128.143.71.37) at 00:10:4B:C5:D1:15 [ether] on eth0
(128.143.71.36) at 00:B0:D0:E1:17:D5 [ether] on eth0
(128.143.71.35) at 00:B0:D0:DE:70:E6 [ether] on eth0
(128.143.136.90) at 00:05:3C:06:27:35 [ether] on eth1
(128.143.71.34) at 00:B0:D0:E1:17:DB [ether] on eth0
(128.143.71.33) at 00:B0:D0:E1:17:DF [ether] on eth0
14
Proxy ARP
• Proxy ARP: Host or router responds to ARP Request that
arrives from one of its connected networks for a host that is
on another of its connected networks.
15
ICMP
• What is it used for?
– E.g. error reporting, route redirect
• When will an ICMP message be triggered?
• Application programs that use ICMP
– Ping, traceroute
16
IP
•
•
•
•
•
•
Network order versus host order
Structure of an IP address
CIDR addressing
Route aggregation
Longest prefix match
Fragmentation
17
An IP address is often written in dotted decimal
notation
• Each byte is identified by a decimal number in the range
[0..255]:
10000000
10001111
10001001
10010000
1st Byte
2nd Byte
3rd Byte
4th Byte
= 128
= 143
= 137
= 144
128.143.137.144
18
Structure of an IP address
31
0
network prefix
host number
• An IP address encodes both a network number
(network prefix) and an interface number (host
number).
– network prefix identifies a network
– the host number identifies a specific host
(actually, an interface on the network).
– All hosts on the same single segment network
have the same network prefix.
19
Network prefix is variable length
128
Addr
Mask
143
137
10000000
10001111
10001001
255
255
255
11111111
11111111
1111111
144
10010000
0
00000000
• A network mask specifies the number of bits used
to identify a network in an IP address.
20
CIDR notation
• CIDR notation of an IP address:
– 128.143.137.144/24
– /24 is the prefix length. It states that the first 24
bits are the network prefix of the address (and
the remaining 8 bits are available for specific
host addresses)
21
Network prefix versus address prefix
• CIDR notation can nicely express blocks of addresses
– An address block
– [128.195.0.0, 128.195.255.255]
– can be represented by an address prefix 128.195.0.0/16
– All addresses whose first 16 bits are the same as those in
128.195.0.0 are in the address block or match the address
prefix 128.195.0.0/16
– How many addresses are there in a /x address block?
• 2 (32-x)
• A network prefix is the first n bits in an IP address that
identifies a single-segment network.
22
How to assign network prefixes from an address
prefix
•
•
•
•
An organization obtains an address prefix 10.0.0.0/16
The organization has two LANS. LAN1 has at most 500
hosts; LAN2 has at most 100 hosts.
Assign network prefixes to each LAN.
Algorithm
1. Figure out the length of the network prefix
– 232-x1 ¸ 500  x1 = 23
– 232-x2 ¸ 100  x2 = 25
2. Allocate subdivisions of 10.0.0.0/16 to each LAN
– 10.0.0.0/23 [10.0.0.0,10.0.1.255]  LAN1
– 10.0.2.0/25 [10.0.2.0, 10.0.2.127]  LAN2
23
Protocol Design
human protocols:
• “what’s the time?”
• “I have a question”
• introductions
… specific msgs sent
… specific actions taken
when msgs received, or
other events
network protocols:
• machines rather than
humans
• all communication activity in
Internet governed by
protocols
protocols define format, order of
msgs sent and received among
network entities, and actions
taken on msg transmission,
receipt
24
What’s a protocol?
a human protocol and a computer network protocol:
Hi
TCP connection
req
Hi
TCP connection
response
Got the
time?
Get http://www.awl.com/kurose-ross
2:00
<file>
time
Q: Other human protocols?
25
How to review
• Lecture notes
• Lab and pre-lab
• Sample midterm
26