-1

I have a virtual machine and the need to add a different network to it.

1st nic is already working on 192.168.1.1

2nd nic should be working on 10.0.0.1

I've added the new nic and connected both to the same virtual switch but I can't ping on the 10.0.0.x network.

Mr. Raspberry
  • 3,918
  • 13
  • 32
Pitto
  • 2,009
  • 10
  • 33
  • 49
  • 1
    Please be more clear about how your networking is configured in ESXi. Have you created a new port group for the second network, and is the vNIC assigned to it? If it's on the same vSwitch, it must be running a seperate vlan; is it setting a vlan tag for the correct vlan? Is the switch you're uplinking to configured to accept that vlan? – Shane Madden Sep 22 '11 at 19:39
  • For new port group you intend a new virtual switch? It is indeed on the same vSwitch so maybe I'm forced to create a vlan? I have a single virtual switch with default configuration. Can you please help me to provide you right information, please? :) – Pitto Sep 22 '11 at 19:45
  • A new port group can be on the same vSwitch, but it's going to be functionally identical to the old port group if it's not on a different vlan. How is your VM host connected to the 10.0.0.0 network? – Shane Madden Sep 22 '11 at 20:09
  • so if you were to plug two nics from a physical server with different ip/gateways into single switch what would be required to make things pingable/routable? – tony roth Sep 22 '11 at 20:15
  • I have two different network cables coming from those two differente networks. Each cable is plugged to a different physical nic on the server hosting esxi. I just wish that a virtual machine sitting on this esxi is able to speak with both networks. – Pitto Sep 22 '11 at 20:34
  • @tonyroth I just have two single cables coming from different networks... That's all – Pitto Sep 22 '11 at 20:36
  • it was a mental exercise to get you thinking about what it would take to get this to work in a non virtual world, not a solution to your probelm. The requirements would be the same. – tony roth Sep 22 '11 at 21:03
  • In Real world i do it just connecting cables and configuring nics... a little hint? :) – Pitto Sep 22 '11 at 22:17
  • Just to toss something simple out there. You say you can't ping the VM on the other IP after adding the 2nd NIC, yes? Is out going traffic working on this new NIC/Network? Did you configure the firewall in whichever non-disclosed OS you are using to allow pings on this newly added network? – Chadddada Sep 27 '11 at 20:52

1 Answers1

1

With two physical NICs, one per subnet, you can stick to a single vSwitch and play with pNIC assignment for specific port groups, but you shouldn't do that - too messy and prone to error.

Instead, create a second vSwitch, assign the pNIC connected to 10.x to that new vSwitch, and also connect the second virtual NIC of your VM to the new vSwitch.

And the best approach of all, even though more compicated:

If not done yet, put both subnets on the same physical switch as separate VLANs. Find the two ports on the switch that are used by the ESXi host and configure them as trunk ports. Assign both pNICs to the same vSwitch. Configure two port groups on the vSwitch, and specify the VLAN IDs in the port group configuration. Connect vNICs of your VM to the corresponding port groups. The advantage of this solution is that provides network redundancy where previously every physical link was a single point of failure.

Max Alginin
  • 3,284
  • 15
  • 11