1

my ifconfig lo0 looks like this:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 192.168.10.11 netmask 0xffffff00
nd6 options=201<PERFORMNUD,DAD>

I need to add inet 127.0.0.1 netmask 0xff000000. How can I do it ?

  • 1
    In Terminal, what's the output of: cat /etc/hosts – user3439894 Jul 30 '18 at 11:32
  • 1
    Just out of curiosity, how did lo0 come to have that IP address assigned to it? – Seamus Jul 30 '18 at 13:12
1

Run this command in the Terminal:

ifconfig lo0 127.0.0.1/8

Or if you want to keep your current (odd) address for the lo0 interface, then add 127.0.0.1 as an additional (alias) address with:

ifconfig lo0 alias 127.0.0.1
  • Don't work for me. I found the solution -> ifconfig lo0 alias 127.0.0.1 – Рома Бойко Jul 31 '18 at 14:23
  • 1
    Your setup seems generally broken if you have a 192.168.x.x address on an lo0 interface? Why do you need that? – jksoegaard Jul 31 '18 at 19:52
  • I added this for my docker – Рома Бойко Aug 1 '18 at 8:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .