Configuring a Solaris network interface may be necessary because it needs to be reconfigured on the fly without a reboot. Fortunately, the process to configure a Solaris network interface is relatively simple. Once the Solaris network interface is configured and activated, it allows the Solaris system to communicate on the network.
Please follow the below mentioned steps to configure your network interface via DHCP or STATIC
For DHCP
ifconfig e1000g0 dhcp start
ifconfig e1000g0 dhcp status
If you want to release the existing IP
ifconfig e1000g0 dhcp release
To check the IP you can use the ‘ifconfig -a‘ command and for nameserver settings use ‘cat /etc/resolve.conf’ command.
For STATIC IP
STEP 1: Type “ifconfig -a“. The output lists two types of network interfaces. One of them is lo0, which is the loop-back network interface and not used to connect to the network. The rest of the ifconfig listing displays all available network interfaces. Some possible names for the network interface include ce0, hme0,be0, le0,e1000g0(in intel based machines) and ge0. Use the information from ifconfig to find the name of the Solaris network interface you want to configure.
STEP 2: Type “ifconfig e1000g0 plumb” where e1000g0 is the Solaris network interface that you want to configure. This command initializes the Solaris network interface.
STEP 3: Type “ifconfig e1000g0 192.168.1.10 netmask 255.255.255.0” to configure the le0 Solaris network interface. In this example, e1000g0 is the name of the network interface, 192.168.1.10 is the IP address of the Solaris system and 255.255.255.0 is the netmask.
STEP 4: Type “ifconfig e1000g0 up” to activate the Solaris network interface and put the Solaris system on the network.
Persistent IPv4 Configuration
In order to have the system configure our NIC at boot, the first step is to get an IP address and subnet mask.
Add a line to the /etc/hosts file for our new card:
192.168.2.100 host1.linuxtrove.com host1
Now, we create a file in /etc that is named hostname. For example, our first NIC’s file is /etc/hostname.e1000g0
In this file, we will put the name associated with the IP (as found in the /etc/hosts file). It should be the first name in the /etc/hosts file. In our scenario, /etc/hostname.e1000g0 should contain:
host1.linuxtrove.com
Then we edit the /etc/netmasks file for our new network:
192.168.2.0 255.255.255.0
Reboot the system, and your network card has been configured for the new network with the proper subnet mask. You can check it by running an ifconfig -a again:
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e100g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.100 netmask ffffff00 broadcast 192.168.1.255
ether
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.