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.
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?
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
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.
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 ~]$
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 826
Rep:
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. .
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.