Ethernet
From Alessandro's Wiki
- Avere informazioni su tutte le interfaccie di rete:
Ethernet in Linux
ifconfig -a
- attivare la scheda di rete eth0 (senza script di ifup/ifdown)
ifconfig eth0 up
- Chiedere in broadcast un indirizzo ip su eth0 (!!!)
dhclient eth0
- Sapere se hai problemi con la scheda (il NIC)
# tail -50 /var/log/messages |grep -A4 eth0 NETDEV WATCHDOG: eth0: transmit timed out Mar 26 14:21:39 porcellino kernel: eth0: transmit timed out, tx_status 00 status e000. Mar 26 14:21:39 porcellino kernel: diagnostics: net 0cf2 media 8880 dma 000000a0 fifo 0000 Mar 26 14:21:39 porcellino kernel: Flags; bus-master 1, dirty 1048374(6) current 1048390(6) Mar 26 14:21:39 porcellino kernel: Transmit list 16c7f5c0 vs. d6c7f5c0.
- scanneriz1zare una rete privata:
for a in `seq 1 254`; do echo -n -e "\r $a ";ping -c1 192.168.1.$a|grep "bytes from "; done
Network
- para conectar un host directo a un puerto de un router (Cisco)
cisco-6500# cisco-6500#conf t cisco-6500(config)#int gi3/44 cisco-6500(config-if)#spanning-tree port ? port-priority portfast cisco-6500(config-if)#spanning-tree portfast ? disable Disable portfast for this interface trunk Enable portfast on the interface even in trunk mode <cr> cisco-6500(config-if)#spanning-tree portfast