CentOS 4.4 routing for localhost 169.254.x.x

Issues related to configuring your network
Post Reply
jcgreer
Posts: 1
Joined: 2005/12/28 19:08:11

CentOS 4.4 routing for localhost 169.254.x.x

Post by jcgreer » 2007/03/12 20:40:40

Hello, I have the strangest thing, CentOS 4.4, clean install basic server stuff + KDE, SEL turned on .
My route for 'lo' below is 169.254.0.0 ? instead of 127.0.0.0 ? The ifcfg-* files are listed below also.
Why would lo come up with this address ? it does seem to be causing some routing problems sometimes the route to the internet works sometimes it does not. I deleted this route and manually put in " route add -net 127.0.0.0 netmask 255.0.0.0 lo" and now it list correctly but something is still not right. ifconfig shows 127.0.0.0 correctly (and always has...). and I -can- 'ping localhost' ok, so it is actually there just not in the route. I have been looking on the CentOS forums also, I have not seen this thread yet, but I have seen quite a few routes that do not have 'lo' listed....
If I put NOZEROCONFIG=yes in /etc/sysconfig/network then there is -no- route for lo at all !!

So, I just grabed a blank drive and installed CentOS 4.4 Server (CD) on the new blank drive, left the default DHCP for both ethernet cards (linksys), did a basic quick install, booted up and there is -no- "lo" interface listed with 'route -n' !?!? WHAT!~
So I copied the configurations below for ifcfg-eth0 and ifcfg-eth1 (ifcfg-lo is already identical) and then re-booted, and everything is correct except there is no "lo" interface listed at all in 'route -n' or is this the 'new thing'?

This is similar to question ID: 22055323 that had lots of good ideas, but again 'why', I do not like to have to use a 'work around'. I have installed linux boxes since Redhat 5.2 and have never seen this before.
http://www.experts-exchange.com/Networking/Linux_Networking/Q_22055323.html

Any ideas...?
Thanks much.
-----

[root@test sysconfig]# cat network
NETWORKING=yes
HOSTNAME=fred.invalid-server.com
DOMAINNAME=invalid-server.com
GATEWAY=216.11.145.62
GATEWAYDEV=eth0
FORWARD_IPV4=yes

[root@test sysconfig]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
216.11.145.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 lo
0.0.0.0 216.11.145.62 0.0.0.0 UG 0 0 0 eth0

[root@test]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:E7:2C:0C:11
inet addr:216.11.145.1 Bcast:216.81.195.63 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46820 errors:0 dropped:0 overruns:0 frame:0
TX packets:41511 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38911051 (37.1 MiB) TX bytes:11628648 (11.0 MiB)

eth1 Link encap:Ethernet HWaddr 00:A3:B4:FC:C2:44
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43269 errors:0 dropped:0 overruns:0 frame:0
TX packets:40261 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11456384 (10.9 MiB) TX bytes:38357329 (36.5 MiB)

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:383 errors:0 dropped:0 overruns:0 frame:0
TX packets:383 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:41727 (40.7 KiB) TX bytes:41727 (40.7 KiB)

[root@test network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=216.11.145.63
IPADDR=216.11.145.1
NETMASK=255.255.255.192
NETWORK=216.11.145.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
NOZEROCONF=yes

[root@test network-scripts]# cat ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
BROADCAST=192.168.1.255
IPADDR=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
NOZEROCONF=yes

[root@test network-scripts]# cat ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
[root@test network-scripts]#

pjwelsh
Posts: 2620
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 4.4 routing for localhost 169.254.x.x

Post by pjwelsh » 2007/03/12 21:14:01

"route -n" or "netstat -rn" won't show the actual "lo" interface. That just says that 169.254.0.0 would go to the interface of "lo". The 169.254.0.0 is realy not a problem. Put NOZEROCONF=yes into /etc/sysconfig/network to get rid of it (http://www.redhat.com/archives/fedora-list/2004-January/msg02353.html)

Post Reply

Return to “CentOS 4 - Networking Support”