We have moved from traditional method to new method to change IP address in Solaris11.
Below is the steps for changing IP address on Solaris11.
Check the current Status:
Below is the steps for changing IP address on Solaris11.
Check the current Status:
root@clnode1:~# ipadm
NAME CLASS/TYPE STATE UNDER ADDR
lo0 loopback ok -- --
lo0/v4 static ok -- 127.0.0.1/8
lo0/v6 static ok -- ::1/128
net0 ip ok -- --
net0/v4 static ok -- 192.168.10.11/24
net0/v6 addrconf ok -- fe80::a00:27ff:fe15:9f0f/10
root@clnode1:~#
Delete existing IP address. Note (When you remove primary IP address you should be in console):
root@clnode1:~# ipadm delete-addr net0/v4
root@node2:~# ipadm
NAME CLASS/TYPE STATE UNDER ADDR
lo0 loopback ok -- --
lo0/v4 static ok -- 127.0.0.1/8
lo0/v6 static ok -- ::1/128
net0 ip ok -- --
net0/v6 addrconf ok -- fe80::a00:27ff:fe15:9f0f/10
root@node2:~#
Assign new IP address and check the status:
root@node2:~#ipadm create-addr -T static -a 192.168.10.12/24 net0/v4
root@node2:~# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
net0: flags=1000843 mtu 1500 index 2
inet 192.168.10.12 netmask ffffff00 broadcast 192.168.10.255
ether 8:0:27:15:9f:f
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128
net0: flags=20002004841 mtu 1500 index 2
inet6 fe80::a00:27ff:fe15:9f0f/10
ether 8:0:27:15:9f:f
root@node2:~# ipadm
NAME CLASS/TYPE STATE UNDER ADDR
lo0 loopback ok -- --
lo0/v4 static ok -- 127.0.0.1/8
lo0/v6 static ok -- ::1/128
net0 ip ok -- --
net0/v4 static ok -- 192.168.10.12/24
net0/v6 addrconf ok -- fe80::a00:27ff:fe15:9f0f/10
root@node2:~#
Update /etc/hosts file:
root@node2:~# cat /etc/hosts | grep 192.168.10.12
192.168.10.12 clnode2
root@node2:~#
We have successfully changed IP address. Cool...
0 comments:
Post a Comment