Download Delivery, and IP Packet Forwarding

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Backpressure routing wikipedia , lookup

AppleTalk wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Distributed firewall wikipedia , lookup

Internet protocol suite wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Network tap wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Serial digital interface wikipedia , lookup

Peering wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Net bias wikipedia , lookup

RapidIO wikipedia , lookup

Computer network wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Deep packet inspection wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Routing wikipedia , lookup

Transcript
Delivery and Forwarding
Chapter 18
COMP 3270 Computer Networks
Computing Science
Thompson Rivers University
Learning Objectives




List the three next-hop methods for packet forwarding.
List the three next-hop methods for packet forwarding.
List the four most basic fields in routing entries.
Explain step-by-step how a router forwards an IP packet to the next
router (or host). You need to use, in the explanation, the terms:
destination address, routing table, interface, address of next hop, ARP.
2
1. DELIVERY
The network layer supervises the handling of the packets by
the underlying physical networks. We define this handling as
the delivery of a packet.
3
Internetwork: a network of different physical networks
Internetworking: communications over an internetwork
☺ The Internet?
LAN
f
3
☺ How to deliver packets from A to D and from D to A? Which route?
☺ Can we use the data link layer?
5
Each data link handles its own network interface only;
There is no interaction between them. -> We can not use the data link layer for internetworking.
Host-to-host delivery
☺ How to decide the next hop for the traffic from A to D?
LAN
f3
Data link layer;
Physical layer
6
It decides the next hop
(the IP address of S3 and the interface f3)
f1
f3
f1
S1 is connected to S3 through f3.
f2
LAN
f3
7
Datagram approach
There is no specific route established from the source to the destination.
Packets could arrive in a different order;
Reordering does not occur
in the network layer.
☺ Then what layer?
8
Communication at the network layer in the Internet is
unreliable connectionless.
 Packets could be lost; Packets could arrive in a different
order.
☺ Does IP include an error checking routine?
☺ Yes; then?
9
2. IP PACKET FORWARDING
IP packet forwarding means to place the packet in its route to its
destination.
Forwarding requires a host or a router to have a routing table.
When a host has a packet to send or when a router has received
a packet to be forwarded, it looks at this table to find the route
to the final destination, i.e., ???.
Topics discussed in this section:
• Forwarding Techniques
• Forwarding Process
• Routing Table
10
Forwarding Techniques
Routers: Route method versus next-hop method
Do we have to keep this?
11
Next-hop method
Next-hop methods and their priorities:
1.
Source routing methods
2.
Host specific method
3.
Network specific method
4.
Default method
Packet header options
Related to classless
addressing and netmask
12
Source routing methods
A routing path from the source to the destination is
included in an option field in the IP packet header
- SSR (Strict Source Routing): all routers on a path …
- LSR (Loose Source Routing): some routers on a path …
☺ Any danger?
SSR
Most routers in the public realm blocks
SSR and LSR.
Y
Z
X
LSR
13
Next-hop method: Host-specific v.s. network-specific method
☺ How to distinguish host-specific entries
and network specific entries in a routing table?
Netmask: 32bits for host specific entries, or less bits for …
Note. A host address is a special case of network address.
However, it is not still easy to keep all the routing information for the whole Internet,
due to the routing traffic overhead.
An ordinary router in an AS (Autonomous System) keeps the routing information only for the AS.
☺ What if a packet is supposed to go to a destination in another AS?
14
Just zero, i.e., 0.0.0.0/0
-> if all other entries do
not match with the given
destination address,
then the entry of 0..0/0
will be matched.
Default method
Or also called,
default gateway
Default router
AS
AS will be discussed
more when routing
is discussed.
Default router:
Border gateway: It knows the whole
topology of the Internet, using BGP
(Border Gateway Protocol).
Now transferred to the destination AS
through other ASes.
In the destination AS, host specific or
15
network specific methods are used.
Next-hop methods and their priorities:
1.
Source routing methods
2.
Host specific method
3.
Network specific method
4.
Default method
Packet header options
Related to netmask
☺ How do routers support the above priorities?
Using the length of netmasks
16
Forwarding Process
Simplified forwarding module in classless address
17
Routing Table
In classless addressing, we need at least four
columns in a routing table. They are
18
☺ When the source routing option is not included,
what are the next hops for the following destinations?
- 193.14.5.68
- 192.16.7.1
- 192.16.7.3
- 193.14.99.10
IP address;
Not MAC address
It will be matched for the last
because of the “longest prefix match first” policy.
Longest prefix match first
Destination address in the packet & mask, and then compare the result to the destination address
 Time consuming process
 Need to use good algorithm for searching
 Any good idea?
19
Example
☺ Where is 180.70.65.0/25?
☺ Aren’t they strange?
m3
eth1
R2
198.161.22.24/24
eth0
198.161.22.254/24
☺ Can you make routing tables for routers R1 and R2?
(One routing entry for each network to which the router is connected, and
one default routing entry, and possibly more.)
20
Routing table for router R1
/0
0.0.0.0
128: 1000 0000
☺ Are they okay?
192: 1100 0000
180.70.65.128/25 is 180.70.65.128/26 because of the LPMF policy.
21
(Very important)
Show the forwarding process if a packet arrives at R1 with the
destination addresses 180.70.65.140.
180.70.65.221, 201.4.22.35, 201.4.32.78, 201.4.17.34 ???
/0
0.0.0.0
128:
192:
1000 0000
1100 0000
22
Routing table for router R2 ?
How many routing entries?
Mask
Network address
Next-hop
Interface
---
eth1
/26
180.70.65.192
/25
180.70.65.128
180.70.65.194
eth1
/22
201.4.16.0
180.70.65.194
eth1
/24
201.4.22.0
180.70.65.194
eth1
/24
198.161.22.0
/32
0.0.0.0
---
eth0
198.161.22.254
eth0
23
Address aggregation (or also called supernetting)
24
point-to-point -> addresses are not necessary.
0
64
128
192
->
->
->
->
0000
0100
1000
1100
0000
0000
0000
0000
25
From the same address block 140.24.7.0/24,
But different locations
How many routing entries?
Rest of
the
Internet
0000
0100
1000
1100
0000
0000
0000
0000
How many routing entries?
26
Example:
As an example of hierarchical routing: A regional ISP is granted 16,384 addresses
starting from 120.14.64.0/18. The regional ISP has decided to divide this block into
four subblocks, each with 4096 addresses.
1.
2.
3.
The first local ISP has divided its assigned subblock into 8 smaller blocks and
assigned each to a small ISP. Each small ISP provides services to 128
households, each using four addresses. (8 -> 2x ?)
The second local ISP has divided its block into 4 blocks and has assigned the
addresses to four large organizations. (4 -> 2x ?)
The third local ISP has divided its block into 16 blocks and assigned each
block to a small organization. Each small organization has 256 addresses, and
the mask is /24. (16 -> 2x ?)
There is a sense of hierarchy in this configuration. All routers in the Internet send a
packet with destination address 120.14.64.0 to 120.14.127.255 to the regional ISP.
27
0100 0000
...
0100 1110
local1
0100
0101
0110
0111
0000
0000
0000
0000
regional
0110 0000
...
0110 1100
local2
0100 0000
local3
0111 0000
...
0111 1111
28
Can you make routing tables for the routers in the previous slide?
29
Related utilities:
• netstat
• route
• ifconfig
30