# multiple loopback devs phenomenon?

## agrypa1

Hi,

I need to figure out why my gentoo box shows three loopback devices, of which one is unreachable.

Here is my net setup:

```

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     7      0        0 br0

127.0.0.0       -               255.0.0.0       !     0      -        0 -

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         192.168.1.1     0.0.0.0         UG    7      0        0 br0

```

```

ip route

192.168.1.0/24 dev br0  scope link  metric 7 

unreachable 127.0.0.0/8  scope host 

127.0.0.0/8 via 127.0.0.1 dev lo  scope link 

127.0.0.0/8 via 127.0.0.1 dev lo 

default via 192.168.1.1 dev br0  metric 7 

```

```

ifconfig 

br0       Link encap:Ethernet  HWaddr 00:11:d8:1c:08:9e  

          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:15440 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10508 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:22971905 (21.9 MiB)  TX bytes:824007 (804.6 KiB)

eth0      Link encap:Ethernet  HWaddr 00:11:d8:1c:08:9e  

          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

          RX packets:15440 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10505 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:23249831 (22.1 MiB)  TX bytes:865280 (845.0 KiB)

          Interrupt:17 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:42 errors:0 dropped:0 overruns:0 frame:0

          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:3476 (3.3 KiB)  TX bytes:3476 (3.3 KiB)

tap0      Link encap:Ethernet  HWaddr 22:55:c6:f5:fd:52  

          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:8 overruns:0 carrier:0

          collisions:0 txqueuelen:500 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

```

ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN 

    link/ether be:9b:67:68:a8:27 brd ff:ff:ff:ff:ff:ff

3: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 00:11:d8:1c:08:9e brd ff:ff:ff:ff:ff:ff

4: wmaster0: <> mtu 0 qdisc noop state DOWN qlen 1000

    link/ieee802.11 00:11:d8:1a:1d:e9 brd 00:00:00:00:00:00

5: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000

    link/ether 00:11:d8:1a:1d:e9 brd ff:ff:ff:ff:ff:ff

8: tap0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500

    link/ether 22:55:c6:f5:fd:52 brd ff:ff:ff:ff:ff:ff

9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 

    link/ether 00:11:d8:1c:08:9e brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.10/24 brd 192.168.1.255 scope global br0

```

```

 ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN 

    link/ether be:9b:67:68:a8:27 brd ff:ff:ff:ff:ff:ff

3: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 00:11:d8:1c:08:9e brd ff:ff:ff:ff:ff:ff

4: wmaster0: <> mtu 0 qdisc noop state DOWN qlen 1000

    link/ieee802.11 00:11:d8:1a:1d:e9 brd 00:00:00:00:00:00

5: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000

    link/ether 00:11:d8:1a:1d:e9 brd ff:ff:ff:ff:ff:ff

8: tap0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500

    link/ether 22:55:c6:f5:fd:52 brd ff:ff:ff:ff:ff:ff

9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 

    link/ether 00:11:d8:1c:08:9e brd ff:ff:ff:ff:ff:ff

```

I can't figure out why I've got dummy0 and three times 127.0.0.1 with one of them unreachable.

any clues, please?

Agryppa

----------

## poly_poly-man

that just means your routes are messed up. Try fixing them manually? otherwise, show us your /etc/conf.d/net

----------

## agrypa1

The trouble is that the thing shows "unreachable" even when the network is down, after I do 

 *Quote:*   

> /etc/init.d/net.br0 stop
> 
> ip route
> 
> unreachable 127.0.0.0/8  scope host 
> ...

 

and here is my relevant portion of net. The rest in the file is commented with #

```

#-----------------------------------------------------------------------------

# TUN/TAP

# For TUN/TAP support emerge net-misc/openvpn or sys-apps/usermode-utilities

#

# You must specify if we're a tun or tap device. Then you can give it any

# name you like - such as vpn

#tuntap_vpn="tun"

#config_vpn="192.168.0.1/24"

# Or stick wit the generic names - like tap0

#tuntap_tap0="tap"

#config_tap0="192.168.0.1/24"

tuntap_tap0="tun"

#config_tap0="null"

# For passing custom options to tunctl use something like the following.  This

# example sets the owner to adm

#tunctl_tun1="-u adm"

tunctl_tap0="-u kb2qzv -t tap0"

# OpenVPN-2.1_rc6 and newer allow --user and --group to set owner and group

# of the node as well

#openvpn_tun1="--user foo --group bar"

```

```

#-----------------------------------------------------------------------------

# Bridging (802.1d)

# For bridging support emerge net-misc/bridge-utils

# To add ports to bridge br0

#bridge_br0="eth0 eth1"

bridge_br0="eth0 tap0"

# or dynamically add them when the interface comes up

#bridge_add_eth0="br0"

#bridge_add_tap0="br0"

#bridge_add_eth1="br0"

# You need to configure the ports to null values so dhcp does not get started 

config_eth0="null"

config_tap0="null"

# Finally give the bridge an address - dhcp or a static IP

config_br0="dhcp" # may not work when adding ports dynamically

#config_br0="192.168.0.1/24"

# If any of the ports require extra configuration - for example wireless or

# ppp devices - we need to depend on them like so.

#rc_need_br0="net.eth0 net.tap0"

# Below is an example of configuring the bridge

# Consult "man brctl" for more details

#brctl_br0="setfd 0

#sethello 0

#stp off"

```

----------

