Upload
hadassah-hancock
View
29
Download
3
Embed Size (px)
DESCRIPTION
CSS432 Basic Internetworking Textbook Ch3.2. Professor: Munehiro Fukuda. Network 1 (Ethernet). H7. R3. H8. H1. H8. H2. H1. H3. TCP. TCP. Network 4. R1. R2. R3. (point-to-point). Network 2 (Ethernet). R1. IP. IP. IP. IP. IP. R2. FDDI. PPP. ETH. ETH. ETH. FDDI. PPP. - PowerPoint PPT Presentation
Citation preview
CSS432: Basic Internetworking 1
CSS432 Basic InternetworkingTextbook Ch3.2
Professor: Munehiro Fukuda
CSS432: Basic Internetworking 2
IP Internet Interconnected Collection of Networks
Viewed as a simple logical network
Routers: nodes interconnecting networks
Protocol Stack IP on all nodes (both hosts and router) TCP and UDP on top of IP
R2
R1
H4
H5
H3H2H1
Network 2 (Ethernet)
Network 1 (Ethernet)
H6
Network 3 (FDDI)
Network 4(point-to-point)
H7 R3 H8
R1
ETH FDDI
IPIP
ETH
TCP R2
FDDI PPP
IP
R3
PPP ETH
IP
H1
IP
ETH
TCP
H8
Identical frame Identical frame
Identicaldatagram
Identicaldatagram
Identical packet
CSS432: Basic Internetworking 3
Service Model Global addressing
IP address Best-effort delivery (unreliable service)
Connectionless (datagram-based) packets are lost packets are delivered out of order duplicate copies of a packet are delivered packets can be delayed for a long time
Datagram format
Version: IPv4/IPv6 HLen: header length in ints
Maximum header length? TOS: type of service (priority queue in routers) Length: packet length in bytes
Maximum packet size? TTL: time to live (#hops) Protocol: TCP, UDP Checksum SourceAddr: source IP address DestinationAddr: destination IP address
Version HLen TOS Length
Ident Flags Offset
TTL Protocol Checksum
SourceAddr
DestinationAddr
Options (variable) Pad(variable)
0 4 8 16 19 31
Data
preamble dest addr src addr 0x0800 CRC
frame type
Ex. Ethernet
CSS432: Basic Internetworking 4
Fragmentation and Reassembly Each network has some MTU (maximum
transmission unit) To check each interface of your computer:
netstat –i ifconfig
Strategy fragment when necessary (MTU < Datagram) try to avoid fragmentation at source host re-fragmentation is possible fragments are self-contained datagrams use CS-PDU (not cells) for ATM delay reassembly until destination host do not recover from lost fragments
CSS432: Basic Internetworking 5
Example
H1 R1 R2 R3 H8
ETH IP (1400) FDDI IP (1400) PPP IP (512)
PPP IP (376)
PPP IP (512)
ETH IP (512)
ETH IP (376)
ETH IP (512)
Ident = x Offset = 0
Start of header
0
Rest of header
1400 data bytes
Ident = x Offset = 0
Start of header
1
Rest of header
512 data bytes
Ident = x Offset = 512
Start of header
1
Rest of header
512 data bytes
Ident = x Offset = 1024
Start of header
0
Rest of header
376 data bytes
CSS432: Basic Internetworking 6
Discussions
How can we detect if a given datagram has lost some fragments?
Who will take care resending a datagram which could not be reassembled previously due to its fragment droppings?
CSS432: Basic Internetworking 7
Global Addresses Properties
globally uniquehierarchical: network + host
Dot Notation Class A
1.0.0.1 – 126.255.255.254 (0.0.0.0 – 0.255.255.255, 1.0.0.0, 126.255.255.255,
and 127.0.0.0 – 127.255.255.255 reserved) Class B
128.0.0.1 – 191.255.255.254 Class C
192.0.0.1 – 223.255.255.254
Network Host
7 24
0A:
Network Host
14 16
1 0B:
Network Host
21 8
1 1 0C:
CSS432: Basic Internetworking 8
Datagram Forwarding
AlgorithmIf ( datagram’s dest network# == network# of network interface x )
deliver it to the destination host over interface xelse
if ( datagram’s dest network# == network# of a next hop router y)deliver it to the router y
elsedeliver it to its default router
Example
Network# Next hop
1 Interface0
2 R2
3 R2
4 Interface1
Network# Next hop
1 R3
2 R1
3 Interface1
4 Interface0
Network# Next hop
1 R2
2 Interface1
3 Interface0
4 R2
R1 R2 R3 R1
R2
R3
H1
H8
Network 4
Network 3
Network 2Network 1
i/f 0 i/f 0
i/f 0
i/f 1
i/f 1 i/f 1
CSS432: Basic Internetworking 9
Static Configuration for Cisco Routers
hostname router1!interface ethernet 0 ip address 172.16.1.1 255.255.255.0!interface ethernet 1 ip address 172.16.2.1 255.255.255.0!ip route 172.16.3.0 255.255.255.0 172.16.1.2ip route 172.16.4.0 255.255.255.0 172.16.1.2ip route 172.16.5.0 255.255.255.0 172.16.1.2
Router 2
Router 1
Router 3
172.16.3.0/24
172.16.1.0/24
172.16.4.0/24172.16.2.0/24
172.16.5.0/24
Eth2: 172.16.5.1 Eth1: 172.16.3.1 Eth0: 172.16.3.2
Eth1: 172.16.4.1
Eth0: 172.16.1.2
Eht0: 172.16.1.1
Eth1: 172.16.2.1
CSS432: Basic Internetworking 10
Address Translation Map IP addresses into physical addresses
destination host next hop router
Techniques encode physical address in host part of IP address
Pha = f( IPa) or IPa =f-1(Pha) Pha: 0010 0001 0100 1001 => 128.96.33.81
Problems Class C has only 8 bits to indicate a host Ethernet has 48 bits to present a host address
table-based Resolution through dynamic binding Address Resolution Protocol
table of IP to physical address bindings broadcast request if IP address not in table target machine responds with its physical address table entries are discarded if not refreshed
CSS432: Basic Internetworking 11
ARP Details
table entries timeout in about 10 minutes
Update table with source when you are the target, otherwise no need to add an entry
update table if already have an entry
A X B Y
Response I’m IPb and Phb. You’re IPa and Pha
Reuqest I’m IPa and Pha. You’re IPb. How about Ph?
A X B YIP Ph
IPb Phb
IPa Pha
IP Ph
IPa Pha
IPb Phb
IP Ph
IPb Phb
IP Ph
IPa Pha
IPb ??
CSS432: Basic Internetworking 12
ARP Packet Format
TargetHardwareAddr (bytes 2 – 5)
TargetProtocolAddr (bytes 0 – 3)
SourceProtocolAddr (bytes 2 – 3)
Hardware type = 1 ProtocolType = 0x0800
SourceHardwareAddr (bytes 4 – 5)
TargetHardwareAddr (bytes 0 – 1)
SourceProtocolAddr (bytes 0 – 1)
HLen = 48 PLen = 32 Operation
SourceHardwareAddr (bytes 0 – 3)
0 8 16 31
An ARP packet is carried in a frame header HardwareType: type of physical network (e.g., Ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target-Physical/Protocol addresses
preamble dest addr src addr 0x0806 CRC
frame type
Ex. Ethernet
CSS432: Basic Internetworking 13
RARP: Reverse Address Resolution Protocol
Use RARP if a client host is diskless workstation
Use the unique MAC address Ask an RARP server about a
client IP. Works in the same LAN Retransmit an RARP message
after a large delay if it has been lost.
Prepare a primary and secondary server.
A X B Y
Response You’re IPa and Pha
Request I’m Pha. What’s my IPa?
A X B Y
IP Ph
IPa Pha
IPb Phb
IP Ph
IPa Pha
IP Ph
?? Pha
RARP server
IP Ph
IPa Pha
IPb Phb
RARP server
CSS432: Basic Internetworking 14
RARP Disadvantage
Using a computer’s MAC address which does not allow computers to move to another network
Operating at data-link level which requires direct access to the network hardware
Not working beyond routers, because routers are IP-based but RAPS are not IP.
CSS432: Basic Internetworking 15
DHCP
Options
Boot file name
Server host name
Client Hardware addrRouter IP aaddrServer IP addrYour IP addrClient IP addr
FlagsSecsXid
HOPSHLENHtypeOP
BOOTP/DHCPUDP headerdatagramFrame addr
DHCPrelay
DHCPserver
Other network
Host
Broadcast
Unicast
DHCP server: Works as a centralized repository for IPs Pools available IP addresses Hands out one to a client on demand Accessible by sending a DHCPDISCOVER message
to an IP broadcast address Receives a DHCPDISCOVER from a Relay agent
connected to a different network Advantages:
Works at a user level Automatic IP configuration Save IP addresses Works across networks.
CSS432: Basic Internetworking 16
DHCP Client State TransitionINITIALIZE
Fig. 23.4 on p453 of Internetworking with TCP/IP
REQUEST
SELECT
RENEWREBIND
BOUND
Host boots
/ DHCPDISCOVER to all servers
Select offer / DHCPREQUEST to a specific server
Receive DHCPOFFERfrom all servers
Receive DHCPACK from the current server
Lease reaches 50% expiration/ DHCPREQUEST to the current server
DHCPACK
DHCPNACK
Lease reaches 87.5% expiration/ DHCPREQUEST to any server
DHCPACK
DHCPNACKOrLease expires
CSS432: Basic Internetworking 17
Two-Step bootstrap Procedure
Diskless Workstation
Step 1A: BOOTP request: BOOT FILE NAME=I want to boot “unix”
Step 1B:BOOTP reply: Server = mercury, BOOT FILE NAME=“/local/var/bootfiles/xncd19r”
Step 2A: TFTP request: request for the image
Step 2B: TFTP reply: image returned
BOOTP server
File server
OS Image:Unix
Windows
CSS432: Basic Internetworking 18
Internet Control Message Protocol (ICMP)
frame header
datagram heaader
ICMP header ICMP data
Src R1 R2 R3 RK
RE
Rcv
Error occurred
Mistakenly routed
An error reporting message (ICMP)
ICMP type 0-18
Is Src responsible for this ICMP message?
CSS432: Basic Internetworking 19
ICMP Message Types
Type field Code field ICMP Message Type Applications
0 and 8 Echo reply/request ping
3 Destination unreachable
5 Redirect (change a route)
11 0 TTL exceeded Trace route,
11 1 Fragment reassemble failed
CSS432: Basic Internetworking 20
Discussions
How can traceroute be implemented using ICMP (type=11, code=0) messages?
CSS432: Basic Internetworking 21
Reviews IP Internet: Protocol stack,
fragmentation/reassembly, IP address, and datagram forwarding
Address translation: ARP, RAPR, and DHCP ICMP
Exercises in Chapter 3Ex. 36 (fragmentation)Ex. 44 (ARP)Ex. 45 (ARP)
CSS432: Basic Internetworking 22
More Exercises (not from Our Textbook)Q1. (DHCP)
Consider a host that has a disk and uses DHCP to obtain an IP address. If the host stores its address on disk along with the data the lease expires, and then reboots within the lease period, can it use the same address? Why or why not?
Q2. (DHCP) DHCP mandates a minimum address lease of one
hour. Can you imagine a situation in which DHCP’s minium lease causes inconvenience? Explain.