What if eth0 not configured on Azure VM - azure

I have 3 NICs deployed on a Azure VM say eth0, eth1 and eth2. But I configure only eth1 and eth2 not eth0. My network configuration marked as failed.
Is it necessary to configure eth0 on Azure VM? If yes, why?

It's necessary to configure the primary network interface as the primary NIC is used for communicating with resources over a network connection. Since the primary interface on an Azure Linux virtual machine (VM) is eth0. If eth0 isn't configured, the VM is not accessible over a network connection even when other tools indicate the VM is up.
When you set multiple NICs in Azure VM. One of the NICs on a multi-NIC VM needs to be primary.
Azure assigns a default gateway to the first (primary) network
interface attached to the virtual machine. Azure does not assign a
default gateway to additional (secondary) network interfaces attached
to a virtual machine. Therefore, you are unable to communicate with
resources outside the subnet that a secondary network interface is in,
by default.
Reference: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/multiple-nics#configure-guest-os-for-multiple-nics

Related

VMs in separate subnet can ping each other

In Azure, I have 2 VMs, each in their own subnet (see image below). To my surprise, both VMs can "see" each other (using ping).
The subnet address ranges are:
net1-subnet1: 10.0.1.0/24
net1-subnet2: 10.0.2.0/24
The VMs (NIC) IPs are:
vm1: 10.0.1.4
vm2: 10.0.2.4
This is the setup
Why are both VMs able to ping each other? I thought since they are in different subnets, they would not be able to "see" each other. Is this an Azure specific feature?
Thanks
Azure routes traffic between subnets in the same virtual network (or peered virtual networks) by default as described in the Azure virtual networks overview.
You can use network security groups to filter traffic flowing in- and outbound to/from these subnets. The default rules will allow traffic from a virtual network, so you will have to add some of your own rules with a higher priority to the Network Security Groups (NSG). See docs in NSG here

Create external network between Azure API Manager and a virtual machine

I have created an API Manager Service (AMS) in Azure with its subnet.
I have created a Virtual Machine with Ubuntu that exposes some APIs on the port 8000. It has a public IP and an internal IP (10.0.1.5). This is the network configuration.
I don't want a public IP on this machine. What I want is that only the AMS speaks with the Virtual Machine to expose the API.
I can't find a way to create a private network (or external network in the AMS point of view) between the AMS and the virtual machine. In the network configuration of the virtual machine, the AMS subnet is not available.
In a normal network I would create a NAT between the 2 subnets but in Azure I don't know how to do it.
Do you have any advice?
Create a Virtual network first in some region . Then , while creating APIM services go to the Virtual network tab and select type as external instead of none and select the same Virtual network that you have created earlier.
Once the APIM service is deployed then create a VM and while creating the VM go to the networking tab and select the same virtual network that you have used in APIM but different subnet for the VM (as APIM and VM cannot use same subnet , it is not supported in azure) . You can add a new subnet in the same Vnet for using it in the VM by going to the VNet resource you have created and in Subnets page clicking on add subnet.
(Note : All the resources must be in same region)
After this configuration is done the resources can communicate which are present inside the VNet even if they have different subnets. As by default resources under the same vnet can communicate in azure.

Azure SNMP problems

I want to setup a monitor system in Azure. The monitor system is using snmp protocol.
However, I have some problems.
My monitor system private subnet is not same as other hosts.
I also tried to use public address. On my mac, I tried to use snmpwalk to azure public IP (VM and also allowed 161 in Azure firewall policy) which return Timeout.
(e.g snmpwalk -v2c -c xxx AzurePublicIP system)
Any suggestion can let me use snmpwalk from VM1 to VM2 (different subnet?)
Many thanks!!
Any suggestion can let me use snmpwalk from VM1 to VM2 (different
subnet?)
If the Azure VMs in the different subsets of the different virtual network, you need make sure the VMs can communicate with each other in the different virtual networking using Virtual network peering. If the Azure VMs in the different subsets of the same virtual network, by default, they can communicate with each other without any further steps.
Moreover, you need to add inbound security rules of NSG which is associated with the VM2 subnet to allow SNMP ports and UDP protocol access to your subnet.
UDP 161: Used when management stations communicate with agents, e.g. Polling
UDP 162: Used when agents send unsolicited Traps to the management station
Also, check the firewall inside each of Azure VMs.
Hope this helps.

Changing the IP address of Azure Virtual Network cloud service

I have 2 different virtual networks set up in azure. The first of these virtual networks contains virtual machines in which I am able to set the internal virtual network IP as 10.101.1.4, 10.101.1.5, 10.101.1.6 on the virtual machines by using the preview portal to set the IP address
In my other virtual network I have a VPN connection and from the virtual network I add a Cloud service which we have informed the other side of the VPN will be available on 10.103.1.4 but for some reason this has now changed to 10.103.1.5
Is there any means of ensuring that the cloud service will always be deployed to the 10.103.1.4 IP address within the virtual network?
an compute instance or an azureVM get an IP-Adresse via DHCP and the lease time is 100+ years. to set a specific IP-Adresse to an azureVM/compute instance you can define a "static ip reservation" in your own VNET to this instance. e.g. via powershell, the new portal or via your cloud service configuration schema.
check out this link: https://azure.microsoft.com/en-us/blog/reserved-ip-addresses/
regards
patrick

how to get Azure point-to-site client to connect to an Azure VM

I have created an Azure virtual network with point-to-site connectivity enabled.
The point-to-site address space is 10.0.0.0/24 (10.0.0.1 - 10.0.0.25).
The virtual network address space is 10.0.1.0/24 (10.0.1.4 - 10.0.1.254).
I added an Azure VM, and it is assigned an IP of 10.0.1.4.
I created the client VPN package and installed it on a machine. It creates a PPP adapter with an IP address 10.0.0.1.
As a result I can't ping / connect to from the client 10.0.0.1 to the VM 10.0.1.4.
How should this work? Do I need some other routing or should I have somehow ended up with the client and VM in the same subnet?
Should I have set up DNS?
It is simple - Windows VMs have default Firewall enabled (as do all default WIndows Server Installations). And this Windows Firewall blocks ICMP packets (which are the PING) packets.
You can easily test the connectivity to the VM by simply trying remote desktop to the targeted VM. Or disable the Windows Firewall.

Resources