VMware Cloud Community
Ashokdb2k
Contributor
Contributor
Jump to solution

Configure 2 network adapters in VM one for MPLS LAN and another for internet

Dear All,

I have a HP server with 2 physical NIC cards. ESXI 4.0 is installed and 3 VM's has been created in it. Initially only one NIC card was connected to the MPLS LAN switch port and another NIC card was not connected to internet switch port.

Each VM had only one network adapter in it. So i assigned MPLS LAN IP's to ESXI host and the 3 VM's and everything worked perfectly.

Now i wanted to have internet connection to my 3 VM's. So i connected the connected the 2nd NIC card to the internet switch port and added the second NIC card to the ESXi using Vsphere client --> configuration --> networking option. Now both the nic cards are ponting to VM network.

I added 2nd network adapter to all the 3 VM's and assigned the internet IP addresses to all of these nic cards. in order to MPLS and internet to work simultaneously i removed the gateway of MPLS NIC card and manually routed it through route add command. post this MPLS and internet worked fine in 1st VM.

I tried the same in 2nd and 3rd VM but it failed. whenever i add the 2nd network adapter in the VM the first network adapter of that VM fails to work.

Am i following the right approach ? Please help...

Regards,

Ashok Kumar.G

Reply
0 Kudos
1 Solution

Accepted Solutions
spuluka
Enthusiast
Enthusiast
Jump to solution

If I understand your setup correctly, you connected the physical NICs to two different IP networks. Then you connected these NICs to the same v-switch in the server.

This essentially bridges at layer 2 the two different layer 3 networks.

Instead, you want the two networks to remain separate inside the host.

  • create a new v-switch on the host

  • move the internet NIC to this v-switch

  • move the second NIC on each VM to this switch

  • Make sure the internet access VM NIC is the one with a default gateway in vm OS

  • remove the default gateway from the MPLS NIC

  • create persistent static routes to the MPLS NIC for any networks reached there beyond the same subnet as the NIC itself. Addresses on this same subnet will automatically be reachable. You only need routes for those outside this range.

Steve Puluka

JNCIA-ER Enterprise Routing

JNCIA-EX Enterprise Switching

Senior Network Administrator

Liberty Dialysis

Steve Puluka - JNCIA-ER Enterprise Routing; JNCIA-EX Enterprise Switching; JNCIS-FWV Advanced Firewall; MCP Server 2003 Administration; MCTS Windows7; Senior Network Administrator http://puluka.com/home

View solution in original post

Reply
0 Kudos
3 Replies
rManic
Expert
Expert
Jump to solution

Dear Ashok

before to ans your question, Please give the details for the bellow questions

1.how many virtual swich are you using?

2. is your networks configured with vLAN or separate LAN?.

3.as you mentioned, you have added both the physical NIC to single virtual switch, am I right?

regards

Manic

Regards Manic
Reply
0 Kudos
spuluka
Enthusiast
Enthusiast
Jump to solution

If I understand your setup correctly, you connected the physical NICs to two different IP networks. Then you connected these NICs to the same v-switch in the server.

This essentially bridges at layer 2 the two different layer 3 networks.

Instead, you want the two networks to remain separate inside the host.

  • create a new v-switch on the host

  • move the internet NIC to this v-switch

  • move the second NIC on each VM to this switch

  • Make sure the internet access VM NIC is the one with a default gateway in vm OS

  • remove the default gateway from the MPLS NIC

  • create persistent static routes to the MPLS NIC for any networks reached there beyond the same subnet as the NIC itself. Addresses on this same subnet will automatically be reachable. You only need routes for those outside this range.

Steve Puluka

JNCIA-ER Enterprise Routing

JNCIA-EX Enterprise Switching

Senior Network Administrator

Liberty Dialysis

Steve Puluka - JNCIA-ER Enterprise Routing; JNCIA-EX Enterprise Switching; JNCIS-FWV Advanced Firewall; MCP Server 2003 Administration; MCTS Windows7; Senior Network Administrator http://puluka.com/home
Reply
0 Kudos
Ashokdb2k
Contributor
Contributor
Jump to solution

Thanks Steve Puluka,

Your solution was very perfect. Now i can access MPLS and Internet connections from my VM's without any prob.

Regards,

Ashok Kumar.G

Reply
0 Kudos