October 15, 1998


Physical Layer:
Let's look at ethernet:

Ethernet supports a branching bus topology and uses a CSMA-CD (Carrier Sense, Multiple Access with Collision Detection) at the hardware level.

A branching technology means there is no loops; only one way for a packet to travel.

CSMA-CD is like a polite dinner party; no one interrupts each other. If two computers start talking at the same time, they both stop, wait a bit and then one of them starts talking.

The delay is somewhat random;
    If collision
                if attempt is between 0 an 10
                        delay 51.2 micro-seconds times a random number
                        between 0 and (2^n - 1)
                if attempt is between 11 and 15
                        delay 51.2 micro-seconds times a random number
                        between 0 and 1023
                if attempt is above 15, give up

(Note: 51.2 microseconds is time required to transmit 512 bits).

            network cable (terminated at each end)
            a connection to that cable for each host on the net

            Each connection requires a tap, a tranceiver, a drop cable, and a ethernet board

Tap                 makes connection to cable
Transceiver     relays signals on cable to ethernet board through drop cable.

  Network cable:
         .5" co-axel cable.
            - often called 10base5 ("thick")
         .25" co-axel cable with BNC connectors.
            - often called 10base2 ("thin")
         twisted pair
            - called 10baseT

10base5 cable:

  • The term 10base5 means "10 megabits/sec, baseband cable, 500 meters max length".
  • So, 10base2 means 10 megabit/sec, baseband cable, 200 meters max length"
  • 10base-T indicates twisted pair cable
  • 10base-F is fiber
  • 10base5 cable:

    10base2 cable: Terminators, connectors, and adapters:

    Tranceivers and Taps:
                Tranceiver:  connects a drop cable to network cable
                                   no external power needed
                                   takes power from interface board
                Tap:             connects tranceiver to network cable


              []==[   ]=============================================[]==========[    ]==[]
      terminatar  | ^--transceiver        ^--wire                terminator                                                           terminator
                      R  <- repeater

    10base-T systems use concentrators (or "hubs") to make up the network.

                  |                                                                                     |
                  |  RJ-45       RJ-45       RJ-45        RJ-45     RJ-45         |
                  |   jack        jack            jack         jack         jack            |
                  |                                                                                     |

    Note:  Repeaters can be used to combine  10-base5, 10base2, and 10base-T segments together!

    The Ethernet Protocol 802.3

        The 802.3 packet:
    bytes: 7 1 6 6 2 0-1500 0-46 4
    preamble sof dest. addr. src. addr. length data pad cksum

        Preamble:  7 bytes, each byte containing 10101010

        Start of Frame:  1 byte containing 10101011

        Destination address:  the ethernet address of the receipiant

       Source address:  the ethernet address of the sender

       Length: indicates the number of bytes in the data field, from 0 to 1500.

       BUT, IEEE 802.3 states frames must be at least 64 bytes long, from destination to checksum!

       So, the dest addr is 6 bytes, the source addr is 6 bytes, the length is 2 bytes, and the checksum is 4 bytes:  total 18 bytes.

       So, if data is less than 46 bytes, the "pad" is used to fill out the packet to 64 bytes.

       The checksum is a 32-bit has code on the entire frame.

    Because Ethernet 802.3 needs to figure out which software it should pass the packet to (i.e., the TCP/IP software, the OSI
    software, etc.), it uses the first 8 bytes of the data field.

    So, the data field looks as follows:
    bytes: 1 1 1 3 2 38-1492
    Destination Service Access Point Source Service Access Point Control Org. Code Type Rest of data                                   

    The Destination SAP is an indication of the protocol suite that should get the frame.  "0xAA (i.e., 10101010)" means IP
    The Source SAP is an indication of the protocol suite that sent the frame.  "0xAA (i.e., 10101010)" means IP
    The control is reserved for further use (always 03 for IP)
    The org code is always 00 00 00  for IP
    The type distinguishes between software in a protocol suite.
    For TCP/IP, 0800 means IP, 0806 means ARP, and 0835 means RARP).

    Note:  the old ethernet frame is slightly different!

    Old Ethernet frame:
    bytes: 7 1 6 6 2 0-1500 4
    preamble sof dest. addr. src. addr. type data cksum

    If using TCP/IP at higher layers, type can be 0800 for IP, 0806 for ARP, or 0835 for RARP.
    Luckily, 0800, 0806, and 0835 are not valid lengths, so newer ethernet cards can recognize both protocols.
    To get the length of the packet, old Ethernet looks at the data to get the length out of the IP header.