1 .Show the network devices that’s connected:
# dladm show-dev
# dladm show-dev
igb0 link: down speed: 0 Mbps duplex: half
igb1 link: down speed: 0 Mbps duplex: half
igb2 link: down speed: 0 Mbps duplex: half
igb3 link: down speed: 0 Mbps duplex: half
igb4 link: down speed: 0 Mbps duplex: half
igb5 link: up speed: 1000 Mbps duplex: full
igb6 link: down speed: 0 Mbps duplex: half
igb7 link: down speed: 0 Mbps duplex: half
Using igb5:
2. Enable the network device:
# ifconfig igb5 plumb
3. Configure the IP address:
Example
# ifconfig igb5 192.168.15.5 netmask 255.255.255.0
4. Bring up the device:
# ifconfig igb5 up
5. Verify the network configuration:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
aggr1: flags=1000802<BROADCAST,MULTICAST,IPv4> mtu 1500 index 2
inet 0.0.0.0 netmask 0
ether xx:xx:xx:xx:xx:yy
igb5: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.15.5 netmask ffffff00 broadcast 192.168.15.255
ether xx:xx:xx:xx:xx:zz
To add a gateway:
Example:
# route add default 192.168.15.1
The above network configuration will not persist after a reboot, to make the network configuration persist, perform the following step:
Create a hostname.nic in /etc where nic is the device name.
Example:
# vi /etc/hostname.igb5
192.168.15.5 netmask 255.255.255.0
:wq
For IP address define in the router’s table, enter the host name instead of the ip address in /etc/hostname.nic
Edit /etc/hosts, and add the IP address and the server’s hostname.
# vi /etc/inet/hosts
127.0.0.1 localhost
192.168.15.5 myhostname
:wq
Commands:
dladm – configure data-link interfaces
Examples:
# dladm show-link
# dladm show-dev
# dladm show-aggr
ifconfig – configure network interface parameters
Examples:
# ifconfig igb5 down