Manual config NIC 

If 'ifup -a' does not work, bring up the NIC by hand:

  1. load the NIC driver

    # modprobe 8139too
  2. configure the NIC

    # ifconfig eth0 inet 192.168.0.99 up
    or via dhcp:
    # dhclient eth0
  3. set the default gateway if any

    # route add default gw 192.168.0.1

Connection check 

ifconfig
ip address show
route
ip route show
ip link show
cat /var/lib/dhcp/dhclient.leases

Remove default gateway (temporally) 

route del default gw 192.168.0.1

Sample 

% route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
% route del default gw 192.168.0.1
% route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

Remove static gateway 

> Another question, how can I removed the static gateway setting?
> I set my static gateway via linuxconf. I don't have linuxconf now,
> and I don't know where linuxconf stores the static gateway setting.
> I'm just using 'route del' to remove default routing temporally.

If Redhat or Mandrake you could look in

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0

Bit Twister

Static setting 

/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=xpt
GATEWAY=192.168.0.1
/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes

Change 

before change 

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

change to 

--- /tmp//1382.tmpf.workon.5317      2003-10-23 13:58:40.000000000 -0400
+++ /etc/sysconfig/network      2003-10-23 13:58:40.000000000 -0400
@@ -1,3 +1,2 @@
 NETWORKING=yes
 HOSTNAME=xpt
-GATEWAY=192.168.0.1
/etc/sysconfig/network-scripts/ifcfg-eth0: same
[Tip]

!!

ifdown eth0
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
ifup eth0
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo