Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Network configuration in Solaris

Leer en espanol
Network configuration in Solaris

Table of contents

We add a static IP addressing. Syntax: text#ifconfig [Interface] [Ip] netmask ===

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:

text
#ifconfig [Interfaz] [Ip] netmask [Mascara] up

Example:

text
#ifconfig e1000g0 192.168.1.180 netmask 255.255.255.0 up

To add it permanently you have to add it to the hostname.[Interface] file

text
#cat >> /etc/hostname.e1000g0
text
192.168.1.180 up

Create SubInterfaces

Syntax:

text
#ifconfig e1000g0 addig [IP] up

example:

text
#ifconfig e1000g0 addig 192.168.1.185

Delete SubInterfaces

text
#ifconfig e1000g0 remove 192.168.1.185

Another way to create SubInterfaces:

Syntax:

text
#ifconfig  e1000g0:1 plumb [IP]

Example:

text
#ifconfig  e1000g0:1 plumb  192.168.1.186

Delete SubInterfaces

text
#ifconfig e1000g0:1 unplumb

To add it permanently you have to add it to the hostname.[Interface] file
Syntax:

text
#cat >> /etc/hostname.e1000g0

addif [IP] up

Example:

text
#cat >> /etc/hostname.e1000g0

addif  192.168.1.186 up

DHCP Configuration

we create the file /etc/dhcp.interface

text
#touch /etc/dhcp.e1000g0
text
# echo wait 300 > /etc/dhcp.e100g0

# echo primary > /etc/dhcp.e1000g0

Configuramos el Gateway

text
#route add default [Ip]

Example

text
#route add default 192.168.1.1
text
add net default: gateway 192.168.1.1

To maintain the Gateway (although I think it is not necessary)

text
#echo “192.168.1.1″> /etc/defaultrouter

Add DNS

For this we are going to create or edit if it exists.

text
#nameserver [Ip servidor DNS]

Example:

text
#nameserver 192.168.1.1

In 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:

text
#hosts: files dns

Configure the domain name.

text
#domainname red-orbita
text
#domainname > /etc/defaultdomain

We configure the HOSTS name

text
#hostname rokitoh

we edit the nodename file

text
#hostname > /etc/nodename

We can also configure the hosts file to associate the IP addresses with the domains.

text
#cat >> /etc/hosts
text
192.168.1.181                   rokitoh1
text
Cntrl + D

Greetings, rokitoh!

Comments