Sie sind auf Seite 1von 21

Internetworking

Slides adapted from Larry Peterson

Outline
Best Effort Service Model Global Addressing Scheme ARP DHCP VPN ICMP
Winter 2012 MU CS 4850/7850

FTP

HTTP TCP

NV

TFTP

UDP

IP
NET 1 NET 2

NET n

IP Internet
Concatenation of Networks

Winter 2012

MU CS 4850/7850

Internetworking
What is IP
IP stands for Internet Protocol Key tool used today to build scalable, heterogeneous internetworks It runs on all the nodes in a collection of networks and defines the infrastructure that allows these nodes and networks to function as a single logical internetwork

A simple internetwork showing the protocol layers


Winter 2012 MU CS 4850/7850 3

The Internet Network layer


Host, router network layer functions:
Transport layer: TCP, UDP
Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions

Network layer

forwarding table

ICMP protocol error reporting router signaling

Link layer physical layer


Winter 2012 MU CS 4850/7850 4

Service Model
Connectionless (datagram-based) Best-effort delivery (unreliable service)
packets are lost packets are delivered out of order duplicate copies of a packet are delivered packets can be delayed for a long time
0 Version 4 HLen Ident TTL Protocol SourceAddr DestinationAddr Options (variable) Data Pad (variable) 8 TOS Flags 16 19 Length Offset Checksum 31

Datagram format

Winter 2012

MU CS 4850/7850

Fragmentation and Reassembly


Each network has some MTU (max. transmission unit)
Largest payload a frame can carry

Design decisions
fragment when necessary (if MTU < Datagram) try to avoid fragmentation at source host re-fragmentation is possible fragments are self-contained datagrams delay reassembly until destination host do not recover from lost fragments

Winter 2012

MU CS 4850/7850

Start of header Ident = x 0 Offset = 0

Example
(a)

Rest of header 1400 data bytes

Start of header Ident = x 1 Offset = 0

Rest of header

H1

R1 R1

R2 R2

R3 R3

H8
512 data bytes
(b)

Start of header Ident = x 1 Offset = 64

ETH IP (1400)

FDDI IP (1400)

PPP IP (512) PPP IP (512) PPP IP (376)

ETH IP (512)
Rest of header

ETH IP (512)
512 data bytes

ETH IP (376)
Start of header Ident = x 0 Offset = 128

Offset: counts 8 byte chunk.


Winter 2012 MU CS 4850/7850

Rest of header
376 data bytes

Global Addresses
IP address: 32-bit identifier for host, router interface Properties
globally unique hierarchical: network + host 4 Billion IP address, half are A type, is B type, and 1/8 is C type

class-full addressing: class Dot Notation


10.3.2.4 128.96.33.81 192.12.69.77
7 (a) 0 Network 24 Host

14 (b) 1 0 Network 21 (c) 1 1 0 Network

16 Host 8 Host

Winter 2012

MU CS 4850/7850

Datagram Forwarding
Strategy
every datagram contains destinations address if connected to destination network, then forward to host if not directly connected, then forward to some router forwarding table maps network number into next hop each host has a default router each router maintains a forwarding table
Network Number 1 2 3 4 Next Hop R3 R1 interface 1 interface 0

Example (R2)

Winter 2012

MU CS 4850/7850

Example
Network 1 (Ethernet) H7 R3 H8

H1

H2

H3

Network 2 (Ethernet) R1

Network 4 (point-to-point)

R2 H4 Network 3 (FDDI)

H5

H6

Winter 2012

MU CS 4850/7850

10

ARP: Address Resolution Protocol


Question: how to determine MAC address of B knowing Bs IP address?
Each IP node (Host, Router) on LAN has ARP table ARP Table: IP/MAC address mappings for some LAN nodes
< IP address; MAC address; TTL>

TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min)

Winter 2012

MU CS 4850/7850

11

Address Translation
Map IP addresses into physical addresses
destination host next hop router

Techniques
encode physical address in host part of IP address (x) table-based

ARP
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
MU CS 4850/7850 12

Winter 2012

ARP Protocol
A wants to send datagram to B, and A knows Bs IP address. Suppose Bs MAC address is not in As ARP table. A broadcasts ARP query packet, containing B's IP address all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address
frame sent to As MAC address (unicast)
Winter 2012 MU CS 4850/7850 13

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshed

ARP is plug-and-play:
nodes create their ARP tables without intervention from net administrator

ARP Packet Format


0 8 Hardware type = 1 HLen = 48 PLen = 32 16 ProtocolType = 0x0800 Operation 31

SourceHardwareAddr (bytes 0 3) SourceHardwareAddr (bytes 5) 4 SourceProtocolAddr (bytes 2 3) SourceProtocolAddr (bytes 1) 0 TargetHardwareAddr (bytes 1) 0

TargetHardwareAddr (bytes 5) 2 TargetProtocolAddr (bytes 0 3)

Winter 2012

MU CS 4850/7850

14

ARP Details
Request Format
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

Notes
table entries timeout in about 10 minutes always update table with source info when you are the target update table with source info if already have an entry (reset timeout) do not refresh table entries with source info otherwise
Winter 2012 MU CS 4850/7850 15

DHCP: Dynamic Host Configuration Protocol


Goal: allow host to dynamically obtain its IP address from network server when it joins network
Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an on) Support for mobile users who want to join network

DHCP overview: host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg
Winter 2012 MU CS 4850/7850 16

Dynamic Host Configuration Protocol (DHCP)


Unicast to server

DHCP relay Broadcast

Other networks

DHCP server

Host

Winter 2012

MU CS 4850/7850

17

Virtual Private Networks (VPN)


C Physical links A Corporation X private network B

M Corporation Y private network (a)

L Physical links

M Virtual circuits

(b)

Winter 2012

MU CS 4850/7850

19

Tunneling
(virtual Point-to-Point link)

Network 1

R1

Internetwork

R2 10.0.0.1

Network 2

IP header, Destination = 2.x IP payload

IP header, Destination = 10.0.0.1 IP header, Destination = 2.x IP payload

IP header, Destination = 2.x IP payload

Combined with encryption

Winter 2012

MU CS 4850/7850

20

ICMP: Internet Control Message Protocol


used by hosts, routers, gateways to communication network-level information
error reporting: unreachable host, network, port, protocol echo request/reply (used by ping)
Type 0 3 3 3 3 3 3 4 8 9 10 11 12 Code 0 0 1 2 3 6 7 0 0 0 0 0 0 description echo reply (ping) dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable dest network unknown dest host unknown source quench (congestion control - not used) echo request (ping) route advertisement router discovery TTL expired bad IP header
21

network-layer above IP:


ICMP msgs carried in IP datagrams

ICMP message: type, code plus first 8 bytes of IP datagram causing error
Winter 2012

MU CS 4850/7850

Internetworking
Summary
Best Effort Service Model Global Addressing Scheme ARP DHCP VPN ICMP
Winter 2012 MU CS 4850/7850

FTP

HTTP TCP

NV

TFTP

UDP

IP
NET 1 NET 2

NET n

22

Das könnte Ihnen auch gefallen