dhcp and static ip conflicts.


 
Thread Tools Search this Thread
Special Forums IP Networking dhcp and static ip conflicts.
# 1  
Old 10-27-2008
dhcp and static ip conflicts.

I have a USB Wireless Adapter using the rum0 driver. All I want to do is set a perminent static IP for the onboard wired interface elxl0. I can plumb the wired interface up fine on the fly, but when I try to save the static IP over a reboot, I lose the IP address assigned to rum0 from my wireless router. See below;

1)This ouput is before I set the static IP on elxl0. At this point I have an assigned IP from my Wireless router and can connect to the internet using rum0 (my USB adapter)

Code:
ts97783@GX150:~$ more /etc/release
                        OpenSolaris 2008.05 snv_86_rc3 X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 26 April 2008
ts97783@GX150:~$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000 
elxl0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
    inet 0.0.0.0 netmask ff000000 
rum0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 3
    inet 192.168.0.3 netmask ffffff00 broadcast 192.168.0.255
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
    inet6 ::1/128

2) Next I manually plumb elxl0 with a static IP and ping the host connected to the interface - I do get "invalid argument" but the IP is still accepted. At this point I can STILL connect to the internet using rum0;

Code:
ts97783@GX150:~# ifconfig elxl0 inet 192.168.1.1 netmask 255.255.255.0 broadcast 127.0.0.255
ifconfig: SIOCSLIFBRDADDR: elxl0: Invalid argument
ts97783@GX150:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000 
elxl0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
    inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
    ether 0:6:5b:25:77:e 
rum0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 3
    inet 192.168.0.3 netmask ffffff00 broadcast 192.168.0.255
    ether 0:1e:8c:99:aa:3f 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
    inet6 ::1/128 
ts97783@GX150:~# ping 192.168.1.2
192.168.1.2 is alive

3) Now I attempt to save my static IP on elxl0 accross reboots, I am creating a hostname.elxl0 in /etc and rebooting.

Code:
ts97783@GX150:/# cd /etc
ts97783@GX150:/etc# echo 192.168.1.1 > hostname.elxl0
ts97783@GX150:/etc# more hostname.elxl0
192.168.1.1
ts97783@GX150:/etc# init 6

4) After the reboot, the static IP is remembered but I lose the IP from my router assigned to rum0. No more web browsing for me.

Code:
ts97783@GX150:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000 
elxl0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
    inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
    ether 0:6:5b:25:77:e 
rum0: flags=201000802<BROADCAST,MULTICAST,IPv4,CoS> mtu 1500 index 3
    inet 0.0.0.0 netmask 0 
    ether 0:1e:8c:99:aa:3f 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
    inet6 ::1/128

This problem is causing me sleepless nights.

As soon as I delete the hostname.elxl0 file from etc and reboot. I am given an IP from my router and am back on the internet again using rum0

Can anyone explain this???

Thanks

Last edited by ts97783; 10-27-2008 at 07:20 PM..
# 2  
Old 11-01-2008
I eventually go this sorted.

I had to disable physical:nwam and enable physical:deault under SMF then create a /etc/hostname.rum0 file

Upon reboot elxl0 remembered it's IP address and rum0 was assigned an IP from my wireless router. Althoguh my router reported conected under dladm, I was getting "page not found" when opening a browser.

I had to find the DNS servers for my provider (googled them) then added them to

/etc/resolv.conf file, and add these 2 lines
nameserver (primary dns)
nameserver (secondary dns)

Then;

cp /etc/nsswitch.dns /etc/nsswitch.conf

After a reboot I had to manually connect to my wifi using dladm but it all works now.

I will try and get this working using nwam but I have a few things I want to try first. Will report back when I can!

Cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris static IP changed (non DHCP)

We have 2 solaris 10 t5240 servers with static IP addresses on nxge0 I/F which were rebooted a few days back with a known good config that has been in place for years (for /etc/hosts, /etc/hostname.nxge0, /etc/netmasks, etc) They are not using dhcp. About the same time today, both of their... (7 Replies)
Discussion started by: hdatontodo
7 Replies

2. IP Networking

Node switched itself from static to DHCP on reboot issue

I'm trying to figure out what circumstances would cause an Open Solaris 11.2 host to switch itself from a static to a DHCP ip address upon reboot. This has only happened once but is a cause for some concern as this machine will be part of a web server pool. Nothing has changed on the LAN that... (2 Replies)
Discussion started by: SmokeyJoe
2 Replies

3. HP-UX

[Solved] Static or DHCP IP in HP-UX

Hi, I can find the IP details whether it is Static or dynamic in Linux machine from the location /etc/sysconfig/network-scripts/ifconfig-eth0 configuration file. Can someone suggest a location to find the same in HP UX machines? -Vivek (2 Replies)
Discussion started by: vkk
2 Replies

4. Red Hat

Purpose of Static IP address through DHCP

Hi All, Could you please explain the purpose of assigning the static IP by using the DHCP Concept. Like by using the clients MAC address we assign the static IP Address. Waiting for your reply. Thanks in Advance. (6 Replies)
Discussion started by: Sharath Kumar
6 Replies

5. UNIX for Dummies Questions & Answers

How to tell if i am using DHCP or Static

Hey guys , YEs this is probably silly for most but i am new to this forum and solaris . i am curious to know if the ip address we have for our solaris server is static or dhcp . how can i tell ? will ifconfig -a tell me this ? or other commands? Thanks in advance (1 Reply)
Discussion started by: xdrivex
1 Replies

6. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

7. Red Hat

How to know whether my system is using DHCP or STATIC IP

Hi, I am using RHEL 5.1 and i would like to know, how to find the whether my system is using DHCP or STATIC IP with out looking at /etc/sysconfig/network-scripts/ifconfig-eth0 configuration file. Regards, Venkat (3 Replies)
Discussion started by: venkat55
3 Replies

8. IP Networking

Switching from DHCP to Static IP

I am trying to write a set of scripts for my Ubuntu 810 Server to allow a user to change from DHCP to a user-supplied Static IP, Subnet, Gateway and DNS Servers. So far I have the following, where $USERCHOICE is a user-entered value in each case: ifconfig eth0 down && ifconfig eth0 $USERCHOICE... (1 Reply)
Discussion started by: cleanden
1 Replies

9. IP Networking

How to configure DHCP to Static IP

I am pretty new to this. My router was earlier configured to enable DHCP, thus my UNIX box is using the dhcp address, i.e. I have to do a ifconfig dhcp hme0 start. Since I am planning to use my NT as a web server, I needed to use the static IP address. How do I configure the unix box to use the... (5 Replies)
Discussion started by: lee30320
5 Replies

10. HP-UX

HP-UX 10.xx Changing from static IP to DHCP

***Newbie alert*** What's the easiest way to accomplish this? An admin left our company and I have taken over his HP Workstation and moved it to a different location that is on a different IP segment. I have performed a number of google searches but the steps I have followed haven't worked. ... (1 Reply)
Discussion started by: Steelysteel
1 Replies
Login or Register to Ask a Question