VMware Networking Community
cs_Infra
Contributor
Contributor
Jump to solution

Providing network access to VMs with a /32 subnet mask

Hello,

 

I'd like to know if it is possible to provide network access for VMs with a /32 subnet mask.

It seems to be possible with OpenStack, and I'd like to know if it is possible with VMware, maybe by using NSX or something else.


The endgoal would be to save IPs in our public IP adresse spaces.


Regards,

Reply
0 Kudos
1 Solution

Accepted Solutions
cs_Infra
Contributor
Contributor
Jump to solution

I just found out that this is a Linux feature, where you can set an IP address with a /32 subnetmask, and it can reach the gateway outside of this /32.

 

 

Capture d’écran 2021-03-18 183507.png

View solution in original post

Reply
0 Kudos
4 Replies
mauricioamorim
VMware Employee
VMware Employee
Jump to solution

With NAT or loadbalancing you can provide /32 addresses although your VMs would actually be part of a network that is some other network mask, but I would like to better understand what you are trying to achieve here.

Reply
0 Kudos
cs_Infra
Contributor
Contributor
Jump to solution

 

I have a VPS in an OVH datacenter, with a public IP address and that's what I get from the VM : 

 

root@vps-7696746a:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether fa:16:3e:dd:9c:33 brd ff:ff:ff:ff:ff:ff
inet 51.210.103.137/32 brd 51.210.103.137 scope global dynamic eth0
valid_lft 64881sec preferred_lft 64881sec
inet6 fe80::f816:3eff:fedd:9c33/64 scope link
valid_lft forever preferred_lft forever
root@vps-7696746a:~#

 

root@vps-7696746a:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 51.210.100.1 0.0.0.0 UG 0 0 0 eth0
51.210.100.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0

 

root@vps-7696746a:~# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 51.210.100.1 (51.210.100.1) 0.336 ms 0.315 ms 0.301 ms
2 192.168.143.254 (192.168.143.254) 0.293 ms 0.275 ms 0.263 ms
3 10.224.60.190 (10.224.60.190) 0.250 ms 0.239 ms 0.300 ms
4 10.224.47.40 (10.224.47.40) 0.292 ms 0.297 ms 0.287 ms
5 10.224.45.206 (10.224.45.206) 0.276 ms 10.224.160.144 (10.224.160.144) 0.322 ms 10.224.45.204 (10.224.45.204) 0.215 ms
6 10.17.149.118 (10.17.149.118) 0.489 ms 10.17.146.0 (10.17.146.0) 0.697 ms 10.17.146.6 (10.17.146.6) 0.464 ms
7 10.73.0.230 (10.73.0.230) 0.290 ms 10.73.0.74 (10.73.0.74) 0.258 ms 10.73.0.228 (10.73.0.228) 0.203 ms
8 10.95.33.10 (10.95.33.10) 1.067 ms 10.95.33.8 (10.95.33.8) 1.201 ms 1.177 ms
9 be102.par-th2-sbb1-nc5.fr.eu (213.186.32.215) 4.748 ms 4.877 ms 4.692 ms
10 * 10.200.2.71 (10.200.2.71) 5.034 ms 5.023 ms
11 * * *
12 * 108.170.245.1 (108.170.245.1) 5.822 ms *
13 216.239.48.143 (216.239.48.143) 4.923 ms dns.google (8.8.8.8) 6.593 ms 64.233.174.93 (64.233.174.93) 7.148 ms

 

root@vps-7696746a:~# lspci | grep Virt
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device

 

root@vps-7696746a:~# dmidecode
# dmidecode 3.2
Getting SMBIOS data from sysfs.
[...]

Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: OpenStack Foundation
Product Name: OpenStack Nova
Version: 19.0.4

 

Plus, I don't find any routing daemon on the VM.

From what I understand, OpenStack can provide network to that VM with is networking virtualization capabilities. But that's just a guess, as I'm not familiar with it.

 

So I was wondering if I could achieve the same thing with VMware.

Reply
0 Kudos
cs_Infra
Contributor
Contributor
Jump to solution

Not sure why, but it seems that my reply was deleted. Maybe too much info.

 

As I was saying, I have a VPS located inside a cloud provider datacenter.

That VMs has a public IP with a /32 subnet mask, configured on the VM's NIC. ( inet xxx.xxx.103.137/32 brd xxx.xxx.103.137 )

The gateway is xxx.xxx.100.1.

I don't see any routing daemon on the VM.

It runs on OpenStack.

 

So from what I understand, OpenStack network virtualization allows network connectivity for host with a /32 mask.

 

I was wondering if you could achieve the same thing with VMware.

 

The idea is to save some IP adresses by not dedicating a /30 (4 IPs) for a single VM.

 

Reply
0 Kudos
cs_Infra
Contributor
Contributor
Jump to solution

I just found out that this is a Linux feature, where you can set an IP address with a /32 subnetmask, and it can reach the gateway outside of this /32.

 

 

Capture d’écran 2021-03-18 183507.png

Reply
0 Kudos