I deleted the entries in routes file.
I then went into yast and under routes entered the gw.
I rebooted.
NOTE: This is what I saw just after the system came up.
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 eth1
linux-jh3c:~ # cat /etc/sysconfig/network/routes
default 192.168.1.1 - -
linux-jh3c:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:D3:AD:C4:9B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:17 Base address:0x8000
eth1 Link encap:Ethernet HWaddr 00:1A:73:8F:93:79
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:73ff:fe8f:9379/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:3
TX packets:18 errors:7 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:342 (342.0 b) TX bytes:3905 (3.8 Kb)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:90 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6332 (6.1 Kb) TX bytes:6332 (6.1 Kb)
NOTE: I decided to plug in the cat5 lan cable and this is what I saw.
linux-jh3c:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 eth1
linux-jh3c:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 eth1
linux-jh3c:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
linux-jh3c:~ #
As can be seen the gw was added, and ifconfig looks like this.
ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:D3:AD:C4:9B
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:d3ff:fead:c49b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2691 errors:0 dropped:0 overruns:0 frame:0
TX packets:2726 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1805862 (1.7 Mb) TX bytes:461427 (450.6 Kb)
Interrupt:17 Base address:0x8000
eth1 Link encap:Ethernet HWaddr 00:1A:73:8F:93:79
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:73ff:fe8f:9379/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:19
TX packets:22 errors:7 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4777 (4.6 Kb) TX bytes:4289 (4.1 Kb)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:90 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6332 (6.1 Kb) TX bytes:6332 (6.1 Kb)
NOTE: I then unplugged the lan cable and this is what I saw.
linux-jh3c:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 eth1
linux-jh3c:~ #
ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:D3:AD:C4:9B
inet6 addr: fe80::216:d3ff:fead:c49b/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2740 errors:0 dropped:0 overruns:0 frame:0
TX packets:2771 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1840112 (1.7 Mb) TX bytes:465765 (454.8 Kb)
Interrupt:17 Base address:0x8000
eth1 Link encap:Ethernet HWaddr 00:1A:73:8F:93:79
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:73ff:fe8f:9379/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:22
TX packets:23 errors:7 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4777 (4.6 Kb) TX bytes:4385 (4.2 Kb)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:90 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6332 (6.1 Kb) TX bytes:6332 (6.1 Kb)
linux-jh3c:~ # cat /etc/sysconfig/network/routes
default 192.168.1.1 - -
linux-jh3c:~ #
As can be seen plug the lan cable in and the gw comes up, unplug the cable and the gw is gone. And back to added the gw manually.
Hopes this helps, and thanks for your help.