Change NIC characteristic in linux

For some reason, my debian box does not enable my NIC’s gigabit capability. The manual way is :

1. apt-get install ethtool

2. ethtool <interface> -s speed <link speed> duplex full autoneg off – e.g. ethtool eth0 -s speed 100 duplex full autoneg off

3. ifconfig eth0 down

4. ifconfig eth0 up

5. route add default gw <gateway> – e.g. route add default gw 192.168.0.1

run “ethtool eth0” to check the interface speed.

To make it permanent, add the following to /etc/network/interfaces :

post-up /usr/bin/ethtool eth0 -s speed 100 duplex full autoneg off
post-up route add default gw 192.168.0.1

Cheers !!!