# ifconfig en0 192.168.1.100 netmask 255.255.255.0 alias : Command to set alias for an interface (Temporarily).
# ifconfig en0 192.168.1.100 netmask 255.255.255.0 delete : Command to remove an alias.
# chdev -l en0 -a alias4=192.168.1.100,255.255.255.0 : Command to set alias permanently.
# chdev -l en0 -a delalias4=192.168.1.100,255.255.255.0 : Command to remove alias permanently.
# lsattr -EHl en0 : Command to view the alias set for an interface.
Problem:
Tried to remove an IP alias on en0, but failed.
Solution:
Check the alias IP and netmask which has been set for the interface.
# lsattr -El en0 -a alias4|grep 192.168.1.100
alias4 192.168.1.100,255.255.255.0 IPv4 Alias including Subnet Mask True
Enter the correct netmask, now it works:
# chdev -l en0 -a delalias4=192.168.1.100,255.255.255.0
en0 changed
# ifconfig en0 192.168.1.100 netmask 255.255.255.0 delete : Command to remove an alias.
# chdev -l en0 -a alias4=192.168.1.100,255.255.255.0 : Command to set alias permanently.
# chdev -l en0 -a delalias4=192.168.1.100,255.255.255.0 : Command to remove alias permanently.
# lsattr -EHl en0 : Command to view the alias set for an interface.
Problem:
Tried to remove an IP alias on en0, but failed.
# chdev -l en0 -a delalias4=192.168.1.100,255.255.254.0 Method error (/usr/lib/methods/chgif): 0514-009 Cannot delete an object from the device configuration database. 0821-232 chgif: Cannot delete alias6 (192.168.1.100) from CuAt.
Solution:
Check the alias IP and netmask which has been set for the interface.
# lsattr -El en0 -a alias4|grep 192.168.1.100
alias4 192.168.1.100,255.255.255.0 IPv4 Alias including Subnet Mask True
Enter the correct netmask, now it works:
# chdev -l en0 -a delalias4=192.168.1.100,255.255.255.0
en0 changed
No comments:
Post a Comment