Computer networks -- 2008-2009 -- info.uvt.ro/Course 8

From Wikiversity
Jump to navigation Jump to search

Quick links: front; agenda; courses 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; examination.

Important! Please note that the current work serves mainly as general guidance and discussion topics, and is by no means the reference material for the course. For further information please consult the dedicated section.

Ethernet switching[edit]

Switch[edit]

Switch example 1
  • overview:
    • switch;
    • its main purpose is to split collision domains;
    • each device connected to a switch port shall have its own collision domain;
    • it allows building a "forest" of switches;
    • (it can be seen as a multi-port bridge;)
    • the functionality is built in hardware for efficiency;
  • advantages:
    • high bandwidth;
    • low latency;
    • low cost;
    • each port negotiates its transmission mode (10BaseT, 100BaseTX, etc.)
  • disadvantages:
    • it doesn't fragment the broadcast domain;
  • golden rule of Ethernet:
    • the nodes should spend 80% of the time on the local segment (in case of hubs) or near segments;
  • functions:
    • address learning;
    • frame forwarding / filtering;
    • (layer 2) loop detection and avoidance;
  • working principle:
    • forwarding / filter tables;
    • address learning;
  • references:
    • CCNA (Cisco Certified Network Associated Study Guide, 5th edition) -- chapter 7 -- section Switching Services;

STP[edit]

STP example 1
STP example 2
  • overview:
    • STP (Spanning Tree Protocol);
    • in switched networks we might have redundant physical links between switches;
    • also these loops could be accidentally created;
    • the main problem is a broadcast storm (frames that are repeatedly broadcasted by switches);
    • it was first proposed by DEC, and later standardized by IEEE as 802.1d;
    • it uses STA (Spanning Tree Algorithm);
  • functions:
    • creating an image of the physical networking topology;
    • detecting where loops occur;
    • shutting down those some links until no loops exist;
    • bringing up some redundant links when network loses connectivity;
    • (leader election;)
  • working principle:
    • switches exchange packets named BPDU (Bridge Protocol Data Unit);
    • each switch is identified by an unique ID: priority (2 bytes) + MAC (6 bytes);
    • a root bridge must be elected; (by exchanging BPDU messages and choosing the switch with the lowest Identifier);
    • it assigns a types to each switch port:
      • root port (it directly or indirectly connects the current switch and the root switch);
      • designated port (it is part of the tree); which is also a forwarding port;
      • non-designated port (not part of the tree); which is also a blocking port;
    • ports are chosen by the cost;
    • port states:
      • blocked;
      • listening -- accepts only BPDU;
      • learning -- builds an initial filter table;
      • forwarding;
      • disabled;
    • convergence (usually 50 seconds?);
  • references:
    • CCNA (Cisco Certified Network Associated Study Guide, 5th edition) -- chapter 7 -- section Spanning Tree Protocol (STP);

VLAN[edit]

802.1q Frame Format
  • overview:
    • VLAN (Virtual Local Area Network);
    • breaks up broadcast domains at the data-link layer;
    • logical grouping of devices inside the same LAN;
  • working principle:
    • each switch port can be assigned to one VLAN;
    • multiple switches can share the same VLAN's;
    • one port can be simultaneously in multiple VLAN's;
  • advantages:
    • optimizes the bandwidth by reducing broadcasts;
    • eases administration and flexibility of the network;
    • enhances security;
    • allows bandwidth prioritization;
  • observations:
    • even though the devices in different VLAN's are connected to the same switch they can not communicate with each other;
    • there are layer 3 switches that replace the role of routers (at least for inter VLAN routing);
  • membership:
    • static -- when the administrator designates a VLAN to each port;
    • dynamic -- when the administrator designates a VLAN for each device (based on the MAC);
  • link types:
    • active links:
      • the devices connected to them see no VLAN related information inside frames;
      • an active link can be part of only one VLAN;
    • trunk links:
      • information about VLANS is kept;
      • one such port can be in multiple VLAN's at the same time;
      • usually used to interconnect multiple switches that are VLAN enabled;
  • VLAN identification:
    • a 12 bit number (4096 posible VLAN's);
    • the VLAN with identifier 0 means no-vlan;
    • the VLAN with identifier 1 is an administrative VLAN, and should be reserved for such;
    • the last VLAN (0xfff) is reserved for vendor specific use);
    • all other 4094 VLAN's are usable by administrators;
  • working principle:
    • frame tagging;
      • each frame that enters through an active link is tagged with the VLAN identifier;
      • each frame that exits through an active link is stripped of the tag;
      • each frame is forwarded to all trunk links;
    • IEEE 802.1q:
      • in case of Ethernet II frames, a special value (TPID (Tag Protocol Identifier)) is used for the EtherType field;
      • after it 3 bits a priority code (PCP (Priority Code Point));
      • 1 bit which is always 1 (for compatibility purposes);
      • 12 bits for VID (VLAN Identifier);
  • miscellaneous:
    • VTP (VLAN Trunking Protocol):
      • used to manage multiple switches with multiple VLAN's;
      • allows operations (addition, removal, renaming) of VLAN's;
  • references:
    • CCNA (Cisco Certified Network Associated Study Guide, 5th edition) -- chapter 8 -- section VLAN Basics and VLAN Memberships;

IP (part 1)[edit]

Overview[edit]

  • functions:
    • it delivers messages to and from the transport layer, by providing a single interface;
    • handles network interconnections;
    • it decides on which data link to send them (routing);
    • segmentation and reassembly;
    • it handles network congestion;
  • goals:
    • the transport layer should be independent on the routing technology;
    • the transport layer should be shielded from the number, type, and topology of the routers;
    • the network addresses should be uniform across all types of physical networks (LAN, WLAN, etc.);
  • issues:
    • getting one message from the source to the destination may involve multiple hops;
    • we must know the physical topology in order to choose the correct route;
    • congestion;
    • quality of service;

Addressing[edit]

IPv4 address example
  • IP address:
    • a numeric identifier assigned to each host on an IP network;
    • it designates the specific location of a host on the network;
    • it is an a software / logical address (as oposed to the MAC hardware address);
    • it was designed to allow host to host communication that spans over multiple networks with different physical types;
    • it is composed of 4 bytes (for IPv4);
    • it provides about 4.3 billion distinct addresses;
    • it can be seen as a hierarchical addressing scheme;
    • it has two parts: network address and host address;
  • discussion about hierarchical and flat addressing schemes:
    • routing efficiency;
    • routing table sizes;
    • network, subnet, host scheme;
    • comparison with telephony numbering system;
  • types of IP addresses:
    • network address;
    • broadcast address;
    • multicast address;
  • IP address structure:
    • network address:
      • uniquely identifies each network on the Internet;
      • every host on the same network has the same network address;
    • host (node) address:
      • uniquely identifies each node inside a network;
    • the split is based on network classes;

Network classes[edit]

  • overview:
    • multiple classes based on the needed size;
    • split is done based on the leading-bits section;
  • class A:
    • starts with the bit 0;
    • between 0.x.x.x and 127.x.x.x;
    • network.node.node.node;
    • 128 networks (only 126 usable);
    • about 16 million nodes per network;
  • class B:
    • starts with the bits 10;
    • between 128.x.x.x and 191.x.x.x;
    • network.network.node.node;
    • about 16 thousand networks;
    • about 65 thousand nodes per network;
  • class C:
    • starts with the bits 110;
    • between 192.x.x.x and 223.x.x.x;
    • network.network.network.node;
    • about 2 million networks;
    • 256 nodes per network (only 254 usable);
  • class D:
    • starts with 1110;
    • between 224.x.x.x and 239.x.x.x;
  • class E:
    • starts with 1111;
    • between 240.x.x.x and 255.x.x.x;
  • observations:
    • network address space exhaustion;

Subnetting[edit]

  • overview:
    • Subnetwork;
    • it allows us to break a large network address into smaller networks;
    • we take some left-most bits from the host address part and reserve them for a subnetwork address;
  • advantages:
    • reduced network traffic;
    • optimized network performance;
    • simplified management;
    • allows localization of computers;
  • disadvantages:
    • all subnetworks must have the same size;
  • subnet mask, or network mask:
    • used to determine the network and host addresses from the IP address;
    • a 32 bit word in the form 1...10...0 -- only ones followed by only zeros;
    • can be written as x.x.x.x;
  • examples:
    • class A mask: 255.0.0.0;
    • class B mask: 255.255.0.0;
    • class C mask: 255.255.255.0;
  • implementation steps:
    • determining the number of subnetworks;
    • determining the number of hosts for each subnetwork;
    • create network mask -- all the subnetworks will have the same mask;
    • determine the IP address ranges for each subnetwork;

VLSM[edit]

  • overview:
    • VLSM (Variable Length Subnet Masks);
    • CIDR (Classless Inter-Domain Routing);
    • used to split the entire IP address space into blocks;
    • CIDR format x.x.x.x/n -- where n is between 0 and 32 and represents the number of bits that denote the network address part;
    • subnetting implies that all the subnetworks have the same network mask;
    • VLSM offers the possibility for subnetworks to have different network masks;
  • examples:
    • for class A: 10.0.0.0/8;
    • for class B: 172.16.0.0/16;
    • for class C: 192.168.x.0/24;

Special addresses[edit]

  • overview:
    • all 0s -- 0.0.0.0 -- any network;
    • all 1s -- 255.255.255.255 -- any host in the current network -- the global broadcast address;
    • 127.0.0.1 -- local loopback address;
    • network part plus all 0s for host part -- the network's address;
    • network part plus all 1s for host part -- all network's hosts -- the network broadcast address;

Private addresses[edit]

  • overview:
    • for local enterprise use;
    • not routable through the Internet, thus outside the local enterprise network;
    • could be used as a security measure;
    • it goes hand in hand with NAT;
  • addresses:
    • 10.x.x.x -- class A;
    • 172.16.x.x -- class B;
    • 192.168.x.x -- class C;

NAT[edit]

  • overview:
    • NAT (Network Address Translation);
    • used to translate between private and public addresses;
  • terminology:
    • inside (private or local) network -- the network subjected to NAT;
    • outside (public or global) network -- the public networks -- the Internet;
  • working principle:
    • before any packets are frowarded (routed) the private address is transformed into a public one;
  • types:
    • SNAT (Static NAT): one-to-one permanent mapping between a private and a public address;
    • DNAT (Dynamic NAT): just like the Static NAT, but the mapping is done as needed;
    • PAT (Port Address Translation) (or Overloading NAT):
      • maps more than one private address to one public address at the same time;
      • its also known as PAT -- port address translation;
  • references:
    • CCNA (Cisco Certified Network Associated Study Guide, 5th edition) -- chapter 2 -- section Introduction to Network Address Translation (NAT);

The current page is (in almost all parts) a recompilation of the following pages (from previous year):