iL iLab ab Lab 1+2 The Basics / Static Routing Consultation - - PowerPoint PPT Presentation

il ilab ab
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

iLab: The Basics / Static Routing 2

Consultation hours

 We will introduce consultation hours  Starting next week  Short (~15 min)  Questions regarding important problems

  • Blocking you for a long time
  • Comprehending

 At the followin

  • wing times:

s:

  • Tuesday 1300
  • Wednesday 1400
  • Thursday 1300
  • Friday 1300
slide-3
SLIDE 3

iLab: The Basics / Static Routing 3

Textbook

 Comput

puter er Networ tworks: ks: A Sy Syst stem em‘s s Approa proach

  • Larry L. Peterson, Bruce S. Davie

 German Translation: „Computernetze“

  • Dpunkt.Verlag
  • ISBN: 389864491X

 Comprehensive Textbook for the iLab

(and the GRNVS lecture, too)

Picture: Amazon.com

slide-4
SLIDE 4

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

  • Katie Hafner, Matthew Lyon

 German Translation: Arpa Kadabra oder

Die Geschichte des Internet

  • Dpunkt.Verlag
  • ISBN: 3898645517

 The Internet‘s history

  • First networks
  • First RFC

 The way from the ARPA-Net to the Internet  The way from the research project to a

commercial network

Picture: Amazon.com

slide-5
SLIDE 5

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)

slide-6
SLIDE 6

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)

slide-7
SLIDE 7

iLab: The Basics / Static Routing 7

ISO/OSI Layer Model (1979-1983)

Application Layer Presentation Layer Session Layer Transport Layer

4 5 6 7

Network Layer Data Link Layer Physical Layer

1 2 3

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

slide-8
SLIDE 8

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, …

  • Alternative name: TCP/IP protocol hierarchy
  • Adaptation of the abstract ISO/OSI layer model for the internet
  • ISO/OSI layers 5, 6, 7 and layers 1, 2 are aggregated

1 2 3 4

3 1 2 4 6 x 5 = Equivalent to ISO/OSI 7

slide-9
SLIDE 9

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

1 2 3

  • Horizo

rizont ntal l communica unicatio tion n = logical communication between instances of the same protocol layer over an abstract medium

  • Only the lowest layer has a real (indirect) connection with the partner

instance

4

Router Router

Telephone, Modem SDH / SONET (Hi-Speed Fiber) WLAN

slide-10
SLIDE 10

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

1 2 3

  • Vert

rtical ical communic municatio tion n = Instances of a protocol layer communicate with instances of protocol layers above or below.

4

Net 1 Net 1 Net 2 Net 2 Net 3 Net 3

slide-11
SLIDE 11

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

  • TCP adds reliability 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

1 2 3 4

slide-12
SLIDE 12

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

  • Routing vs. Forwarding
slide-13
SLIDE 13

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)

slide-14
SLIDE 14

iLab: The Basics / Static Routing 14

 MAC addresses (also referred to as “physical address”)

  • Specific for the network type, e.g. Ethernet, Bluetooth, ATM
  • Are not unique for all network types

 Ethernet / WLAN 48 Bit long (e.g.: aa:bb:cc:dd:ee:ff )

  • Contains information about vendor and product

 MAC addresses are not hierarchically issued, e.g.:

  • Device with MAC aa:bb

:bb:cc :cc:dd :dd:ee :ee:ff ff may be located in the US

  • Device with MAC aa:

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

slide-15
SLIDE 15

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)

slide-16
SLIDE 16

iLab: The Basics / Static Routing 16

  • „TCP/IP“is used often as a synonym for a whole family of protocols
  • The TCP/IP family and the ISO/OSI layer model:
  • ICMP and IGMP use IP like an application layer (ISO/OSI) protocol, but

are assigned to the network layer (ISO/OSI)

  • Application layer (ISO/OSI) protocols are e.g. FTP, TELNET or SMTP

ICMP RARP ARP TCP UDP IP Session Layer Network Layer Data Link Layer IGMP

TCP/IP Protocol Family – Overview

Transport Layer

slide-17
SLIDE 17

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

  • Use first n bit of the IP address for addressing the network
  • Use last 32 - n bit of the IP address for addressing the host inside the

network

 Effect:

  • A router only needs to know how to reach the hosts within the own

network

  • For reaching hosts outside the own network, the router only needs to

know the router that „cares“ for the destination network

slide-18
SLIDE 18

iLab: The Basics / Static Routing 18

Main Properties of IP

 Paket-switched best effort service

  • no quality of service (QoS) guaranteed

 Connectionless and unreliable transmission:

  • “fire and forget”
  • Datagrams may get lost
  • Datagrams may arrive out of order
  • Transmission errors might occur

 No flow control

  • Congestion in the network might occur

 Used in private and public networks

  • private home networks
  • enterprise networks
  • Public (wide area) networks (e.g. in the internet backbone)
slide-19
SLIDE 19

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

slide-20
SLIDE 20

iLab: The Basics / Static Routing 20

  • 1. Class A: Nets with up to 16 million nodes (prefix: 1 bit/ net: 7 / host: 24)
  • 2. Class B: Nets with up to 65.536 nodes (2/ 14/ 16)
  • 3. Class C: Nets with up to 256 nodes (3/ 21/ 8)
  • 4. Class D: used for group communication (multicast)
  • 5. Class E, unused, reserved for future use

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

slide-21
SLIDE 21

iLab: The Basics / Static Routing 21

Subnetworks

 Purpose: Split the static Class A, B C networks into parts (subnets)  Use:

  • Makes large (Class A) networks manageable
  • Easier network administration
  • Separation of business units

 Implemented with subnetwork masks

  • e.g. 255.255.255.0
slide-22
SLIDE 22

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

  • subnetwork. In the binary representation of the subnetwork mask this area is

represented with a sequence of set bits („1“)

  • Example:

IP-Addresse: 129. 13.

  • 3. 64

Subnetmask: 255.

  • 255. 255. 0

1111 1111 1111 1111 1111 1111 0000 0000 Network: 129. 13. Subnetwork: 3. Endsystem: 64

  • The network part can be derived from the address class.
  • If the subnetwork mask only covers the network part (e.g. 255.255.0.0), no

subnetwork is specified.

IP Subnetwork Addresses

Network Part Network Part Local Part Subnet Part Host Part

slide-23
SLIDE 23

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

slide-24
SLIDE 24

iLab: The Basics / Static Routing 24

CIDR: Classless Inter-Domain Routing

 Diadvantage of fixed address classes:

  • Up to now: three address classes with fixed length prefixes for unicast.
  • Bad utilization of IP address space due to unused addresses.

 Example:

  • A company needs 1000 IP addresses and requests a Class B network
  • A Class B network contains more than 65000 addresses. This means,
  • ver 6400

4000 addre resse sses s are not in use!

 CIDR:

R: Replace fixed network classes with network prefixes of arbitrary length:

  • E.g.: 129.24.12.0/14: The first 14 Bits are used for network identification
  • Used in combination with hierarchical routing:
  • Backbone-Router, e.g. a transatlantic link, only needs to pay attention to the

first 14 Bits  smaller routing tables, smaller costs

  • Router of a ISP pays attention to first 20 Bit
  • Router in a (small) company network pays attention to first 25 Bits
slide-25
SLIDE 25

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:

  • Echo Request / Reply: Echo Reply is requested ("ping").
  • Timestamp Request / Reply: similar to Echo Request: a timestamp that

holds the time of arrival (query) and time of sending (response) is added.

Router connection interrupted Router Router ICMP message Sender Destination Router

slide-26
SLIDE 26

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

  • blem:

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.

slide-27
SLIDE 27

iLab: The Basics / Static Routing 27

 Transmission of ICMP messages

  • ICMP messages are transmitted in

IP-packets.

  • ICMP messages have the value „1“

in the protocol field of the IP header.

 Format of ICMP messages

  • Type: the type of this message, e.g. Type = 3 means „Destination

unreachable“)

  • Code: more specific information, e.g. „Network not reachable“)
  • Checksum: Checksum over the ICMP message
  • The content of the Info-Field depends on the Type of the ICMP message,

e.g. timestamps

Type Code Checksum

ICMP: Packet layout

IP Header [Protocol = 1] ICMP Message Info

slide-28
SLIDE 28

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)

slide-29
SLIDE 29

iLab: The Basics / Static Routing 29

ARP - Introduction

 ARP = Address Resolution Protocol  Purpose:

  • When IP needs to send out a packet, it needs to know the MAC address
  • f the next hop
  • ARP resolves the MAC address of a given IP address
  • IP packet then is encapsulated in a Link Layer frame and sent to the next

hop

 ARP cache: a system remembers MAC addresses of recently resolved

IP addresses

  • Increases performance
slide-30
SLIDE 30

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:

  • 2 networks are connected via a router
  • Router translates from Ethernet to some other physical medium
  • All ARP caches are empty  nobody knows any MAC address
  • All routing tables are correct

 Now the sender wants to send a packet to the destination … Ethernet Some network with 8 bit long MAC addresses

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

  • f next hop

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

  • f next hop

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

slide-39
SLIDE 39

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)

slide-40
SLIDE 40

iLab: The Basics / Static Routing 40

Lab #1: The Basics

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

  • 1. Setup
  • 2. Configuring the interfaces
  • 3. Configuring DNS (/etc/hosts)
  • 4. Telnet/ FTP
  • 5. tcpdump
  • 6. wireshark
  • 7. ARP
  • 8. ARP spoofing
  • 9. How does an IPv6-address look like?
  • 10. Suggestions/ complaints
  • 11. Please remove the Cables
slide-41
SLIDE 41

iLab: The Basics / Static Routing 41

Lab #2: Static Routing

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

  • 1. Setup - static routing
  • 2. The routing table
  • 3. The default gateway
  • 4. Packet forwarding
  • 5. Further configuring of the Cisco router
  • 6. Checking if everything is set up correctly
  • 7. Watching the packets travel
  • 8. One more interesting experiment...
  • 9. Suggestions/ complaints
  • 10. Please remove the Cables