Cannot Assign Network Address as IP address

I am trying to add/change VLAN IP addresses. I am in configure, and I type the following:
set interfaces ethernet eth1 vif 46 address ‘XXX.XXX.XX.XXX’, where ‘X’ is a number, and when I hit enter, I get the following “Cannot assign network address as IP address”
“Value validation failed”
“Set failed”
What am I doing wrong?

Verify that the IP address you are assigning follows IPV4 addressing conventions.
Here’s an example for a /24:
192.168.1.0 <----- network address (nope)
192.168.1.1-254 <---- usable
192.168.1.255 <---- broadcast address (nope)

How about 192.168.1.160
Just to be clear, can this IP be used as a gateway, since it ends in ‘0’?

192.168.1.160/30

in subnet 192.168.1.160/30, 192.168.1.160 is the subnet-id and you can only use addresses 192.168.1.161 - 192.168.1.162 for hosts. Check a subnet calculator.

I’m just making sure about this before I put a statement into the Vyos. I tried using an IP like (this is an example, not the actual IP) 192.168.32.160/30, but kept getting an error message about Cannot assign network address as IP address. I then put 192.168.32.161/30 in then Vyos would accept it. I just wanted to check to make sure I was not creating a problem by having and range from 160-163.

Hi skeating,

the error message is correct, the IP is not useable like @Line2 explained
you can calculate the IP spaces here:
http://jodies.de/ipcalc?host=192.168.32.160&amp;mask1=30

or i misunderstand your question/problem

I finally figured that out, What I did not understand was the IP range for (example) 192.168.32.160/30 is 160-163. But if I put 192.168.32.161/30 into the vyos, (since 192.168.32.160 is unacceptable) then .161 is now the gateway, even though the range has 160 in it. Out of 4 possible IPs, only one can be use on a device, the other must be the gateway. Am I getting this right?

yes, because in a /30 net there are 4 IPs but only 2 are useable.

Thanks so much for your help.

Here is what that command shows.
Filesystem Size Used Avail Use% Mounted on
overlayfs 7.3G 7.2G 0 100% /
tmpfs 1.9G 0 1.9G 0% /lib/init/rw
udev 1.9G 316K 1.9G 1% /dev
tmpfs 1.9G 4.0K 1.9G 1% /dev/shm
/dev/sda1 7.3G 7.2G 0 100% /live/image
/dev/sda1 7.3G 7.2G 0 100% /live/cow
tmpfs 1.9G 0 1.9G 0% /live
tmpfs 1.9G 40K 1.9G 1% /tmp
/dev/sda1 7.3G 7.2G 0 100% /opt/vyatta/etc/config
tmpfs 1.9G 68K 1.9G 1% /var/run
none 1.9G 408K 1.9G 1% /opt/vyatta/config

How close is this to not being able to function, and where should I reduce stuff?

maybe post is in wrong thread

Where should I put it?

maybe to this one: https://forum.vyos.io/t/basic-admin-commands/3758/3 :wink: