Saturday, January 7, 2017

Solaris 11 - Setting up Virtual NIC, IPMP, hostname and assigning IP address

Solaris 11 - Creating virtual NIC
# dladm show-phys
# ipadm show-if
# ipadm show-addr
# dladm show-link
# dladm create-vnic -l net0 net0vnic1
# dladm show-link
LINK CLASS MTU STATE OVER
net0vnic1 vnic 1500 up net0
# ipadm create-addr -T static -a local=192.168.10.120/24 net0vnic1
# ipadm show-if
# ipadm show-addr
# ifconfig -a




~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~


Solaris 11 IPMP Setup

1. Find your NIC card ..
# more /etc/path_to_inst
" 0 "e1000g"
" 1 "e1000g"
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet unknown 0 unknown e1000g1

2. Make sure ncp is set to defaultfixed, if not, enable it
# netadm list
ncp DefaultFixed online
# netadm enable -p ncp DefaultFixed

3. Detail list of NIC
# dladm show-linkprop -p mac-address
# dladm show-phys
4. Remove existing ip address info
# ipadm delete-addr net0/v4
# ipadm delete-addr net0/v6

5. Create IPMP and assign ip address
# ipadm add-ipmp -i net0 -i net1 ipmp0
# ipadm create-addr -T static -a 192.168.10.130 ipmp0/data0
# ipadm
# ifconfig -a
# ipmpstat -a
# ipadm set-ifprop -p standby=on -m ip net1
# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp0 ipmp0 ok -- net0 (net1)
 
# ifconfig -a
groupname ipmp0

# ipmpstat -i
INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE
net0 yes ipmp0 --mbM-- up disabled ok
net1 no ipmp0 is----- up disabled ok
 
# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp0 ipmp0 ok -- net0 (net1)


6. Test if IPMP is working
# if_mpadm -d net0
Disables net0


# if_mpadm -r net0
# ifconfig -a


~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~




1. Change ncp mode to to Manual mode
# netadm enable -p ncp DefaultFixed

2. Display the available NIC on the system
# dladm show-phys

3. Assign IP address to the interface
# ipadm delete-ip net0
# ipadm create-ip net0
# ipadm show-if
# ipadm create-addr -T static -a local=192.168.10.135/24 net0/addr
# ipadm show-addr

4. If you want to use DHCP, perform the following.
# ipadm delete-ip net0
# ipadm create-ip net0
# ipadm create-addr -T dhcp net0/addr
# ipadm show-addr

5. IPv6 configuration with auto-generated
# ipadm delete-ip net0
# ipadm create-ip net0
# ipadm create-addr -T addrconf net0/addr
# ipadm show-addr

6. Add default route
# route -p add default 192.168.10.1

7. Configure host/dns information
# svccfg -s dns/client \'setprop config/nameserver = net_address: 192.168.10.110\'
# svccfg -s dns/client \'setprop config/domain = astring: \"expanor.local\"\'
# svccfg -s name-service/switch \'setprop config/host = astring: \"files dns\"\'
# svcadm refresh name-service/switch
# svcadm refresh dns/client

8. Traditional method of using resolve.conf and nsswitch.conf file can be used.
Fill out the info and usr import command.
Solaris 11 does not use resolv.conf and nsswitch for name resolution
# nscfg import -f svc:/system/name-service/switch:default
# nscfg import -f svc:/network/dns/client:default
# svcadm refresh dns/client

9. Change host entry
# svccfg -s system/identity:node listprop config
# svccfg -s system/identity:node setprop config/nodename="goma"
# svccfg -s system/identity:node setprop config/loopback="goma"
# svccfg -s system/identity:node refresh
# svcadm restart system/identity:node

Solaris10 - zfs mirror root disk split on zfs root

zfs mirror root disk split on zfs root


1. Mirror existing disk
# zpool attach rpool c0t2d0s0 c0t0d0s0


2. wait until syncing and split
# zpool split rpool rpool2


3. Import new pool
# zpool import rpool2


4. List your zfs filsystem
# zpool list


5. Install boot on second disk and set boot-device
# installboot /usr/platform/SUNW,Sun-Blade-100/lib/fs/zfs/bootblk /dev/rdsk/c0t2d0s0
# eeprom boot-device=disk2


6. Reboot and verify boot device at ok prompt and boot the system.
# sync;sync;sync
# init 0
ok printenv boot-device
boot-device = disk2
ok boot

7. Verify system is booted from splitted pool
# df -h
# zpool status
# zpool list

Wednesday, January 4, 2017

Solaris 11 - scanning result and fix

Solaris 11 - scanning result and fix
95389 Network Time Protocol Daemon
(ntpd) read_mru_list() Remote DoS =-> Apply new patch


86122 OpenSSH MaxAuthTries Bypass
changed to MaxAuthTries    6
90317 SSH Weak Algorithms Supported
71049 SSH Weak MAC Algorithms Enabled
70658 SSH Server CBC Mode Ciphers Enabled
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour
MACs hmac-sha1,hmac-ripemd160


26925 VNC Server Unauthenticated Access
# svcs -a | grep vnc
online         15:03:37 svc:/application/x11/xvnc-inetd:default