NoTrace Security Forum

NoTrace Security Forum
Home | Discussioni Attive | Discussioni Recenti | Segnalibro | Msg privati | Utenti | Download | cerca | faq | RSS | Security Chat
Nome Utente:
Password:
Salva Password
Password Dimenticata?

 Tutti i Forum
 Sistemi Operativi
 Linux/Unix
 Configurazione delle interfacce di rete
 Forum Bloccato
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
I seguenti utenti stanno leggendo questo Forum Qui c'è:
Autore Discussione Precedente Discussione Discussione Successiva  

balubeto
New Member



45 Messaggi


Inserito il - 21/05/2007 : 10:44:41  Mostra Profilo
CIAO

Ho queste interfacce di rete:


PLUTO:~# ifconfig -v eth1
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:2191 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:203549 (198.7 KiB)  TX bytes:167005 (163.0 KiB)
          Interrupt:193 Base address:0xa000 

PLUTO:~# ifconfig -v eth2                                                                                               
eth2      Link encap:Ethernet  HWaddr 00:90:4B:49:F5:3B  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:6 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:0xc000 

PLUTO:~# iwconfig eth2                                                                                                     
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   
          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


Da quanto avete capito, l'interfaccia eth1 rappresenta la scheda di rete Ethernet; mentre quella eth1 rappresenta il chip di rete Wireless del mio notebook.

Ora, come faccio a configurare l'interfaccia di rete eth2 come eth1 usando ifconfig per i parametri come l'indirizzo IP del computer, quello del gateway, quello di netmask, ................?

Una volta configurato i parametri wireless con il comando iwconfig e provato se tutto funziona correttamente, come faccio ad inserire, in modo agevole, tutti questi parametri nel file /etc/network/interfaces per far in modo che, ad ogni avvio di Linux, abbia tutti i parametri dell'interfacce ethernet e wireless gia` configurati?

GRAZIE

CIAO

Uso la Debian Lenny Testing.

Trunks
Moderatore




2016 Messaggi

Inserito il - 21/05/2007 : 19:26:04  Mostra Profilo
Con ifconfig da root. Qua viene spiegato:

htt*://openskills.info/topic.php?ID=156

ifconfig va a scrivere in etc/network/interfaces
Torna all'inizio della Pagina

balubeto
New Member



45 Messaggi

Inserito il - 22/05/2007 : 19:12:30  Mostra Profilo
Ho deciso di fare tutto a mano anche per imparare bene:

Dato che il mio portatile ha anche un chip wireless 802.11b/g


PLUTO:~# lspci | grep -i wireless                                                                                           
02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)


ho provato a configurare il file /etc/network/interfaces in questo modo:


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-essid Reparto_giorno
        wireless-mode Manager
        wireless-channel 6
        wireless-ap 00:12:A9:55:11:43
        wireless-key 62D20F769AC17D958E31DF5039D088E1

auto eth1


Dove eth1 e` l'interfaccia della scheda di rete cablata; mentre eth2 e` l'interfaccia del chip di rete wireless.

Il valore di wireless-ap e` il MAC del mio AP Client/Repeater (che e` connesso ad un AP "Server" che e` collegato via cavo ad un firewall hardware che funge da gateway) ed il valore di wireless-key e` la chiave WEP a 152 bit generata dal mio AP Client/Repeater.

Dopo aver riavviato Linux, ho dato i seguenti comandi da un terminale:


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
          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: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:0 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

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:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4870 (4.7 KiB)  TX bytes:4870 (4.7 KiB)

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.


e, fin qui, mi sembra tutto ok.

Ora, ho disattivato eth1 ed attivato eth2 cosi`:


PLUTO:~# ifdown eth1
PLUTO:~# ifup eth2
PLUTO:~# ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 00:90:4B:49:F5:3B
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::290:4bff:fe49:f53b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:7 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22 (22.0 b)  TX bytes:6536 (6.3 KiB)
          Interrupt:5

PLUTO:~# iwconfig eth2
eth2      IEEE 802.11b/g  ESSID:"Reparto_giorno"  Nickname:"Broadcom 4306"
          Mode:Managed  Frequency=2.437 GHz  Access Point: 00:12:A9:55:11:43
          Bit Rate=11 Mb/s   Tx-Power=15 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:62D2-0F76-9AC1-7D95-8E31-DF50-39   Security mode:open
          Link Quality=100/100  Signal level=3/3  Noise level=188/100
          Rx invalid nwid:0  Rx invalid crypt:7  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


A questo punto, la spia del Wireless incomincia a lampeggiare e vedo, dall'interfaccia WEB del mio AP Client/Repeater, che il portatile e` connesso. Per sicurezza, provo a scrivere:


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth2
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth2


A questo punto, noto che l'ultima riga stenta ad apparire. Quindi, scrivo:


PLUTO:~# cat /proc/net/wireless
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 20
  eth2: 0000  100.    3.  187.       0     73      0      0      0        0
PLUTO:~# tail -n 52 /var/log/messages
May 22 12:52:56 localhost kernel: eth1: link down
May 22 12:52:56 localhost kernel: NET: Registered protocol family 10
May 22 12:52:56 localhost kernel: lo: Disabled Privacy Extensions
May 22 12:52:56 localhost kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
May 22 12:52:56 localhost kernel: IPv6 over IPv4 tunneling driver
May 22 12:52:57 localhost hpiod: 1.6.10 accepting connections at 2208...
May 22 12:53:00 localhost kernel: ACPI: Battery Slot [BAT1] (battery present)
May 22 12:53:00 localhost kernel: ACPI: AC Adapter [ACAD] (on-line)
May 22 12:53:00 localhost kernel: ACPI: Power Button (FF) [PWRF]
May 22 12:53:00 localhost kernel: ACPI: Lid Switch [LID]
May 22 12:53:00 localhost kernel: ACPI: Power Button (CM) [PWRB]
May 22 12:53:01 localhost kernel: lp0: using parport0 (interrupt-driven).
May 22 12:53:01 localhost kernel: ppdev: user-space parallel port driver
May 22 12:53:06 localhost dhcdbd: Started up.
May 22 12:53:06 localhost kernel: bcm43xx: PHY connected
May 22 12:53:06 localhost kernel: bcm43xx: Microcode rev 0x127, pl 0xe (2005-04-18  02:36:27)
May 22 12:53:06 localhost kernel: bcm43xx: Radio turned on
May 22 12:53:07 localhost kernel: bcm43xx: Chip initialized
May 22 12:53:07 localhost kernel: bcm43xx: 32-bit DMA initialized
May 22 12:53:07 localhost kernel: bcm43xx: Keys cleared
May 22 12:53:07 localhost kernel: bcm43xx: Selected 802.11 core (phytype 2)
May 22 12:53:07 localhost kernel: ADDRCONF(NETDEV_UP): eth2: link is not ready
May 22 12:53:41 localhost kernel: [drm] Initialized drm 1.0.1 20051102
May 22 12:53:41 localhost kernel: ACPI: PCI Interrupt 0000:01:05.0[A] -> GSI 16 (level, low) -> IRQ 185
May 22 12:53:41 localhost kernel: [drm] Initialized radeon 1.25.0 20060524 on minor 0
May 22 12:53:42 localhost kernel: Bluetooth: Core ver 2.10
May 22 12:53:42 localhost kernel: NET: Registered protocol family 31
May 22 12:53:42 localhost kernel: Bluetooth: HCI device and connection manager initialized
May 22 12:53:42 localhost kernel: Bluetooth: HCI socket layer initialized
May 22 12:53:42 localhost kernel: Bluetooth: L2CAP ver 2.8
May 22 12:53:42 localhost kernel: Bluetooth: L2CAP socket layer initialized
May 22 12:53:42 localhost kernel: Bluetooth: RFCOMM socket layer initialized
May 22 12:53:42 localhost kernel: Bluetooth: RFCOMM TTY layer initialized
May 22 12:53:42 localhost kernel: Bluetooth: RFCOMM ver 1.8
May 22 12:53:43 localhost kernel: mtrr: 0xf0000000,0x8000000 overlaps existing 0xf0000000,0x4000000
May 22 12:53:43 localhost last message repeated 2 times
May 22 12:53:43 localhost kernel: agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
May 22 12:53:43 localhost kernel: agpgart: Putting AGP V3 device at 0000:00:00.0 into 4x mode
May 22 12:53:43 localhost kernel: agpgart: Putting AGP V3 device at 0000:01:05.0 into 4x mode
May 22 12:53:43 localhost kernel: [drm] Setting GART location based on new memory map
May 22 12:53:43 localhost kernel: [drm] Loading R200 Microcode
May 22 12:53:43 localhost kernel: [drm] writeback test succeeded in 1 usecs
May 22 12:54:17 localhost gconfd (root-3232): inizializzazione (versione 2.16.1), pid 3232, utente "root"
May 22 12:54:17 localhost gconfd (root-3232): L'indirizzo "xml:readonly:/etc/gconf/gconf.xml.mandatory" è stato risolta ad una sorgente di configurazione in sola lettura in posizione 0
May 22 12:54:17 localhost gconfd (root-3232): L'indirizzo "xml:readwrite:/root/.gconf" è stato risolto ad una sorgente di configurazione scrivibile in posizione 1
May 22 12:54:17 localhost gconfd (root-3232): L'indirizzo "xml:readonly:/etc/gconf/gconf.xml.defaults" è stato risolta ad una sorgente di configurazione in sola lettura in posizione 2
May 22 12:54:17 localhost gconfd (root-3232): L'indirizzo "xml:readonly:/var/lib/gconf/debian.defaults" è stato risolta ad una sorgente di configurazione in sola lettura in posizione 3
May 22 12:54:17 localhost gconfd (root-3232): L'indirizzo "xml:readonly:/var/lib/gconf/defaults" è stato risolta ad una sorgente di configurazione in sola lettura in posizione 4
May 22 12:54:23 localhost gconfd (root-3232): L'indirizzo "xml:readwrite:/root/.gconf" è stato risolto ad una sorgente di configurazione scrivibile in posizione 0
May 22 12:57:45 localhost kernel: bcm43xx: set security called, .active_key = 0, .level = 1, .enabled = 1, .encrypt = 1
May 22 12:57:45 localhost kernel: SoftMAC: Open Authentication completed with 00:12:a9:55:11:43
May 22 12:57:45 localhost kernel: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready


e noto che la linea wireless e` disturbata (parametro noise). Infatti, pingando il gateway (192.168.1.1), mi indica che e` irraggiugbile (dimenticavo di dirvi che la spia Wireless del notebook rimane quasi sempre spenta anche se l'AP mi indica che il notebook e` connesso).

Che cosa c'e` che non va?

GRAZIE

CIAO
Torna all'inizio della Pagina

Trunks
Moderatore




2016 Messaggi

Inserito il - 22/05/2007 : 20:35:32  Mostra Profilo
Interessante :p. I parametri della rete sembrano tutti ok.Analizzando gli output dei vari comandi si vede che "perdi" dei pacchetti.

RX packets:1 errors:0 dropped:7 overruns:0 frame:0

ed effettivamente hai un valore altissimo di noise

Link Quality=100/100 Signal level=3/3 Noise level=188/100

Altra stranezza:

Bit Rate=11 Mb/s Tx-Power=15 dBm

Dovresti avere un 54 mb/s

Sembra che la linea sia "castrata"

Prova a cambiare canale, e disabilita il supporto a ipv6.

Il driver bcm è già presente nel kernel o lo hai compilato tu?
Torna all'inizio della Pagina

balubeto
New Member



45 Messaggi

Inserito il - 23/05/2007 : 09:22:02  Mostra Profilo
Cosa significa linea "castrata"?

Come si fa ad abilitare/disabilitare il supporto a ipv6?

Il driver BCM4306 era gia` presente nello kernel. Ho dovuto solamente prelevare, dai repository della Debian, il relativo firmware in quanto era nella sezione Contrib.

GRAZIE

CIAAO
Torna all'inizio della Pagina
  Discussione Precedente Discussione Discussione Successiva  

 Forum Bloccato
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
Vai a:
NoTrace Security Forum
© Nazzareno Schettino
RSS NEWS
Torna all'inizio della Pagina
Pagina generata in 0,2 secondi. TargatoNA | SuperDeeJay | Snitz Forums 2000