Network configuration in OmniOSce/OpenIndiana
┌
Display the IP configurations
(eequivalent to 'ip -a' or 'ifconfig')
ipadm
┌
Display the available physical network interfaces
dladm show-phys
┌
Display the routing table
netstat -rn
┌
Display the persistent routes
route -p show
┌
Configure a static IP address
(assuming you want to configure e1000g0 NIC to 192.168.0.10 and default gateway to 192.168.0.1)
su -
ipadm delete-if e1000g0
ipadm create-if e1000g0
ipadm create-addr -T static -a 192.168.0.10 e1000g0/v4
route -p add default 192.168.0.1
┌
Configure a dynamic IP address (via DHCP)
(assuming you want to configure e1000g0 NIC)
su -
ipadm delete-if e1000g0
ipadm create-if e1000g0
ipadm create-addr -T dhcp e1000g0/dhcp
┌
Change the name servers (DNS)
su -
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
┌
Add a route
(assuming you want to reach 172.16.0.0/24 network by 192.168.10.254)
su -
# temporarily
route add -net 172.16.0.0/24 -gateway 192.168.10.254
# permanently
route -p add -net 172.16.0.0/24 -gateway 192.168.10.254
Don't miss what's next. Subscribe to Illumadmin: