Computer networks -- 2007-2008 -- info.uvt.ro/Course 5

From Wikiversity
Important! These pages are somehow outdated and it is recommended to consult the newer version at Computer networks -- 2008-2009 -- info.uvt.ro (by Ciprian Crăciun).

Quick links:


CSMA/CD[edit]

  • CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection;
  • it is a protocol that allows multiple devices to communicate over a shared medium;
  • collision happens when two devices transmit at the same time;
  • functions:
    • it shares the bandwidth evenly;
    • it forbids two devices to transmit at the same time;
    • its main focus is collision detection;
  • working principle:
    • when a device wants to transmit it checks if someone transmits; (if this happens it will wait;)
    • if no one transmits, it will start to transmit;
    • but as it transmits it will also check to see if no one else is already transmiting;
    • if it detects another signal it sends a jam signal and tries to send again;
    • any node that receives the jam signal will wait a period of time before retrying;
  • collision domain: all the devices connected to the shared medium;

Ethernet[edit]

  • the most used data (and physical) link layer protocol in LANs;
  • advantages:
    • highly scalable;
    • easy to integrate with new technologies (like Fast Ethernet or Gigabit Ethernet);
    • simple to implement;
  • IEEE 802 -- standards for LANs and MANs:
    • IEEE 802.3 -- Ethernet;
    • IEEE 802.11 -- Wireless;
    • IEEE 802.15 -- Bluetooth;
  • the specifications cover both the physical and data link layers;
  • it uses the CSMA/CD protocol;
  • it could be seen as a best-effort datagram service;

Ethernet at the physical layer[edit]

  • transmission modes:
    • half-duplex:
      • it uses only a wire pair, and the signal goes in both ways (each having its turn);
      • it shares the bandwidth;
      • in case of shared media we can use token ring in order to establish who can communicate at each time;
    • full-duplex:
      • it uses two wire pairs, each pair acting like a half-duplex channel, but the data flows in only one way;
      • it requires a point-to-point connection with only two devices present:
        • switch to device;
        • switch to switch;
        • device to device;
      • not usable in shared-media cases (like in case of hubs);
      • no collision occures;
      • the bandwidth is 100% in each direction (thus in the case of 100BaseTX we could have in total 200Mbps bandwidth);
    • the transmission mode is established by a negotiation between devices;
  • types:
    • type -- cabling -- maximum length -- maximum nodes per segment;
    • 10Base2 -- thin coaxial cable -- 185 m -- 30 nodes;
    • 10Base5 -- thick coaxial cable -- max 500 m -- max 100 nodes;
    • 10BaseT -- twisted pair -- 100 m -- 1024 nodes -- category 3 UTP;
    • 10BaseF -- fiber optics -- 2000 m -- 1024 nodes;
    • 100BaseT4 -- twisted pair -- 100 m -- category 3 UTP;
    • 100BaseTX -- twisted pair -- 100 m -- full duplex -- category 5, 6, or 7 UTP;
    • 100BaseFX -- fiber optics -- 412 m -- full duplex;
    • 1000BaseSX -- fiber optics -- 550 m -- multi-mode;
    • 1000BaseLX -- fiber optics -- 3000 m - 10000 m -- single-mode or multi-mode;
    • 1000BaseCX -- 2 pairs of STP -- 25 m;
    • 1000BaseT -- 4 pairs of UTP -- 100 m -- category 5 UTP;
  • cable types:
    • straight-through: host to switch or hub;
    • crossover: switch to switch; hub to hub; hub to switch; host to host;

Ethernet at the data link layer[edit]

  • functions:
    • it is concerned with addressing;
    • framing packets from the network layer;
  • it uses:
    • MAC addresses;
    • frames;

Ethernet addressing[edit]

  • it uses the already existing MAC -- Media Access Control address;
  • the address is burned-in into the network interface card -- NIC;
  • it has 48 bits -- 6 bytes;
  • structure:
    • organizationally unique identifier -- OUI -- 24 bit:
      • first bit -- individual / group bit:
        • 0 means individual;
        • 1 means group => broadcast;
      • second bit -- global / local address bit;
        • 0 -- global;
        • 1 -- local;

Ethernet frame[edit]

  • types of media access methods:
    • contention -- Ethernet;
    • token passing -- Token Ring and FDDI;
    • polling;
  • types of frames:
    • Ethernet II;
    • IEEE 802.3;
    • IEEE 802.2;
    • SNAP;
  • frames provide information about:
    • addressing;
    • error detection -- CRC;
  • frame:
    • preamble -- 8 bytes of 10101010;
    • DA -- destination address -- 6 bytes;
      • 0 as high order bit is for ordinary address;
      • 1 as high order bit is for group addresses;
      • the second high order bit determines if the address is globally unique or not;
      • LSB -- Least Significant Bit -- first; (or little endian;)
    • SA -- source address:
      • like DA;
      • no broadcast or multicast addresses allowed;
    • length:
      • at least 64 bytes and at most 1500;
      • Ethernet frames used this field as type indicator;
    • payload -- 64 to 1500 bytes; (jumbo frames;)
    • padding;
    • FCS -- frame check sequence:
      • 32 bits CRC;
      • used to detect errors;

Ethernet switching[edit]

  • domains:
    • collision domains;
    • broadcast domains;
  • network segmentation;
  • hardware:
    • hubs;
    • bridge;
    • switch;
    • repeater;
    • router -- layer 3 device;
  • switching:
    • it breaks the collision domain;
    • either by using bridges or switches;
    • a bridge connects two collision domains, thus only 2 ports -- for example two hubs;
    • a switch connects multiple collision domains, so multiple ports;
    • a switch is a multi-port bridge;
    • advantages:
      • high bandwidth;
      • low latency;
      • low cost;
      • flexible aproach by combining multiple topologies;
    • disadvantages:
      • golden rule: the nodes should spend 80% of the time on the local segment (in case of hubs) or near segments;
      • it does not break the broadcast domain;
  • switch:
    • functions:
      • address learning;
      • forward and filter decisions;
      • loop detection and avoidance;
    • filter tables:
    • address learning and forward filtering decisions:
      • first time discovery;
      • based upon frame source addresses;
    • network loops:
      • redundant physical links;
      • STP -- Spanning Tree Protocol;
  • miscellaneous issues:
    • promiscuous mode;
    • broadcast storm;
    • MAC flooding;
    • ARP spoofing;
    • VLAN;

STP[edit]

  • versions:
    • original developed by DEC;
    • IEEE 802.1d;
  • functions:
    • detect and remove the network loops at layer 2;
    • as a result it eliminates broadcast storms and multiple frame copies;
  • working principle:
    • it monitors the network to detect loops;
    • it shuts down any redundant links;
    • it uses STA -- Spanning Tree Algorithm;
    • it creates an inital layout;
    • it updates the layout according to the network dynamics;
  • terminology:
    • BDPU -- Bridge Protocol Data Unit -- packet exchanged by one bridge with its neighbors;
    • bridge ID:
      • identifies uniquely all the bridges on the network;
      • 8 bytes -- priority 2 bytes + MAC 6 bytes;
    • root bridge -- it takes all the decisions on a network -- the bridge with the lowest bridge ID;
    • non-root bridge;
    • root port -- the port connected directly to the root bridge, or the port on the shortest path to the root bridge;
      • in case of equal path length the one with the maximum bandwidth is chosen;
    • designated port;
    • nondesignated port -- blocked;
    • forwarding port;
    • blocket port;
    • port cost -- based on the bandwidth:
      • 2 for 10 Gbps;
      • 4 for 1 Gbps;
      • 19 for 100 Mbps;
      • 100 for 10 Mbps;
  • operations:
    • selecting the root bridge;
    • selecting the root port:
      • the cumulative port cost to the root bridge is computed;
      • the port with the lowest port cost is choosen;
  • port states:
    • blocking -- no forwarding, only BDPU listening;
    • listening -- listens for BDPU, preparing forwarding, no MAC table building;
    • learning -- listens for BDPU, no forwarding, MAC table building;
    • forwarding;
    • disabled -- outside the scope of the STP;
  • convergence:
    • it occures when all the ports have transitioned in either forwarding or blocking modes;
    • it usually takes about 50 seconds;
  • STP poem:
    I think that I shall never see
    A graph more lovely than a tree.
    A tree whose crucial property
    Is loop-free connectivity.
    A tree which must be sure to span
    So packets can reach every LAN.
    First the Root must be selected
    By ID it is elected.
    Least cost paths from Root are traced
    In the tree these paths are placed.
    A mesh is made by folks like me
    Then bridges find a spanning tree.

VLAN[edit]

  • VLAN -- Virtual Local Area Network;
  • functions:
    • break broadcast domain;
    • allows logigal grouping of nodes that spans over multiple switches;
  • advantages:
    • security improvement;
    • allows better control of the network;
    • flexibility;
    • security;
    • reduces the broadcast traffic;
  • VLAN membership:
    • static VLAN -- when the administrator designates a VLAN to each port;
    • dynamic VLAN -- when the administrator designates a VLAN for each device (based on the MAC);
    • security concernes;
  • link types in a VLAN environment:
    • access links: just like a normal Ethernet link, no VLAN information in the frame;
    • trunk links:
      • VLAN specific and can carry data for multiple VLANs;
      • it allows a port to be part of multiple VLANs;
  • frame tagging:
    • IEEE 802.1q;
  • miscellaneous:
    • the purpose of routers;
    • VTP -- VLAN Trunking Protocol;

Network diagrams[edit]