Solaris Network Configuration

3. Configure Network configuration Profiles (NCP) in Solaris 11

Solaris 11 uses Network configuration Profiles to manage network setting

  1. ‘Automatic’ Network configuration Profiles is used for dynamic ip address configuration using DHCP
  2. ‘DefaultFixed’ Network configuration Profiles is used for static ip address configuration and it needs manually specification of ipaddress details.

3.i Configure static ipaddress in Solaris 11

1. List Current profiles status

# netadm list
TYPE        PROFILE        STATE
ncp         Automatic      online
ncp         DefaultFixed   disabled
loc         Automatic      online
loc         NoNet          offline
loc         DefaultFixed   disabled

2. In this case dhcp is configured so we have to disable Automatic NCP and enable DefaultFixed NCP

#netadm disable -p ncp Automatic
#netadm enable -p ncp DefaultFixed

3. Run dladm to find which device is up and available for ip configuration

# dladm show-phys
LINK     MEDIA        STATE     SPEED     DUPLEX     DEVICE
net0     Ethernet     up        100Mb     full       bge0

dladm command without arguments can also be used but dladm show-phys shows device information also which ensures we are configuring correct device.

# dladm 
LINK     CLASS        MTU     STATE     OVER 
net0     phys         1500     up       --

4. Create new ipaddress for net0 interface ( net0 is the name of interface to be configured found by above commands )

#ipadm create-ip net0

For Static Ip address

#ipadm create-addr -T static -a local=192.168.1.110/24 net0/v4

For DHCP use

# ipadm create-addr -T dhcp net0

Address object v4 is automatically added tag for IPv4 and v6 for IPv6 . for multiple intefaces it is named as net0/v4, net0/v4a, net0/v4b, net0/v6, net0/v6a. You can specify your own 32 character name like net0/external1 , net0/Internal2 etc.

Find out the config and link state

# ipadm
NAME      CLASS/TYPE     STATE     UNDER     ADDR
lo0       loopback       ok        --        --
l0/v4      static        ok        --        127.0.0.1/8
net0/v4    static        ok       --         192.168.1.110/24

5. Add Default route to allow it to communicate with others

# route -p add default < your own router ip address >

6. Add ip in /etc/hosts to give it a name
# vi /etc/hosts
# Internet host table
# 127.0.0.1       localhost
192.168.1.110    prodhost01

3.ii dhcp configuration in Solaris 11

For dhcp process is same as static ip cobnfiguration except change in few commands

1. Enable dchp network Configuration Profile

if DefaultFixed is enabled, disable it and enable Automatic NCP

#netadm disable -p ncp DefaultFixed
#netadm enable -p ncp Automatic

2. Find network interface & define dhcp as protocol for net0 interface

# dladm show-phys
LINK     MEDIA        STATE     SPEED     DUPLEX     DEVICE
net0     Ethernet     up        100Mb     full       bge0

# ipadm create-addr -T dhcp net0

3. Check status using ipadm, the class/type will be shown as dhcp

# ipadm
NAME      CLASS/TYPE     STATE     UNDER     ADDR
lo0       loopback       ok        --        --
l0/v4      static        ok        --        127.0.0.1/8
net0/v4    dhcp          ok       --         192.168.1.114/24

5. Add Default route to allow it to communicate with others

#route -p add default < your own router ip address >

To delete the existing route if needed

#route -p delete default 192.168.1.1

NEXT PAGE – Configuring Wireless Access for WiFi network in Solaris 11

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.