Default gateway set incorrectly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I try to setup networking with a fresh CENTOS4.4 installation. Upto now I have 20 installations, most of them FC3/FC4 and RHEL3.
I noticed that the default gateway is not setup properly when using Centos.

[root@raaf ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.101.0   *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         192.168.101.1   0.0.0.0         UG    1      0        0 eth1

Networking is setup done by using dhcp, and this seems to work OK. Problem is however that the gateway should be 192.168.101.2 and not 192.168.101.1 (does not exist). If I manually add the gateway, networking is OK:

route add default gw 192.168.101.2 eth1
[root@raaf ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.101.0   *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         scholekster     0.0.0.0         UG    0      0        0 eth1
default         192.168.101.1   0.0.0.0         UG    1      0        0 eth1

(scholekster=192.168.101.2)

If I issue "service restart network". The added gateway is removed again. I understand that I can fix this default gateway, but that is not what I want.
I also tried to manually start dhclient:

[root@raaf ~]#  dhclient eth1
....
Listening on LPF/eth1/00:15:f2:********
Sending on   LPF/eth1/00:15:f2:********
Sending on   Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.101.2
bound to 192.168.101.221 -- renewal in 294560 seconds.

But now my default gateway is added correctly! So is dhclient not used by the networking scripts??

Anyone got an idea of how I could debug this further? The reason I use eth1, is that the machine has two interfaces and is dual bootable. The FC4 installation seems to have a different idea of which adapter should be eth0...

Thanks,
Theo

PS.
The error message it started with, for google :-)
[root@raaf ~]# yum update
Setting up Update Process
Setting up repositories
http://mirror.centos.org/centos/4/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (113, 'No route to host')>

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux