Skip to content

Instantly share code, notes, and snippets.

@aneesh-joshi
Created February 19, 2019 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aneesh-joshi/9fac81a31f47db39abed54a28af41d07 to your computer and use it in GitHub Desktop.
Save aneesh-joshi/9fac81a31f47db39abed54a28af41d07 to your computer and use it in GitHub Desktop.
  • broadly speaking there are three classes of multiple access protocols:

    • channel partitioning (including CDMA)
    • random access
    • taking turns
  • This random access protocol is referred to as CSMA with collision avoidance, or more succinctly as CSMA/CA. As with Ethernet’s CSMA/CD, the “CSMA” in CSMA/CA stands for “carrier sense multiple access,” meaning that each station senses the channel before transmitting, and refrains from transmitting when the channel is sensed busy

  • CSMA/CA(802.11) vs CDMA(Ethernet???)

    • Collision avoidance vs collision detection
    • senses before transmitting vs transmits as soon as channel is sensed to be idle
    • link layer based ack
  • 802.11 MAC protocol does not implement collision detection because:

    • costly to build hardware that can detect collisions
    • even if hardware built, it couldn't recognize all collisions due to hidden terminal problem and fading
  • when the destination station receives a frame that passes the CRC, it waits a short period of time known as the Short Inter-frame Spacing (SIFS) and then sends back an acknowledgment frame.

  • DIFS : Distributed Inter Frame Space SIFS : Short Inter Frame Space CTS : Clear To Send

  • The CSMA/CA can fail when:

    • random backoff can be close enough that the first one's transmission doesn't reach the second one before it starts transmitting
    • the two networks could be hidden from each other
  • Normal CSMA protocol:

    1. if the channel is initially idle, it waits a DIFS period of time
    2. if it isn't idle, it backsoff a random amount of time using binary exponentiation backsoff. Timer only ticks when the medium is idle
    3. when the timer rings and the medium is idle, the station closes its ears and transmits the whole frame no matter what and then waits for an acknowledgment
    4. if ack received, move on. Else go to step 2.
  • CSMA with hidden terminals:

    • sender waits dfs and send RTS to AP
    • AP waits SIFS and sends CTS to all stations
    • sender waits SIFS and sends data while others defer their access till ACK
    • After data is transferred, AP waits SIFS and transfers ACK to all stations
  • RTS CTS good cuz:

    • RTS CTS are small enough that collisions are ok
    • hidden station problem is mitigated

Virtual Circuits

  • Computer networks that provide only a connection service at the network layer are called virtual-circuit (VC) networks; computer networks that provide only a connectionless service at the network layer are called datagram networks.

  • A VC consists of :

    1. a path (that is, a series of links and routers) between the source and destination hosts
    2. VC numbers, one number for each link along the path, and
    3. entries in the forwarding table in each router along the path
  • Why are the VC links different:

    1. putting different ones from link to link reduces the range of VC numbers
    2. It's difficult to agree on one VC number
  • Difference between VC at network layer and connection oriented TCP at Transport Layer: a VC network layer, routers along the path between the two end systems are involved in VC setup, and each router is fully aware of all the VCs passing through it.

  • Nomenclature:

    • Application : packets
    • Transport : segment
    • Network : datagram
    • Data Link: frame

VLANs

  • Problems that VLANs address:

    • Lack of traffic isolation needed for:
      • security
      • not congesting the network
    • Inefficient use of switches
    • Managing users (if an employee moves between groups, cabling will have to be changed)
  • VLANs allows multiple virtual local area networks to be defined over a single physical local area network infrastructure. Hosts within a VLAN communicate with each other as if they (and no other hosts) were connected to the switch.

  • VLAN trunking: In the VLAN trunking approach shown in Figure 5.26(b), a special port on each switch (port 16 on the left switch and port 1 on the right switch) is configured as a trunk port to interconnect the two VLAN switches. The trunk port belongs to all VLANs, and frames sent to any VLAN are forwarded over the trunk link to the other switch. BUT: how does the switch know which VLAN the frame belongs to? The switch updates the frame with an additional field of VLAN group. This is removed at the receiving end of the trunk.

Inter and Intra AS routing

  • Intra-AS routing protocols are also known as interior gateway protocols. Eg: RIP, OSPF, ISIS
  • OSPF is a link-state protocol that uses flooding of link-state information and a Dijkstra least-cost path algorithm. - OSPF creates a complete topological graph of the entire network With OSPF, a router broadcasts routing information to all other routers in the autonomous system, not just to its neighboring routers. A router broadcasts linkstate information whenever there is a change in a link’s state (for example, a change in cost or a change in up/down status). It also broadcasts a link’s state periodically (at least once every 30 minutes), even if the link’s state has not changed.
  • Advances embodied by OSPF:
    • Security: Exchanges between OSPF routers can be authenticated. Prevents malicious intruders from injecting incorrect information into the routing table.
    • Multiple same cost paths: When multiple paths to a destination have the same cost, OSPF allows multiple paths to be used
    • Integrated support for unicast and multicast
    • Support for hierarchy within a single routing domain: Perhaps the most significant advance in OSPF is the ability to structure an autonomous system hierarchically
  • An OSPF autonomous system can be configured hierarchically into areas. Each area runs its own OSPF link-state routing algorithm, with each router in an area broadcasting its link state to all other routers in that area. Within each area, one or more area border routers are responsible for routing packets outside the area. Lastly, exactly one OSPF area in the AS is configured to be the backbone area.

Multiple Access Links and Protocols

  • TDM : Time Division Multiplexing FDM : Frequency Division Multiplexing

  • There are two types of network links:

    • point-to-point link: single sender at one end and single receiver at the other end. Eg: PPP, HDLC
    • broadcast link: can have multiple sending and receiving nodes all connected to the same, shared, single broadcast channel. Eg: Ethernet and Wireless LAN
  • the multiple access problem: how to coordinate the access of multiple sending and receiving nodes to a shared broadcast channel

  • we can classify any multiple access protocol as belonging to one of three categories:

    • channel partitioning protocols
    • random access protocols
  • A circuit in a link is implemented with either:

    • FDM: the frequency spectrum of a link is divided up among the connections established across the link.
    • TDM: time is divided into frames of fixed duration, and each frame is divided into a fixed number of time slots. When the network establishes a connection across a link, the network dedicates one time slot in every frame to this connection. These slots are dedicated for the sole use of that connection, with one time slot available for use (in every frame) to transmit the connection’s data.
  • Packet Switching vs Circuit Switching:

    • Packet switching not good for real time services because of its variable and unpredictable end-to-end delays.
    • Packet switching:
      • offers better sharing of transmission capacity
      • simpler
      • more efficient
      • less costly compared to circuit swithcing
  • Drawback fo TDM:

    • reduced bandwidth even when it's the only node
    • long wait even when it's the only node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment