# loopback no IP address



## murias (Nov 24, 2010)

A little background in case it is needed.

This machine I have just recently updated from 7.1 to 8.1, updating everything in this process.
The machine is in my office and not at is final resting home, and is currently using DHCP not the static IP which the machine will have.

That all said.

lo0 does not have the standard 127.0.0.1 loopback address, it has nothing.

results of ifconfig

```
em0: flags=8802<BROADCAST,SIMPLEX,MULITCAST> metric 0 mtu 1500
       options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
       ether 00:17:f2:0c:c3:44
       media: Ethernet autoselect
       status: no carrier
em1: flags=8843<UP,BROUADCAST,RUNNING,SIMPLEX,MULITCAST> metric 0 mtu 1500
       options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
       ether 00:17:f2:0c:c3:44
       inet 10.0.1.5 netmask 0xffffff00 broadcast 10.0.1.255
       media: Ethernet autoselect (1000baseT <full-duplex>)
       status: active
lo0: flags=8008<LOOPBACK,MULTICAST>
       options=3<RXCSUM,TXCSUM>
```

netstat -r gives me this in return

```
Routing Tables

Internet:
Destination                     Gateway                    Flags         Refs      Use     Netif       Expire
default                            10.0.1.1                    UGS                0     210      em1
10.0.1.0                          link#2                       U                    0        13     em1
10.0.1.5                          link#2                       UHS                0          0      lo0
```

In rc.conf I had commented out the static IP addresses for em0 and em1.  Added:

```
ifconfig_em1="DHCP"
```
Just to handle the dhcp of my office.  

I have not had an issue with this before.  I built and tested this server here in my office using dhcp and the loopback was there, and able to test everything which connects to loopback.

Since this problem arose, I did try adding this to rc.conf

```
ifconfig_lo0="127.0.0.1 netmask 255.255.255.0"
```
which did nothing.

yet I do:

```
ifconfig lo0 inet 127.0.0.1 netmask 255.255.255.0
```
and loopback seems to come up

Could someone please enlighten me as to why this is? might this be a problem when I go back to the static IP?
Is this something I should be as concerned about as I currently am?  How to avoid this in the future?

Thank you.
Murias


----------



## SirDice (Nov 24, 2010)

Post your rc.conf please. I'm sure the answer is in there.


----------



## akitaro (Nov 24, 2010)

It seems to me you did not update /etc hierarchy


----------



## murias (Nov 24, 2010)

SirDice said:
			
		

> Post your rc.conf please. I'm sure the answer is in there.


the rc.conf feels like a long shot to me, but it follows at the bottom.



			
				akitaro said:
			
		

> It seems to me you did not update /etc hierarchy


You might be onto something with this.

When I did the upgrade and the whole mergemaster process. There were numerous /etc files which I said wait till later, on the monitor was using was not able to read enough of the differences, and was not able to read the nice +++ or --- flags at beginning of each line.  So I merged some, saved the rest for later.  If I am not mistaken they are kept in /var/tmp/temproot/etc.

As a side note I also have the same problem that was stated in another forum post http://forums.freebsd.org/archive/index.php/t-8938.html

I somehow now hear someone saying RTM!  But, not had these problems on previous updates / upgrades.

anywho... here is my rc.conf

```
# -- sysinstall generated deltas -- # Wed May 20 14:31:10 2009
# Created: Wed May 20 14:31:10 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="mpcs1.mpcompliance.com"
sshd_enable="YES"
mysql_enable="YES"
dovecot_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
postfix_enable="YES"
apache22_enable="YES"
#webmin_enable="YES"
clamav_freshclam_enable="YES"
clamav_clamd_enable="YES"
maia_enable="YES"
#mailman_enable="YES"
# -- sysinstall generated deltas -- # Sat May 23 15:15:31 2009
#ifconfig_em1="inet 208.69.182.99  netmask 255.255.255.240"
#ifconfig_em0="inet 208.69.182.98  netmask 255.255.255.240"
#defaultrouter="208.69.182.97"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
#mailgraph_enable="YES"
#named_enable="YES"
#proftpd_enable="YES"
#proftpd_modwrap_enable="NO"
vsftpd_enable="YES"
#svnserve_enable="YES"
#svnserve_flags="-d --listen-port=3690 --listen-host 208.69.182.99"
#svnserve_data="/home/svn/repos"
#svnserve_user="svn"
#svnserve_group="svn"
ifconfig_em1="DHCP"
ifconfig_lo0="127.0.0.1 netmask 255.255.255.0"
```

The last two lines I added to get DHCP in my office, and then to try to see if I could get loopback up on its own.

Cheers
and thank you


----------



## DutchDaemon (Nov 24, 2010)

[cmd=]$ grep lo0 /etc/defaults/rc.conf[/cmd]
should give you

```
ifconfig_lo0="inet 127.0.0.1"	# default loopback device configuration.
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
```

If it doesn't, your /etc/ wasn't properly updated/populated by mergemaster(8).


----------



## wblock@ (Nov 24, 2010)

-Ui options to mergemaster(8) help a lot.  /etc/defaults/rc.conf should set ifconfig_lo0="inet 127.0.0.1".  But doing it in rc.conf should work, too.


----------



## SirDice (Nov 24, 2010)

Also check if /etc/defaults/rc.conf has

```
network_interfaces="auto"       # List of network interfaces (or "auto").
```

I had the same issue once when I forgot to add lo0 to network_interfaces in my /etc/rc.conf :e


----------



## murias (Nov 26, 2010)

Direct from /etc/defaults/rc.conf

```
network_interfaces="auto"          # List of network interfaces (or "auto")
ifconfig_lo0="inet 127.0.0.1"
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff"    # Sample alias entry
```

I also just altered /etc/rc.conf to

```
ifconfig_lo0="inet 127.0.0.1"
```

This did not bring up lo0 on reboot.

It is sounding like then that I should be rebooting into single user mode, and then continuing with the mergemaster manually using sdiff.  When that is complete then doing my make delete-old and make delete-old-libs.  This is from my understanding of this thread and the other thread I had mentioned above, then my problem might be solved.

I must say though that I am not fully clear how that will bring back up lo0, as my rc.conf is being read at boot and bringing up my other network devices and launching all my daemons.  -- I also like to understand my errors and corrections, makes for a better administrator.

Cheers
Murias


----------



## DutchDaemon (Nov 26, 2010)

Your /etc/rc script and /etc/rc.d/ files may be out of sync with the current userland and start scripts too, causing a partial by-pass of needed steps at boot-time. Yes, re-running [cmd=]mergemaster -Ui[/cmd] may patch things up, though I would probably re-run the entire operation (kernel/world/mergemaster/delete-old).


----------



## murias (Nov 30, 2010)

I always like it when the person with the problem follows up and lets others know when the original issue gets solved and what worked.  So.. 

Thank you all for your assist on this.

I ended up booting into single user, doing `mergemaster -Ui` and not saving anything for later, dealing with it immediately.  I then followed it up with the rest of the steps I had not completed `make delete-old` and `make delete-old-libs`  Machine is so sweet now.  well, one little bitty bug, but that will be in its own thread if I can't find an appropriate answer.

--As a side note, I have noticed that there are two online open source communities which I think hands down rock it over others, FreeBSD and then Drupal.

Cheers
Murias


----------

