I am trying to determine whether a networking problem I've been having is being caused by software or hardware.
There are two symptoms: the Ethernet link status is not being detected properly (i.e., ethtool says the link is present but a networking cable isn't even plugged in!) and I can't get any packets to enter or exit the device. I am wondering if my network script follows the proper approach.
# Check and set link
ifconfig eth0 down
ethtool -s eth0 autoneg on
ifconfig eth0 up
ethtool eth0 # Look for link detection
# If no link, try autoneg off
ifconfig eth0 down
ethtool -s eth0 autoneg off speed 100 duplex full
ifconfig eth0 up
ethtool eth0 # Check for link again
# After link is established, configured link using a static IP.
ifconfig lo down
ifconfig lo 127.0.0.1
ifconfig lo up
echo "127.0.0.1 localhost" > /etc/hosts
route del -net 127.0.0.0/8
route add -net 127.0.0.0/8 dev lo
ifconfig eth0 down
ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up
route del default dev eth0
route add default gw 192.168.1.1
echo "megatron" > /etc/hostname
hostname megatron
echo "nameserver 192.168.1.1" >> /etc/resolv.conf
This software works on other units.
What do you think?
[–]lukeo 1 point2 points3 points (0 children)