cs244a-Introduction to Computer Networking-Unit1

Unit 1

学习目标:

  1. how an application use the Internet
  2. The structure of the Internet:The 4 layer model
  3. The Internet protocol(IP)
  4. Basic architectural ideas and principles:
    • Packet switching
    • Layering
    • Encapsulation

1.1 A Day in the life of an Application

  • Dominant model:
    • bidrectional
    • reliable byte stream connection
1. World Wide Web (HTTP)
  • C/S架构
  • 发送commands,接收responses
  • request:"GET / HTTP/1.1"
  • response: "HTTP/1.1 200 OK"
2. BitTorrent
  • P2P架构
  • break files into "pieces"
  • 所有存有pieces file的client被称为swarm,client join and leave swarms
  • tracker追踪swarm的成员,通过torrent file向一个tracker获取swarm中的client列表
  • request: "GET list of clients in swarm"
  • response: "200 OK list of clients"
3. Skype
  • mixed架构
  • 如果两个client能互联,就在client间建立连接--->P2P
  • 如果有一方存在NAT:Client A-----Internet-----NAT---ClientB
    • 由于NAT,B可以连接A,但A无法连接B
    • A cannot open connection to B
    • B在一个Rendezvous上注册,A向Rendezvous发送请求,Rendezvous转发请求给B,B主动和A建立连接
  • 双方均存在NAT
    • 通过一个Relay转发服务器作为中转,转发双方的消息

1.2 What the Internet is: The 4 Layer Internet Model

  1. Application:(http, bit-torrent)
    • application-specific semantics
  2. Transport:(tcp, udp)
    • guarantees correct, in-order delivery of data end-to-end
    • controls congestion
  3. Network:(IP)
    • must use the Internet Protocol(IP)
    • best-effort attempt to deliver datagrams, no promises
    • IP datagrams can get lost, out of order, and can be corrupted
  4. Link:(802.11, 3G, DSL, Ethernet)
    • one-hop control
    • delivers data over a single link between an end host and router, or between routers

two extra things need to know:

  1. IP is the "thin waist"
  2. the 7-layer OSI Model
    • Application------http--------Application----7
    • Application------ASCII-----Presentation--6
    • Transport--------TCP-------Session--------5
    • Transport--------TCP-------Transport------4
    • Network----------IP----------Network--------3
    • Link---------------Ethernet----Link------------2
    • Link---------------Ethernet----Physical------1

1.3 What the Internet is: The IP service model

  1. The Internet Protocol(IP)
    • Transport Segment
    • IP Datagram
    • Link Frame
  2. The IP service Model

    Property Behavior
    Datagram Hop by hop routing
    Unreliable Packets might be dropped because of full wait queue
    Best effort
    Connectionless No per-flow state. Might be mis-sequenced
  3. why simple?
    • faster, more streamlined and lower cost to build and maintain
    • The end-to-end principle: implement features in the end hosts if possible
    • Allows a variety of reliable(or not) services to be built on top
    • Works over any link layer: IP makes very few assumptions about the link layer below
  4. The IP service model
    1. Tries to prevent packets looping forever(TTL, time to live)
    2. Will fragment packets if they are too long
    3. Uses a header checksum to reduce chances of delivering datagram to wrong destination
    4. Allows for new versions of IP
      • IPv4: 32 bit
      • IPv6: 128 bit
    5. Allows for new options to be added to header

Quiz:
In an alternative to the Internet Protocol called "ATM" proposed in the 1990s, the source and destination address is replaced by a unique "flow" identifier that is dynamically created for each new end-to-end communication. Before the communication starts, the flow identifier is added to each router along the path, to indicate the next hop, and then removed when the communication is over. Which of the following statements are implications of this design? Check all that apply.

  1. (+)There is state in the network for every communication flow, rather than just for every destination.
  2. (-)If a link fails, there is no need to update any state in the network.
  3. (-)There must be a centralized controller to manage the insertion and removal of identifiers, as well as update them whenever a flow needs to be re-routed.
  4. (-)It means we no longer need a transport layer to reliably deliver correct, in-order data to applications.

猜你喜欢

转载自www.cnblogs.com/Willendless/p/11846158.html