LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-15-2017, 12:44 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
Why does my server use two IP addresses


I have a hobby server located in my garage. I don't have CAT5 going to it, so I used a wireless network. During setup, I used a hardwired Ethernet with 192.168.1.200, and then set up the wireless network on 192.168.1.201. The hardwired Ethernet is now not connected, and recently I viewed traffic using wireshark, and saw that both 192.168.1.200 and 192.168.1.201 are both being used.

Why two different IP addresses? What am I doing wrong?

Thanks!

Code:
[Michael@devserver www]$ sudo tshark -w /var/www/testing_w_fw.pcap -f "port 1337 or port 47808" -i wlan0 -P
Running as user "root" and group "root". This could be dangerous.
Capturing on wlan0
0.000000000 192.168.1.201 -> 192.168.1.255 BACnet-APDU 67 Unconfirmed-REQ i-Am device,1234
2.564370326 192.168.1.210 -> 192.168.1.255 BACnet-APDU 67 Unconfirmed-REQ i-Am device,4321
9.489940460 192.168.1.210 -> 192.168.1.200 TCP 74 35950 > menandmice-dns [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=374573308 TSecr=0 WS=128
9.489979947 192.168.1.200 -> 192.168.1.210 TCP 74 menandmice-dns > 35950 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=2040119293 TSecr=374573308 WS=128
9.490752018 192.168.1.210 -> 192.168.1.200 TCP 66 35950 > menandmice-dns [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=374573308 TSecr=2040119293
9.492925033 192.168.1.210 -> 192.168.1.200 TCP 130 35950 > menandmice-dns [PSH, ACK] Seq=1 Ack=1 Win=29312 Len=64 TSval=374573308 TSecr=2040119293
9.492946705 192.168.1.200 -> 192.168.1.210 TCP 66 menandmice-dns > 35950 [ACK] Seq=1 Ack=65 Win=14592 Len=0 TSval=2040119296 TSecr=374573308
9.629910795 192.168.1.210 -> 192.168.1.255 BACnet-APDU 60 Unconfirmed-REQ who-Is 0 4194303
9.630058153 192.168.1.201 -> 192.168.1.255 BACnet-APDU 67 Unconfirmed-REQ i-Am device,1234
9.630917768 192.168.1.210 -> 192.168.1.255 BACnet-APDU 67 Unconfirmed-REQ i-Am device,4321
^C10 packets captured
[Michael@devserver www]$ sudo ifconfig
[sudo] password for Michael:
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:76889 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76889 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:103150003 (98.3 MiB)  TX bytes:103150003 (98.3 MiB)

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: xx::xx:xx:xx:xx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46225694 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37562168 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4950581203 (4.6 GiB)  TX bytes:5937929508 (5.5 GiB)

[Michael@devserver www]$
 
Old 02-15-2017, 01:02 AM   #2
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
It would appear to me that wlan0 is assigned only a single IP though. Wireshark is probably detecting something sent through the network that has somehow ended up reaching your wireless device. As you can see the ip address which is different has sent to 192.168.1.255 which is the broadcast address. That just let's the whole network know there is some service on that ip address. It is not your machine physically having two addresses.

It is possible to create such a virtual adapter on a physical adapter, but that would come up in ifconfig as wlan0.0 wlan0.1 etc for each virtual interface. Those will have their own IP addresses but will also have their own individual entries and they will all use the same interface.

So what you posted looks like normal network chatter to me. Nothing to worry about
 
1 members found this post helpful.
Old 02-15-2017, 07:01 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
192.168.1.210 is also an address on your network.

Wireshark operates in a mode known as "promiscuous mode", to allow the program to be able to see all traffic.

Note that while your server uses address 192.168.1.201, it also sees all the traffic on that network, as well as other traffic in the WIFI area. And as ericson007 points out, also the broadcast address.

I'd recommend that you operate a server using the wired CAT5 for performance purposes. You may find that WIFI suits you well, however in times of high demand you may have problems, but this obviously depends more on the amount of load you put on that server.
 
Old 02-15-2017, 08:08 AM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks ericson007 and rtmistler,

Okay, let's forget about wireshark. Why does arp give me two IPs with the same MAC Address?
  • (192.168.1.200) at 23:32:32:2d:31:95 [ether] on eth0
  • (192.168.1.201) at 23:32:32:2d:31:95 [ether] on eth0

Code:
login as: michael
michael@192.168.1.210's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Feb 15 13:36:35 2017 from iammichael-pc
michael@raspberrypi:~ $ ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data.
64 bytes from 192.168.1.200: icmp_seq=1 ttl=64 time=3.49 ms
^C
--- 192.168.1.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.496/3.496/3.496/0.000 ms
michael@raspberrypi:~ $ ping 192.168.1.201
PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data.
64 bytes from 192.168.1.201: icmp_seq=1 ttl=64 time=1.56 ms
^C
--- 192.168.1.201 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.560/1.560/1.560/0.000 ms
michael@raspberrypi:~ $ arp -a
IAMMICHAEL-PC (192.168.1.10) at 23:a5:cd:23:3c:40 [ether] on eth0
? (192.168.1.200) at 23:32:32:2d:31:95 [ether] on eth0
router.asus.com (192.168.1.1) at 23:21:c2:e2:d2:58 [ether] on eth0
michael-HP-EliteBook-2570p (192.168.1.84) at 22:23:c2:21:23:9e [ether] on eth0
? (192.168.1.201) at 23:32:32:2d:31:95 [ether] on eth0
michael@raspberrypi:~ $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr a3:12:c2:23:42:11
          inet addr:192.168.1.210  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ab8c:e035:53c4:84c9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21909662 errors:0 dropped:3028 overruns:0 frame:0
          TX packets:20710758 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1735968410 (1.6 GiB)  TX bytes:2135938137 (1.9 GiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3897 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3897 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:280817 (274.2 KiB)  TX bytes:280817 (274.2 KiB)

michael@raspberrypi:~ $
Code:
login as: Michael
Michael@192.168.1.200's password:
Last login: Wed Feb 15 05:59:07 2017 from 192.168.1.10
[Michael@devserver ~]$ ping 192.168.1.201
PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data.
64 bytes from 192.168.1.201: icmp_seq=1 ttl=64 time=0.041 ms
^C
--- 192.168.1.201 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 373ms
rtt min/avg/max/mdev = 0.041/0.041/0.041/0.000 ms
[Michael@devserver ~]$ ping 192.168.1.210
PING 192.168.1.210 (192.168.1.210) 56(84) bytes of data.
64 bytes from 192.168.1.210: icmp_seq=1 ttl=64 time=1.11 ms
^C
--- 192.168.1.210 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 614ms
rtt min/avg/max/mdev = 1.115/1.115/1.115/0.000 ms
[Michael@devserver ~]$ arp -a
IAMMICHAEL-PC (192.168.1.10) at 23:a5:cd:23:3c:40 [ether] on wlan0
? (192.168.1.210) at a3:12:c2:23:42:11 [ether] on wlan0
michael-HP-EliteBook-2570p (192.168.1.84) at 22:23:c2:21:23:9e [ether] on wlan0
router.asus.com (192.168.1.1) at 23:21:c2:e2:d2:58 [ether] on wlan0
[Michael@devserver ~]$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 88:51:FB:51:DF:70
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:77032 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77032 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:103160443 (98.3 MiB)  TX bytes:103160443 (98.3 MiB)

wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba76:3fff:fe69:3195/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46692508 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37933420 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4999342874 (4.6 GiB)  TX bytes:5987824884 (5.5 GiB)

[Michael@devserver ~]$
Code:
login as: Michael
Michael@192.168.1.201's password:
Last login: Wed Feb 15 05:37:18 2017 from 192.168.1.10
[Michael@devserver ~]$ ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data.
64 bytes from 192.168.1.200: icmp_seq=1 ttl=64 time=0.033 ms
^C
--- 192.168.1.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 395ms
rtt min/avg/max/mdev = 0.033/0.033/0.033/0.000 ms
[Michael@devserver ~]$ ping 192.168.1.210
PING 192.168.1.210 (192.168.1.210) 56(84) bytes of data.
64 bytes from 192.168.1.210: icmp_seq=1 ttl=64 time=0.910 ms
^C
--- 192.168.1.210 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 375ms
rtt min/avg/max/mdev = 0.910/0.910/0.910/0.000 ms
[Michael@devserver ~]$ arp -a
IAMMICHAEL-PC (192.168.1.10) at 23:a5:cd:23:3c:40 [ether] on wlan0
? (192.168.1.210) at a3:12:c2:23:42:11 [ether] on wlan0
michael-HP-EliteBook-2570p (192.168.1.84) at 22:23:c2:21:23:9e [ether] on wlan0
router.asus.com (192.168.1.1) at 23:21:c2:e2:d2:58 [ether] on wlan0
[Michael@devserver ~]$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 88:51:FB:51:DF:70
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:77034 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77034 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:103160611 (98.3 MiB)  TX bytes:103160611 (98.3 MiB)

wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba76:3fff:fe69:3195/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46692936 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37933757 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4999381695 (4.6 GiB)  TX bytes:5987872325 (5.5 GiB)

[Michael@devserver ~]$
 
Old 02-15-2017, 11:52 AM   #5
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
The above output from the ifconfig command on what I am guessing is your server seems to indicate that:

- your wired adapter (eth0) has MAC address 88:51:fb:51:df:70 and is using IP address 192.168.1.200

- your wireless adapter (wlan0) has MAC address b8:76:3f:69:31:95 and is using IP address 192.168.1.201

... which is what you say you are expecting. Could you be more precise concerning whatever problem you seem to be having ?
 
Old 02-15-2017, 02:15 PM   #6
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 826

Rep: Reputation: 229Reputation: 229Reputation: 229
What's strange is that the output of ifconfig differs on post#1 and the last code on post#4. In the first post it does not show eth0 but does in post#4. Both are from devserver. .

Last edited by erik2282; 02-15-2017 at 02:21 PM.
 
Old 02-15-2017, 05:31 PM   #7
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
In the first post it does not show because you passed ifconfig as the command. The second time you did ifconfig and appended -a which tellsit to show all devices even those not connected. That is why.

Ifconfig if run without options only shows the active devices. Since the eth0 does not have the up flag, the system is not using it. It shows an ip for eth0 because you configured a static ip for it.
 
1 members found this post helpful.
Old 02-15-2017, 06:54 PM   #8
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
What I find odd is when I do arp -a on 192.168.1.210, it shows 192.168.1.200 on eth0. This eth0 is a wired adapter, right? But there is no wire connecting eth0 to a switch, only the wireless to 192.168.1.201, and 192.168.1.210 and 192.168.1.200 are physically different machines. Why does it even show up. Is it somehow going wireless to the other machine via 192.168.1.201, and then eternally within the receiving machine getting to the 192.168.1.200 interface?
 
Old 02-15-2017, 08:13 PM   #9
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
Stale arp entries from default gateway maybe? Not sure why it would show...

Does it come back after you flush the arp cache on the system concerned?

Last edited by ericson007; 02-15-2017 at 08:15 PM.
 
Old 02-15-2017, 08:40 PM   #10
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
This is somewhat different to your particular issue but interesting none the less

http://serverfault.com/questions/415...he-same-subnet

Last edited by ericson007; 02-15-2017 at 09:43 PM.
 
Old 02-16-2017, 06:43 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,898
Blog Entries: 43

Rep: Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138Reputation: 3138
Member response

Hi,

I wonder what the OP shows for his route table for this server? Do a 'route -n' and post the output. From 'man route';
Quote:
route - show / manipulate the IP routing table

SYNOPSIS
route [-CFvnee]

route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn] [reinstate]
[[dev] If]

route [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm] [metric N] [[dev] If]

route [-V] [--version] [-h] [--help]

DESCRIPTION
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface
after it has been configured with the ifconfig(8) program.

When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the
routing tables.
Hope this helps.
Have fun & enjoy!
 
  


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
Getting IP addresses from the server mmahulo Linux - Newbie 2 12-01-2008 07:11 AM
2 web addresses on 1 server linuxhippy Slackware 9 06-27-2007 07:30 AM
best way to server http on two ip addresses nephish Linux - Networking 2 12-11-2006 08:46 PM
Server responds to 2 IP addresses albracco Linux - Networking 3 03-17-2006 12:07 PM
bind 2 ip addresses to the server txm123 Linux - Newbie 2 11-08-2004 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:32 AM.

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
Open Source Consulting | Domain Registration