Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a server with wired and wireless Ethernet. I believe all is good with the devices drivers and WPA2 is configured correctly. I set two devices using system-network-config; eth0 which I assigned static IP 192.168.0.100 and wlan0 which I assigned static IP 192.168.0.101. (Please confirm that with two NICs should have different IPs)

If I unplug the CAT-5 and restart the network, I can ping the server's wireless IP (192.168.0.101) from other PCs on the LAN.

From the server, however, I cannot ping the router or other PCs on the LAN. When attempted, I get From 192.168.0.100 icmp_seq=1 Destination host unreachable. Note that 192.168.0.100 is eth0 and not wlan0.

As such, it seems like my server is configured to use only eth0. Or maybe it has two interfaces on the same subnet, but I don't really know. Ideally, it would use eth0 if connected, then default to wlan0. How do I do this? Thank you

PS. Sorry if my understanding is incorrect as I am currently unfortunately far from an expert.

[root@desktop ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=desktop.example.com

[root@desktop ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 88:51:FB:51:DF:70
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::8a51:fbff:fe51:df70/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2744 errors:0 dropped:0 overruns:0 frame:0
          TX packets:438 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:268005 (261.7 KiB)  TX bytes:57967 (56.6 KiB)

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:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1344 (1.3 KiB)  TX bytes:1344 (1.3 KiB)

wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          inet addr:192.168.0.101  Bcast:192.168.0.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:8736 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3078 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4494490 (4.2 MiB)  TX bytes:265995 (259.7 KiB)

[root@desktop ~]# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Wired"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:E7:F0:85:CE
          Bit Rate=1 Mb/s   Tx-Power=27 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=63/70  Signal level=-47 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:5   Missed beacon:0

eth0      no wireless extensions.

[root@desktop ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
IPV6INIT=yes
IPV6_AUTOCONF="yes"
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="05b28da3-5efd-4dff-bdf1-e1aeb842fe65"
HWADDR=88:51:fb:51:df:70
PREFIX=24
DNS1=8.8.8.8
DOMAIN=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="System eth0"
LAST_CONNECT=1372676618
USERCTL=no
DNS2=8.8.4.4
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1

[root@desktop ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0
GATEWAY=192.168.0.1
IPV6INIT=no
DNS2=8.8.4.4
BROADCAST=192.168.0.255
USERCTL=no
DNS1=8.8.8.8
BOOTPROTO=none
TYPE=Ethernet
DEVICE=wlan0
NETMASK=255.255.255.0
IPADDR=192.168.0.101
NETWORK=192.168.0.0
#changed from no to yes by Michael Reed
ONBOOT=yes
HWADDR=b8:76:3f:69:31:95

[root@desktop ~]# service network status
Configured devices:
lo eth0 wlan0
Currently active devices:
lo wlan0 eth0

[root@desktop ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
[root@desktop ~]#
share|improve this question
    
what tool are you using to connect to the AP? Is it WICD? If you are using wpa_supplicant, how do you use the tool? –  angs Jul 5 '13 at 19:04
    
@angs. I don't understand the question about AP and WICD. I followed wiki.centos.org/HowTos/Laptops/WpaSupplicant, which describes how wpa_supplicant is used. –  user1032531 Jul 5 '13 at 19:47
    
Can you please post route -n just to see what is the Iface in use. –  cfreire Jul 6 '13 at 11:27
    
@cfreire. I just added it to the very end of my original post. Thank you –  user1032531 Jul 6 '13 at 12:39
    
As you can see there is no wlan0 in the last column of route. Try ifup wlan0 and the check to see if appears ou route -n. You can also add manualy a default gw via: route add default gw 192.168.0.1 wlan0. Another strange thing is the 1MB/s link rate at you wlan0. Are you to far from the router/AP? –  cfreire Jul 6 '13 at 15:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.