# Week1 計網概筆記 * Switched network (交換網路) : connect by switches, and the topology of switched network is not limit, but the packets are delivered along the spanning tree. * Interconnected network (互聯網路) : connect by routers, and the packets are delivered by routing protocols. * Multiplexing (多工) : a switch transmits multiple datagram over a single link. * FDM: **Frequency** Division Multiplexing. * TDM: **Time** Division Multiplexing. * Statistical Multiplexing: based on demand of each flow, **FIFO** (first-in-first-out), **Round-Robin** (循環) , **Priority**. * Protocols: * Peer-to-peer interface: exchange messages between the same layer of peers. * Service interface: service provide to the higher layer of protocols. * Protocol Specification(協議規格): pseudo-code, state transition diagram, message format. * Encapsulation: the higher layers of protocol will add header to the data so that the peer can read it. * 7-layers of internet: application->presention->session->transport->network->data link->physical. * Physical layer * transmission data over a communication link. * Coaxial cable: 10base5, 10base2. * Twisted cable: 10baseT. * Optical fiber * Power line * Air space * Different signal coding schemes. * send clk and data so that receiver can read the data correctly. * Data Link layer * transmit a frame to a directly connected host, based on only **mac address**. (p2p, multiple access) * switch * bridge * MAC (Multiple Access Control Protocol) * CSMA/CD (ethernet) * CSMA/CA (wireless lan) * Network layer * transmit packets (data in this layer called packet) to a host via internet * router will check **routing table** and **condition of internet** to deliver packet, and if the packet larger than the limit, router will fragment the packet. * IP protocol * router just check **ip address**. * Transport layer * transmit message (data in this layer called message) from **host to host**. * TCP (reliable) * UDP (unreliable)