Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static Ip

Status
Not open for further replies.

cellspam

ISP
Jun 28, 2008
114
AR
Hi all,

Im having problems configuring the static ip for my server.

ifconfig e1000g2 plumb

ifconfig e1000g2 192.168.1.115 up

Then i creat the file hostnamen.e1000g2 with the info from the ip but if a reboot the server i loose the Ip.


Regards
 
Hi again :)

Firstly, I presume the 'n' in hostnamen.e1000g2 is a typo in your post? If not, it shouldn't be there.

What exactly do you have in that file? It should just be a hostname (except when configuring IPMP or similar), and that hostname should be in /etc/hosts associated with the correct IP address.

Annihilannic.
 
the files is /etc/hostname.e1000g2
Yes i did that to but when i restart the server i loose the ip.


Regards
 
What version of Solaris?

Do you see no error messages on the console or in /var/adm/messages?

Annihilannic.
 
is the 192.168.1.15 the same subnet that your primary interface is on?
I am taking a long shot by assuming that you are attempting to add a second interface since you did not use the e1000g0 interface in your initial post.

If you are adding a second interface on a different subnet, you probably will have to add an entry for the new subnet in the /etc/netmasks.

If you are not trying to add a second interface, but instead the primary interface your server runs on, than again make sure you /etc/netmasks is correct and also the /etc/defaulrouter which houses your gateway.

I'm just reminding you about these files since you did not mention them in your initial post as to if you set them.


/etc/netmasks example:

192.168.1.0 255.255.255.0 (assuming class c)
192.168.99.0 255.255.255.0

-David


 
Im using both interfaces, and the ip i configured in both are
192.168.1.104 255.255.255.0
192.168.1.105 255.255.255.0


Regards
 
cellspam,

As the others have suggested; /etc/hosts, etc/defaultrouter and /etc/netmasks needs to be configured correctly for this to work and your /etc/hostname.e1000g2 file should contain just the hostname you want to use for that interface, with a corresponding entry in /etc/hosts and also /etc/inet/ipnodes if solaris10. You may find that this is just a sym link to /etc/hosts anyway.

Your example;

192.168.1.104 255.255.255.0
192.168.1.105 255.255.255.0

If this is an output of your netmasks file then it needs to be changed to;

192.168.1.0 255.255.255.0

/etc/defaultrouter should be 192.168.1.1 (I assume)

If this doesn't work then maybe you can post your files.

Hope this helps
 
I did all the steps and still the same issue.

bash-3.2# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
inet 192.168.1.104 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:85:e6:d9
e1000g1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
ether 0:c:29:85:e6:e3
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
 
question:

1)are you sure you are using a static IP for 192.168.1.115, I notice you are also using DHCP.


2) after you do: ifconfig e1000g2 192.168.1.115 up, do you verify by doing a ifconfig -a, does your addition ever make into the configuration?

will this work for you,


#ifconfig e1000g2 plumb

#ifconfig e1000g2 192.168.1.115 mtu 1500 netmask 255.255.255.0 broadcast 192.168.1.255 up

you can try it w/o the mtu also.

#ifconfig e1000g2 192.168.1.115 netmask 255.255.255.0 broadcast 192.168.1.255 up

Also check /etc/inet/ipnodes, is it in sync in regards to ip address and hostnames. it has to be in sync with the /etc/hosts and /etc/hostname.* (meaning, are the ip's correct)


if this does not work, take Annihilannic's advise and check your messages file.

also as anotheralan stated, your netmask file is wrong if what you posted is actually what you have on the server. It should look as he stated.

 
Here is my dmesg

# dmesg | grep e1000g1
Jul 29 20:29:17 solaris-server /sbin/dhcpagent[156]: [ID 778557 daemon.warning] configure_v4_lease: no IP broadcast specified for e1000g1, making best guess
Jul 29 20:29:18 solaris-server in.routed[506]: [ID 238047 daemon.warning] interface e1000g1 to 192.168.1.112 turned off
Jul 30 03:29:39 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
Jul 30 03:29:51 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex

Thanks to all
 
why are you greping e1000g1 when in your initial post you are talking about e1000g2.

if it is e1000g1 you are having issues with,

than try:

ifconfig e1000g1 192.168.1.115 mtu 1500 netmask 255.255.255.0 broadcast 192.168.1.255 up


or do a grep like:

# grep e1000g /var/adm/messages*

 
its e1000g1
here is the logs
bash-3.2# grep e1000g1 /var/adm/messages*
/var/adm/messages:Jul 25 19:19:01 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 25 19:19:35 solaris-server mac: [ID 736570 kern.info] NOTICE: e1000g1 unregistered
/var/adm/messages:Jul 25 19:29:44 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 25 19:44:54 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 04:09:53 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 04:10:03 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 04:10:16 solaris-server in.routed[503]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 26 14:03:47 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 14:03:58 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 14:04:11 solaris-server in.routed[515]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 26 14:12:47 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 14:12:59 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 14:13:09 solaris-server in.routed[480]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 26 14:27:49 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 14:28:00 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 14:28:11 solaris-server in.routed[524]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 26 14:47:49 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 14:48:00 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 14:59:16 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 14:59:27 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 15:09:31 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 15:09:42 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 15:43:49 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 15:43:59 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 16:12:44 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 16:12:55 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 26 16:13:07 solaris-server in.routed[500]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 26 16:23:43 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 26 16:23:55 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 28 18:24:08 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 28 18:24:19 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 28 18:24:32 solaris-server in.routed[490]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 28 18:34:09 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 28 18:34:19 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 28 18:34:32 solaris-server in.routed[516]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 28 18:47:33 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 28 18:47:43 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 28 18:47:55 solaris-server in.routed[502]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 28 18:59:42 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 28 18:59:51 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 28 19:00:04 solaris-server in.routed[529]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 28 19:07:39 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 28 19:07:49 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 29 02:38:54 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 29 02:39:08 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 29 02:39:17 solaris-server in.routed[507]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 29 02:49:08 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 29 02:49:18 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 29 06:30:27 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 29 06:30:37 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 29 20:18:28 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 29 20:18:38 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
/var/adm/messages:Jul 29 20:18:50 solaris-server in.routed[506]: [ID 749644 daemon.notice] e1000g1 has a bad address 0.0.0.0
/var/adm/messages:Jul 29 20:29:17 solaris-server /sbin/dhcpagent[156]: [ID 778557 daemon.warning] configure_v4_lease: no IP broadcast specified for e1000g1, making best guess
/var/adm/messages:Jul 29 20:29:18 solaris-server in.routed[506]: [ID 238047 daemon.warning] interface e1000g1 to 192.168.1.112 turned off
/var/adm/messages:Jul 30 03:29:39 solaris-server mac: [ID 469746 kern.info] NOTICE: e1000g1 registered
/var/adm/messages:Jul 30 03:29:51 solaris-server mac: [ID 435574 kern.info] NOTICE: e1000g1 link up, 1000 Mbps, full duplex
--
if found that the nic is trying go work like IPv6 " inet6 ::1/128
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top