Change the 10.20.20.1 network to my VMware network - ubuntu-18.04

I installed MicroStack in Ubuntu for the virtual machine. My instance floating IP is 10.20.20.238. I want to access my instance from Windows cmd,only can ping 172.21.10.13, but can't ping 10.20.20.238,so I want to change the 10.20.20.1 network to my own network. What should I do?enter image description here

Stackoverflow is about code development, not IT management. serverfault.com would be a more appropriate forum, or perhaps superuser.com.
microstack "fakes" the external network. It's not really external, but only exists on br-ex, the external bridge. It doesn't look like you can create a microstack cloud with a different external network CIDR, but you can try adding a subnet to the external network, inserting ens33 in br-ex and adding IP address 172.21.10.13 to br-ex . I have not tried this.
However, if your only requirement is to access the instance from the PC, you can create a tunnel or add a route. What makes sense in your case depends on the virtual machine hypervisor you are using (yours seems to be VMware - I can't comment on that) and the operating system on which this hypervisor runs.

Related

do not allow to change ip address from inside a kvm guest

At the moment, a customer having a virtual machine on kvm can simply change his own ip address or add another one and probably cause an ip address conflict.
How can I prevent that a user can change the ip address of his virtual machine?
I read about using ebtables over the bridged network on the host.
Isn't there something like an ACL feature or defining it directly in the guests XML file?
I have found the solution. Libvirt provides a feature called nwfilter which allows you to setup filters. There are also some example filters. They exactly do what I wanted. See this link.
I have downloaded them directly from github and defined with virsh nwfilter-define <file.xml>

Windows Azure - Web Role and Virtual Machines Securely Communicating

I am attempting to deploy an app to Windows Azure and I am having some trouble figuring out how I can achieve my optimal configuration because of lack of documentation and newness of the Azure infrastructure. I need to have two virtual machines configured (One Linux box and one Windows Server with SQL Server) to communicate with one Web Role Instance. The Web Role should have the only end point accessible from the outside world. It should be able to communicate with SQL Server and the Linux machine (these machines don’t need to communicate with each other). I can achieve this if I open up endpoints on the VM (for example Port 1433 on the Windows machine and the same port in the VM’s firewall), however I am concerned about the security risk of doing this and would rather have the Web Role communicate directly with my virtual machine WITHOUT opening up an endpoint (using the Azure Portal). I have read some examples that refer to deploying the items as a cloud service, but none include a Web Role AND a CUSTOMIZED Virtual Machine. I have seen references made to using a Virtual Network, but no examples. I have looked everywhere for a solution to no success. This seems like a common scenario, so I don’t think it should be this difficult. Am I missing something?
Well you have 2 options here: use Windows Azure Connect or use Virtual Networks. Since you're really trying to make a network of different machines I would suggest to use a Virtual Network (I think this is the most flexible option). And connecting your Virtual Machines to your Cloud Services is pretty easy:
Create a Virtual Network as described here: Create a Virtual Network in Windows Azure
Add your Virtual Machines to that network as described here: Add a Virtual Machine to a Virtual Network
Modify the ServiceConfiguration.cscfg of your cloud service to connect to your Virtual Network. The schema is available on MSDN or you can follow the blog post on Michael Washam's blog.
I marked the answer above as correct, because it does provide the answer especially if you are only creating a virtual network with MS products. What they fail to point out in the majority of their documentation, is that VN functionality is limited for Linux machines while VMs and VNs are in their current preview. However, this does not mean you can't add a Linux VM to a VN. After searching for sometime and piecing information together, Linux machines can be added to an existing VN rather simply by using PowerShell and cmdlets. The following generic script can be run from a PowerShell ISE with your own information in order to create and add a Linux VM in your VN.
$vm = New-AzureVMConfig -Name $vmname -InstanceSize ExtraSmall -ImageName $img |
Add-AzureProvisioningConfig -Linux –LinuxUser $user -Password $pass |
Set-AzureSubnet -SubnetNames $subnet
New-AzureVM -ServiceName $cloudSvcName -AffinityGroup $affinitygroup -VNetName $vnetname -VMs $vm
Hope this helps someone from pulling their hair out.

Find machine name and IP address in OOB SL5 app

How can I obtain the client machine name and IP address when running my Silverlight 5 application out-of-browser (i.e. installed on the local machine and NOT running via the web)?
It looks like there's no way to gather this information using just Silverlight. You'd have to do something like this. The short version is you use an AutomationFactory to create an unmanaged object which contains that information (in this case, a WMI Win32_NetworkAdapterConfiguration object). That means this probably won't work on a Mac. If you need something truly cross platform, it seems like the way is to create a really simple web service that simply returns the requestor's IP and hostname.
I dont know what is your exact requirement .We had similar requirement some time back to get the local ip address to call a local service which is supposed to be present in client machine.
In that case we just built the local service url by hard coding the loopback address.ie localhost.

simulate different PC with different IP addresses in linux environment

im new to linux environment and any help/feedback would be appreciated. Im actually trying to develop a client-server (MULTICAST) program, so, i would like to test one client sending information to different servers (one-to-many relationship). thus, i would like to simulate different server side in linux with different IP addresses in one computer.
Did you try using different ports instead? I didn't try it myself, but perhaps that can help you in the mid-time.
If you're really multicasting, you don't need to worry about physical host-specific IP:s, all you should need to do is make sure all the programs (clients and servers) are using the same multicast group addresses. Then they should all see each other's traffic automatically.
There's nothing stopping you from running multiple clients on the same machine that also runs the server, in this case.
I sounds like you want to test your code with different IP's. You can create IP aliases on your interface and simulate multiple IP's on one computer.
for e.g. if eth0 is you're active interface with IP, say 192.168.5.11 you can assign another IP to eth0:0 (an alias to eth0) as below.
ifconfig eth0:0 192.168.5.12 netmask255.255.255.0 up
ifconfig eth0:1 192.168.5.13 netmask255.255.255.0 up
run your server on one of the IP's and distribute clients to all your aliases
Use either of the following when you do not have sufficient hardware:
Multicast loop which has the IP stack redirect outbound packets to local receivers.
Virtual machines.
Be aware that semantics of the socket option for #1 change depending on the operating system; for #2 only some virtual machines support multicast, refer to the vendor for details.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms739161(v=vs.85).aspx
Ultimately though you must test with different machines due to specific artifacts of how hosts manage multicast groups. You can for instance create send-only membership which will block every other application on the host. Also consider that an internet, lower case 'I', will introduce further artifacts regarding group joining and propagation delays and drops that your application may need to be aware of.
You can create multiple IP for same machine with help of IP alias. As mentioned above.
But to create multiple Server at one PC you must need different port for each server if you want to simulate the all server behavior with network as well.
I mean for one port multicast traffic always goes to that and some process in the PC will be receiving the packet and has to serve for all server in the PC, Means you have one packet only and all server is receiving with locally manipulation.
But really simulation would be you have multiple server at 1 PC and all are receiving multicast traffic from network rather then from local process.
my Solution: You keep number for server == number of port at the PC. Client send the multicast traffic over all port simultaneously and all server at the PC end will be receiving multicast packet from corresponding port from the Network.
Please correct me if my understanding is wrong.

Faking a network communication to test client/server on one computer

I have a course project where I'm suppose to present some networking stuff. There are great chances that I have to do it on one computer. So my question is, how do I show a communication between tcp/ip or tcp/udp? I'm not a networking expert, I understand the concept of sending data which is red. And I think I need two IP addresses.
You don't need two IP addresses. Just start the server on the machine, and have the client connect to address 127.0.0.1 and the appropriate port. (This address always refers to the same machine the program is running on.)
You can run a virtual machine on your computer and work on network between them.

Resources