View Full Version : Configurazione file interfaces
balubeto
02-06-2007, 11:28
CIAO
Ho questo file /etc/network/interfaces :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
iface eth2 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
wireless-essid Reparto_giorno
wireless-mode Manager
wireless-channel 6
wireless-ap 00:12:A9:55:11:43
wireless-key 62D20F769AC17D958E31DF5039D088E1
auto eth1
Ho notato che, all'avvio di Linux, le interfacce eth1 e eth2 si attivano entrambe. Vorrei che una delle due venga, all'avvio, disattivata ma che rimanga comunque configurata in modo che possa usare ifup e ifdown per poterla attivarla o disattivarla quando mi occorre.
GRAZIE
CIAO
stefanoxjx
02-06-2007, 11:44
Prova a togliere auto eth1
balubeto
02-06-2007, 13:03
Ho provato e non funziona.
Quindi, mi puoi spiegare una cosa:
Nella mia configurazione, come mai si attiva all'avvio l'interfaccia wireless eth2 ?
GRAZIE
CIAO
Uso la Debian Lenny Testing.
stefanoxjx
02-06-2007, 14:03
Allora, proverei a modificare in questo modo:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
iface eth2 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
wireless-essid Reparto_giorno
wireless-mode Manager
wireless-channel 6
wireless-ap 00:12:A9:55:11:43
wireless-key 62D20F769AC17D958E31DF5039D088E1
Anche se non capisco perchè le interfacce di rete da te partano da eth1 e non da eth0!!! boh!!! :confused:
Eventualmente: man interfaces ;)
balubeto
03-06-2007, 09:39
Non funziona neanche la tua configurazione.
Per me, l'interfaccia eth2 si attiva quando Linux carica il modulo del chip wireless:
PLUTO:~# lspci | grep -i wireless
02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
Quindi, non so come fare a far caricare tale modulo senza che Linux attivi l` interfaccia eth2
grazie
ciao
The_Dave
03-06-2007, 16:58
è la stessa cosa che vorrei sapere io!!
Anche io ho provato a togliere auto eth1, ma quando poi si fa ifconfig eth1 up, non funziona...
fedek9001
04-06-2007, 11:31
eth1 e eth2 hanno lo stesso address, non sarà il caso di metterlo diverso ?:rolleyes:
The_Dave
04-06-2007, 12:07
forse ha impostato in questo modo perche il router a cui si collega è lo stesso, ma quando è vicino, si attacca con il cavo, quando è lontano, usa il wireless...
stefanoxjx
04-06-2007, 13:28
forse ha impostato in questo modo perche il router a cui si collega è lo stesso, ma quando è vicino, si attacca con il cavo, quando è lontano, usa il wireless...
Questo non c'entra!!
E' sempre buona norma che gli indirizzi ip delle varie interfacce di rete del PC siano diversi.
Se poi il router è lo stesso, l'importante è che sia corretto l'indirizzo del gateway.
balubeto
05-06-2007, 13:09
Dal file /var/log/messages, ho notato che eth2 non e` pronta ma, a quanto pare, me la tira su lo stesso:
Jun 5 10:20:05 localhost kernel: bcm43xx: PHY connected
Jun 5 10:20:05 localhost kernel: bcm43xx: Microcode rev 0x127, pl 0xe (2005-04-18 02:36:27)
Jun 5 10:20:05 localhost kernel: bcm43xx: Radio turned on
Jun 5 10:20:05 localhost kernel: bcm43xx: Chip initialized
Jun 5 10:20:05 localhost kernel: bcm43xx: 32-bit DMA initialized
Jun 5 10:20:05 localhost kernel: bcm43xx: Keys cleared
Jun 5 10:20:05 localhost kernel: bcm43xx: Selected 802.11 core (phytype 2)
Jun 5 10:20:05 localhost kernel: ADDRCONF(NETDEV_UP): eth2: link is not ready
Jun 5 10:20:10 localhost kernel: [drm] Initialized drm 1.0.1 20051102
Jun 5 10:20:10 localhost kernel: ACPI: PCI Interrupt 0000:01:05.0[A] -> GSI 16 (level, low) -> IRQ 185
Jun 5 10:20:10 localhost kernel: [drm] Initialized radeon 1.25.0 20060524 on minor 0
Jun 5 10:20:11 localhost kernel: Bluetooth: Core ver 2.10
Jun 5 10:20:11 localhost kernel: NET: Registered protocol family 31
Jun 5 10:20:11 localhost kernel: Bluetooth: HCI device and connection manager initialized
Jun 5 10:20:11 localhost kernel: Bluetooth: HCI socket layer initialized
Jun 5 10:20:11 localhost kernel: Bluetooth: L2CAP ver 2.8
Jun 5 10:20:11 localhost kernel: Bluetooth: L2CAP socket layer initialized
Jun 5 10:20:11 localhost kernel: mtrr: 0xf0000000,0x8000000 overlaps existing 0xf0000000,0x4000000
Jun 5 10:20:11 localhost kernel: Bluetooth: RFCOMM socket layer initialized
Jun 5 10:20:11 localhost kernel: Bluetooth: RFCOMM TTY layer initialized
Jun 5 10:20:11 localhost kernel: Bluetooth: RFCOMM ver 1.8
Jun 5 10:20:11 localhost kernel: mtrr: 0xf0000000,0x8000000 overlaps existing 0xf0000000,0x4000000
Jun 5 10:20:11 localhost kernel: mtrr: 0xf0000000,0x8000000 overlaps existing 0xf0000000,0x4000000
Jun 5 10:20:11 localhost kernel: agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
Jun 5 10:20:11 localhost kernel: agpgart: Putting AGP V3 device at 0000:00:00.0 into 4x mode
Jun 5 10:20:11 localhost kernel: agpgart: Putting AGP V3 device at 0000:01:05.0 into 4x mode
Jun 5 10:20:12 localhost kernel: [drm] Setting GART location based on new memory map
Jun 5 10:20:12 localhost kernel: [drm] Loading R200 Microcode
Jun 5 10:20:12 localhost kernel: [drm] writeback test succeeded in 1 usecs
ma, poi, facendo un ifconfig, ottengo:
PLUTO:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:02:3F:6D:7D:5C
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::202:3fff:fe6d:7d5c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:766 errors:0 dropped:0 overruns:0 frame:0
TX packets:468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:75892 (74.1 KiB) TX bytes:109505 (106.9 KiB)
Interrupt:193 Base address:0xa000
eth2 Link encap:Ethernet HWaddr 00:90:4B:49:F5:3B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:4 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:1764 (1.7 KiB)
Interrupt:5 Base address:0x4000
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:840 (840.0 b) TX bytes:840 (840.0 b)
PLUTO:~# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
eth0 no wireless extensions.
eth2 IEEE 802.11b/g ESSID:off/any Nickname:"Broadcom 4306"
Mode:Managed Frequency=2.484 GHz Access Point: Invalid
Bit Rate=1 Mb/s Tx-Power=15 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
A quanto pare, l'eth2 e` stata tirata su anche se non e` stata configurata come era descritto nel file interfaces:
PLUTO:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
iface eth2 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
wireless-power off all
wireless-essid Reparto_giorno
wireless-mode Manager
wireless-channel 6
wireless-ap 00:12:A9:55:11:43
wireless-key 62D20F769AC17D958E31DF5039D088E1
auto eth1
Il chip wireless che ho sul portatile e`:
PLUTO:~# lspci | grep -i broadcom
02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
Che cosa c'e` che non va?
In poche parole, vorrei che Linux configurasse il chip wireless all'avvio ma non tirasse su l'interfaccia eth2.
GRAZIE
CIAO
Anche io ho provato a togliere auto eth1, ma quando poi si fa ifconfig eth1 up, non funziona...
devi usare ifup eth1 oppure ifconfig+route con i parametri giusti
The_Dave
05-06-2007, 21:05
devi usare ifup eth1 oppure ifconfig+route con i parametri giusti
spiega spiega, che sono curioso... Forse mi risolvi un problemissimo!!!
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.