Title: Netwowrk Layer
1Netwowrk Layer
2Unicast vs. Multicast
- Unicast
- One sender and one receiver
- Multicast
- One or more senders and a group of receivers
- Video-conferencing, stock feed, software upgrade,
white board
3Multicast Routing Options
Core-based/Shared Receiver-Initiated
Core-based/Shared Broadcast Prune
CBT
PIM-SM
Source-Rooted Receiver-Initiated
Source-Rooted Broadcast Prune
PIM-DM
DVMRP
PIM-SSM
4Tree Options
- SOURCE BASED TREE each source (A, B) is the root
of its own tree per group connecting to all the
members
- CORE-BASED/SHARED TREE single tree per group
the root (A) is the CORE or the Rendez Vous
point all messages go through the CORE
5Source-Rooted vs. Shared
- Source-Rooted pros
- no single point-of-failure (the CORE)
- less centralization of traffic (around core)
- packet sent along shortest path to receiver
- Core-Based/Shared better
- one router entry per source-group pair
- trees often utilize fewer links (consider min.
spanning tree vs. shortest path tree) - (How do you advertise the core??)
- Explicit Join less traffic, but longer delay.
6A typical LAN (IP network)
Dedicated
Shared
7Router, hub, bridge, and switch
8IP Addressing
223.1.1.1
- IP address 32-bit identifier for host, router
interface - interface connection between host, router and
physical link - routers typically have multiple interfaces
- host may have multiple interfaces
- IP addresses associated with interface, not host,
router
223.1.2.9
223.1.1.4
223.1.1.3
223.1.1.1 11011111 00000001 00000001 00000001
223
1
1
1
9Network or Prefix
223.1.1.1
- IP address
- network part or prefix
- host part
- Whats a network ? (from IP address perspective)
- device interfaces with same network part of IP
address - can physically reach each other without
intervening router
223.1.2.1
223.1.1.2
223.1.2.9
223.1.1.4
223.1.2.2
223.1.1.3
223.1.3.27
LAN
223.1.3.2
223.1.3.1
network consisting of 3 IP networks (for IP
addresses starting with 223, first 24 bits are
network address)
10Address Resolution Protocol (ARP)
- Interface between Link layer and Network Layer.
- Allows hosts to query who owns an IP address on
the same LAN. - Owner responds with hardware address.
- Allows changes to link layer to be independent of
IP addressing.
11On-the-same-LAN routing
1. Route lookup determines on the same
subnet. 2. Use ARP to determine what link layer
address to send it to. 3. Give it to Link layer
223.1.2.1
223.1.2.9
223.1.2.2
223.1.3.27
LAN
223.1.3.3
223.1.3.1
223.1.3.2
12Through-the-gateway Routing
1. Route lookup determines its on a different
subnet -gt Go through default route. 2. Use ARP
to determine link layer address of gateway. 3.
Give it to Link layer.
223.1.2.1
223.1.2.9
223.1.2.2
223.1.3.27
LAN
223.1.3.3
223.1.3.1
223.1.3.2
13NAT Network Address Translation
rest of Internet
local network (e.g., home network) 10.0.0/24
10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
Datagrams with source or destination in this
network have 10.0.0/24 address for source,
destination (as usual)
All datagrams leaving local network have same
single source NAT IP address 138.76.29.7, differe
nt source port numbers
14NAT Network Address Translation
- Motivation local network uses just one IP
address as far as outside word is concerned - no need to be allocated range of addresses from
ISP - just one IP address is used 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).
15NAT Network Address Translation
- Implementation NAT router must
- outgoing datagrams replace (source IP address,
port ) of every outgoing 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 dest fields of every incoming datagram
with corresponding (source IP address, port )
stored in NAT table
16NAT Network Address Translation
NAT translation table WAN side addr LAN
side addr
138.76.29.7, 5001 10.0.0.1, 3345
10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
4 NAT router changes datagram dest addr
from 138.76.29.7, 5001 to 10.0.0.1, 3345
3 Reply arrives dest. address 138.76.29.7,
5001
17NAT Network Address Translation
- 16-bit port-number field
- 60,000 simultaneous connections with a single
LAN-side address! - NAT is controversial
- routers should only process up to layer 3
- violates end-to-end argument
- NAT possibility must be taken into account by app
designers, eg, P2P applications - address shortage should instead be solved by IPv6
18Mobil Access Network
- So far, all about wired networks
- Link layer protocol
- Network layer routing
19IEEE 802.11 Wireless LAN
- Wireless LANs are becoming popular for mobile
Internet access - Applications nomadic Internet access, portable
computing, ad hoc networking (multihopping) - IEEE 802.11 standards defines MAC protocol
unlicensed frequency spectrum bands 900Mhz,
2.4Ghz - Basic Service Sets Access Points gt
Distribution System - Like a bridged LAN (flat MAC address)
20Ad Hoc Networks
- IEEE 802.11 stations can dynamically form a group
without AP - Ad Hoc Network no pre-existing infrastructure
- Applications laptop meeting in conference
room, car, airport interconnection of personal
devices (see bluetooth.com) battelfield
pervasive computing (smart spaces) - IETF MANET (Mobile Ad hoc Networks) working
group
21IEEE 802.11 MAC Protocol
- CSMA Protocol
- - sense channel idle for DISF sec (Distributed
Inter Frame Space) - - transmit frame (no Collision Detection)
- - receiver returns ACK after SIFS (Short
Inter Frame Space) - -if channel sensed busy then binary backoff
- NAV Network Allocation Vector (min time of
deferral)
22Hidden Terminal effect
- CSMA inefficient in presence of hidden terminals
- Hidden terminals A and B cannot hear each other
because of obstacles or signal attenuation so,
their packets collide at B - Solution? CSMA/CA
- CA Collision Avoidance
23Collision Avoidance RTS-CTS exchange
- CTS freezes stations within range of receiver
(but possibly hidden from transmitter) this
prevents collisions by hidden station during data
- RTS and CTS are very short collisions during
data phase are thus very unlikely (the end result
is similar to Collision Detection) - Note IEEE 802.11 allows CSMA, CSMA/CA and
polling from AP
24What is mobility?
- spectrum of mobility, from the network
perspective
mobile user, using same access point
mobile user, passing through multiple access
point while maintaining ongoing connections (like
cell phone)
mobile user, connecting/ disconnecting from
network using DHCP.
25Mobility Vocabulary
home network permanent home of mobile (e.g.,
128.119.40/24)
home agent entity that will perform mobility
functions on behalf of mobile, when mobile is
remote
wide area network
Permanent address address in home network, can
always be used to reach mobile e.g.,
128.119.40.186
correspondent
26Mobility more vocabulary
visited network network in which mobile
currently resides (e.g., 79.129.13/24)
Permanent address remains constant (e.g.,
128.119.40.186)
Care-of-address address in visited
network. (e.g., 79,129.13.2)
wide area network
foreign agent entity in visited network that
performs mobility functions on behalf of mobile.
correspondent wants to communicate with mobile
27How do you contact a mobile friend
I wonder where Alice moved to?
Consider friend frequently changing addresses,
how do you find her?
- search all phone books?
- call her parents?
- expect her to let you know where he/she is?
28Mobility approaches
- Let routing handle it routers advertise
permanent address of mobile-nodes-in-residence
via usual routing table exchange. - routing tables indicate where each mobile located
- no changes to end-systems
- Let end-systems handle it
- indirect routing communication from
correspondent to mobile goes through home agent,
then forwarded to remote - direct routing correspondent gets foreign
address of mobile, sends directly to mobile
29Mobility approaches
- Let routing handle it routers advertise
permanent address of mobile-nodes-in-residence
via usual routing table exchange. - routing tables indicate where each mobile located
- no changes to end-systems
- let end-systems handle it
- indirect routing communication from
correspondent to mobile goes through home agent,
then forwarded to remote - direct routing correspondent gets foreign
address of mobile, sends directly to mobile
not scalable to millions of mobiles
30Mobility registration
visited network
home network
wide area network
- End result
- Foreign agent knows about mobile
- Home agent knows location of mobile
31Mobility via Indirect Routing
visited network
home network
wide area network
32Indirect Routing comments
- Mobile uses two addresses
- permanent address used by correspondent (hence
mobile location is transparent to correspondent) - care-of-address used by home agent to forward
datagrams to mobile - foreign agent functions may be done by mobile
itself - triangle routing correspondent-home-network-mobil
e - inefficient when
- correspondent, mobile
- are in same network
33Forwarding datagrams to remote mobile
Permanent address 128.119.40.186
Care-of address 79.129.13.2
34Indirect Routing moving between networks
- suppose mobile user moves to another network
- registers with new foreign agent
- new foreign agent registers with home agent
- home agent update care-of-address for mobile
- packets continue to be forwarded to mobile (but
with new care-of-address) - Mobility, changing foreign networks transparent
on going connections can be maintained!
35Mobility via Direct Routing
correspondent forwards to foreign agent
visited network
home network
wide area network
correspondent requests, receives foreign address
of mobile
36Mobility via Direct Routing comments
- overcome triangle routing problem
- non-transparent to correspondent correspondent
must get care-of-address from home agent - What happens if mobile changes networks?
37Mobile IP agent discovery
- agent advertisement foreign/home agents
advertise service by broadcasting ICMP messages
(typefield 9)
H,F bits home and/or foreign agent
R bit registration required
38Mobile IP registration example