学习笔记(1)Stanford CS144 Introducti
2020-02-03 本文已影响0人
官子寒
1. Network Application
1.1 Bidirectional Byte Stream Model
Byte Stream Model- A/B can write&send the message that B/A can read
- A/B can close the connection
1.2 Word Wide Web
Word Wide Web(HTTP)- Different kinds of request: GET, POST, DELETE and etc.
- send commands to the SERVER
- HTTP is document-centric, so clients requests name a file
- all in ASCII
1.3 BitTorrent
BitTorrent- P2P transmission
- Swarms: collections of clients
- Get torrent file: describes the download information and tells who the tracker is
- Tracker keeps track with the name of the clients in the swarm
- when a new client join in, it will connect to other clients and other clients will be notified
1.4 Skype
Skype Skype with NAT- NAT: client behind NAT can connect to other clients while the reverse is not the same
- personal computers are ways behind the NAT while public servers are not
- reverse connection: A wants to connect to B, but B opens connection with A
- Rendezvous
2.The 4 Layer of Internet Model
Link- packet: the information that is to be transmitted
- router and link
- eg: WIFI and Ethernet
- packet is the building block of the layer
- provides a service to the Link Layer
- must use Internet Protocol (IP)
- helps the information transmitted in order
- in some cases, data don't need to be transmitted in order: video conference
IP: the thins waist of Internet
3. The IP Service
Network Layer Datagram- IP sends the data based on IP header (IP DA and IP SA)
- hop-by-hop routing
Why IP is so simple?
- To keep the network simple, dumb and minimal
- End-to-end principle: implement the features in the end hosts
- Allows a variety of reliable (or unreliable) services to be built on top
- requires very few assumptions of the link layer below
4. Life of a packet
three-way handshake- Sync: C -> S
- Sync/ Ack: S -> C
- Ack: C -> S
- see which pattern matches the pattern of the packet
- default: most useful
5. Principle: Layering
Layering Example: Postal Service Example: Computer SystemReasons for Layering:
- Modularity
- Well defined Service
- Reuse
- Separation of Concerns
- Continuous Improvement
6. Principle: Encapsulation
- Layer N data is payload to Layer N - 1
- eg: IP encapsulated TCP
7. Network Byte Order
Big endian
Little endian
8. IPv4 Addresses
8.1 Goal of Internet ProtocolAddresses
- stitch many different networks together
- Need network-independent, unique address
网络配置的四大基本要素: IP + Netmask + Gateway + DNS
8.2 Net Mask
Net Mask9. Longest Prefix Matching
Longest Prefix Matching Quiz10. ARP
Introduction to Computer Networking学习笔记(五):ARP协议(Address Resolution Protocol)