trying to setup a Proxmox machine that is running 3 vms. it has 3 public ips but these ips are on a single interface (eth0). the 3 vms are on a bridge (vmbr0) with an address of 172.16.0.1/24 I have enable ip masquerading and forwarding. but I cannot figure out how to make each of the 3 vms (172.16.0.2, 172.16.0.3,
Tag: iproute
Get Subnet mask in Linux using bash
I am using bash to get the IP address of my machine with that script: And now I am trying to get the Subnet Mask in this type: But I have no idea how can I do that. Answer there are couple of ways to achieve this: first: to print the mask in format 255.255.255.0, you can use this: second: