Well I bring a small tutorial on how to configure the IP address, Host name, DNS name, in Solaris
We add a static IP addressing.
Syntax:
#ifconfig [Interfaz] [Ip] netmask [Mascara] upExample:
#ifconfig e1000g0 192.168.1.180 netmask 255.255.255.0 upTo add it permanently you have to add it to the hostname.[Interface] file
#cat >> /etc/hostname.e1000g0192.168.1.180 upCreate SubInterfaces
Syntax:
#ifconfig e1000g0 addig [IP] upexample:
#ifconfig e1000g0 addig 192.168.1.185Delete SubInterfaces
#ifconfig e1000g0 remove 192.168.1.185Another way to create SubInterfaces:
Syntax:
#ifconfig e1000g0:1 plumb [IP]Example:
#ifconfig e1000g0:1 plumb 192.168.1.186Delete SubInterfaces
#ifconfig e1000g0:1 unplumbTo add it permanently you have to add it to the hostname.[Interface] file
Syntax:
#cat >> /etc/hostname.e1000g0
addif [IP] upExample:
#cat >> /etc/hostname.e1000g0
addif 192.168.1.186 upDHCP Configuration
we create the file /etc/dhcp.interface
#touch /etc/dhcp.e1000g0# echo wait 300 > /etc/dhcp.e100g0
# echo primary > /etc/dhcp.e1000g0Configuramos el Gateway
#route add default [Ip]Example
#route add default 192.168.1.1add net default: gateway 192.168.1.1To maintain the Gateway (although I think it is not necessary)
#echo “192.168.1.1″> /etc/defaultrouterAdd DNS
For this we are going to create or edit if it exists.
#nameserver [Ip servidor DNS]Example:
#nameserver 192.168.1.1In order for us to resolve using dns, we also have to configure the file nsswitch.conf
in line hosts: files we have to add dns. it would look like this:
#hosts: files dnsConfigure the domain name.
#domainname red-orbita#domainname > /etc/defaultdomainWe configure the HOSTS name
#hostname rokitohwe edit the nodename file
#hostname > /etc/nodenameWe can also configure the hosts file to associate the IP addresses with the domains.
#cat >> /etc/hosts192.168.1.181 rokitoh1Cntrl + DGreetings, rokitoh!
Comments