How to Configure a Static Ip Address

Hello friend, I am new in UNIX, but I want to learn a lot
Well I have a problem to try to configure my PC with a static IP Address
(IP 192.168.1.39, Mask 255.255.255.0, gateway 192.168.1.1)
(DNS 200.48.225.130 and 200.48.225.146).
where are the file that I must be change?
The SO is Sun Solaris
Release: 5.10
kernel architecture: i86pc
Aplication architecture: i386

when i write the command appear the following

#ifconfig -a
lo0: flags=2001000849<UP, LOOPBACK, RUNNING, MULTICAST, IPv4, VIRTUAL>mtu 8232 index 1
inet 127.0.0.1 netmask ff000000

Can any help please
regard

please post the output of the command:

# dladm show-dev

the "lo0" interface is the loopback interface. we need to find your network card. the above command will tell us!

Hi,

Run the below commands to assign the static IP to your machine:

#dladm show-dev

see the instance name of the ethernet card looks like (bge0, hme0, pcn0.......)

# ifconfig bge0/hme0/pcn0 192.168.0.1 netmask 255.255.255.0 up

It will assign the above IP address to your machine. To make it permanent so that it could be available after reboot:

Edit the below files:

/etc/inet/hosts
/etc/inet/ipnodes
/etc/hostname.interface

Please revert back to this forum if this doesn't solve your purpose.

Thanks,
Deepak

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

Well when I put the command dladm show-deb

# dladm show-dev
The message is:
Aug 5 16:53:42 paolo usba: WARNING: /pci@0.0/pci925,123@11,2 (uhci0): No SOF interrupts have been received, this USB UHCI host controller is unasable
Aug 5 16:53:45 paolo usba: WARNING: /pci@0.0/pci925,123@11,3 (uhci1): No SOF interrupts have been received, this USB UHCI host controller is unasable
Aug 5 16:53:48 paolo usba: WARNING: /pci@0.0/pci925,123@11,4 (uhci2): No SOF interrupts have been received, this USB UHCI host controller is unasable

---------- Post updated at 07:02 AM ---------- Previous update was at 06:54 AM ----------

Hi Deepak
When I put the command:

in /etc/inet/
cat hosts
127.0.0.1    localhost loghost paolo

also

 in /etc/inet/
cat hosts
127.0.0.1    localhost loghost paolo

but

 in /etc
cat hostname.interface
cat: cannot open hostname.interface

it looks like you don't have a useable network card in your machine... you might need to install special drivers for solaris to make use of your hardware.

What shows:

/usr/X11/bin/scanpci

?

HI jlliagre

This appear :

/usr/X11/bin/scanpci
...
...
desde 
CardVendor 0x%04x card 0x%04x
pci bus 0x%04x cardnum 0x%02x function 0x%02x: vendor 0x%04x device 0x%04x
STATUS     0x%04x    COMMAND 0x%04x
CLASS    0x%02x    0x%02x    0x%02x    REVISION 0x%02x
HEADER    0x%02x    LATENCY    0x%02x
PRIBUS    0x%02x    SECBUS    0x%02x    SUBBUS    0x%02x
SECLT    0x%02x    SECSTATUS 0x%04x
IOBASE    0x%04x%04x IOLIM 0x%04x%04x
PREFETCH_MEMBASE 0x%08x%08x  MEMLIM  0x%08x%08x
%sFAST_B2B %sSEC_BUS_RST %sM_ABRT %sVGA_EN %sISA_EN %sSERR_EN %sPERR_EN
PREFETCH_MEMBASE    0x%08x    MEMLIM    0x%08x
NOPREFETCH_MEMBASE    0x%08x    MEMLIM    0x%08x
IOBASE    0x%04x    IOLIM 0x%04x
    -v print config space    -O use OS config support 
-f force config type -V set message verbosity level CardVendor 0x%04x
card 0x%04x
APBASE        0X%08x    addr    0X%08x
BLOCKIO        0X%08x    addr    0X%08x
REGBASE        0X%08x    addr    0X%08x
SPARSEIO    0X%03x    %s    IO enabled    %sable 0x46E8
MW0_AD        0X%08x    addr    0X%08x    %spre-fetchable
MW1_AD        0X%08x    addr    0X%08x    %spre-fetchable
XYW_AD(A)    0X%08x    addr    0X%08x
XYW_AD(B)    0X%08x    addr    0X%08x
RBASE_G        0X%08x    addr    0X%08x
IO        0X%08x    addr    0X%08x
RBASE_E        0X%08x    addr    0X%08x    %sdecode-enabled
PRIBUS        0X%02x    SECBUS 0x%02x    SUBBUS 0x%02x    SECLT 0x%02x
IOBASE         0x%02x    IOLIM    0x%02x    SECSTATUS 0x%04x
HEADER        0x%02x    LATENCY    0x%02x    CACHE    0x%02x
TICK    0x%081x        SECCNTL    0x%02x
MASTER RETRIES: PRIMARY    0x%02x, SECONDARY 0x%02x
TARGET RETRIES:    PIO    0x%02x,    DMA      0x%02x
TARGET LATENCY:    PIO    0x%02x,    DMA      0x%02x
DMA AFSR    0x%081X%081x    AFAR    0x%081X%081x
PIO AFSR    0x%081X%081x    AFAR    0x%081X%081x
PCI CNTL    0x%081X%081x    DIAG    0x%081X%081x
MAPS:        I/O    0x%02x, MEM    0x%02x
F16NUM        0x%02x    F16CPL    0x%02x    DEVNPRES 0x%081x
CBN        0x%02x    CBUSES    0x%02x
BUSNO        0x%02x    SUBNO    0x%02x
VGASE        0x%02x    PCIS    0x%02x    IOR    0x%02x
TOM        0x%04x    IORD    0x%04x
ERRCMD        0x%02x    GAPEN    0x%02x
BAPBASE        0x%081x%081X    AGPSIZ    0x%02x    VGAGE    0x%02x
xf86LinearVidMen: failed to open %s (%s)
xf86LinearVidMen: either /dev/fbs/aperture or /dev/xsvc device driver required
xf86LinearVidMen: linear memory    access disabled
xf86MapVidMen: no aperture device
xf86MapVidMen: failed to open %s (%s)
xf86MapVidMen: mmap failure: %s
xf86EnableIOPorts: Failed to set IOPL for I/O
pciReadWorld: Alignment error: Cannot read 16 bits at offset %d
pciWriteWorld: Alignment error: Cannot read 16 bits at offset %d
pciGenFindNext: primary bus mismatch on PCI bridge 0x%081x (0x%02x, 0x%02x)
PCI: PCI scan (all values are in hex)
PCI: %.2x:%02x:%1x chip %04x,%04x card %04x,%04x rev %02x class %02x,%02x,%02x
hdr %02x
xf86scanpci: Out of memory after %d device!!
xf86MapPciMen: Could not mmap PCI Memory {base=0x%1x,hostbase=0x%1x,size=%1x} (%s)
xf86ReadPciBios: modifying membase {%i} for device %i:%i:%i
Cannot find empty range to map base to
Truncating PCI BIOS Length to %i
PCI: stages = 0x%02x, oldVal1 = 0x%081x,
mode1Res1 = 0x%081x, mode1Res2 = 0x%081x, 
PCI: No PCI bus found or probed for
PCI: Probing config type using method 1
PCI: Stages = 0x%02x, oldVal1 = 0x%081x, mode1Res1 = 0x%081x
PCI: Probing config type using method 2
PCI: Standar check for type 1 failed
xf86ReadBIOS: Failed to open % (%s)
xf86ReadBIOS: Could not mmap BIOS �{a=%1x}
PREFECTCHABLEMEN I/O 64 BITnot-?v120fV: Device unknown (%s %s) %s %sNO_ (Card 
unknow), Usage: scanpci {-v120fV}   -1 config type 1  -2 config type 2
xf86SetupPciIds() failed
No PCI devices foundEnDisSparseBlock SECSTATUS 0x%04x
BUS I/O 0x%06x-0x%06x
BUS MEM 0x%08x-0x%08x
/dev/xsvc/dev/fbs/aperturePCI: End of PCI scan
PCI: Config type is 1
PCI: Forcing config type 2
PCI: Config type is 2
Fatal Error:
XNFalloc failed
XNFrealloc failed
XNFcalloc failed
..
.
.
.

If you need more information or procedure, please tell me.
Thank
Andres

I'm afraid you didn't run scanpci but displayed its binary content instead ...

Hi jlliagre
Well I do /usr/X11/bin/scanpi
and I write in WordPad the message that appear, after I attached it.
What, in your opinion would be the problem?, and how Can I solve?

Okay, let's try to figure out what's going on.

Please type these commands and post their output:

uname -a
cat /etc/release
file /usr/X11/bin/scanpci
/usr/X11/bin/scanpci | head

Hi Jlliage

uname -a
SunOS paolo 5.10 Generic_137138-09
cat /etc/release
Solaris 10 10/08 s10x_u6wos_07b X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is Subject to License Terms
Assembled 27 October 2008
file /usr/X11/bin/scanpci
/usr/X11/bin/scanpci: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available
 /usr/X11/bin/scanpci | head
pci bus 0x0000 cardnum 0x00 function 0x00: vendor 0x1106 device 0x3148
VIA Technologies, Inc. P4M266 Host Bridge

pci bus 0x0000 cardnum 0x01 function 0x00: vendor 0x1106 device 0xb091
VIA Technologies, Inc. VT8633 {Apollo Pro266 AGP}

pci bus 0x0000 cardnum 0x11 function 0x00: vendor 0x1106 device 0x3074
VIA Technologies, Inc. VT8233 PCI to ISA Bridge

There is nothing wrong there. Please post again the real scanpci command output.

Hi Jlliagre, thanks for you helps!!!
I attached

#/usr/X11/bin/scanpci
pci bus 0x0000 cardnum 0x00 function 0x00: vendor 0x1106 device 0x3148
VIA Technologies, Inc. P4M266 Host Bridge

pci bus 0x0000 cardnum 0x01 function 0x00: vendor 0x1106 device 0xb091
VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]

pci bus 0x0000 cardnum 0x11 function 0x00: vendor 0x1106 device 0x3074
VIA Technologies, Inc. VT8233 PCI to ISA Bridge

pci bus 0x0000 cardnum 0x11 function 0x01: vendor 0x1106 device 0x0571
VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Mater IDE

pci bus 0x0000 cardnum 0x11 function 0x02: vendor 0x1106 device 0x3038
VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

pci bus 0x0000 cardnum 0x11 function 0x03: vendor 0x1106 device 0x3038
 VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

pci bus 0x0000 cardnum 0x11 function 0x04: vendor 0x1106 device 0x3038
 VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

pci bus 0x0000 cardnum 0x11 function 0x05: vendor 0x1106 device 0x3059
 VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller

pci bus 0x0000 cardnum 0x11 function 0x06: vendor 0x1106 device 0x3068
 VIA Technologies, Inc. AC' 97 Modem Controller

pci bus 0x0000 cardnum 0x12 function 0x00: vendor 0x1106 device 0x3065
 VIA Technologies, Inc. VT6102 [Rhine-II]

pci bus 0x0001 cardnum 0x00 function 0x00: vendor 0x5333 device 0x8d04
 S3 Inc. VT8375 [ProSavage8 KM266/KL266]

the VIA Technologies, Inc. VT6102 seems to be your network card. so as already said above you will/might need a solaris driver for your mainboard to get use of the nic.

and this driver would likely be the vfe one downloadable from Free NIC drivers for Solaris

Note that this card is natively supported by the OpenSolaris "vr" driver.