Lehrstuhl für Netzarchitekturen und Netzdienste
Institut für Informatik Technische Universität München
iL iLab ab
Lab 1+2 The Basics / Static Routing
iL iLab ab Lab 1+2 The Basics / Static Routing Consultation - - PowerPoint PPT Presentation
Lehrstuhl fr Netzarchitekturen und Netzdienste Institut fr Informatik Technische Universitt Mnchen iL iLab ab Lab 1+2 The Basics / Static Routing Consultation hours We will introduce consultation hours Starting next week
Lehrstuhl für Netzarchitekturen und Netzdienste
Institut für Informatik Technische Universität München
Lab 1+2 The Basics / Static Routing
iLab: The Basics / Static Routing 2
Consultation hours
We will introduce consultation hours Starting next week Short (~15 min) Questions regarding important problems
At the followin
s:
iLab: The Basics / Static Routing 3
Textbook
Comput
puter er Networ tworks: ks: A Sy Syst stem em‘s s Approa proach
German Translation: „Computernetze“
Comprehensive Textbook for the iLab
(and the GRNVS lecture, too)
Picture: Amazon.com
iLab: The Basics / Static Routing 4
Background and History of the Internet
Wher
here Wizards ards Stay ay Up Late te: The e Origins igins Of T The e Interne ernet
German Translation: Arpa Kadabra oder
Die Geschichte des Internet
The Internet‘s history
The way from the ARPA-Net to the Internet The way from the research project to a
commercial network
Picture: Amazon.com
iLab: The Basics / Static Routing 5
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 6
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 7
ISO/OSI Layer Model (1979-1983)
Application Layer Presentation Layer Session Layer Transport Layer
Network Layer Data Link Layer Physical Layer
Applications, e.g. HTTP , FTP , … Management of Sessions Representation of data Transport, e.g. TCP , UDP , SCTP Routing, e.g. IP Transmission of frames Physical layer, e.g. Ethernet
iLab: The Basics / Static Routing 8
Internet Layer Model vs. ISO/OSI
Application Layer Transport Layer Internet Layer Link Layer Interface to the physical medium
Ethernet, WLAN, Token Ring, FDDI, …
Routing in the internet
IPv4, IPv6
End-to-end data transport
tcp, udp, sctp, …
Applications
http, ftp, telnet, smtp, pop, …
3 1 2 4 6 x 5 = Equivalent to ISO/OSI 7
iLab: The Basics / Static Routing 9
Horizontal Communication
Application TCP IP Net 1 IP Net 1 Net 2 IP Net 2 Net 3 Application TCP IP Net 3
rizont ntal l communica unicatio tion n = logical communication between instances of the same protocol layer over an abstract medium
instance
Router Router
Telephone, Modem SDH / SONET (Hi-Speed Fiber) WLAN
iLab: The Basics / Static Routing 10
Vertical Communication
Router Router
Telephone, Modem SDH / SONET (Hi-Speed Fiber) WLAN
Application TCP IP IP IP Application TCP IP
rtical ical communic municatio tion n = Instances of a protocol layer communicate with instances of protocol layers above or below.
Net 1 Net 1 Net 2 Net 2 Net 3 Net 3
iLab: The Basics / Static Routing 11
Cooperation of Protocol Instances: PDUs
A service provides a Service Access Point (SAP) to the layer above it Protocol Data Units (PDUs) are encapsulated TCP/UDP adds process addressing (ports) to IP
IP routes data packets through the network to the destination
MAC/LLC-Header IP-Header TCP/UDP-Header IP-Header TCP/UDP-Header UDP-Header Data Application Transport Layer Link Layer Internet Layer TCP-Header
bzw.
Data Data Data Data Trailer
iLab: The Basics / Static Routing 12
Internet Architecture: Common Design Decisions
Hold no information (state) in nodes between sender of data and
destination (e.g. no need for resynchronisation)
All information specific for the stream is stored only at the sender and
the destination of data: End-to to-end end princ nciple ple
Separation of packet forwarding from one hop to the next and the
creation of routing tables
iLab: The Basics / Static Routing 13
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 14
MAC addresses (also referred to as “physical address”)
Ethernet / WLAN 48 Bit long (e.g.: aa:bb:cc:dd:ee:ff )
MAC addresses are not hierarchically issued, e.g.:
:bb:cc :cc:dd :dd:ee :ee:ff ff may be located in the US
a:bb bb:cc :cc:dd :dd:ee :ee:fe fe may be located in Japan
Q: Why don’t we use MAC addresses for addressing devices in the Internet? Routing would not scale as every router would need to know the route to every possible destination. No aggregation!
Layer 2 Adresses
iLab: The Basics / Static Routing 15
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 16
are assigned to the network layer (ISO/OSI)
ICMP RARP ARP TCP UDP IP Session Layer Network Layer Data Link Layer IGMP
TCP/IP Protocol Family – Overview
Transport Layer
iLab: The Basics / Static Routing 17
Routing Inside the Internet
IP addresses are 32 bit long this results in 2^32 possible host
addresses
A naive approach would result in huge routing tables, a router would
need to know all routes to all end systems impossible
Bette
ter approach: proach: Hier erarch archical cal Addre dress ssing ing
network
Effect:
network
know the router that „cares“ for the destination network
iLab: The Basics / Static Routing 18
Main Properties of IP
Paket-switched best effort service
Connectionless and unreliable transmission:
No flow control
Used in private and public networks
iLab: The Basics / Static Routing 19
Version Hdr.Len DiffServ Total Length Identifier Flags Fragment Offset Protocol Time to Live Header Checksum Source Address Destination Address Options and Padding Data 3 7 15 31 IP-Header
0 DF MF
Reserved Don‘t Fragment More Fragments Bit
DiffServ Codepoint ECN
Congestion Control (Explicit Congestion Notification) QoS Class
IPv4 Datagram Layout
iLab: The Basics / Static Routing 20
0 1 2 4 8 16 24 31 1 Net-ID Net-ID 1 1 Net-ID Node-ID Node-ID Node-ID 1 1 1 1 Reserved for future use
IP Address Classes
1 1 1 Multicast Address
iLab: The Basics / Static Routing 21
Subnetworks
Purpose: Split the static Class A, B C networks into parts (subnets) Use:
Implemented with subnetwork masks
iLab: The Basics / Static Routing 22
IP
IP-Addr ddress ess (in this example: Class B , prefix 10, 2/14/16):
Subnetwo
network rk mask sk marks the bits that describe the network and the
represented with a sequence of set bits („1“)
IP-Addresse: 129. 13.
Subnetmask: 255.
1111 1111 1111 1111 1111 1111 0000 0000 Network: 129. 13. Subnetwork: 3. Endsystem: 64
subnetwork is specified.
IP Subnetwork Addresses
Network Part Network Part Local Part Subnet Part Host Part
iLab: The Basics / Static Routing 23
IP-Subnetworks: Example
129.13.3 129.13.41 129.13.42 Router
Ethernet Ethernet Ethernet
129.13.35
WDM
Router University Net Internet Router Transition between university and institute network 129.13
iLab: The Basics / Static Routing 24
CIDR: Classless Inter-Domain Routing
Diadvantage of fixed address classes:
Example:
4000 addre resse sses s are not in use!
CIDR:
R: Replace fixed network classes with network prefixes of arbitrary length:
first 14 Bits smaller routing tables, smaller costs
iLab: The Basics / Static Routing 25
Control of IP: ICMP
IP only provides (unreliable) paket transmission When errors occur or for testing purposes ICMP (Internet Control
Message Protocol) is used.
ICMP uses IP Mess
ssag age e type, pe, exa xamples: ples:
holds the time of arrival (query) and time of sending (response) is added.
Router connection interrupted Router Router ICMP message Sender Destination Router
iLab: The Basics / Static Routing 26
ICMP: Error messages
Dest
stinat ination ion unr nreacha eachable: ble: A data packet could not be delivered, e.g. because of an interrupted cable or a router failure.
Time to live
e exceede ceeded: d: A data packet was dropped by a router because the packet‘s TTL exceeded.
Para
ramete meter problem
A data packet was discarded due to illegal values in its IP header.
Sour
urce ce quenc ench: A overloaded communication system requests the sender to throttle transmission rate.
Redirect:
irect: A data packet should be sent over another router.
iLab: The Basics / Static Routing 27
Transmission of ICMP messages
IP-packets.
in the protocol field of the IP header.
Format of ICMP messages
unreachable“)
e.g. timestamps
Type Code Checksum
ICMP: Packet layout
IP Header [Protocol = 1] ICMP Message Info
iLab: The Basics / Static Routing 28
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 29
ARP - Introduction
ARP = Address Resolution Protocol Purpose:
hop
ARP cache: a system remembers MAC addresses of recently resolved
IP addresses
iLab: The Basics / Static Routing 30
ARP - Example Setup
Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2 Example setup:
Now the sender wants to send a packet to the destination … Ethernet Some network with 8 bit long MAC addresses
iLab: The Basics / Static Routing 31
ARP vs. Routing
Source wants to send a packet to 84.6.7.8 (destination) The destination is not located in the own network
The sender determines the next hop which is the router (default gateway) Result: the next layer 3 hop is the router with the IP 202.34.5.2
The sender first needs to resolve the MAC address of the router Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 32
ARP – Request 1
Ethernet Frame: DST: Broadcast (..:ff:ff) SRC: ..:f7:a1 Type: ARP Address Resolution Protocol (Request) Hardware Type: Ethernet Protocol Type: IP Hardware Size: 6 Protocol Size: 4 Sender MAC: ..:f7:a1 Sender IP: 202.34.5.27 Target MAC: ..:00:00 Target IP: 202.34.5.2 Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 33
ARP – Reply 1
Ethernet Frame: DST: ..:f7:a1 SRC: ..:b1:f2 Type: ARP Address Resolution Protocol (Reply) Hardware Type: Ethernet Protocol Type: IP Hardware Size: 6 Protocol Size: 4 Sender MAC: ..:b1:f2 Sender IP: 202.34.5.2 Target MAC: ..:f7:a1 Target IP: 202.34.5.27 This is node e will l not t inter terfer ere Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 34
Forwarding
Ethernet Frame: DST: ..:b1:f2 SRC: ..:f7:a1 Type: IP Internet Protocol: Source: 202.34. 5.27 Destination: 84. 6. 7. 8 … Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload,
The IP packet is forwarded from sender to the router
MAC addres ess
Final nal destina tinatio tion Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 35
Forwarding
The router recognizes, that the destination is directly reachable by him The router now needs the layer 2 address of the destination Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 36
ARP – Request 2
L2 Frame: DST: Broadcast (ff) SRC: 2 Type: ARP Address Resolution Protocol (Request) Hardware Type: XY Protocol Type: IP Hardware Size: 1 Protocol Size: 4 Sender MAC: 2 Sender IP: 84.6.7.254 Target MAC: 0 Target IP: 84.6.7.8 In this network, MAC addresses are 1 bit long! Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 37
ARP – Reply 2
L2 Frame: DST: 2 SRC: 7 Type: ARP Address Resolution Protocol (Reply) Hardware Type: XY Protocol Type: IP Hardware Size: 1 Protocol Size: 4 Sender MAC: 7 Sender IP: 84.6.7.8 Target MAC: 2 Target IP: 84.6.7.254 Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 38
All done!
The router obtained the needed information for delivering the packet XY MAC Frame: DST: 7 SRC: 2 Type: IP Internet Protocol: Source: 202.34. 5.27 Destination: 84. 6. 7. 8 … Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Payload, Mac c addres ess
Final nal destina tinatio tion Source IP 202.34.5.27 MAC ..:f7:a1 Host 1 IP 202.34.5.11 MAC ..:e0:10 Destination IP 84.6.7.8 MAC 7 Host 2 IP 84.6.7.10 MAC 5 Router IP 202.34.5.2 MAC ..:b1:f2 IP 84.6.7.254 MAC 2
iLab: The Basics / Static Routing 39
Agenda
Layered Internet Model and Internet Architecture Layer 2 Addresses Internet Protocol and IP Addresses (Layer 3) Address Resolution Protocol (ARP) Introduction to the Static Routing Exercise (Lab 2)
iLab: The Basics / Static Routing 40
IPv4, ICMP , ARP , (IPv6) Session Presentation Application Physical Datalink Network Transport Network Transport Application Host-to-Net TCP/ IP ISO/ OSI TCPDump, Wireshark, Telnet, FTP Ethernet 802.3 (CSMA/ CD), 100Base-Tx Switch
Concepts, Hardware, Software
iLab: The Basics / Static Routing 41
Ciscorouter, IPv4, ICMP , ARP Session Presentation Application Physical Datalink Network Transport Network Transport Application Host-to-Net TCP/ IP ISO/ OSI
Concepts, Hardware, Software
Minicom