0

I just started to learn about Networking and I am curious if I am right with my understanding that IP is used for networks to networks data transmission, it cannot be used for data transmission within a LAN. Instead MAC addresses are used for in-network (LAN) communication / data transmission. Am I correct?

1

The fact that you seem to have misunderstood is as follows:

  • Within a LAN segment in a TCP/IP network, computers can communicate without using IP.  They would need some mechanism to learn each other’s MAC addresses.
    • Computers use the Address Resolution Protocol (ARP) to learn the MAC addresses of other machines within the same LAN segment.  Wikipedia says, “ARP has been implemented with many combinations of network and data link layer technologies, such as IPv4, Chaosnet, DECnet and Xerox PARC Universal Packet (PUP) using IEEE 802 standards, FDDI, X.25, Frame Relay and Asynchronous Transfer Mode (ATM).  IPv4 over IEEE 802.3 and IEEE 802.11 is the most common case.”  (Emphasis added.)
  • Computers that are not in the same LAN segment cannot communicate without using IP or some other layer 3 (network layer) protocol.

As other answers have stated, it is certainly possible (and, in fact, quite routine) for network communication within a LAN segment to use IP.  Beyond that: it is possible for two processes on the same computer to communicate via IP.

TL;DR

Your understanding was

  • In a TCP/IP network, IP is used only for traffic going through a router.

The truth (somewhat simplified) is

  • In a TCP/IP network, IP is needed only for traffic going through a router.

So, you were close.

| improve this answer | |
1

We cannot say IP address are not used to communicate between LAN, because IP address are used to find MAC address. Inside a LAN, a switch will be used where MAC address play a vital role to find destination address.

| improve this answer | |
  • Can you expand upon this? Your answer is a bit hard to understand as written. – bwDraco Apr 23 '15 at 6:32
  • MAC is a physical address for any machine in network.In LAN switch has MAC table consisting of MAC address of system connected to it.so when we communicate within LAN,ip address is used to find the concern MAC address in MAC table. – Hakkim Apr 23 '15 at 6:58
  • @Hakkim That comment should be added to your answer. – Giacomo1968 Apr 23 '15 at 8:18
0

In OSI model layer 2 (data link layer) you can transmit data into host inside the same collision domain. So when you have layer 3 (network layer) connectivity you are allowed to cross that limit transmitting data inside same broadcast domain and send data to another broadcast domain via routing protocols or fixed routes.

| improve this answer | |
0

No, this is pretty much completely wrong. Computers use IP to talk to each other, whether in the same network or in different networks. They compose IP datagrams and then it's the network's job to get that datagram to the destination machine. As the IP datagram travels over different transports, each transport may put its own "wrapper" around the IP datagram. But IP is still being used, it's just being used inside another transport.

Imagine an IP datagram that starts on my computer and is going to Google's web server. It has a source IP address, that of my computer, and a destination IP address, that of Google's web server. It passes over a variety of links, LANs, and routers on its travels. On some of those hops, it may be inside an Ethernet container that has a source and destination MAC address for that one hop. But the point of this entire setup is to transport IP datagrams and IP is being used by the entire process.

| improve this answer | |
0

You can use IP-addresses in LAN communication too, a LAN is just a local network, which can consist of multiple networks. And with multiple networks and routing you will need IP-adresses.

Cisco has some easy to understand pages on Layer 2 (Data link layer, MAC addresses) and Layer 4 (Network layer, IP-adresses).

| improve this answer | |
  • It would be helpful if you provided all relevant information in the answer itself instead of just linking to a third-party website. – Ramhound Apr 23 '15 at 11:30
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Dave M Apr 23 '15 at 12:50
  • @Dave The essential parts are included, the answer to the question and why it is that way. The links are for further reading to learn more about it. :) – Alex Apr 23 '15 at 21:39
  • @Alex And links can die and disappear. Which is why link-only answers are frowned upon here. You should provide some basic quotes or simple context for each of the links so this answer can be useful for others years from now. That is the goal of this site: To create long-term, valuable content that helps the original poster as well as others who might stumble across this thread. – Giacomo1968 Apr 26 '15 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.