LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-02-2011, 09:51 AM   #1
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Rep: Reputation: Disabled
IP address


Does the computer with same wi-fi connection have same IP address?
 
Old 08-02-2011, 10:04 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
No, every computer (or other network device) has to have a unique IP within your network.
 
Old 08-02-2011, 10:18 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Welcome to LQ!

Quote:
Originally Posted by kirthika View Post
Does the computer with same wi-fi connection have same IP address?
Linux Home Networking: Ch02 Introduction to Networking should help you to understand things.

Rute Tutorial & Exposition: 25. Introduction to IP should expand things a bit;
Quote:
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;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualization- Top 10

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 08-02-2011, 10:20 AM   #4
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
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?
 
Old 08-02-2011, 10:21 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
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.

Cheers,

Josh
 
Old 08-02-2011, 10:24 AM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by kirthika View Post
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.
 
Old 08-02-2011, 10:34 AM   #7
ibaydan
Member
 
Registered: Jan 2008
Distribution: Debian6 , Centos 6,Ubuntu 11.04
Posts: 57

Rep: Reputation: 2
Thumbs up

Quote:
Originally Posted by corp769 View Post
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.
thats true
 
Old 08-02-2011, 10:45 AM   #8
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by ibaydan View Post
thats true
I know it's true Any other questions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Program to assign globa lIPv6 address and bind() to the previously assigned address. mwnn Linux - Networking 2 10-07-2010 03:29 AM
Address Space Randomization on 2.6.28-15-generic ubuntu 9.04. Finding base address nullprocess Linux - Security 1 09-15-2009 01:56 AM
Router gateway address being picked up as primary DNS address under SuSe Hubmasterflex Linux - Networking 13 10-18-2008 02:40 PM
WARNING: IP: Hardware address '***' trying to be our address 172.016.104.065 sunram Solaris / OpenSolaris 1 05-30-2008 09:51 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 05:33 AM


All times are GMT -5. The time now is 01:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration