Rede sem fio E servidor com fio dhcp

2

Eu tenho um servidor Ubuntu, que se conecta automaticamente a uma rede sem fio na inicialização. Isto é conseguido através de /etc/network/interfaces :

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant [...]
post-down sudo killall [...]

No entanto, eu gostaria que a máquina agisse também como um servidor dhcp quando alguém conecta um cabo. Instalei dhcp3-server e, em seguida, configurei /etc/network/interfaces adicionando:

auto eth0
iface eth0 inet static
  address 10.0.0.1
  netmask 255.255.255.0
  network 10.0.0.0/25
  gateway 10.0.0.1

No entanto, a Internet agora está inacessível, pois a máquina tenta (eu acho) se conectar através de eth0 em vez de wlan0.

Como eu configuro uma máquina para ter acesso à internet sem fio e atuar como um servidor dhcp com fio?

EDIT: saída solicitada anexada.

ifconfig -a

eth0      Link encap:Ethernet  HWaddr [...]  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP 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)
          Interrupt:17 

lo        Link encap:Local Loopback  
          [...]

wlan0     Link encap:Ethernet  HWaddr [...]  
          inet addr:10.7.0.213  Bcast:10.7.255.255  Mask:255.255.0.0
          inet6 addr: fe80::21c:bfff:fe36:cea7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:267437 (267.4 KB)  TX bytes:9606 (9.6 KB)

rounte -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    100    0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.7.0.0        0.0.0.0         255.255.0.0     U     0      0        0 wlan0
    
por astabada 28.02.2014 / 10:22

1 resposta

1

E se você tentar

route del default gw 10.0.0.1
route add default gw 10.7.0.1

Ele usará seu antigo gw como seu novo gateway padrão. Essas configurações serão redefinidas após uma reinicialização.

    
por 28.02.2014 / 11:02