After recent efforts to get old jails running on a new server, I tried to upgrade some ports today. I failed.
portupgrade was erroring out and reporting: protocol not supported
A simple fetch http://www.google.com/ was giving me fetch: transfer timed out
I tried portaudit -Fa. Nothing. fetch: transfer timed out
I checked ifconfig on the jail host. There is was. I’ll show only a small part of the ifconfig output:
$ ifconfig inet 10.45.0.100 netmask 0x20 broadcast 255.255.255.255 inet 10.45.0.101 netmask 0x20 broadcast 255.255.255.255 inet 10.45.0.102 netmask 0xffffffff broadcast 10.45.0.102 inet 10.45.0.104 netmask 0xffffffff broadcast 10.45.0.104
See that 0x20. That’s wrong. It should be 0xffffffff like the others. I recall making this error at the time.
I had copied pasted the entries from /etc/rc.conf to the command line. In my haste, I tried:
sudo ifconfig em0 alias 10.45.0.101/32
Which failed. So then I tried:
sudo ifconfig em0 alias 10.45.0.101 netmask 32
Which succeeded, but was not what I wanted.
Solution, stop the jail in question, then:
sudo ifconfig em0 delete 10.45.0.100 sudo ifconfig em0 alias 10.45.0.100 netmask 255.255.255.255
After, restart the jail. All was well.