exam questions

Exam 70-740 All Questions

View all questions & answers for the 70-740 exam

Exam 70-740 topic 1 question 13 discussion

Actual exam question from Microsoft's 70-740
Question #: 13
Topic #: 1
[All 70-740 Questions]

You have a Hyper-V host named Server1 that runs Windows Server 2016.
Server1 has a virtual machine named VM1. VM1 is configured to run the Docker daemon.
On VM1, you have a container network that uses transparent mode.
You need to ensure that containers that run on VM1 can obtain IP addresses from DHCP.
What should you do?

  • A. On VM1, run Get-VMNetworkAdapter-VMName VM1 | Set-VMNetworkAdapter ""MacAddressSpoofing On.
  • B. On VM1, run docker network connect.
  • C. On Server1, run docker network connect.
  • D. On Server1, run Get-VMNetworkAdapter ""VMName VM1 | Set-VMNetworkAdapter ""MacAddressSpoofing On.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
To use DHCP for IP assignment on a virtual container host enable MACAddressSpoofing
If the container host is virtualized, and you wish to use DHCP for IP assignment, you must enable MACAddressSpoofing on the virtual machine's network adapter.
Otherwise, the Hyper-V host will block network traffic from the containers in the VM with multiple MAC addresses.
You can enable MACAddressSpoofing with this PowerShell command:
PS C:\> Get-VMNetworkAdapter -VMName ContainerHostVM | Set-VMNetworkAdapter -MacAddressSpoofing On
References:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/advanced

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ShockwaveXYZ
Highly Voted 5 years, 3 months ago
Answer is D. you run the command on the host server targeting the vm that is hosting the container. On the VM the container network is already set to transparent, so we need to make sure that the VM is on an external virtual switch/network.
upvoted 8 times
Benjam
5 years, 1 month ago
Thank you so much ......!!
upvoted 1 times
...
...
Ahmedsgk
Highly Voted 5 years, 3 months ago
D is correct because VM1 uses transparent mode network and therefore containers are connected to the same network as VM1 and spoofing must be configured on Server1. https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-networking
upvoted 7 times
...
camielmark
Most Recent 3 years, 11 months ago
I agree, answer = D. For start, the containers will need transparency mode to bypass the host and communicate with the local DHCP server. Then each container requires a unique MAC address to be identified as separate devices on the network. Heres the tricky part - essentially answer A does the same thing, but the syntax is incorrect as there isn't a space between the VM name. Therefor running the cmd from server 1 as in answer D is correct.
upvoted 1 times
...
student_123
4 years ago
Dutch 2005 Thanks for the reply, but why do we need to turn on "Mac Address Spoofing" when configuring the virtual machine network adapter to recieve TCP/IP configuration?
upvoted 1 times
...
TA77
4 years, 5 months ago
IMO, there's one thing that makes option A a wrong answer .. how you going to run "Set-VMNetworkAdapter" with the parameter -VMName on a VM? It doesn't make any sense, because you specify the -VMName on a host not a guest. Plus, hyper-v is the one who will block the multiple addresses if MacSpoofing is not set, so it only makes sense to run this command on the Hyper-v host, which is Server1.
upvoted 1 times
...
Jake__
4 years, 7 months ago
Got this Q on exam
upvoted 2 times
...
bigdraws
4 years, 8 months ago
To use DHCP for IP assignment on a virtual container host enable MACAddressSpoofing If the container host is virtualized, and you wish to use DHCP for IP assignment, you must enable MACAddressSpoofing On The Virtual Machines Network Adapter . Otherwise, the Hyper-V host will block network traffic from the containers in the VM with multiple MAC addresses. You can enable MACAddressSpoofing with this PowerShell command: PS C:\> Get-VMNetworkAdapter -VMName ContainerHostVM | Set-VMNetworkAdapter -MacAddressSpoofing On
upvoted 1 times
...
glukken
4 years, 11 months ago
There is no VM running on VM1, so the command Get-VMNetworkAdapter on VM1 is pointless, and definitely not valid on VM1 itself! Also, the hostserver is most likely connected to an external NIC (for DHCP to work), so per VM on the hostserver one should set the MacAddressSpoofing. So D is the correct answer
upvoted 3 times
lbs
4 years, 7 months ago
I agree.
upvoted 1 times
...
...
Izhar
4 years, 11 months ago
Got this question in exam
upvoted 2 times
...
Ben22
4 years, 11 months ago
Answer D: is correct because VM1 uses transparent mode network and therefore containers are connected to the same network as VM1 and spoofing must be configured on Server1. If transparent mode network was not the case (which by default is not) spoofing would have to be configured on both Server1 and VM1 because VM1 is a host for the containers, not only a guest on Server1.
upvoted 5 times
Arya1991
4 years, 6 months ago
Very good explanation
upvoted 1 times
...
...
Zaz11
5 years, 3 months ago
PS C:> Get-VMNetworkAdapter -VMName ContainerHostVM | Set-VMNetworkAdapter -MacAddressSpoofing On The command needs to be run on the Hyper-V host.
upvoted 4 times
...
jguitar
5 years, 5 months ago
Sorry this the correct link that contains Bonna's answer. https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/advanced
upvoted 2 times
RockClimber
5 years, 5 months ago
I agree, below is a link (focused on mac spoofing) which is part of the article you mentioned https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/advanced#to-use-dhcp-for-ip-assignment-on-a-virtual-container-host-enable-macaddressspoofing
upvoted 3 times
toddy
5 years, 5 months ago
I am confused now , what is the correct answer ?
upvoted 1 times
Dutch2005
5 years, 5 months ago
PS C:\> Get-VMNetworkAdapter -VMName ContainerHostVM | Set-VMNetworkAdapter -MacAddressSpoofing On it has to have the space, it its 1 "work" combining it with a - its not a command
upvoted 1 times
toddy
5 years, 5 months ago
Thank you for the clarity Dutch2005
upvoted 2 times
...
...
...
...
...
jguitar
5 years, 5 months ago
Updated Link: https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/architecture
upvoted 2 times
...
[Removed]
5 years, 6 months ago
The Answer Should be A If the container host is virtualized, and you wish to use DHCP for IP assignment, you must enable MACAddressSpoofing on the virtual machines, not on the Servers, network adapter. Otherwise, the Hyper-V host will block network traffic from the containers in the VM with multiple MAC addresses. PS C:> Get-VMNetworkAdapter -VMName ContainerHostVM | Set-VMNetworkAdapter -MacAddressSpoofing On
upvoted 3 times
Dutch2005
5 years, 5 months ago
Its Get-VMNetworkAdapter –VMName VM1 vs Get-VMNetworkAdapter-VMName VM1 e.g. one has a name with a space, the other one does not
upvoted 1 times
...
...
Husny
5 years, 8 months ago
Ans should be On VM1, runGet-VMNetworkAdapter-VMName VM1| Set-VMNetworkAdapter- MacAddressSpoofing On.
upvoted 3 times
Dutch2005
5 years, 2 months ago
D. On Server1, run Get-VMNetworkAdapter –VMName VM1 | Set-VMNetworkAdapter –MacAddressSpoofing On. It should ontain the "space" between adapter and -VMName
upvoted 2 times
...
...
dan
5 years, 9 months ago
what is the answer
upvoted 1 times
Dutch2005
5 years, 5 months ago
D. On Server1, run Get-VMNetworkAdapter –VMName VM1 | Set-VMNetworkAdapter –MacAddressSpoofing On.
upvoted 10 times
...
...
paprda
5 years, 10 months ago
link not work
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago