Top Banner
CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009
22

CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

CSEE W4140Networking Laboratory

Lecture 3: IP Forwarding and ICMP

Jong Yul Kim02.04.2009

Page 2: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

IP in Internet Protocol Stack

NetworkLayer

Link Layer

IP

ARPNetworkAccess

Media

ICMP IGMP

TransportLayer

TCP UDP

Physical

Link

Network

Transport

Application

Page 3: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

IP network

10.0.1.11 128.59.16.1

Page 4: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Two functions of network layer

Routing“Collective interactions of all routers to

determine the paths that packets take on their trips from source to destination”

Forwarding“The transfer of a packet from an incoming

link to an outgoing link within a single router.”

Page 5: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Today’s topics

Page 6: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Subnet (RFC 950) Hard to define…

General recipe“Detach each interface from its host or

router, creating islands of isolated networks, with interfaces terminating the end points of the isolated networks.

Each of these isolated networks is called a subnet.”

Page 7: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Subnet Exercise 1

Page 8: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Subnet Exercise 2

Page 9: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.
Page 10: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Netmask

Hosts and routers within a subnet use netmask to determine whether the other host is directly connected or not

Page 11: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Classless Interdomain Routing(RFC 4632)

Examples 128.59.19.10 One host on CS net 128.59.16.0/21 CS wired net 128.59.0.0/16 Columbia wired net

Two parts to an address Network part (first 21 bits of CS wired) Host part (remaining 11 bits)

prefix

Page 12: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

IPv4 Datagram Format (RFC 791)

Page 13: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Router Architecture

Interface Card

Interconnection Network

Interface Card Interface Card

Processor

CPUMemory

Page 14: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Functional Components

Control

Datapath:per-packet processing

forwardingtable

Routingfunctions

IP Forwarding

forwardng tablelookup

forwarding tableupdates

incoming IP datagrams

outgoing IP datagrams

routing protocol

routing protocol

Page 15: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Forwarding Table

Destination Next Hop

10.1.0.0/2410.1.2.0/2410.2.1.0/2410.3.1.0/2420.1.0.0/1620.2.1.0/28

directdirectR4direct R4R4

IP datagrams can be directly delivered (“direct”) or are sent to a router (“R4”)

Page 16: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 1 . 0 . 0 / 1 6 2 0 . 2 . 1 . 0 / 2 8

d i r e c t R 3 R 3 R 3 R 3 R 3

H 1

R 1 R 2

R 3 R 4

H 2

1 0 . 2 . 1 . 0 / 2 4

2 0 . 1 . 0 . 0 / 1 61 0 . 1 . 2 . 0 / 2 4

1 0 . 1 . 0 . 0 / 2 4 1 0 . 3 . 0 . 0 / 1 6

2 0 . 2 . 1 . 0 / 2 8

2 0 . 2 . 1 . 2 / 2 8

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 1 . 0 . 0 / 1 6 2 0 . 2 . 1 . 0 / 2 8

d i r e c t d i r e c t R 4 d i r e c t R 4 R 4

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 1 . 0 . 0 / 1 6 2 0 . 2 . 1 . 0 / 2 8

R 3 R 3 R 2 d i r e c t d i r e c t R 2

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 2 . 0 . 0 / 1 6 3 0 . 1 . 1 . 0 / 2 8

R 3 d i r e c t d i r e c t R 3 R 2 R 2

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 1 . 0 . 0 / 1 6 2 0 . 2 . 1 . 0 / 2 8

R 1 R 1 d i r e c t R 4 d i r e c t d i r e c t

D e s t i n a t i o n N e x t H o p 1 0 . 1 . 0 . 0 / 2 4 1 0 . 1 . 2 . 0 / 2 4 1 0 . 2 . 1 . 0 / 2 4 1 0 . 3 . 1 . 0 / 2 4 2 0 . 1 . 0 . 0 / 1 6 2 0 . 2 . 1 . 0 / 2 8

R 2 R 2 R 2 R 2 R 2 d i r e c t

to:20.2.1.2

Delivery with forwarding tables

Page 17: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Longest Prefix Matching Rule

Destination Next Hop

11001000 11011111 R2

11001000 00010 R4

11001000 0001011 Direct

Where would this packet go?

Packet destination is: 200.23.146.5111001000 00010111 10010010 00110011

200.223.0.0/16200.16.0.0/13

200.22.0.0/15

Page 18: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

ICMP (RFC 792) Used to communicate network info

Error reporting Router advertisement and discovery

Has type and code Type 8, code 0 = echo request Type 0, code 0 = echo reply

Replies have original sender’s IP header + 64 bits of data

Used by ping traceroute

Page 19: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

IOS Command Mode Hierarchy

Read the Introduction part 4 in textbook

Page 20: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Main Points of Lab 3

Setting up static routes on: Linux machines Cisco routers

Routing packets using: Proxy ARP ICMP Route Redirect Netmasks

Kermit not used use picocom!

Page 21: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Homework

Prelab 3 due on Friday (02.06.2009)

Lab report 2 due by beginning of lab 3 next week

Read RFC 2453 “RIP Version 2” parts 1 ~ 3

Page 22: CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.04.2009.

Announcements

In-class quiz next week Basic ARP, subnets, and IP forwarding

Swipe Access Apar, Hai, Eric, Aaron, Abhinav Please check on Monday