×
all 5 comments

[–]zanfarCCENT 12 points13 points  (1 child)

What role, if any, does the IP addresses for these two host have?

If you are just considering the movement of frames, nothing. Everything you described happens at L2. However, those frames almost always contain an IP packet.

IP addressing is a logical address that resides at layer 3 of the OSI model and if I am correct is mainly used when moving about the network and to other networks.

More accurately, L3 provides the understanding of networks.

Why exactly do we need IP addressing in a local network with no gateway to any other networks?

Need? You technically don't, but then you would have to re-write every protocol you use to communicate because they all operate over IP at the least--TCP or UDP most likely. File sharing, email, Slack, etc. all have no knowledge of any L3 addresses on the network.

Wouldn't the LAN be able to communicate with just MAC addressing?

You seem to think that the networking layers operate in concentric rings--each one reaching farther than the last. However, they are stacked--each one used at all points of the network, but each ignorant of (and therefore relying on) the topology of the layer underneath.

In a LAN with no gateway, are IP addresses mainly used for a host with an unknown MAC address?

An IP address is used in every single packet, which carries all the information you care about in a modern LAN.

When you send data to a host on the same subnet (even without a gateway) you are still sending information to an IP address at a specific TCP/UDP port. Your data is placed in a TCP segment (for example) and TCP tells L3 "send this to 10.0.0.2". IP places the segment into a packet, discovers that the IP is in the same subnet, and tells L2 "send this to 10.0.0.2". Ethernet places the packet into a frame, and either looks up or ARPs for the destination MAC, then tells L1 "Send this to AABB.CCDD.EEFF", and so on.

Think of this: what if you were connected to two different networks without gateways on different NICs? Which NIC would send the data destined for AABB.CCDD.EEFF?

[–]SportsballPlayer[S] 0 points1 point  (0 children)

Thank you so much for the informative reply! This clears up a lot of things for me. For some reason I wasn't thinking of the top OSI layers, and was also mistakenly viewing encapsulation as a bottom to top process.

[–]elint 2 points3 points  (0 children)

Here's a diagram of 2 computers interacting through the TCP/IP model. Yes, your simple network consisting of NICs, cables, and a switch will only pay attention to the frames at OSI layer 2, and ignore the layer 3 packet data. But, the applications on your computer are all probably designed to encapsulate their data within L3 packets regardless of how your network is layed out. If you have a simple web server on one PC and a simple web browser on the other PC, those applications don't know that your network is only locally switched -- your browser will still want to send its request to port 80 on a specific IP, and that's what the web server wants to receive.

TCP/IP is so pervasive in today's networks that it would be a waste of a lot of effort to develop protocols for desktop applications that skip the transport and internet layers and work directly between applications and frames.

[–]herolurkerCCENT 0 points1 point  (0 children)

Frames can go from A to B without an IP address, some ISPs test internal connectivity using mac address only and a special traffic generating tool (JDSU MTS 5800)

https://www.viavisolutions.com/en-us/products/t-berd-mts-5800-handheld-network-tester

So we wouldn't need an ip address in a contained subnet, but you would need special L7 tools to communicate between machines

[–]Blackavatar360 0 points1 point  (0 children)

But come to think IP addressing the only way for hosts to figure out if they are on the same network or not. How else will the host know if the other guy is on his network of there was no IP address. Correct me if am wrong