vendredi 21 septembre 2012

CCNA - Internetworking


Introduction to Internetwork

Breaking up a big network into a number of smaller is called network segmentation, we can do this by using devices like routers, switches, and bridges.
Each segment plugged to a switch is a separate collision domain, doing this increase bandwidth for users.
Hub didn't segment a network, just plugs network segment together. Their using can contribute to congestion on Ethernet network.
Routers create interwork (break up a broadcast domain -- the set of all devices on a segment that hear all the broadcasts sent on that segment).
Routers uses serial interface for WAN connections, V.35 physical interface on a Cisco router.
Routers main functions are packet switching, packet filtering, Internetwork communication, path selection.
Broadcast domain number is equal to the router's connection.
Collision domain number is the sum of all connection of the switches, (connection between switches are considered a collision domain).


Internetworking Models

The OSI Reference Manual

The OSI has seven different layers, divided into two groups. The top three layers define how the applications within the end stations will communicate with each other and with the users. The bottom four defines how data is transmitted end to end.

  1. Application Layer: Application layer is acting as an interface between the actual application program (which isn't a part of the layered structure) and the next layer down, by providing ways for the application to send information down through the protocol stack. It's also responsible for identifying and establishing the availability of the intended communication partner and determining whether sufficient ressources for the intended communication exist.
  2. Presentation Layer: It present data to the Application layer, and is responsible for data translation and code formatting, data compression, decompression, encryption, and some multimedia operations.
  3. Session Layer: It is responsible for setting up, managing sessions between Presentation layer entities. It provides dialog control between devices, coordinate communication between systems and servers to organize their communication by offering different mode: simplex, half duplex, full duplex. 
  4. Transport Layer: It segments and reassembles data, provides end-to-end data transport services and can establish a logical connection on an internetwork. 
    1. Flow Control: It ensures data integrity, prevents from overflowing the buffers in the receiving host, employs a connection-oriented communications session between systems, and the protocols involved, ensure: 
      - The delivered segment is ack back.
      - Any segment not ack is retransmitted.
      - Segments are sequenced back into their proper order at destination.
      - Manageable data flow is maintained to avoid congestion, overloading, loss
    2. Connection-Oriented Communication: The transmitting device first establishes a connection-oriented session with its peer system, called call setup, three-way handshake. Then, data is transferred. Finally, a call termination tears down the virtual circuit.
      The steps of the three-way handshake are:
      - Request for Synchronization from the sender.
      - Acknowledge and connection parameters (rules) setting so that a bidirectional connection is formed.
      - Acknowledgment by the sender.
      But problems can occurs, the transport can issue a not ready indicator to the sender for avoiding dumping resources and allowing data to be lost. After processing the segments on memory, the receiver can send ready transport indicator.
      A service is considered connection-oriented if it uses:
       - Virtual circuit,
       - Sequencing,
       - Acknowledgments,
       - Flow control.
    3. Windowing: The quantity of data segments (in bytes) that the transmitting machine is allowed to send without receiving an acknowledgment for them is called a window.
    4. Acknowledgments: Positive acknowledgment with retransmission requires a receiver to send an acknowledgment message back to the sender when receiving data. When sending, the sender starts a timer and retransmits if it expires before getting ack.
  5. Network Layer: It manages device addressing, tracking the location of devices on the network, and determines the best way to move data. Routing services are provided by the router. When a router receives a packet, it check if not the IP address is his one, else he redirected to the appropriate entry, else it drop the packet when not able to find entry. Two types of packets are received by the router:
     - Data packets: used to transport user data. Protocols used to support data traffic are called routed protocols, like IP, IPv6.
     - Route update packets: Used to update neighbouring routers about the network connected to all routers within the internet work. Protocols that send update packet are called routing protocols, like RIP, RIPv2, EIGRP, and OSPF.
    1. Network address: Protocol-specific network address. A router must maintain a routing table for individual routing protocols because each one keeps track of network with a different addressing scheme (IP, IPv6, IPX).
    2. Interface: The exit interface token by a packet destinated to a specific network.
    3. Metric (e.g. The distance of the remote network): Some routing protocols (namely RIP) use hop count (number of router to pass through to the remote network), while others use bandwidth, delay of the line, ...
  6. Data Link layer: It provides the physical transmission of the data and handles error notification, network topology, and flow control. It formats the data into data frame. Routers are only concerned about finding the best way to reach network, it's the Data Link layer responsibility for the actual unique identification of each device residing on a local network.
    The packet itself isn't altered along the route; it's only encapsulated with the type of control information with the type of control information required for it to be properly passed on to the different media types.
    1. Data Link sub-layers: The IEEE Ethernet Data Link layer has two sub-layers.
       - Media Access Control (MAC) 802.3 : defines how packets are placed on the media. Media access is first come/first served everyone shares the same bandwidth. Physical addressing is defined here, as well as logical topology (the signal path through a physical topology).
       - Logical Link Control (LLC) 802.2 : responsible for identifying Network layer protocols and then encapsulating them with an LLC header. This one will tell the Data Link layer what to do with a packet once a frame is received.
    2. Switches and Bridges at the Data Link Layer: Layer 2 switching is based on hardware called application-specific integrated circuit (ASIC), which run up to gigabit speeds with very low latency.
      Latency is the time between the entry of the frame from a port to its exit from a port.
      Bridges and switches put the source hardware address in a filter table and keeps track of which port the frame was received. After building the filter table, if the address of the incoming frame is the same of the destination, the frame is blocked. If the destination is on a different segment, the frame is transmitted to only that segment. This is called transparent bridging. If the destination isn't found, the frame will be forwarded to every plugged segment, if the destination responds; the filter table will be updated by its location. If the frame has a broadcast address, then it'll be forwarded to each segment.
    3. Binary to Decimal and Hexadecimal Conversion: nibble is 4 bits, bytes is 8 bits.
  7. Physical Layer: This layer is where identifying the interface between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE). DCE is located at the service provider, while DTE is the attached device. The services available to the DTE are most often accessed via a modem or channel service unit/data service unit (CSU/DSU).

Ethernet Networking

When a collision occurs on an Ethernet LAN, the following happens:

  • A jam signal informs all devices that a collision occurred.
  • The collision invokes a random back-off algorithm.
  • Each device stops transmitting until the timers expire.
  • All hosts have equal priority to transmit after the timers have expired.

Half- and Full-Duplex Ethernet

Half-duplex Ethernet is defined in the original 802.3 Ethernet; Cisco says it uses only one wire pair with a digital signal running in both directions on the wire. It uses CSMA/CD. If a hub is attached to a switch, it must operate in half-duplex mode because the end stations must be able to detect collisions.
Full-duplex Ethernet uses two pairs of wires, a point-to-point connection. Because the transmitted data is sent on a different set of wires than the received data, no collisions will occur. It supposes to offer 100 percent efficiency in both directions. For example, you can get 20Mbps with 10Mbps Ethernet running full duplex. It can be used with a connection:
  • From a switch to a host;
  • From a switch to a switch;
  • From a host to host using a crossover cable.

You can run a full-duplex with just about any device except a hub.
When a full-duplex Ethernet port is powered on, it first connects to the remote end and then negotiates with other end using auto-detect mechanism, which decides on the exchange capability (checks if it can run on 10 or 100Mbps, if it can run on full duplex).

Ethernet at the Data Link Layer


1. Ethernet Addressing

It uses the Media Access Control (MAC) address burned into each Ethernet network interface card (NIC). The MAC is 48-bits, the right 24-bits is assigned to the vendor, the left ones,

  • Begin by an Individual/Group (I/G) bit, when it is 0 (the MAC is a device address), when it is 1, the MAC represent a broadcast or multicast address in Ethernet, or broadcast or functional address in TR and FDDI.
  • The next bit global/local (G/L or U/L for Universal) when it is 0 represents a globally administrated address, when it's 1 it represent a locally governed and administrated address.
  • The lower bits: the Organizationally Unique Identifier (OUI) is assigned by the IEEE to an organization.

2. Ethernet Frames
Frames are used to encapsulate packets from Network layer.
The different field of the 802.3 and Ethernet frame are:
  • Preamble : 8-bytes, is a sequence of 0,1 bits. The last byte Start Frame Delimiter (SFD)/Synch is 10101011 to determine the data beginning. 
  • Destination Address (DA): 48-bits length.
  • Source Destination (SA) : 48-bits length.
  • Length or type: 802.3 use a Length field and can't identify the Network layer protocol (must be used in proprietary LAN, eg: IPX). Ethernet use Type field to identify the Network layer protocol.
  • Data: from 64 to 1500 bytes.
  • Frame Check Sequence (FCS) used to store CRC and detect errors.

3. Ethernet at the Physical Layer
The IEEE extended the 802.3 Committee (created from the DIX specification: Ethernet 10Mbps) to 802.3u (Fast Ethernet) and 802.3ab (Gigabit Ethernet on category 5), and finally 802.3ae (10Gbps over fibber and coax).
Here are the original IEEE 802.3 standards:
  • 10Base2: 10Mbps, baseband technology (signalling method for communication on the network), up to 185 meters in length, AUI (Attachment Unit Interface) connector.
  • 10Base5: 10Mbps, baseband technology, 500 meters, AUI connector.
  • 10BaseT: 10Mbps using category 3 UTP, each device must connect into a hub or switch, one host per segment. It uses RJ45 connector.
  • 100BaseTX (IEEE 802.3u): EIA/TIA category 5, 6 or 7 UTP two-pair wiring, one user per segment up to 100m, RJ45 connector, physical star topology.
  • 100BaseFX (IEEE 802.3u): fibber cabling 62.5/125 micron multimode fibber, point-to-point topology up to 412m. It uses ST or SC connector. 
  • 1000BaseCX (IEEE 802.3z): Copper twisted-pair called twinax (balanced coaxial pair), 25m.
  • 1000BaseT (IEEE 802.3ab)
  • 1000BaseSX (IEEE 802.3z)
  • 1000BaseLX (IEEE 802.3z)

Ethernet Cabling

Three types of Ethernet cables are available.

1. Straight-Through Cable

It’s used to connect a Host to switch or hub, Router to switch or hub.
Four wires are used in this cable, only the pins 1, 2, 3, and 6.
          1 ---------------- 1
          2 ---------------- 2
          3 ---------------- 3 
          6 ---------------- 6

2. Crossover Cable

It is used to connect Switch to switch, hub to hub, host to host, hub to switch, Router direct to host. The same wires are used in this cable.
          1 ---------------- 3
          2 ---------------- 6
          3 ---------------- 1
          6 ---------------- 2

3. Rolled Cable

This cable isn't used to connect Ethernet connections, but to connect a host to a router console serial communication (com) port. Eight wires are used in this cable to connect serial devices.
          1 ---------------- 8
          2 ---------------- 7
          3 ---------------- 6
          4 ---------------- 5
          5 ---------------- 4
          6 ---------------- 3
          7 ---------------- 2
          8 ---------------- 1

5. Data Encapsulation 

The Cisco Three-Layer Hierarchical Model

Hierarchy helps us discern where we should go to get what we need.
Cisco defines three layers (logical layers) of hierarchy:
  • The core layer: backbone.
  • The distribution layer: routing.
  • The access layer      : switching.

1. The Core layer

At the top of the hierarchy, it's responsible for transporting large amounts of traffic both reliably and quickly (as fast as possible).

2. The Distribution Layer

Referred to as the workgroup layer. Its primary function is to provide routing, filtering, and WAN access and to determine how packets can access the core, if needed. It's the place where to implement policies for the network.

3. The Access Layer

Referred as the desktop layer. It controls user and workgroup access to internet-work resources. The network resources most users need will be available locally. The distribution layer handles any traffic for remote services. Some functions are:
  • Continued (from distribution layer) use of access control and policies.
  • Creation of separate collision domains (segmentation).
  • Workgroup connectivity into the distribution layer.


Aucun commentaire:

Enregistrer un commentaire