这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@edigaryev
Copy link
Collaborator

docs/faq.md Outdated
}
```

Because the macOS built-in DHCP server overwrites the `hw_address` with the `identifier`, it leaves no information about the VM's MAC address to the `tart ip`, which relies on this file to determine the IP address associated with the VM's MAC address.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like tart ip depends on /var/db/dhcpd_leases, which cannot work for bridged network, since the builtin macOS dhcps server is not the the loop.

It would be nice to add a sentence making this more clear (tart looks up the vm ip address in /var/db/dhcpd_leases...), and add a section about bridged network.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 98ba367.

Copy link

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but it sounds like we have 2 solutions and users have to choose the right one for the vm. The system can be smarter and pick the right solution (or both) transparently.

tart ip --resolver=arp <VM>
```

This causes the `tart ip` to consult the host's ARP table instead of the `/var/db/dhcpd_leases` file.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have very little experience with querying arp, but in the last time I tried to use it the vm (not a tart vm) got an ip and was accessible, but arp did not report the vm ip.

Copy link
Collaborator Author

@edigaryev edigaryev Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably related to #873 (comment).

I'll try to document this in this section too.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to the common case, see
#873 (comment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved in c21cebf.

fkorotkov
fkorotkov previously approved these changes Jan 20, 2025
docs/faq.md Outdated

This causes the `tart ip` to consult the host's ARP table instead of the `/var/db/dhcpd_leases` file.

Note that this method of resolving the IP heavily relies on the level of VM's talkativeness on the network. This is normally not an issue for macOS VMs, but on Linux VMs you might need to install Samba, which includes a [NetBIOS name server](https://www.samba.org/samba/docs/current/man-html/nmbd.8.html) that exhibits the same behavior as macOS and populates the ARP table of the host OS:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

talkativeness sounds wrong to me, maybe it is better to describe the actual behavior (sending the special arp request that makes the host added to arp cache).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved in 2e52d95.

@edigaryev edigaryev merged commit 2d55f3b into main Jan 20, 2025
7 checks passed
@edigaryev edigaryev deleted the document-dhcp-identifiers-issue branch January 20, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared network with both host to vm anv vm to vm access

4 participants