Computer Communication and Networks

advertisement
Computer Communication and Networks
Lab Experiment 6
MAC Address and Ethernet Packet
Introduction
In computer networking a Media Access Control address (MAC address) is a
quasi-unique identifier attached to most network adapters (NICs). It is a number that acts
like a name for a particular network adapter, so, for example, the network cards (or builtin network adapters) in two different computers will have different names, or MAC
addresses, as would an Ethernet adapter and a wireless adapter in the same computer, and
as would multiple network cards in a router. However, it is possible to change the MAC
address on most of today's hardware.
MAC addresses, unlike IP addresses and IPX addresses, are not divided into
"host" and "network" portions, so a host cannot determine, from the MAC address of
another host, whether that host is on the same layer 2 network segment as the sending
host or a network segment bridged to that network segment and, if it's not, cannot
determine the MAC address of a router that is on the same network segment as the
sending host or a segment bridged to that network segment and that can help route the
packet to the destination host.
ARP is commonly used to convert from addresses in a layer 3 protocol such as
Internet Protocol (IP) to the layer 2 MAC address. On broadcast networks, such as
Ethernet, the MAC address allows each host to be uniquely identified and allows frames
to be marked for specific hosts. It thus forms the basis of most of the layer 2 networking
upon which higher OSI Layer protocols are built to produce complex, functioning
networks.
The original IEEE 802 MAC address, comes from the original Xerox Ethernet
addressing scheme. This 48-bit address space contains potentially 248 or
281,474,976,710,656 possible MAC addresses.
All three numbering systems use the same format and differ only in the length of
the identifier. Addresses can either be "universally administered addresses" or "locally
administered addresses."
A universally administered address is uniquely assigned to a device by its
manufacturer; these are sometimes called "burned-in addresses." The first three octets (in
transmission order) identify the organization that issued the identifier and are known as
the Organizationally Unique Identifier (OUI). The following three (MAC-48 and EUI-48)
or five (EUI-64) octets are assigned by that organization in nearly any manner they
please, subject to the constraint of uniqueness. The IEEE expects the MAC-48 space to
be exhausted no sooner than the year 2100; EUI-64s are not expected to run out in the
foreseeable future.
A locally administered address is assigned to a device by a network
administrator, overriding the burned-in address. Locally administered addresses do not
contain OUIs.
Universally administered and locally administered addresses are distinguished by
setting the second least significant bit of the most significant byte of the address. If the bit
is 0, the address is universally administered. If it is 1, the address is locally administered.
The bit is 0 in all OUIs. For example, 02-00-00-00-00-01. The most significant byte is
02h. The binary is 00000010 and the second least significant bit is 1. Therefore, it is a
locally administered address.
If the least significant bit of the most significant byte is set to a 0, the packet is
meant to reach only one receiving NIC. This is called unicast. If the least significant bit
of the most significant byte is set to a 1, the packet is meant to be sent only once but still
reach several NICs. This is called multicast.
MAC-48 and EUI-48 addresses are usually shown in hexadecimal format, with
each octet separated by a dash or colon. An example of a MAC-48 address would be "0008-74-4C-7F-1D". If you cross-reference the first three octets with IEEE's OUI
assignments, you can see that this MAC address came from Dell Computer Corp. The last
three octets represent the serial number assigned to the adapter by the manufacturer.
The following technologies use the MAC-48 identifier format:

Ethernet 802.11 wireless networks

Bluetooth

IEEE 802.5 token ring

most other IEEE 802 networks

FDDI

ATM (switched virtual connections only, as part of an NSAP address)

Fibre Channel and Serial Attached SCSI (as part of a World Wide Name)
The distinction between EUI-48 and MAC-48 identifiers is purely semantic: MAC-48
is used for network hardware; EUI-48 is used to identify other devices and software.
(Thus, by definition, an EUI-48 is not in fact a "MAC address", although it is
syntactically indistinguishable from one and assigned from the same numbering space.)
Note: The IEEE now considers the label MAC-48 to be an obsolete term which was
previously used to refer to a specific type of EUI-48 identifier used to address hardware
interfaces within existing 802-based networking applications and should not be used in
the future. Instead, the term EUI-48 should be used for this purpose.
EUI-64 identifiers are used in:

FireWire

IPv6 (as the low-order 64 bits of a unicast network address when temporary
addresses are not being used)

ZigBee / 802.15.4 wireless personal-area networks
The IEEE has built in several special address types to allow more than one Network
Interface Card to be addressed at one time:

Packets sent to the broadcast address, all one bits, are received by all stations on
a local area network. In hexadecimal the broadcast address would be
"FF:FF:FF:FF:FF:FF".

Packets sent to a multicast address are received by all stations on a LAN that
have been configured to receive packets sent to that address.

Functional addresses identify one of more Token Ring NICs that provide a
particular service, defined in IEEE 802.5.
These are "group addresses", as opposed to "individual addresses"; the least
significant bit of the first octet of a MAC address distinguishes individual addresses from
group addresses. That bit is set to 0 in individual addresses and 1 in group addresses.
Group addresses, like individual addresses, can be universally administered or locally
administered.
In addition, the EUI-64 numbering system encompasses both MAC-48 and EUI-48
identifiers by a simple translation mechanism. To convert a MAC-48 into an EUI-64,
copy the OUI, append the two octets "FF-FF", and then copy the organization-specified
part. To convert an EUI-48 into an EUI-64, the same process is used, but the sequence
inserted is "FF-FE". In both cases, the process can be trivially reversed when necessary.
Organizations issuing EUI-64s are cautioned against issuing identifiers that could be
confused with these forms. The IEEE policy is to discourage new uses of 48-bit
identifiers in favor of the EUI-64 system.
IPv6 — one of the most prominent standards that uses EUI-64—applies these rules
inconsistently. Due to an error in the appendix to the specification of IPv6 addressing, it
is standard practice to extend MAC-48 addresses (such as IEEE 802 MAC address) to
EUI-64 using "FF-FE" rather than "FF-FF."
Figure 1
Objective
The objectives of this experiment are to:



Understand physical connection between two nodes with the help of a hub.
Transfer packets from one node to another using MAC address.
Capture and analyze the contents of a transmitted packet.
Network Diagram
Figure 2: Network Diagram.
Procedure
Part1:
1. Open “xclient” on both the nodes.
2. Click “tools -> network configuration” and enter the IP Address for Interface 1
and 2.
3. Set “always listening on”.
4. Click “M Br”.
5. Click “SendE”.
6. Set destination address to “FF:FF:FF:FF:FF:FF”.
7. Either ITS 1 or ITS 2 click send.
Part 2:
1. Set the destination address to the receiver's MAC address.
2. Click Send.
Part3:
1. On ITS 2, click “Mddl”.
2. Click “load” to load the AutoResponser.mddl.
3. Click “Upld” to upload the mddl file.
4. On ITS 1, in the packet send window, set the packet type to “AA:AA”, message
to 01, and destination to the MAC address of ITS 2.
5. Send Ethernet packet from ITS 1 to ITS 2.
Report
1. Explain the concept of MAC address.
2. Capture all the output of the packet sent/received window by using “Prt Sc”
button on the keyboard and attach them as results.
3. Comment on the results and its parameters.
4. Conclude you learning outcome.
Questions
1. In the part one and two of the experiment, what happens if the destination address
is set to a non existent address?
2. Why can’t a straight cable be used to connect two computers back-to-back?
3. How does a HUB differ from a switch?
Download