If 'ifup -a' does not work, bring up the NIC by hand:
load the NIC driver
# modprobe 8139too
configure the NIC
# ifconfig eth0 inet 192.168.0.99 up or via dhcp: # dhclient eth0
set the default gateway if any
# route add default gw 192.168.0.1
ifconfig ip address show
route ip route show ip link show
cat /var/lib/dhcp/dhclient.leases
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 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
> 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
$ 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
--- /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
![]() | |
!! |
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