Upload
rktiwary256034
View
221
Download
0
Embed Size (px)
Citation preview
8/12/2019 Overview Network Layer
1/79
1
Wireless Networking & Mobile ComputingNetwork Layer Overview
ECE 256
Romit Roy Choudhury
Dept. of ECE and CS
8/12/2019 Overview Network Layer
2/79
2
Recall Layering
transport segment fromsending to receiving host
on sending side encapsulatessegments into datagrams
on rcving side, delivers
segments to transport layer network layer protocols in
everyhost, router
Router examines header fieldsin all IP datagrams passing
through it
networkdata linkphysical
networkdata link
physical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata link
physical
networkdata linkphysical
applicationtransportnetworkdata linkphysical
application
transportnetworkdata linkphysical
8/12/2019 Overview Network Layer
3/79
3
Routing - Why Difficult ?
Several algorithmic problems: Many many paths - which is the best?
Each path has changing characteristics
Queuing time varies, losses happen, router down
How do you broadcast (find where someone is)
How do you multicast (webTV, conference call)
How do routers perform routing at GBbps scale
Several management problems:
How do you detect/diagnose faults
How do you do pricing, accounting
8/12/2019 Overview Network Layer
4/79
4
Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and
datagram networks
4.3 Whats inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
ICMP
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in theInternet
RIP
OSPF
BGP
4.7 Broadcast and
multicast routing
8/12/2019 Overview Network Layer
5/79
5
Key Network-Layer Functions
forwarding:movepackets from routersinput to appropriaterouter output
routing:determineroute taken by packetsfrom source to dest.
Routing algorithms
analogy:
routing:process of
planning trip fromsource to dest
forwarding:process of
getting through actual
traffic intersections
8/12/2019 Overview Network Layer
6/79
6
1
23
0111
value in arriving
packets header
routing algorithm
local forwarding table
header value output link
0100
0101
01111001
3
2
21
Interplay between routing and forwarding
8/12/2019 Overview Network Layer
7/797
Two types of Network Architecture
Connection-OrientedandConnection-Less
Virtual Circuit Switching
Example:ATM, X.25
Analogy: Telephone
Datagram forwarding
Example: IP networks
Analogy: Postal service
8/12/2019 Overview Network Layer
8/798
Virtual circuits: signaling protocols
used to setup, maintain teardown VC used in ATM, frame-relay, X.25
not used in todays Internet
applicationtransportnetworkdata linkphysical
applicationtransport
networkdata linkphysical
1. Initiate call
2. incoming call
3. Accept call
4. Call connected5. Data flow begins 6. Receive data
8/12/2019 Overview Network Layer
9/799
No call setup at network layer
@ routers: no state about end-to-end connections
no concept of connection
packets forwarded using destination host address May take different path for same source-dest pair
Datagram networks
applicationtransportnetworkdata linkphysical
application
transportnetworkdata linkphysical
1. Send data 2. Receive data
8/12/2019 Overview Network Layer
10/7910
Design Decisions
Thoughts on why VC isnt great?
Thoughts on why dataram may not be great?
Think of an application thats better with VC
8/12/2019 Overview Network Layer
11/7911
Datagram or VC network: why?
Internet data traffic
elastic service, no strict
timing req.
smart end computers
simple network
complexity at edge
many link types
different characteristics
uniform service difficult
ATM
evolved from telephony
Call admission control
human conversation: strict timing, reliability
requirements
need for guaranteed
service
dumb end systems
telephones
complexity inside
network
8/12/2019 Overview Network Layer
12/7912
Chapter 4: Network Layer
IP Addressing
8/12/2019 Overview Network Layer
13/7913
IP Addressing: introduction
IP address:32-bitidentifier for host,
router interface
interface:connection
between host/routerand physical link
routers typically have
multiple interfaces
host typically has one
interface IP addresses associated
with each interface
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 11
8/12/2019 Overview Network Layer
14/7914
Subnets
IP address: subnet part (high order
bits)
host part (low order bits)
Whats a subnet ?
device interfaces with
same subnet part of IP
address
can physically reacheach other without
intervening router
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
network consisting of 3 subnets
subnet
8/12/2019 Overview Network Layer
15/7915
IP addressing: CIDR
CIDR:Classless InterDomain Routing subnet portion of address of arbitrary length
address format: a.b.c.d/x, where x is # bits in subnet
portion of address
11001000 00010111 00010000 00000000
subnetpart
hostpart
200.23.16.0/23
8/12/2019 Overview Network Layer
16/79
16
IP addresses: how to get one?
Q:How does networkget subnet part of IP addr?A:gets allocated portion of its provider ISPs
address space
ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20
Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23
Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23... .. . .
Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23
8/12/2019 Overview Network Layer
17/79
8/12/2019 Overview Network Layer
18/79
18
Scalability Problem
Internet growing very fast Many million devices
Each device needs an address for communication
Question is
How do you address each of them
IP addresing can give you 232
May not be enough
8/12/2019 Overview Network Layer
19/79
19
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
138.76.29.7
local network(e.g., home network)
10.0.0/24
rest ofInternet
Datagrams with source or
destination in this networkhave 10.0.0/24 address forsource, destination (as usual)
Alldatagrams leavinglocalnetwork have samesingle source
NAT IP address: 138.76.29.7,different source port numbers
8/12/2019 Overview Network Layer
20/79
20
NAT makes Globally non-routable hosts
Non-routable Means you cannot ping 192.168.0.3 (your home
machines) from Duke Lab
But, Skype, GotoMyPC, etc. can access / callyour home machine
How ?
8/12/2019 Overview Network Layer
21/79
21
An Alternate Approach: IPv6
Initial motivation:Make space for 64 bit addressspace
How can this be made compatible to IPv4 routers?
IPv6 not flying
NAT coping fine with todays needs
8/12/2019 Overview Network Layer
22/79
22
Chapter 4: Network Layer
Routing Algorithms
8/12/2019 Overview Network Layer
23/79
23
u
y
x
wv
z2
2
1
3
1
1
2
53
5
Graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Graph abstraction
Remark: Graph abstraction is useful in other network contexts
Example: P2P, where N is set of peers and E is set of TCP connections
8/12/2019 Overview Network Layer
24/79
24
Graph abstraction: costs
u
y
x
wv
z2
2
1
3
1
1
2
53
5 What factors influence this cost ?
Cost of path (x1, x2, x3,, xp) = c(x1,x2) + c(x2,x3) + + c(xp-1,xp)
Question: Whats the least-cost path between u and z ?
Routing algorithm: algorithm that finds least-cost path
Should costs be only on links ?
8/12/2019 Overview Network Layer
25/79
25
Routing Algorithm classification
2 main classes:
Centralized
all routers have complete topology, link cost info
link state algorithms
Distributed:
Each router knows link costs to neighbor routers only
distance vector algorithms
8/12/2019 Overview Network Layer
26/79
26
A Link-State Routing Algorithm
Dijkstras algorithm
Link costs known to all nodes
computes least cost paths from one node (source) to allother nodes
gives forwarding tablefor that node
iterative: after k iterations, know least cost path to kdest.s
8/12/2019 Overview Network Layer
27/79
27
Dijkstras Algorithm
1 Init ial ization:2 N' = {u}
3 for all nodes v
4 if v adjacent to u
5 then D(v) = c(u,v)
6 else D(v) = 7
8 Loop
9 find w not in N' s.t. D(w) is a minimum
10 add w to N'
11 update D(v) for all v adjacent to w and not in N' :
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 unt i l al l nodes in N'
Notation:
c(x,y):link cost from node x to y;= if not direct neighbors
D(v):current value of cost of path
from source to dest. v
u
y
x
wv
z2 2
13
1
1
2
5
3
5
8/12/2019 Overview Network Layer
28/79
28
Dijkstras algorithm: example (2)
u
y
x
wv
z
Resulting shortest-path tree from u:
vx
y
w
z
(u,v)(u,x)
(u,x)
(u,x)
(u,x)
destination link
Resulting forwarding table in u:
8/12/2019 Overview Network Layer
29/79
29
Distributed: Distance Vector
To find D, node S asks each neighbor X How far X is from D
X asks its neighbors comes back and says C(X,D)
Node S deduces C(S,D) = C(S,X) + C(X,D)
S chooses neighbor Xithat provides min C(S,D)
Later, Xjmay find better route to D
Xjadvertizes C(Xj,D)
All nodes update their cost to D if new min found
8/12/2019 Overview Network Layer
30/79
30
Distance Vector Algorithm
Bellman-Ford Equation (dynamic programming)
Define
dx(y) := cost of least-cost path from x to y
Then
dx(y) = min {c(x,v) + dv(y) }
where min is taken over all neighbors v of x
v
x y
v2
v1
8/12/2019 Overview Network Layer
31/79
31
Bellman-Ford example
u
y
x
wv
z2
2
1
3
1
1
2
53
5 Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
du(z) = min { c(u,v) + dv(z),c(u,x) + dx(z),c(u,w) + dw(z) }
= min {2 + 5,1 + 3,5 + 3} = 4
Node that achieves minimum is nexthop in shortest path forwarding table
B-F equation says:
8/12/2019 Overview Network Layer
32/79
32
Distance Vector: link cost changes
Link cost changes: if DV changes, notify neighbors
x z
14
50
y1
At time t0, ydetects the link-cost change, updates its DV,and informs its neighbors.
At time t1, zreceives the update from yand updates its table.It computes a new least cost to x and sends its neighbors its DV.
At time t2, yreceives zs update and updates its distance table.ys least costs do not change and hence y does notsend anymessage to z.
When can it get complicated ?
8/12/2019 Overview Network Layer
33/79
33
Distance Vector: link cost changes
Link cost changes: Y thinks Zs best cost is 5
Thus C(y,x) = 5 + 1 = 6
Announces this cost
Z thinks C(z,x) = 6 + 1
Poissoned reverse:
If Z routes through Y to get
to X :
Z tells Y its (Zs) distance to
X is infinite (so Y wont route
to X via Z)
will this completely solve
count to infinity problem?
x z1
4
50
y
60
Food for thought
Will this converge ?
If so, after how many rounds ?How can this be solved?
Should Y announce change from 4 to 60?
8/12/2019 Overview Network Layer
34/79
34
Routing in Internet
Similar to international FedEx routing FedEx figures out best route within country
Uses google maps say This is link state -- All info available
USA FedEx does not have international map,
also no permission to operate outside USA
Gets price quote from Germany FedEx, Japan FedEx
etc. to route to India Chooses minimum price and handles package to say
Germany (Distance Vector)
Germany has country map (link state)
Germany asks for cost from Egypt, South Africa
8/12/2019 Overview Network Layer
35/79
35
Internet Routing
Think of each country FedEx as ISPs Routing on internet very similar to prior example
The link state and DV routing protocols used in
internet routing RIP (routing information protocol)
OSPF (Open shortest path first)
BGP (Border gateway protocol)
They utilize the concepts of Link state
Distance vector routing
8/12/2019 Overview Network Layer
36/79
36
How is this different in wireless?
8/12/2019 Overview Network Layer
37/79
37
Routing in wireless Mobile Networks
Imagine hundreds of hosts moving Routing algorithm needs to cope up with varying
wireless channel and node mobility
Wheres
RED guy
8/12/2019 Overview Network Layer
38/79
38
Questions ?
8/12/2019 Overview Network Layer
39/79
39
Backup Slides
8/12/2019 Overview Network Layer
40/79
40
Comparison of LS and DV algorithms
Message complexity
LS:with n nodes, E links, O(nE)
msgs sent
DV: exchange between neighbors
only
convergence time varies
Speed of Convergence
LS:O(n2) algorithm requires
O(nE) msgs
may have oscillations
DV: convergence time varies may be routing loops
count-to-infinity problem
Robustness:what happens if
router malfunctions?
LS:
node can advertise incorrectlinkcost
each node computes only its
owntableDV:
DV node can advertiseincorrectpathcost
each nodes table used byothers
error propagate thru network
8/12/2019 Overview Network Layer
41/79
8/12/2019 Overview Network Layer
42/79
8/12/2019 Overview Network Layer
43/79
43
Hierarchical Routing
aggregate routers intoregions,autonomous
systems (AS)
routers in same AS run
same routing protocol intra-AS routing
protocol
routers in different AS
can run different intra-AS
routing protocol
Gateway router Direct link to router in
another AS
8/12/2019 Overview Network Layer
44/79
44
3b
1d
3a
1c2a
AS3
AS1
AS21a
2c
2b
1b
Intra-AS
Routing
algorithm
Inter-AS
Routing
algorithm
Forwarding
table
3c
Interconnected ASes
Forwarding table isconfigured by both
intra- and inter-AS
routing algorithm
Intra-AS sets entries forinternal dests
Inter-AS & Intra-As sets
entries for external dests
8/12/2019 Overview Network Layer
45/79
45
3b
1d
3a
1c2a
AS3
AS1
AS21a
2c
2b
1b
3c
Inter-AS tasks
Suppose router in AS1
receives datagram forwhich dest is outside of
AS1
Router should forward
packet towards one of
the gateway routers, butwhich one?
AS1 needs:
1. to learn which dests
are reachable throughAS2 and which through
AS3
2. to propagate this
reachability info to allrouters in AS1
Job of inter-AS routing!
8/12/2019 Overview Network Layer
46/79
46
3b
1d
3a
1c2a
AS3
AS1
AS21a
2c
2b
1b
3c
Inter-AS tasks
Suppose router in AS1
receives datagram forwhich dest is outside of
AS1
Router should forward
packet towards one of
the gateway routers, butwhich one?
AS1 needs:
1. to learn which dests
are reachable throughAS2 and which through
AS3
2. to propagate this
reachability info to allrouters in AS1
Job of inter-AS routing!
8/12/2019 Overview Network Layer
47/79
47
Example: Setting forwarding table in router 1d
Suppose AS1 learns from the inter-AS protocolthat subnetxis reachable from AS3 (gateway
1c) but not from AS2.
Inter-AS protocol propagates reachability info to
all internal routers.
Router 1d determines from intra-AS routing info
that its interface I is on the least cost path to 1c.
Puts in forwarding table entry (x,I).
8/12/2019 Overview Network Layer
48/79
48
Learn from inter-ASprotocol that subnet
x is reachable via
multiple gateways
Use routing info
from intra-ASprotocol to determine
costs of least-cost
paths to each
of the gateways
Hot potato routing:Choose the gateway
that has the
smallest least cost
Determine from
forwarding table theinterface I that leads
to least-cost gateway.
Enter (x,I) in
forwarding table
Example: Choosing among multiple ASes
Now suppose AS1 learns from the inter-AS protocolthat subnetxis reachable from AS3 andfrom AS2.
To configure forwarding table, router 1d mustdetermine towards which gateway it should forwardpackets for dest x.
This is also the job on inter-AS routing protocol!
Hot potato routing:send packet towards closest of tworouters.
8/12/2019 Overview Network Layer
49/79
49
Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and
datagram networks
4.3 Whats inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
ICMP
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the
Internet
RIP
OSPF
BGP
4.7 Broadcast andmulticast routing
8/12/2019 Overview Network Layer
50/79
50
Intra-AS Routing
Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols:
RIP: Routing Information Protocol
OSPF: Open Shortest Path First
IGRP: Interior Gateway Routing Protocol (Cisco
proprietary)
8/12/2019 Overview Network Layer
51/79
51
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and
datagram networks
4.3 Whats inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
ICMP
IPv6
4.5 Routing algorithms
Link state
Distance Vector
Hierarchical routing
4.6 Routing in the
Internet
RIP
OSPF
BGP
4.7 Broadcast andmulticast routing
8/12/2019 Overview Network Layer
52/79
52
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol):thede factostandard
BGP provides each AS a means to:1. Obtain subnet reachability information from
neighboring ASs.
2. Propagate the reachability information to all routersinternal to the AS.
3. Determine good routes to subnets based onreachability information and policy.
Allows a subnet to advertise its existence torest of the Internet: I am here
BGP b i
8/12/2019 Overview Network Layer
53/79
53
BGP basics
Pairs of routers (BGP peers) exchange routing info over semi-permanentTCP conctns: BGP sessions
Note that BGP sessions do not correspond to physical links. When AS2 advertises a prefix to AS1, AS2 ispromisingit will forward
any datagrams destined to that prefix towards the prefix.
AS2 can aggregate prefixes in its advertisement
3b
1d
3a
1c
2aAS3
AS1
AS21a
2c
2b
1b
3c
eBGP session
iBGP session
Di t ib ti h bilit i f
8/12/2019 Overview Network Layer
54/79
54
Distributing reachability info
With eBGP session between 3a and 1c, AS3 sends prefixreachability info to AS1.
1c can then use iBGP do distribute this new prefix reach info toall routers in AS1
1b can then re-advertise the new reach info to AS2 over the 1b-to-2a eBGP session
When router learns about a new prefix, it creates an entry for theprefix in its forwarding table.
3b
1d
3a
1c
2a
AS3
AS1
AS21a
2c
2b
1b
3c
eBGP session
iBGP session
8/12/2019 Overview Network Layer
55/79
55
Path attributes & BGP routes
When advertising a prefix, advert includes BGP attributes.
prefix + attributes = route
Two important attributes:
AS-PATH:contains the ASs through which the advert for the prefix
passed: AS 67 AS 17
NEXT-HOP:Indicates the specific internal-AS router to next-hop AS.
(There may be multiple links from current AS to next-hop-AS.)
When gateway router receives route advert, uses import policyto
accept/decline.
8/12/2019 Overview Network Layer
56/79
56
BGP route selection
Router may learn about more than 1 route tosome prefix. Router must select route.
Elimination rules:
1. Local preference value attribute: policy decision
2. Shortest AS-PATH
3. Closest NEXT-HOP router: hot potato routing
4. Additional criteria
8/12/2019 Overview Network Layer
57/79
57
BGP messages
BGP messages exchanged using TCP.
BGP messages:
OPEN:opens TCP connection to peer and
authenticates sender
UPDATE:advertises new path (or withdraws old)
KEEPALIVEkeeps connection alive in absence of
UPDATES; also ACKs OPEN request
NOTIFICATION:reports errors in previous msg; also
used to close connection
8/12/2019 Overview Network Layer
58/79
8/12/2019 Overview Network Layer
59/79
59
BGP routing policy (2)
Figure 4.5-BGPnew: a simple BGP scenario
A
B
C
W
X
Y
legend:
customer
network:
provider
network
Aadvertises to B the path AW
B advertises to X the path BAW
Should B advertise to C the path BAW?
No way! B gets no revenue for routing CBAW since neither W
nor C are Bs customers
B wants to force C to route to w via A
B wants to route only to/from its customers!
8/12/2019 Overview Network Layer
60/79
60
Why different Intra- and Inter-AS routing ?
Policy: Inter-AS: admin wants control over how its traffic routed, who routes
through its net.
Intra-AS: single admin, so no policy decisions needed
Scale:
hierarchical routing saves table size, reduced update traffic
Performance:
Intra-AS: can focus on performance
Inter-AS: policy may dominate over performance
8/12/2019 Overview Network Layer
61/79
61
Questions ?
8/12/2019 Overview Network Layer
62/79
62
NAT: Network Address Translation
Motivation:local network uses just one IP address as far as
outside world is concerned:
range of addresses not needed from ISP: just one IP
address for all devices
can change addresses of devices in local network
without notifying outside world
can change ISP without changing addresses of devices
in local network
devices inside local net not explicitly addressable,
visible by outside world (a security plus).
8/12/2019 Overview Network Layer
63/79
63
NAT: Network Address Translation
Implementation:NAT router must:
outgoing datagrams:replace(source IP address, port #) of everyoutgoing datagram to (NAT IP address, new port #)
. . . remote clients/servers will respond using (NAT IP address,new port #) as destination addr.
remember (in NAT translation table) every (source IP address, port#) to (NAT IP address, new port #) translation pair
incoming datagrams:replace(NAT IP address, new port #) in destfields of every incoming datagram with corresponding (source IPaddress, port #) stored in NAT table
8/12/2019 Overview Network Layer
64/79
64
Distance Vector Algorithm
Dx(y)= estimate of least cost from x to yDistance vector: Dx= [Dx(y): y N ]
Node x knows cost to each neighbor v: c(x,v)
Node x maintains Dx
= [Dx
(y): y N ]
Node x also maintains its neighbors distance
vectors
For each neighbor v, x maintains
Dv= [Dv(y): y N ]
8/12/2019 Overview Network Layer
65/79
8/12/2019 Overview Network Layer
66/79
66
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and
datagram networks
4.3 Whats inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
ICMP
IPv6
4.5 Routing algorithms
Link state
Distance Vector
Hierarchical routing
4.6 Routing in the
Internet RIP
OSPF
BGP
4.7 Broadcast andmulticast routing
Ro ter Architect re O er ie
8/12/2019 Overview Network Layer
67/79
67
Router Architecture Overview
Two key router functions:
run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link
8/12/2019 Overview Network Layer
68/79
68
Input Port Functions
Decentralized switching:
given datagram dest., lookup output port using
forwarding table
goal: complete input port processing at line
speed
queuing: if datagrams arrive faster than
forwarding rate into switch fabric
Physical layer:bit-level reception
Data link layer:e.g., Ethernetsee chapter 5
Th t f it hi f b i
8/12/2019 Overview Network Layer
69/79
69
Three types of switching fabrics
8/12/2019 Overview Network Layer
70/79
70
The Internet Network layer
forwardingtable
Host, router network layer functions:
Routing protocolspath selection
RIP, OSPF, BGP
IP protocoladdressing conventions
datagram formatpacket handling conventions
ICMP protocolerror reportingrouter signaling
Transport layer: TCP, UDP
Link layer
physical layer
Networklayer
8/12/2019 Overview Network Layer
71/79
71
Hierarchical addressing: route aggregation
Send me anythingwith addressesbeginning200.23.16.0/20
200.23.16.0/23
200.23.18.0/23
200.23.30.0/23
Fly-By-Night-ISP
Organization 0
Organization 7Internet
Organization 1
ISPs-R-UsSend me anythingwith addressesbeginning199.31.0.0/16
200.23.20.0/23Organization 2
.
.
.
.
.
.
Hierarchical addressing allows efficient advertisement of routinginformation:
8/12/2019 Overview Network Layer
72/79
72
Hierarchical addressing: more specific routes
ISPs-R-Us has a more specific route to Organization 1
Send me anything
with addressesbeginning200.23.16.0/20
200.23.16.0/23
200.23.18.0/23
200.23.30.0/23
Fly-By-Night-ISP
Organization 0
Organization 7Internet
Organization 1
ISPs-R-Us Send me anythingwith addressesbeginning 199.31.0.0/16or 200.23.18.0/23
200.23.20.0/23Organization 2
.
.
.
.
.
.
8/12/2019 Overview Network Layer
73/79
73
IP addressing: the last word...
Q:How does an ISP get block of addresses?A:ICANN: Internet Corporation forAssigned
Names and Numbers
allocates addresses
manages DNS
assigns domain names, resolves disputes
Network layer connection and connection-less
8/12/2019 Overview Network Layer
74/79
74
Network layer connection and connection less
service
Datagram network provides network-layerconnectionless service
VC network provides network-layer connection
service
Analogous to the transport-layer services, but: Service: host-to-host
No choice: network provides one or the other
Implementation: in the core
8/12/2019 Overview Network Layer
75/79
75
Virtual circuits
Call setup, teardown for each call beforedata can flow
Each packet carries VC identifier (not destination host
address)
Everyrouter on source-dest path maintains state for
each passing connection
Link, router resources (bandwidth, buffers) may beallocated to VC
VC i l t ti
8/12/2019 Overview Network Layer
76/79
76
VC implementation
A VC consists of:1. Path from source to destination
2. VC numbers, one number for each link along path
3. Entries in forwarding tables in routers along path
Packet belonging to VC carries a VC number.
VC number must be changed on each link. New VC number comes from forwarding table
8/12/2019 Overview Network Layer
77/79
D t F di T bl
8/12/2019 Overview Network Layer
78/79
78
Datagram Forwarding Table
Destination Address Range Link Interface
11001000 00010111 00010000 00000000through 0
11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000through 1
11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000through 211001000 00010111 00011111 11111111
otherwise 3
4 billionpossible entries
Longest prefi matching
8/12/2019 Overview Network Layer
79/79
Longest prefix matching
Prefix Match Link Interface11001000 00010111 00010 0
11001000 00010111 00011000 111001000 00010111 00011 2
otherwise 3
DA: 11001000 00010111 00011000 10101010
Examples
DA: 11001000 00010111 00010110 10100001 Which interface?
Which interface?