How the minikube vm network implement?

I use minikube ssh log into the minikube vm from host macos:

$ minikube ssh
❗  Executing "docker container inspect minikube --format={{.State.Status}}" took an unusually long time: 2.285660564s
💡  Restarting the docker service may improve performance.
Last login: Wed Oct 13 14:59:25 2021 from 192.168.49.1

but on my macos there is no IP address (192.168.49.1)

$ ifconfig -a | grep 192.168.49.1

so how the virtual network implement?


minikube vm node IP is 192.168.49.2 :

$ minikube profile list
|----------|-----------|---------|--------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes |
|----------|-----------|---------|--------------|------|---------|---------|-------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | v1.22.2 | Running |     1 |
|----------|-----------|---------|--------------|------|---------|---------|-------|

Bridged network. After you do minikube start and check ipconfig, you will likely see something like this:

bridge100: flags=8a63<UP,BROADCAST,SMART,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether REDACTED 
	inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
	inet6 REDACTED%bridge100 prefixlen 64 secured scopeid 0x12 
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x0
	member: en7 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 17 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active

This will also probably vary based on the driver you choose. I use the hyperkit vm right now.

you mean in your case, the 192.168.0.1 can talk to minikube vm?

but in my case, after I started minikube, there only display one bridge, and no IPv4 address:

bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=63<RXCSUM,TXCSUM,TSO4,TSO6>
	ether 82:13:08:b0:ec:c0 
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x0
	member: en1 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 5 priority 0 path cost 0
	member: en2 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 6 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: <unknown type>
	status: inactive

I see you have thread 17764, which seems related to why you’re asking this. Going to continue the conversation there. On my MacBook, bridge0 exists but is not used by the minikube VM.