Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
excerpt from '25.4 Computers on a LAN';
LANs work as follows. Network cards transmit a frame to the LAN, and other network cards read that frame from the LAN. If any one network card transmits a frame, then all other network cards can see that frame. If a card starts to transmit a frame while another card is in the process of transmitting a frame, then a clash is said to have occurred, and the card waits a random amount of time and then tries again. Each network card has a physical address of 48 bits called the hardware address (which is inserted at the time of its manufacture and has nothing to do with IP addresses). Each frame has a destination address in its header that tells what network card it is destined for, so that network cards ignore frames that are not addressed to them.
Since frame transmission is governed by the network cards, the destination hardware address must be determined from the destination IP address before a packet is sent to a particular machine. This is done is through the Address Resolution Protocol (ARP). A machine will transmit a special packet that asks ``What hardware address is this IP address?'' The guilty machine then responds, and the transmitting machine stores the result for future reference. Of course, if you suddenly switch network cards, then other machines on the LAN will have the wrong information, so ARP has time-outs and re-requests built into the protocol. Try typing the command arp to get a list of hardware address to IP mappings.
Just a few links to aid you to gaining some understanding;
In "www.whatismyip.com" website it shows us our current IP address. I am using my laptop in a LAN connecion(college wi-fi connection). It shows my IP address. My friend near me gets the same IP address. How is it possible?
To add what Gary said.... A physical connection and a wireless connection use two completely different network cards. Each card has a unique MAC address assigned to it from the factory, so each device will be given a different IP address from your router. That pretty much sums that up for you; Please read the links given to you though, as they will definitely help you understand networking in depth.
In "www.whatismyip.com" website it shows us our current IP address. I am using my laptop in a LAN connecion(college wi-fi connection). It shows my IP address. My friend near me gets the same IP address. How is it possible?
That is because the external IP address of your network's router is the same. You two will have different LAN IP addresses. On the command line, type the following:
Code:
ifconfig
Have your friend do the same, and you will notice that the actual IP address of your interface will be different from his. On my network, my LAN IP address is 192.168.2.91, whereas my external IP address is the actual route to the external WAN, or internet.
That is because the external IP address of your network's router is the same. You two will have different LAN IP addresses. On the command line, type the following:
Code:
ifconfig
Have your friend do the same, and you will notice that the actual IP address of your interface will be different from his. On my network, my LAN IP address is 192.168.2.91, whereas my external IP address is the actual route to the external WAN, or internet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.