Since Switch is a layer 2 device, and it uses MAC addresses to interact with other Hosts within the Network, then why do we use IP addresses within our local networks?
Well let's start with what traffic you're sending.
If you use a strictly layer-2 protocol inside your own LAN with no HTTP, SSL, NFS, CIFS, iSCSI, H.323, SIP, DNS, ICMP, databases, or websockets, then your proposal works just fine. In fact, FCoE does not rely on an IP layer... so if that's what you want, knock yourself out :-)
The problem is that you just crippled 95% of the utility of most networks by removing those IP-based services. Networks exist to share information; all operating systems on the planet share information by binding services to, and encapsulating inside IP. That information is usually wrapped inside TCP as well.
- Rhetorical question: Could a bunch of determined people implement TCP and UDP services directly on top of ethernet in all the major operating systems?
- Pedantic Answer: Yes, but that's a collosal waste of time and resources for insignificant gain. Let's start with the basics... there is no DNS name-service for ethernet mac-addresses. That means unless you build it, how would you resolve URLs without IP addresses? I doubt that anyone really wants to type
http://00c0.9b4a.fb2c/
just so they can avoid 20 extra bytes in each packet. This is just an example of the work required.
What if someone do not need to connect to any host or network outside its own network, Why do he still needs to have an IP address, isn't MAC address is enough?
Technically, yes. In the real world... it's a pretty boring network without IP.
Hunt for an L2 loop or a software misbehaviour.
Start at 2960G/Gi0/22, and go to the upstream router let's say R1.
Search on which port is the @MAC: 00:16:3e:64:98:e2, let's say R1/Gi0/7.
Go to the network equipment connect on R1/Gi0/7, and go ahead until you
reach the final port which says it sees this @MAC.
If this isn't a physical connection to the same machine,
- check for an L2 wireless loop (through a wireless access point),
- check for a VLAN L2 loop (same VLAN trunked on 2 different ports),
- check for a rogue repeater, switch or AP,
- check for a ghost value at the CAM level (clear the port).
Best Answer
The least significant bit (LSB) in the MAC-Address is the Individual/Group type specification. IEEE 802.3 specifies the MAC-Address like this (with LSB first):
I/G Bit: If this bit is 0, it shall indicate that the address field contains an individual address. If this bit is 1, it shall indicate that the address field contains a group address that identifies none, one or more, or all of the stations connected to the LAN. In the Source Address field, the first bit is reserved and set to 0.
L/G Bit: The second bit shall be used to distinguish between locally or globally administered addresses. For globally administered (or U, universal) addresses, the bit is set to 0. If an address is to be assigned locally, this bit shall be set to 1. Note that for the broadcast address, this bit is also a 1.
When you convert the first byte of your address
bb
into binary, you get10111011
. Here the LSB is last, so the last bit in the first octet/byte is the I/G bit, which is 1. This makes your MAC address a group MAC address which your router rejects. If you useaa
, you get10101010
where the last bit is 0, making this an individual (unicast) MAC-Address.To make your MAC-Adress unicast and also make clear that you've locally assigned it (and to prevent MAC collision) you should use an address where the I/G bit is turned off and the L/G bit is turned on. This means one of the following addresses:
You can use any hex value you want for
X
.