Lecture 5: Network Layer PowerPoint PPT Presentation

presentation player overlay
1 / 38
About This Presentation
Transcript and Presenter's Notes

Title: Lecture 5: Network Layer


1
Lecture 5 Network Layer
  • Prev. summary
  • IP packet switched
  • Link layer
  • Network Layer
  • Routing
  • Internet Routing

Application
Transport
Network
Link
2
The Internet Network layer
Application layer
3
Scalable Routing
Our routing study thus far idealization (e.g.,
all routers identical, network flat, NOT true
in practice)
  • Routing more complex with more routers
  • scale
  • takes more space to store routing tables 300 m
    dest.!
  • requires more time to compute routes
  • uses more link bandwidth to update routes
  • administrative autonomy
  • internet network of networks
  • each network administrator may want to control
    routing in its own network

4
Scalable Routing
Solution
  • divide the world into several hierarchies
  • Do I really care that router z at foo just went
    down?
  • only store info about
  • your local area
  • how to get to higher up routers
  • optimal of levels for an N router network is ln
    N

5
Hierarchical Routing
  • aggregate routers into regions, autonomous
    systems (AS)
  • routers in same AS run the same routing protocol
  • intra-AS routing protocol
  • special routers in AS
  • run intra-AS routing protocol in its AS
  • also responsible for routing to destinations
    outside AS
  • run inter-AS routing protocol with other gateway
    routers

6
Intra-AS and Inter-AS routing
7
Intra-AS and Inter-AS routing
Host h2
Intra-AS routing within AS B
Intra-AS routing within AS A
8
Internet Routing
  • can use any of the standard routing
    algorithms
  • link-state
  • OSPF (Open Shortest Path First)
  • distance vector
  • RIP (Routing Information Protocol) RFC 1058
    RFC 1723
  • BGP (Border Gateway Protocol) (inter-AS routing)

9
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)

10
RIP ( Routing Information Protocol)
  • Distance vector algorithm
  • Included in BSD-UNIX Distribution in 1982
  • Distance metric of hops (max 15 hops)
  • Distance vectors exchanged among neighbors every
    30 sec via Response Message (also called
    advertisement)
  • Each advertisement list of up to 25 destination
    nets within AS

11
RIP Example
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2 z B
A 7 5 x -- 1 . . ....
Routing table in D
12
RIP Link Failure and Recovery
  • If no advertisement heard after 180 sec --gt
    neighbor/link declared dead
  • routes via neighbor invalidated
  • new advertisements sent to neighbors
  • neighbors in turn send out new advertisements (if
    tables changed)
  • link failure info quickly propagates to entire
    net
  • poison reverse used to prevent ping-pong loops
    (infinite distance 16 hops)

13
RIP Table processing
  • RIP routing tables managed by application-level
    process called route-d (daemon)
  • advertisements sent in UDP packets, periodically
    repeated

14
RIP Table example (continued)
  • Router giroflee.eurocom.fr

Destination Gateway
Flags Ref Use Interface
-------------------- -------------------- -----
----- ------ --------- 127.0.0.1
127.0.0.1 UH 0 26492 lo0
192.168.2. 192.168.2.5 U
2 13 fa0 193.55.114.
193.55.114.6 U 3 58503 le0
192.168.3. 192.168.3.5 U
2 25 qaa0 224.0.0.0
193.55.114.6 U 3 0 le0
default 193.55.114.129 UG
0 143454
  • Three attached networks (LANs)
  • Router only knows routes to attached LANs
  • Default router used to go up
  • Route multicast address 224.0.0.0
  • Loopback interface (for debugging)

15
OSPF (Open Shortest Path First)
  • open publicly available
  • Uses Link State algorithm
  • LS packet dissemination
  • Topology map at each node
  • Route computation using Dijkstras algorithm
  • OSPF advertisement carries one entry per neighbor
    router
  • Advertisements disseminated to entire AS (via
    flooding)
  • Carried in OSPF messages directly over IP (rather
    than TCP or UDP

16
Inter-AS routing in the Internet BGP
17
Internet inter-AS routing BGP
  • BGP (Border Gateway Protocol) the de facto
    standard
  • Path Vector protocol
  • similar to Distance Vector protocol
  • each Border Gateway broadcast to neighbors
    (peers) entire path (i.e., sequence of ASs) to
    destination
  • BGP routes to networks (ASs), not individual
    hosts
  • E.g., Gateway X may send its path to dest. Z
  • Path (X,Z) X,Y1,Y2,Y3,,Z

18
Internet inter-AS routing BGP
  • Suppose gateway X send its path to peer gateway
    W
  • W may or may not select path offered by X
  • cost, policy (dont route via competitors AS),
    loop prevention reasons.
  • If W selects path advertised by X, then
  • Path (W,Z) w, Path (X,Z)
  • Note X can control incoming traffic by
    controlling it route advertisements to peers
  • e.g., dont want to route traffic to Z -gt dont
    advertise any routes to Z

19
BGP controlling who routes to you
  • A,B,C are provider networks
  • X,W,Y are customer (of provider networks)
  • X is dual-homed attached to two networks
  • X does not want to route from B via X to C
  • .. so X will not advertise to B a route to C

20
BGP controlling who routes to you
  • A advertises 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!

21
BGP operation
  • Q What does a BGP router do?
  • Receiving and filtering route advertisements from
    directly attached neighbor(s).
  • Route selection.
  • To route to destination X, which path (of several
    advertised) will be taken?
  • Sending route advertisements to neighbors.

22
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)
  • KEEPALIVE keeps connection alive in absence of
    UPDATES also ACKs OPEN request
  • NOTIFICATION reports errors in previous msg
    also used to close connection

23
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

24
Network service model
  • Q What service model for transporting packets
    from sender to receiver?
  • guaranteed bandwidth?
  • preservation of inter-packet timing (no jitter)?
  • loss-free delivery?
  • in-order delivery?
  • congestion feedback to sender?

service abstraction
25
Packet-Switched Models
  • virtual circuit networks
  • simulate a virtual path (series of links and
    packet switches between the source and the
    destination)
  • virtual circuit numbers to identify the path
  • datagram networks
  • the Internet model
  • each packet has destination address in its header
  • works similar to postal service

26
Virtual circuits (VC)
  • much like telephone circuit
  • call setup for each call before data can flow,
  • teardown when done
  • each packet carries VC identifier
  • every router on source-dest path maintains
    state for each passing connection
  • transport-layer connection only involved two end
    systems
  • link, router resources (bandwidth, buffers) may
    be allocated to VC
  • to get circuit-like performance

27
Virtual circuits signaling protocols
  • used to setup, maintain teardown VC
  • used in ATM, frame-relay, X.25
  • not used in todays Internet

6. Receive data
5. Data flow begins
4. Call connected
3. Accept call
1. Initiate call
2. incoming call
28
Datagram networks the Internet model
  • routers no state about end-to-end connections
  • no network-level concept of connection
  • packets routed using destination host ID
  • packets between same source-dest pair may take
    different paths
  • no call setup at network layer

1. Send data
2. Receive data
29
Datagram Networks
  • Demet Aksoy
  • Computer Science Dept.
  • University of California
  • Davis, CA 95616 Joddie Gray
  • Computer Science Dept.
  • University of Maryland
  • College Park, MD 20742
  • like postal system
  • hierarchial delivery

hostB
hostA
PS1
PS2
hostC
  • packet headers contain destination address
  • routing tables are used to reach the destination

30
Addressing Issues
  • Datagrams
  • must include full address in each packet
  • addresses must be unique for entire network
  • Virtual Circuit Numbers
  • If globally unique
  • requires allocation scheme to ensure its unique
  • consumes many bits per packet
  • If per link ()
  • requires translation at each switch
  • uses fewer bits (important for small packets like
    ATM)

31
IP Addressing
  • must include full address in each packet
  • addresses must be unique for entire network

10000000 00001010 00000010 00011101
128.10.2.29
IP Address 32-bit identifier for host/router
interface (decimal notation)
Figure 8.5
32
IP Addressing
  • IP address
  • network part (high order bits)
  • host part (low order bits)
  • Whats a network ? (from IP address perspective)
  • device interfaces with same network part of IP
    address
  • can physically reach each other without
    intervening router

33
IP Addressing
Q Every host has one unique IP-address
(true/false)?
A False one address per interface, not one
address per host e.g., a host with
multiple connections, routers
  • host may also have multiple interfaces
  • IP addresses associated with interface, not host
  • what about routers?

Ethernet
128.10.4.92
A
routers typically have multiple interfaces (so
multiple IP addresses)
Figure 8.5
34
IP Address Classes
class-full addressing
Bit position
0 1 2 3 8
16
31
1.0.0.0 to 127.255.255.255
Class A
0
Net ID
Host ID
128.0.0.0 to 191.255.255.255
Class B
Net ID
Host ID
1 0
192.0.0.0 to 223.255.255.255
Class C
Net ID
Host ID
1 1 0
224.0.0.0 to 239.255.255.255
Class D
1 1 1 0
Multicast address
Class E
Reserved for future use, experiment
1 1 1 1
Reserved for experiments
Determining the class if first bit is 0 then
class A else if second bit 0 then class B else
if ...
Figure 8.5
35
Special Addresses
Q How many different IP addresses can be formed
within a class A Not all possible IP addresses
(defined by the number of bits for the class) are
used to identify a specific interface
NetId HostId Special
Address
All 0s
Network address

All 1s
Direct broadcast address


Specific host on this network
All 0s
All 0s
This host on this network
All 0s
All 1s
Limited broadcast address
All 1s
any
Loopback address
127
36
Subnet Addressing
Subnetting allows another level of hierarchy in
the IP address
From the IP address used one can determine the
class being used Subnet Mask determines the
boundary bw subnet ID host ID
Original
Net ID
Host ID
1 0
address
11111111 11111111
11111111 00000000
Subnet mask
Subnetted
Net ID
Host ID
1 0
Subnet ID
address
  • Subnetting is not visible to the outside
    networks
  • Subnetting reduces the complexity in routing
  • It is not necessary that the subnet ID be 8 bits

Figure 8.6
37
Subnet Masking
IP address
10101000 11110000 00010100 00100101
Mask
11111111 11111111 11111111 00000000
Applying Mask
38
Example Subnet Masks
  • hosts address is 140.134.6.5
  • subnet mask is 255.255.0.0
  • host address is 140.134.6.5
  • subnet mask is 255.255.255.0
  • host address is 140.134.6.5
  • subnet mask is 255.255.255.192

No subnetting
Subnetting with 8 bits
Subnetting with 10 bits
Write a Comment
User Comments (0)
About PowerShow.com