Data link layer && Transport layer
Data link layer: consists of Logic link layer and medium access control. dataframes transmission*,encapsulates network layer data into frmaes. responsible for local delivery of frames between devices on the same LAN. example protocals:Ethernet for local area network(multinodes);PPP, HDLC.
Transport layer:TCP/UDP packets.provides host to host transmission for applications, provides connection oriented and reliable, flow control, multiplexing.
The transport layer is responsible for delivering data to the appropriate application process on the host computers.**
Capacity: max rate you can sent in unit time.
Throughput: data transferred/sent in unit time.
Circuit switching&Packet switching:circuit needs to setup connection, there is overhead and reliable connection based. Packet switching no overhead, with unreliable, connectionless transmission.
Switch && Bridges
Switch transfers single input multi/single output devices, enables large size network. Adds star topology to network.
Property of star topology:1.can build large wtwork by interconnecting several switches together.
2.adding new hosts to network won’t influence performance.s
Switch network is more scalable. While it’s impossible to send packets simutaneously at the same time on the same medium.
Switching/forwarding is main functionality of network layer.
Identify ports by numbering its port or name of nodes which connects to the port.
This switching & forwarding canbe connection or connectionless.
Datagram
Using forwarding table to deal with a datagram, which has enough information to decide where to go.
A host can send a packet anywhere at any time, since any packet that turns up at a switch can be immediately forwarded (assuming a correctly populated forwarding table). For this reason, datagram networks are often called connectionless; this contrasts with the connection-oriented networks described below, in which some connection state needs to be established before the first data packet is sent.
The host doesn’t know anything about dest when it sends out datagram.
Each packets is forwarded independently, and they can follow different path when sent out.
If there is any alternatives to route, failures can be accepted.
Virtual circuit switch
Connection based.
1.connection setup
2.data transfer
1 entry in the VC table contains:1.VCI,2.incoming interface3.outcoing interface4.potential interface
VPN/ATM based on virtual circuits.
Bridges && Switches
LAN switches==bridges for region network.
Ethernet bridges can scale the throughput of network by n.
Issue with switches and bridges
Issues with bridges:scale and heterogenenity;broadcast don’t scale, spanning tree algorithms will expand linearly.
解决方案:VLAN.single LAN partitioned into several seemingly separated LAN.If both segments have same identifier can packets travel from one to another. For heterogenenity, it can only supports network with same address format, with same address header.
优势:transparency.
Learning bridges
Each time bridges will inspect the source address of packets it receive. Has timeout mechanism with each entry in the table. If a frame received with destination address not known, will send to all of other ports.
Spanning tree algorithms
Reason:maybe due to not single administrator, or redundancy on purpose, in case of failure.
Construct a spanning tree in order to avoid cycle graph.
The hard part is how all of the bridges coordinate their decisions to arrive at a single view of the spanning tree. After all, one topology is typically able to be covered by multiple spanning trees.
Dynamic algorithms should some bridge failed will always reconstruct a new spanning tree.
Process:
1.Selects the bridge with the smallest ID as the bridge root. root always transmit through all its port.
2.each bridge computes their shortest path to the root bridge. Record which port is on the path.
3.Finally, all the bridges connected to a given LAN elect a single designated bridge that will be responsible for forwarding frames toward the root bridge. Each LAN’s designated bridge is the one that is closest to the root. 选取一个网桥作为LAN的代表连接到Root节点。(同时有两个网桥连接到同一个LAN才会进行网桥选取,其他时候直接选择连接LAN的路径)
Configuration message:ID of current bridge, distance to root bridge, ID of root bridge.开始每个网桥都认为自己是root,直到收到更好的配置信息,就不再产生配置信息,持续等待其他配置并进行转发,最终稳定态只有一个根节点在持续产生配置信息.
Broadcast && Multicast
Bridges should also be able to support broadcast+multicast. Broadcast is simple, only need to transmit frames on all ports other than the port reveiving this port.
Multicast can be implemented in the same way, except the host should decides whether it will recieve the packets.