Alterando a interface de rede padrão dos servidores

0

Eu tenho um servidor com Ethernet com e sem fio. Eu acredito que tudo é bom com os drivers de dispositivos e o WPA2 está configurado corretamente. Eu configurei dois dispositivos usando o system-network-config; eth0 que eu atribuí IP estático 192.168.0.100 e wlan0 que eu atribuí IP estático 192.168.0.101. (Por favor, confirme que com dois NICs devem ter IPs diferentes)

Se eu desconectar o CAT-5 e reiniciar a rede, posso fazer o ping do IP sem fio do servidor (192.168.0.101) de outros PCs na LAN.

No servidor, no entanto, não consigo fazer o ping do roteador ou de outros PCs na LAN. Quando tentei, recebi De 192.168.0.100 icmp_seq=1 Destination host unreachable . Observe que 192.168.0.100 é eth0 e não wlan0.

Assim, parece que meu servidor está configurado para usar apenas eth0. Ou talvez tenha duas interfaces na mesma sub-rede, mas eu realmente não sei. Idealmente, usaria eth0 se conectado, então padrão para wlan0. Como eu faço isso? Obrigado

PS. Desculpe se meu entendimento está incorreto, pois infelizmente estou longe de ser um especialista.

[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 ~]#
    
por user1032531 05.07.2013 / 20:26

0 respostas