Download presentation
Presentation is loading. Please wait.
1
CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim 02.08.2010
2
Today’s topics
3
IP in Internet Protocol Stack Physical Link Network Transport Application
4
IP: The waist of the hourglass IP is the waist of the hourglass of the Internet protocol architecture Multiple higher-layer protocols Multiple lower-layer protocols Only one protocol at the network layer.
5
IP network 205.35.293.4128.59.16.1
6
Application protocol IP is the highest layer protocol which is implemented at both routers and hosts
7
IP Service Delivery service of IP is minimal IP provide provides an unreliable connectionless best effort service (also called: “datagram service”). Unreliable: IP does not make an attempt to recover lost packets Connectionless: Each packet (“datagram”) is handled independently. IP is not aware that packets between hosts may be sent in a logical sequence Best effort: IP does not make guarantees on the service (no throughput guarantee, no delay guarantee,…) Consequences: Higher layer protocols have to deal with losses or with duplicate packets Packets may be delivered out-of-sequence
8
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.”
9
IPv4 Datagram Format (RFC 791)
10
IP network 205.35.293.4128.59.16.1
11
Classless Interdomain Routing (RFC 4632) IP addresses have variable prefixes Addresses are interpreted to have a hierarchy
12
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
13
CIDR hierarchical address allocation IP addresses are hierarchically allocated. An ISP obtains an address block from a Regional Internet Registry An ISP allocates a subdivision of the address block to an organization An organization recursively allocates subdivision of its address block to its networks A host in a network obtains an address within the address block assigned to the network ISP 128.0.0.0/8 128.1.0.0/16 Foo.com 128.2.0.0/16 Library CS 128.59.0.0/16 128.59.44.0/24 128.59.16.0/24 University Bar.com 128.59.16.150
14
Hierarchical address allocation ISP obtains an address block 128.0.0.0/8 [128.0.0.0, 128.255.255.255] ISP allocates 128.59.0.0/16 ([128.59.0.0, 128.59.255.255]) to the university. University allocates 128.59.16.0/24 ([128.59.16.0, 128.59.16.255]) to the CS department’s network A host on the CS department’s network gets one IP address 128.59.16.150 128.0.0.0 - 128.255.255.255 128.59.0.0 – 128.59.255.255 128.59.16.[0 – 255] 128.59.16.150
15
Route Aggregation Longest prefix match algorithm permits to aggregate prefixes with identical next hop address to a single entry This contributes significantly to reducing the size of routing tables of Internet routers DestinationNext Hop 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.0.0.0/8 R3 direct direct R3 R2 DestinationNext Hop 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.2.0.0/16 20.1.1.0/28 R3 direct direct R3 R2 R2
16
Regional Internet Registries (RIRs) Registration and management of IP address is done by Regional Internet Registries (RIRs) Where do RIRs get their addresses from: IANA maintains a high-level registry that distributes large blocks to RIRs RIR are administer allocation of: IPv4 address blocks IPv6 address blocks Autonomous system (AS) numbers There are currently five RIRs worldwide: APNIC (Asia/Pacific Region), ARIN (North America and Sub-Sahara Africa), LACNIC (Latin America and some Caribbean Islands) RIPE NCC (Europe, the Middle East, Central Asia, and African countries located north of the equator). AfriNIC (Africa) ( 100,663,296 IP addresses 5% of total IPv4 addresses!)
17
Subnet (RFC 950) Network within a domain 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.”
18
Subnet Exercise 1
19
Subnet Exercise 2 Similar to the configuration for Lab 2
21
Netmask Hosts and routers within a subnet use netmask to determine whether the other host is directly connected or not
22
Assigning IP address to a subnet Every subnet has a network address assigned Example: 128.59.19.0/24 Each interface inside this subnet is assigned an address from the network address PC1 = 128.59.19.18 PC2 = 128.59.19.19 Gateway address One address is assigned as the default gateway (router) Router = 128.59.19.1 Broadcast address One address is assigned as the broadcast address 128.59.19.255
23
Assigning IP address to a subnet How many PCs can I support with the following network address? 128.59.19.0/24 10.0.1.0/29
24
Router Architecture
25
Functional Components Control Datapath: per-packet processing
26
Forwarding Table DestinationNext Hop 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 20.1.0.0/16 20.2.1.0/28 eth0 eth1 10.0.1.1 10.0.1.1 10.0.1.1 IP datagrams can be directly delivered (“eth0 or eth1”) or are sent to a router (“10.0.1.1”)
27
to: 20.2.1.2 Delivery with forwarding tables
28
Longest Prefix Matching Rule DestinationNext Hop 11001000 11011111R2 11001000 00010R4 11001000 0001011Direct Where would this packet go? Packet destination is: 200.23.146.51 11001000 00010111 10010010 00110011 200.223.0.0/16 200.16.0.0/13 200.22.0.0/15
29
PCs can be configured to forward packets echo “1” > /proc/sys/net/ipv4/ip_forward route command * Works in Redhat / Fedora Kernel IP routing table Destination Gateway Genmask Flags Iface 165.91.168.200 0.0.0.0 255.255.255.248 U eth1 128.59.16.0 0.0.0.0 255.255.248.0 U eth0 165.91.0.0 165.91.168.201 255.255.0.0 UG eth1 0.0.0.0 128.59.16.1 0.0.0.0 UG eth0
30
Sending a packet from Argon to Neon
31
ARP: What is the MAC address of 128.143.137.1? Sending a packet from Argon to Neon ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20 128.143.71.21 is not on my local network. Therefore, I need to send the packet to my default gateway with address 128.143.137.1 frame 128.143.71.21 is on my local network. Therefore, I can send the packet directly. ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 ARP: What is the MAC address of 128.143.71.21? frame
32
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
33
Routing table manipulations with ICMP When a router detects that an IP datagram should have gone to a different router, the router (here R2) forwards the IP datagram to the correct router sends an ICMP redirect message to the host Host uses ICMP message to update its routing table R1
34
IOS Command Mode Hierarchy Read the Introduction part 4 in textbook
35
Main Points of Lab 3 Setting up static routes on: Linux machines Cisco routers Routing packets using: Proxy ARP ICMP Route Redirect Netmasks
36
Homework Prelab 4 due on Friday (02.08.2010) Lab report 2 due this week Lab report 3 due by next week Review RIP for next class
37
Announcements In-class quiz next week Basic ARP, subnets, and IP forwarding
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.