Docstoc

Networking overview - Computer Engineering

Document Sample
Networking overview - Computer Engineering Powered By Docstoc
					                      In the Name of the Most High



               Networking Review
                                        By
                                   Behzad Akbari




These power point slides have been adapted from slides prepared by Prof. Jim Kurose (U Mass)


                                                                                               1
Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks
   course                    error control
    equalize backgrounds    flow control
    identify remedial       congestion control
     work
    ease into course        routing
                             LANs
                             addressing




                                                   2
What’s the Internet: “nuts and bolts” view
 PC        millions of connected   Mobile network
 server     computing devices:                       Global ISP
 wireless  hosts = end systems
 laptop
             running network
 cellular
 handheld     apps                  Home network
                                                   Regional ISP
           communication links
      access  fiber, copper,
      points
      wired
                radio, satellite       Institutional network
      links
              transmission
                rate = bandwidth
             routers: forward
 router
              packets (chunks of
              data)
                                                                  3
What’s the Internet: “nuts and bolts” view
                                   Mobile network
 protocols control sending,
  receiving of msgs                                 Global ISP
    e.g., TCP, IP, HTTP, Skype,
     Ethernet
 Internet: “network of            Home network

  networks”                                       Regional ISP

    loosely hierarchical
    public Internet versus           Institutional network
     private intranet
 Internet standards
    RFC: Request for comments
    IETF: Internet Engineering
     Task Force

                                                                 4
What’s a protocol?
human protocols:           network protocols:
 “what’s the time?”        machines rather than
 “I have a question”        humans
 introductions             all communication
                             activity in Internet
… specific msgs sent         governed by protocols
… specific actions taken   protocols define format,
  when msgs received,        order of msgs sent and
  or other events           received among network
                              entities, and actions
                                  taken on msg
                              transmission, receipt
                                                      5
What’s a protocol?
a human protocol and a computer network protocol:


       Hi
                               TCP connection
                               request
       Hi
                               TCP connection
     Got the                   response
      time?                    Get http://www.awl.com/kurose-ross
      2:00
                                     <file>
                     time

 Q: Other human protocols?
                                                                    6
A closer look at network structure:
network edge:
 applications and
 hosts
access networks,
 physical media:
 wired, wireless
 communication links
network core:
  interconnected
   routers
  network of
   networks                           7
 The network edge:
end systems (hosts):
   run application programs
   e.g. Web, email
   at “edge of network”       peer-peer

client/server model
   client host requests, receives
    service from always-on server
                                  client/server
   e.g. Web browser/server;
    email client/server
peer-peer model:
   minimal (or no) use of
    dedicated servers
   e.g. Skype, BitTorrent

                                                  8
Network edge: reliable data transfer service

 Goal: data transfer             TCP service [RFC 793]
   between end systems            reliable, in-order byte-
  handshaking: setup              stream data transfer
   (prepare for) data                loss: acknowledgements
   transfer ahead of time             and retransmissions
     Hello, hello back human     flow control:
      protocol                       sender won’t overwhelm
     set up “state” in two           receiver
      communicating hosts
                                  congestion control:
  TCP - Transmission                senders “slow down sending
   Control Protocol                   rate” when network
     Internet’s reliable data        congested
      transfer service
                                                                   9
Network edge: best effort (unreliable) data
transfer service
 Goal: data transfer         App’s using TCP:
   between end systems        HTTP (Web), FTP (file
     same as before!          transfer), Telnet
  UDP - User Datagram         (remote login), SMTP
   Protocol [RFC 768]:         (email)
    connectionless
    unreliable data         App’s using UDP:
      transfer                streaming media,
    no flow control           teleconferencing, DNS,
    no congestion control     Internet telephony


                                                       10
Access networks and physical media
 Q: How to connect end
   systems to edge router?
  residential access nets
  institutional access
   networks (school,
   company): LAN
  mobile access networks
 Keep in mind:
  bandwidth (bits per
   second) of access
   network?
  shared or dedicated?
                                     11
Local area networks
  company/univ local area
   network (LAN) connects
   end system to edge router
  Ethernet:
    10 Mbs, 100Mbps,
      1Gbps, 10Gbps Ethernet
    modern configuration:
      end systems connect
      into Ethernet switch
  Question: switch versus
   router?
   
   

                               12
Wireless access networks
 shared wireless access
  network connects end system
  to router                              router
    via base station aka “access
     point”
                                         base
 wireless LANs:                       station
    802.11b/g (WiFi): 11 or 54 Mbps
 wider-area wireless access
    provided by telco operator
    ~1Mbps over cellular system
     (EVDO, HSDPA)
                                                  mobile
    next up (?): WiMAX (10’s Mbps)
                                                   hosts
     over wide area

                                                           13
The Network Core
 mesh of interconnected
  routers
 the fundamental
  question: how is data
  transferred through net?
   circuit switching:
     dedicated circuit per
     call: telephone net
   packet-switching: data
     sent thru net in
     discrete “chunks”

                             14
Network Core: Circuit Switching
End-end resources
  reserved for “call”
 link bandwidth, switch
  capacity
 dedicated resources:
  no sharing
 circuit-like
  (guaranteed)
  performance
 call setup required


                                  15
Network Core: Circuit Switching
network resources              Qiestion: how is
  (e.g., bandwidth)             bandwidth divided into
  divided into “pieces”         “pieces”
                                 
 pieces allocated to calls
                                 
 resource piece idle if
  not used by owning call
  (no sharing)




                                                         16
Network Core: Packet Switching
each end-end data stream           resource contention:
  divided into packets              aggregate resource
 user A, B packets share            demand can exceed
  network resources                  amount available
 each packet uses full link        congestion: packets
  bandwidth                          queue, wait for link use
 resources used as needed          store and forward:
                                     packets move one hop
                                     at a time
Bandwidth division into “pieces”       Node receives complete
     Dedicated allocation               packet before forwarding
    Resource reservation

                                                                   17
 Packet Switching: Statistical Multiplexing
          100 Mb/s
  A       Ethernet     statistical multiplexing   C

                            1.5 Mb/s
      B
            queue of packets
            waiting for output
                   link


                            D                     E

Question: why packet switching?
   
   
                                                      18
 Internet structure: network of networks
 roughly hierarchical
 at center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T,
  Cable and Wireless), national/international coverage
   treat each other as equals


  Tier-1
  providers
                        Tier 1 ISP
  interconnect
  (peer)
  privately
                 Tier 1 ISP     Tier 1 ISP



                                                           19
Tier-1 ISP: e.g., Sprint
        POP: point-of-presence

            to/from backbone

                        peering
        …                …
                         .
                      …
       …

               …



           to/from customers




                                  20
   Internet structure: network of networks
  “Tier-2” ISPs: smaller (often regional) ISPs
      Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs



                                                           Tier-2 ISPs
Tier-2 ISP pays         Tier-2 ISP                         also peer
                                          Tier-2 ISP       privately with
tier-1 ISP for
connectivity to                 Tier 1 ISP                 each other.
rest of Internet
 tier-2 ISP is
customer of
tier-1 provider       Tier 1 ISP        Tier 1 ISP     Tier-2 ISP

                   Tier-2 ISP        Tier-2 ISP


                                                                        21
   Internet structure: network of networks
  “Tier-3” ISPs and local ISPs
       last hop (“access”) network (closest to end systems)

                  local
                   ISP     Tier 3                   local
                                         local            local
                            ISP                      ISP
                                          ISP              ISP
Local and tier-            Tier-2 ISP            Tier-2 ISP
3 ISPs are
customers of                        Tier 1 ISP
higher tier
ISPs
connecting
them to rest
                          Tier 1 ISP             Tier 1 ISP       Tier-2 ISP
of Internet
                                                                        local
                    Tier-2 ISP           Tier-2 ISP
                                                                         ISP
              local         local          local
               ISP           ISP            ISP                                 22
 Internet structure: network of networks
 a packet passes through many networks!


           local
            ISP     Tier 3                    local
                                   local            local
                     ISP                       ISP
                                    ISP              ISP
                    Tier-2 ISP             Tier-2 ISP

                              Tier 1 ISP


                   Tier 1 ISP              Tier 1 ISP       Tier-2 ISP
                                                                  local
              Tier-2 ISP           Tier-2 ISP
                                                                   ISP
        local         local          local
         ISP           ISP            ISP                                 23
Protocol “Layers”
Networks are complex!
 many “pieces”:
  hosts
  routers
  links of various
    media
  applications
  protocols
  hardware,
    software


                        24
Internet protocol stack
 application: supporting network
  applications (FTP, SMTP, HTTP)       application
 transport: process-process data
  transfer (TCP, UDP)                  transport
 network: routing of datagrams from
  source to destination                 network
    IP, routing protocols
 link: data transfer between             link
  neighboring network elements
    PPP, Ethernet                      physical
 physical: bits “on the wire”

 Question: anything missing?
                                                     25
                          source
     message        M   application
                                                 Encapsulation
  segment      Ht   M   transport
datagram Hn Ht      M    network
frame Hl Hn Ht      M      link
                         physical
                                                        link
                                                      physical

                                                                         switch



               destination               Hn Ht   M   network
           M    application           Hl Hn Ht   M     link      Hn Ht   M
     Ht    M    transport                            physical
   Hn Ht   M     network
Hl Hn Ht   M       link                                                  router
                 physical

                                                                                  26
Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks       error control
   course                    flow control
    equalize backgrounds
                             congestion control
    identify remedial
     work                    routing
    ease into course        LANs
                             addressing
                             synthesis:
                                control timescales



                                                      27
Error control
 reliable point-point communication
    generic problem: app-to-app, over path, over link
 error model?
    bits flipped in packet
    packets “lost
    packets delayed or reordered




              provided service    service implementation
                                                           28
Bit level error detection
EDC= Error Detection and Correction bits (redundancy)
D = Data protected by error checking, may include header fields

• Error detection not 100% reliable!
    • protocol may miss some errors, but rarely
    • larger EDC field yields better detection and correction




                                                                  29
Parity Checking
Single Bit Parity:              Two Dimensional Bit Parity:
Detect single bit errors        Detect and correct single bit errors




Much more powerful error
detection/correction schemes:
Cyclic Redundancy Check (CRC)
                                      0                0


                           Simple form of forward
                           error correction (FEC)                      30
Internet checksum
Goal: detect “errors” (e.g., flipped bits) in transmitted
  segment (note: used at transport layer only)

Sender:                      Receiver:
                              compute checksum of received
 treat segment contents       segment
  as sequence of 16-bit
                              check if computed checksum
  integers                     equals checksum field value:
 checksum: addition (1’s        NO - error detected
  complement sum) of             YES - no error detected. But
  segment contents                 maybe errors nonetheless?
 sender puts checksum
  value into segment
  checksum field

                                                                 31
Recovering from lost packets
why are packets lost?
  limited storage, discarded in congestion
  outages: eventually reroute around failure (~sec
   recovery times hopefully)
  dropped at end system e.g., on NIC
ARQ: automatic request repeat
  sender puts sequence numbers on packets (why)
  receiver positively or negatively acknowledges
   correct receipt of packet
  sender starts (logical) timer for each packet,
   timeout and retransmits
                                                      32
                                         Reference: section 3.4 in K&R
 rdt3.0: channels with errors and loss
Assumption: underlying            Approach: sender waits
  channel can corrupt, lose         “reasonable” amount of
  packets (data or ACKs)            time for ACK
 need checksum, seq. #,           retransmits if no ACK
  ACKs, retransmissions,            received in this time
  timer                            if pkt (or ACK) just delayed
                                    (not lost):
                                      retransmission will be
 seq #s                                duplicate, but use of 0,1
    detect reordering                  seq. #’s already handles
    ACK, NAKing                        this
    detect missing packet            receiver must specify seq
                                        # of pkt being ACKed
    duplicate detection due to
     retransmissions               requires countdown timer

                                                                    33
rdt3.0 sender
                                 rdt_send(data)
                                                                               rdt_rcv(rcvpkt) &&
                                 sndpkt = make_pkt(0, data, checksum)          ( corrupt(rcvpkt) ||
                                 udt_send(sndpkt)                              isACK(rcvpkt,1) )
     rdt_rcv(rcvpkt)             start_timer                                            L
           L                 wait for                          Wait
                                                                                timeout
                       0    call from                           for
                                                                                udt_send(sndpkt)
                             above                             ACK0
                                                                                start_timer
    rdt_rcv(rcvpkt)
    && notcorrupt(rcvpkt)                                                  rdt_rcv(rcvpkt)
    && isACK(rcvpkt,1)                                                     && notcorrupt(rcvpkt)
    stop_timer                                                             && isACK(rcvpkt,0)
                                                                           stop_timer
                               Wait                                 wait for
 timeout                        for                            1   call from
 udt_send(sndpkt)              ACK1                                 above
 start_timer                                                                      rdt_rcv(rcvpkt)
                                      rdt_send(data)                                     L
        rdt_rcv(rcvpkt) &&
        ( corrupt(rcvpkt) ||          sndpkt = make_pkt(1, data, checksum)
        isACK(rcvpkt,0) )             udt_send(sndpkt)
                                      start_timer
                 L

                 FSM specification of sender (details not important)
                                                                                                      34
rdt3.0 in action




                   35
rdt3.0 in action




                   36
Forward error control
add redundancy to recover from losses

                original file (n blocks)
     encoding
                                    (potentially) infinite number
                                    of blocks

                   lossy channel


                                      eventually receive n(1+e) blocks
     decoding

                recover file
                                                                    37
Forward error control
e controls computation cost, BW usage
used for video delivery; large file
 transfers




                                         38
Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks       error control
   course                    flow control
    equalize backgrounds
    identify remedial
                             congestion control
     work                    routing
    ease into course        LANs
                             addressing
                             synthesis:
                                “a day in the life”
                                control timescales



                                                       39
                                         flow control
                                          sender won’t overrun
Flow Control (in TCP)                     receiver’s buffers by
                                         transmitting too much,
                                                 too fast

receiver: explicitly informs sender of (dynamically changing)
   amount of free buffer space
     RcvWindow field in TCP segment
sender: keeps the amount of transmitted, unACKed data less
   than most recently received RcvWindow




                                    RcvBuffer = size of TCP Receive Buffer

                                    RcvWindow = amount of spare room in Buffer
       receiver buffering
                                                                                 40
Principles of Congestion Control

Congestion:
 informally: “too many sources sending too much
  data too fast for network to handle”
 different from flow control!
 manifestations:
   lost packets (buffer overflow at routers)
   long delays (queueing in router buffers)




                                                   41
 Causes/costs of congestion: scenario 1
                               Host A                                               lout
 two senders, two                      lin : original data

  receivers
 one router,
                      Host B                                   unlimited shared
                                                              output link buffers


  infinite buffers
 no retransmission


                                                           large delays
                                                            when congested
                                                           maximum
                                                            achievable
                                                            throughput
                                                                                           42
 Causes/costs of congestion: scenario 2

 one router, finite buffers
 sender retransmission of lost packet

               Host A   lin : original                   lout
                        data
                        l'in : original data, plus              l‘out : original data,
                              retransmitted data                           duplicates

      Host B                     finite shared output
                                          link buffers




                                                                                 43
   Causes/costs of congestion: scenario 2
         always:    = l
                       l     (goodput)
                   in    out
         “perfect” retransmission only when loss:            l > lout
                                                    in
         retransmission of delayed (not lost) packet makes               l         larger
                                                                               in
             (than perfect case) for same           lout
       R/2                              R/2                        R/2


                                        R/3
lout




                                 lout




                                                            lout
                                                                   R/4




                           R/2                        R/2                           R/2
                 lin                          lin                        lin


                 a.                           b.                         c.
         “costs” of congestion:
          more work (retrans) for given “goodput”
          unneeded retransmissions: link carries multiple copies of pkt
                                                                                             44
Causes/costs of congestion: scenario 3
 four senders                          Q: what happens as l
 multihop paths                          and l increase ?
                                                             in
 timeout/retransmit                                     in
                       Host A                                     lout
                                lin : original data
                                l'in : original data, plus
                                      retransmitted data

                                          finite shared output
                                                   link buffers


     Host B




                                                                         45
Causes/costs of congestion: scenario 3
                                   H         l
                                   o
                                             o
                                   s
                                             u
                                   t
                                   A         t


                             H
                             o
                             s
                             t
                             B




Another “cost” of congestion:
 when packet dropped, any “upstream transmission
  capacity used for that packet was wasted!

                                                    46
Approaches towards congestion control
Two broad approaches towards congestion control:

 End-end congestion            Network-assisted
   control:                      congestion control:
  no explicit feedback from    routers provide feedback
   network                       to end systems
  congestion inferred from        single bit indicating
   end-system observed loss,         congestion (SNA,
   delay                             DECbit, TCP/IP ECN,
  approach taken by TCP             ATM)
                                   explicit rate sender
                                     should send at



                                                            47
Case study: ATM ABR congestion control

ABR: available bit rate:    RM (resource management)
 “elastic service”           cells:
 if sender’s path           sent by sender, interspersed
  “underloaded”:              with data cells
    sender should use       bits in RM cell set by switches
      available bandwidth     (“network-assisted”)
 if sender’s path              NI bit: no increase in rate
  congested:                      (mild congestion)
    sender throttled to        CI bit: congestion
      minimum guaranteed          indication
      rate                   RM cells returned to sender by
                              receiver, with bits intact


                                                                48
Case study: ATM ABR congestion
control




 two-byte ER (explicit rate) field in RM cell
    congested switch may lower ER value in cell
    sender’ send rate thus minimum supportable rate on path
 EFCI bit in data cells: set to 1 in congested switch
    if data cell preceding RM cell has EFCI set, sender sets CI
     bit in returned RM cell

                                                                   49
TCP Congestion Control
 end-end control (no network assistance)
 transmission rate limited by congestion window
  size, Congwin, over segments:




         Congwin




                                                   50
TCP congestion control:
 “probing” for usable            two “phases”
  bandwidth:                         slow start
    ideally: transmit as fast       congestion avoidance
     as possible (Congwin as
                                  important variables:
     large as possible)
     without loss                    Congwin
    increase Congwin until          threshold: defines
     loss (congestion)                threshold between two
                                      slow start phase,
    loss: decrease Congwin,
                                      congestion control
     then begin probing
                                      phase
     (increasing) again




                                                              51
TCP Slowstart
                                      Host A   Host B
Slowstart algorithm




                                RTT
initialize: Congwin = 1
for (each segment ACKed)
     Congwin++
until (loss event OR
       CongWin > threshold)

 exponential increase (per
  RTT) in window size (not so
  slow!)                                                time
 loss event: timeout (Tahoe
  TCP) and/or or three
  duplicate ACKs (Reno TCP)
                                                               52
TCP Congestion Avoidance: Tahoe
TCP Tahoe Congestion avoidance

/* slowstart is over   */
/* Congwin > threshold */
Until (loss event) {
  every Congwin segments
ACKed:       Congwin++
  }
threshold = Congwin/2
Congwin = 1
perform slowstart

Numerous improvements: TCP Reno, SACK
                                        53
Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks       error control
   course                    flow control
    equalize backgrounds
    identify remedial
                             congestion control
     work                    routing (and network
    ease into course         layer services)
                             LANs
                             addressing
                             synthesis:
                                control timescales



                                                      54
Network layer
   transport segment from sending to receiving host
                                                        application
   on sending side encapsulates segments into
                                                        transport
    datagrams
                                                         network
   on rcving side, delivers segments to transport       data link
    layer                                                physical
   network layer protocols in every host, router
                                                                           network      network
   router examines header fields in all IP datagrams                      data link    data link
    passing through it                                       network                    physical
                                                                           physical
                                                             data link
                                                             physical      network       network
                                                                           data link     data link
                                                                           physical      physical


                                                                         network           network
                                                                         data link         data link
                                                                         physical          physical
                                                                                 network
                                                                                 data link
                                                                                 physical
                                                                                                       application
                                                                         network                       transport
                                                                         data link                      network
                                                                                       network
                                                                         physical                       data link
                                                            network                    data link
                                                                                                        physical
                                                            data link                  physical
                                                            physical




                                                                                                           55
Two Key Network-Layer Functions

 forwarding: move        analogy:
  packets from router’s
  input to appropriate    routing: process of
  router output            planning trip from
                           source to dest
 routing: determine
  route taken by          forwarding: process
  packets from source      of getting through
  to dest.                 single interchange

   routing algorithms

                                                 56
Interplay between routing and forwarding

                        routing algorithm


                   local forwarding table
                  header value output link
                            0100   3
                            0101   2
                            0111   2
                            1001   1




    value in arriving
    packet’s header
                          0111               1

                                        3 2




                                                 57
Network service model                         CRUCIAL
                                              question!

  Q: What service model
    for “channel”
                                   The most important
    transporting packets           abstraction provided
    from sender to                  by network layer:
    receiver?
   guaranteed bandwidth?
   preservation of inter-packet
    timing (no jitter)?
                                     ? ?
                                     virtual circuit
                                           or
                                       datagram?
   loss-free delivery?
   in-order delivery?
   congestion feedback to
                                      ?
    sender?

                                                          58
Virtual circuits
 “source-to-dest path behaves much like telephone
   circuit”
      performance-wise
      network actions along source-to-dest path


 call setup, teardown for each call before data can flow
 each packet carries VC identifier (not destination host ID)
 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 perf.

                                                                59
Virtual circuits: signaling protocols

 used to set up, maintain teardown VC
 used in ATM, frame-relay, X.25
 not used in today’s Internet


application
                                 6. Receive data application
transport 5. Data flow begins
 network 4. Call connected        3. Accept call transport
 data link 1. Initiate call      2. incoming call network
                                                 data link
 physical
                                                 physical



                                                               60
Datagram networks: the Internet model
 no call setup at network layer
 routers: no state about end-to-end connections
     no network-level concept of “connection”
 packets typically routed using destination host ID
     packets between same source-dest pair may take
      different paths


application
                                                        application
transport
                                                         transport
 network
 data link 1. Send data                  2. Receive data network
                                                          data link
 physical
                                                          physical


                                                                      61
Datagram or VC network: why?
Internet                          ATM
 data exchange among              evolved from telephony
  computers
                                   human conversation:
    “elastic” service, no strict
                                      strict timing, reliability
     timing req.
                                       requirements
 “smart” end systems
                                      need for guaranteed
  (computers)
                                       service
    can adapt, perform
                                   “dumb” end systems
     control, error recovery
                                      telephones
    simple inside network,
     complexity at “edge”             complexity inside
                                       network
 many link types
    different characteristics
    uniform service difficult
                                                                    62
Routing
 Routing protocol
 Goal: determine “good” path                   5
 (sequence of routers) thru                        3
network from source to dest.                   B           C   5
                                           2
                                   A           2           1       F
                                                       3
Graph abstraction for                  1                       2
  routing algorithms:                          D           E
                                                   1
 graph nodes are
  routers                         “good” path:
 graph edges are                    typically means minimum
  physical links                      cost path
    link cost: delay, $ cost,       other def’s possible
     or congestion level

                                                                       63
Routing: only two approaches used in practice

Global:
 all routers have complete topology, link cost info
 “link state” algorithms: use Dijkstra’s algorithm to find
   shortest path from given router to all destinations
Decentralized:
 router knows physically-connected neighbors, link costs
   to neighbors
 iterative process of computation, exchange of info with
   neighbors
 “distance vector” algorithms
 a ‘self-stabilizing algorithm’ (we’ll see these later)




                                                              64
Distance Vector Routing Algorithm
iterative:
                            Each node:
 continues until no
  nodes exchange info.
 self-terminating: no        wait for (change in local link
  “signal” to stop            cost of msg from neighbor)
asynchronous:
 nodes need not
   exchange info/iterate      recompute distance table
   in lock step!
distributed:
                              if least cost path to any dest
 each node
   communicates only with     has changed, notify
   directly-attached          neighbors
   neighbors
                                                               65
Hierarchical Routing
             Our routing review thus far - idealization
              all routers identical
              network “flat”
             … not true in practice

scale: with 200 million       administrative autonomy
  destinations:                internet = network of
 can’t store all dest’s in     networks
  routing tables!              each network admin may
 routing table exchange        want to control routing in its
  would swamp links!            own network



                                                                 66
Hierarchical Routing
 aggregate routers into        gateway routers
  regions, “autonomous           special routers in AS
  systems” (AS)                  run intra-AS routing
 routers in same AS run          protocol with all other
                                  routers in AS
  same routing protocol
                                 also responsible for
    “intra-AS” routing
                                  routing to destinations
     protocol
                                  outside AS
    routers in different AS
                                    run inter-AS routing
     can run different intra-
                                      protocol with other
     AS routing protocol
                                      gateway routers




                                                            67
Intra-AS and Inter-AS routing
                                Inter-AS Internet: BGP
               C.b               routing
                                between   B.a
                        A.a     A and B                Host
                b               A.c             c        h2
    a      C                               a
                                                    b
                          a                   B
    Host              d          c            Intra-AS routing
    h1                     b
                     A                        within AS B
                     Intra-AS routing
                     within AS A
                     Internet: OSPF, IS-IS, RIP




                                                                 68
Addressing
what’s an address?
  identifier that differentiates between me and
   someone else, and also helps route data to/from
   me
 real world examples of addressing?
   mailing address
  office #, floor, etc
  phone




                                                     69
Addressing: network layer
 IP address: 32-bit                    223.1.1.1

  identifier for host,                                            223.1.2.1
  router interface
                                        223.1.1.2
                                               223.1.1.4     223.1.2.9
 interface: connection                                           223.1.2.2
  between host, router                 223.1.1.3     223.1.3.27

  and physical link
    router’s typically have
     multiple interfaces                 223.1.3.1                223.1.3.2
    host may have multiple
     interfaces
    IP addresses
     associated with           223.1.1.1 = 11011111 00000001 00000001 00000001
     interface, not host,
                                            223          1          1         1
     router
                                                                                  70
IP Addressing
 IP address:                   223.1.1.1

    network part (high                                   223.1.2.1
                                223.1.1.2
     order bits)                       223.1.1.4    223.1.2.9
    host part (low order
     bits)                     223.1.1.3     223.1.3.27
                                                           223.1.2.2

 what’s a network ?
                                                     LAN
  (from IP address
  perspective)                   223.1.3.1                 223.1.3.2
    device interfaces with
     same network part of
     IP address
                              network consisting of 3 IP networks
    can physically reach     (for IP addresses starting with 223,
     each other without       first 24 bits are network address)
     intervening router

                                                                       71
Hierarchical addressing: route aggregation
   Hierarchical addressing allows efficient advertisement of routing
   information:


 Organization 0
     200.23.16.0/23
 Organization 1
                                              “Send me anything
     200.23.18.0/23                           with addresses
 Organization 2                               beginning
     200.23.20.0/23    .   Fly-By-Night-ISP   200.23.16.0/20”
                       .
                  .    .                                           Internet
                  .
 Organization 7   .
    200.23.30.0/23
                                               “Send me anything
                             ISPs-R-Us
                                               with addresses
                                               beginning
                                               199.31.0.0/16”


                                                                              72
Hierarchical addressing: more specific
routes
ISPs-R-Us has a more specific route to Organization 1
 Organization 0
     200.23.16.0/23

                                               “Send me anything
                                               with addresses
 Organization 2                                beginning
     200.23.20.0/23     .   Fly-By-Night-ISP   200.23.16.0/20”
                        .
                    .   .                                             Internet
                    .
 Organization 7     .
    200.23.30.0/23
                                                “Send me anything
                              ISPs-R-Us
                                                with addresses
   Organization 1                               beginning 199.31.0.0/16
                                                or 200.23.18.0/23”
       200.23.18.0/23


                                                                                 73
IP addresses: how to get one?

Q: How does host get IP address?
hard-coded by system admin in a file
  Wintel: control-panel->network->configuration->tcp/ip->properties
  UNIX: /etc/rc.config
DHCP: Dynamic Host Configuration Protocol:
 dynamically get address: “plug-and-play”
  host broadcasts “DHCP discover” msg
  DHCP server responds with “DHCP offer” msg
  host requests IP address: “DHCP request” msg
  DHCP server sends address: “DHCP ack” msg
                                                                       74
Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks       error control
   course                    flow control
    equalize backgrounds
    identify remedial
                             congestion control
     work                    routing
    ease into course        LANs
                             addressing (cont.)
                             synthesis:
                                control timescales




                                                      75
Link Layer: Introduction
Some terminology:
 hosts and routers are nodes
 communication channels that
  connect adjacent nodes along
  communication path are links
    wired links
    wireless links
    LANs
 layer-2 packet is a frame,
  encapsulates datagram



data-link layer has responsibility of
transferring datagram from one node
to adjacent node over a link
                                        76
 Link Layer: setting the context
   two physically connected devices:
      host-router, router-router, host-host
   unit of data: frame



        M    application
     Ht M    transport
   Hn Ht M    network        data link    network
                             protocol
Hl Hn Ht M      link                        link     Hl Hn Ht M
              physical                    physical      frame
                             phys. link


                           adapter card
                                                                  77
LANs
bus topology popular through mid 90s
today: star topology prevails
    active switch in center, each “spoke” runs a
     (separate) Ethernet protocol
wireless LANS: 802.11




                       switch                   shared RF
                                            (e.g., 802.11 WiFi)
bus: coaxial cable
                     star
                                                                  78
LAN Addresses
Each adapter on LAN has unique LAN address (also has an IP address)
                                         LAN (or MAC or physical) address:
                                          used to get datagram from one
                                            interface to another physically-
                                            connected interface (same
                                            network)
                                          48 bit MAC address (for most
                                            LANs)
                                            burned in the adapter ROM




                                              Question: why separate
                                              MAC and IP addresses?
                                                                          79
     ARP: Address Resolution Protocol
   Question: how to determine                       Each IP node (host,
   MAC address of B                                  router) on LAN has
   knowing B’s IP address?                           ARP table
                                                    ARP table: IP/MAC
                               137.196.7.78
                                                     address mappings for
                              1A-2F-BB-76-09-AD
                                                     some LAN nodes
  137.196.7.23
                                    137.196.7.14        < IP address; MAC address; TTL>
                                                             TTL (Time To Live): time
                        LAN                                  after which address
71-65-F7-2B-08-53                                            mapping will be forgotten
                                    58-23-D7-FA-20-B0
                                                             (typically 20 min)

                               0C-C4-11-6F-E3-98
         137.196.7.88


                                                                                      80
ARP protocol: Same LAN
(network)
 A wants to send datagram
  to B, and B’s MAC address      A caches (saves) IP-to-
  not in A’s ARP table.           MAC address pair in its
 A broadcasts ARP query          ARP table until information
  packet, containing B's IP       becomes old (times out)
  address                           soft state: information
    dest MAC address = FF-          that times out (goes
     FF-FF-FF-FF-FF                  away) unless refreshed
    all machines on LAN         ARP is “plug-and-play”:
     receive ARP query              nodes create their ARP
 B receives ARP packet,             tables without
  replies to A with its (B's)         intervention from net
  MAC address                         administrator
    frame sent to A’s MAC
     address (unicast)

                                                                81
Addressing: routing to another LAN
walkthrough: send datagram from A to B via R
             assume A knows B’s IP address
      74-29-9C-E8-FF-55                                      88-B2-2F-54-1A-0F

     A                       E6-E9-00-17-BB-4B
                                                                   222.222.222.221
                                         1A-23-F9-CD-06-9B
  111.111.111.111


                                           222.222.222.220         222.222.222.222
                             111.111.111.110
                                                                        B
 111.111.111.112
                                         R                    49-BD-D2-C7-56-2A
         CC-49-DE-D0-AB-7D



 two ARP tables in router R, one for each IP
  network (LAN)


                                                                                     82
 A creates IP datagram with source A, destination B
 A uses ARP to get R’s MAC address for 111.111.111.110
 A creates link-layer frame with R's MAC address as dest,
  frame contains A-to-B IP datagram
                                          This is a really important
 A’s NIC sends frame                     example – make sure you
 R’s NIC receives frame                  understand!
 R removes IP datagram from Ethernet frame, sees its
  destined to B
 R uses ARP to get B’s MAC address
 R creates frame containing A-to-B IP datagram sends to B
         74-29-9C-E8-FF-55                                       88-B2-2F-54-1A-0F

       A
                                E6-E9-00-17-BB-4B
                                                                        222.222.222.221
                                             1A-23-F9-CD-06-9B
    111.111.111.111



                                               222.222.222.220          222.222.222.222
                                111.111.111.110                               B
   111.111.111.112
                                              R                   49-BD-D2-C7-56-2A

            CC-49-DE-D0-AB-7D
                                                                                          83
Part 0: Networking Review
 Goals:                     Overview:
  review key topics         overview
   from intro networks       error control
   course                    flow control
    equalize backgrounds
    identify remedial
                             congestion control
     work                    routing
    ease into course        LANs
                             addressing (cont.)
                             synthesis:
                                control timescales




                                                      84
Synthesis: which protocols involved?
www browser downloads page




                                       85
Protocols involved in http GET
 user types in a URL, what happens?
 DNS: translate hostname to IP address
   via DHCP, source has IP address of DNS server (suppose
    DNS server on same network segment)
   create DNS query, pass to UDP, create UDP segment
    containing DNS query, pass to IP on host
   look in routing table (DHCP gave me default router),
    recognize that DNS server on same network.
   use ARP to determine MAC address of DNS server
   Ethernet used to send frame to DNS server on physically
    connected “wire” (network segment, ethernet “cable”)
   on DNS machine ethernet->IP->UDP. UDP looks at dest
    port #, sees it is DNS, passes DNS query to DNS
    application. (assume DNS knows IP addresses of
    hostname in original URL - address found!)
   DNS server sends UDP reply back to orginating machine

                                                              86
Protocols involved in http GET
 browser now has IP address of GET destination server
 need to establish TCP connection to server, send SYN packet
  (will get an SYNACK back, eventuallly….)
 SYN packet down to network layer, with IP address of server.
  Since server destined “off my network”, SYN packet goes
  through router.
 look in routing table, see that destination off network, need to
  send to “default gateway” (to get off my net)
 use ARP to get MAC address of default gateway, create
  Ethernet frame with gateway MAC address, containing IP packet
  containing TCP segment, containing SYN
 IMPORTANT to realize that while the Ethernet frame containing
  the IP datagram that contains the TCP SYN has as its
  destination address the MAC address of the router, the IP
  datagram (still) has as destination address the IP address of the
  remote www server
                                                                  87
Protocols involved in http GET
 Router receives Ethernet frame (frame addressed to router), looks at
  IP datagram, sees that IP datagram not addressed to itself (IP
  datagram addressed to server). Router knows it must forward IP
  datagram to next hop router along path to eventual destination.
 Router checks routing tables (table values populated using intra, possibly
  inter-, domain routing protocols like OSPF, RIP, IS-IS, BGP (inter). Get
  IP address of next hop router.
 Router puts IP packets in Ethernet frame, Ethernet frame addressed to
  next hop router. MAC address of next hop router determined by ARP.
  Frame sent to next hop router.
 Network management shoehorn: arriving packets at interface cause
  SNMP MIB variable for # arriving IP datagrams to be incremented
 Forwarding continues until IP datagram containing TCP SYN eventually
  arrives at destination, gaia.cs.umass.edu (128.119.30.30)
 Up to IP, demultiplex from Ethernet to IP using Ethernet TYPE field to
  identify IP as upper layer protocol
 From IP to TCP using protocol field of IP datagram,
 SYN packet arrives at gaia TCP (FINALLY)


                                                                           88
Protocols involved in http GET
 So …. SYN has arrived at gaia. Gaia returns SYNACK to
  initial sender
 Gaia gets synack, ready to send data.
 HTTP GET message now sent to gaia.cs.umass.edu in TCP
  segment, in IP datagram, in Ethernet frame, along hops to
  gaia.cs.umass.edu
 GET arrives! REPLY formulated by http server … and sent




                                                              89

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:3/27/2013
language:English
pages:89