[opensuse] Virtualbox: two guest Linux machines with the same IP. How do I change it?
Hi, I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original. I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox. The host MAC is 00:21:85:16:2d:0b The guests MAC is 00:08:27:44:87:3a - on both guests. How can I force different MACs and thus different IPs? -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 17/06/2019 14.16, Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
I solved by changing in the machine the network card to «paravirtualized network adapter "virtio-net"» -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On Monday, 17 June 2019 21:46:33 ACST Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
With the machine shut down, I click the "rotating arrows" icon on the RHS of the Mac Address field in the network adapter settings (Advanced settings). Each time I click the button the mac address changes. The changes appear to stick when I close the settings icon. You an also edit the MAC address manually, but there are certain rules that are enforced (for example, the 2nd character must be even). You could also try changing the network card type, although I haven't tested any other than the Intel Pro/1000 MT Desktop adapter. -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ==============================================================
On 17/06/2019 14.57, Rodney Baker wrote:
On Monday, 17 June 2019 21:46:33 ACST Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
With the machine shut down, I click the "rotating arrows" icon on the RHS of the Mac Address field in the network adapter settings (Advanced settings).
They were greyed out.
Each time I click the button the mac address changes. The changes appear to stick when I close the settings icon. You an also edit the MAC address manually, but there are certain rules that are enforced (for example, the 2nd character must be even).
You could also try changing the network card type, although I haven't tested any other than the Intel Pro/1000 MT Desktop adapter.
I had to change the network card, then I could change the MAC. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 08:16 AM, Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
What does Wireshark show, when the VM is going through DHCP? Also, I don't like NAT mode, as it gets in the way. It also blocks IPv6. NAT is a hack that was created to get around the IPv4 address shortage. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 15.04, James Knott wrote:
On 2019-06-17 08:16 AM, Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
What does Wireshark show, when the VM is going through DHCP?
I solved it, by changing network card type.
Also, I don't like NAT mode, as it gets in the way. It also blocks IPv6. NAT is a hack that was created to get around the IPv4 address shortage.
I don't like ANY of the VBox network types. I would like a simple networked and routed type, not bridged. VMware has it. So my router is on 192.168.1, and the virtual machines were something like 192.168.100 - routed. Connection to Internet, to the host, from the host to the guest... and from outside the host to the guest it needs help from the host firewall, so that the guests are very protected from outside. Now I have to share the router address pool with all guests. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 09:50 AM, Carlos E. R. wrote:
I don't like ANY of the VBox network types.
I would like a simple networked and routed type, not bridged. VMware has it. So my router is on 192.168.1, and the virtual machines were something like 192.168.100 - routed. Connection to Internet, to the host, from the host to the guest... and from outside the host to the guest it needs help from the host firewall, so that the guests are very protected from outside.
Now I have to share the router address pool with all guests.
With bridges, each VM appears as just another computer on the network. No need to worry about NAT, routing, etc.. It just works. As I mentioned, if you want to use IPv6, you can't use NAT. I have used NAT mode in the past, but I find bridge mode to be superior for a number of reasons. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Monday, 17 June 2019 23:20:45 ACST Carlos E. R. wrote:
On 17/06/2019 15.04, James Knott wrote:
On 2019-06-17 08:16 AM, Carlos E. R. wrote:
Hi,
I cloned a virtual machine, telling it to change the MAC address. But Linux Leap 15.1 refuses to recognize the change of MAC and thus it gets the same IP from the router as the original.
I'm using "Bridged Adapter" mode, in order to get internet and connect via ssh to the machine. I don't like bridged mode, but I don't know another mode that gets me both things in virtualbox.
The host MAC is 00:21:85:16:2d:0b
The guests MAC is 00:08:27:44:87:3a - on both guests.
How can I force different MACs and thus different IPs?
What does Wireshark show, when the VM is going through DHCP?
I solved it, by changing network card type.
Also, I don't like NAT mode, as it gets in the way. It also blocks IPv6. NAT is a hack that was created to get around the IPv4 address shortage.
I don't like ANY of the VBox network types.
I would like a simple networked and routed type, not bridged. VMware has it. So my router is on 192.168.1, and the virtual machines were something like 192.168.100 - routed. Connection to Internet, to the host, from the host to the guest... and from outside the host to the guest it needs help from the host firewall, so that the guests are very protected from outside.
Now I have to share the router address pool with all guests.
Yes, VMWare's networking is more versatile than VirtualBox, but you can achieve the same if you run up a software router/firewall like pFSense, then set the guests and the LAN interface on pfSense to use "intnet" (VirtualBox Internal network). That is equivalent to the VMWare Vswitch, except that it isn't VLAN aware (as far as I know, hence using the router/firewall VM). The WAN interface for the router/firewall has an IP address on the local LAN and has it's next-hop router configured as your main router/gateway. This has the nice side effect of isolating test VM's from the rest of the network and you can create firewall rules to protect the sandbox as needed. I actually used this to test pfSense and IPFire options before recommending one for deployment at work for a DMZ in our virtual infrastructure (VMWare on VXRails). Both are lightweight and need minimal resources. I simply moved a couple of my Windows VM's to intnet to facilitate the testing. They're back on bridged mode now because I don't need the firewall most of the time. Regards, Rodney. -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ==============================================================
participants (3)
-
Carlos E. R.
-
James Knott
-
Rodney Baker