0

I have a VM running CentOS which only has one virtual adapter attached.

enter image description here

However, if you look at the details you see this:

enter image description here

I only want/need the 10.1.x.x address. Where did the others come from? Can they safely be removed? If so, how?

Here is an ifconfig:

br-0804aae03e53: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        inet6 fe80::42:b6ff:fe4e:a3b1  prefixlen 64  scopeid 0x20<link>
        ether 02:42:b6:4e:a3:b1  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 1312 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:10ff:fec8:4c88  prefixlen 64  scopeid 0x20<link>
        ether 02:42:10:c8:4c:88  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 656 (656.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.1.1.112  netmask 255.255.0.0  broadcast 10.1.255.255
        inet6 fe80::7a35:f4e4:8726:909a  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:65:8d:af  txqueuelen 1000  (Ethernet)
        RX packets 32094  bytes 2243477 (2.1 MiB)
        RX errors 0  dropped 245  overruns 0  frame 0
        TX packets 493  bytes 79107 (77.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0xfd3a0000-fd3c0000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 498  bytes 41767 (40.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 498  bytes 41767 (40.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth117d12a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::24bd:2fff:feac:fd9d  prefixlen 64  scopeid 0x20<link>
        ether 26:bd:2f:ac:fd:9d  txqueuelen 0  (Ethernet)
        RX packets 54  bytes 3996 (3.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22  bytes 1472 (1.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth514d3ac: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::2431:c2ff:fea2:b8df  prefixlen 64  scopeid 0x20<link>
        ether 26:31:c2:a2:b8:df  txqueuelen 0  (Ethernet)
        RX packets 120  bytes 13715 (13.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 112  bytes 15542 (15.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth869d99f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::8c54:eeff:fe2a:c8dd  prefixlen 64  scopeid 0x20<link>
        ether 8e:54:ee:2a:c8:dd  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 1312 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethebc687e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f413:feff:fe5f:4f1  prefixlen 64  scopeid 0x20<link>
        ether f6:13:fe:5f:04:f1  txqueuelen 0  (Ethernet)
        RX packets 79  bytes 12873 (12.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 112  bytes 12937 (12.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:76:7e:39  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
1

The other IP addresses correspond to the bridges you have inside the VM, presumably to provide network connectivity to containers and other VMs inside the VM. To “delete” those IP addresses, you’d have to remove the corresponding bridges, but if there are useful containers and VMs inside the VM, and you need access to them, you shouldn’t do that.

Alternatively, you could also try to reconfigure all your VM-internal networking to be private, i.e. not use bridges connected to your NIC, and use NAT for everything which needs to exit the VM.

  • Hmm, there is only one "app" running and I access it via the 10.1 address. However, this is great info. I can look through the docker YAML and see if there are interfaces in there defined that I don't need? – Scott Beeson May 25 at 16:10
  • p.s. I'm brand new to docker, so I really appreciate the feedback even if the question seemed stupid. – Scott Beeson May 25 at 16:10
  • 1
    There are no stupid questions ;-). If you’re not hosting VMs inside the VM, you shouldn’t need virbr0; that might be added for you by libvirt packages. I wouldn’t worry about the Docker side of things; is there a particular reason you want to clean things up? – Stephen Kitt May 25 at 16:15
  • I like things tidy. :) – Scott Beeson May 25 at 16:16
  • OK ;-). NAT would be an option too, I don’t have the details off-hand. – Stephen Kitt May 25 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.