How to change from DHCP assigned to manual ?

Opensuse 12.3

I changed my network connectivity from Wifi to wired and I want to retain the static I/P address.
It seemed simple enough, go into Manage Connections, select the wired connection and change it from Automatic (DHCP) to manual and assign the manual address,
I/P 192.168.1.211
Subnet 255.255.255.0
Gateway 192.168.1.1
DNS 192.168.1.1

After the changes, I could not access the internet nor ping the router.

What am I doing wrong ?

Oh yeah, automatic DHCP works just fine.

thanks

On 03/06/2014 10:16 AM, hextejas pecked at the keyboard and wrote:
> Opensuse 12.3
>
> I changed my network connectivity from Wifi to wired and I want to
> retain the static I/P address.
> It seemed simple enough, go into Manage Connections, select the wired
> connection and change it from Automatic (DHCP) to manual and assign the
> manual address,
> I/P 192.168.1.211
> Subnet 255.255.255.0
> Gateway 192.168.1.1
> DNS 192.168.1.1
>
> After the changes, I could not access the internet nor ping the router.
>
> What am I doing wrong ?
>
> Oh yeah, automatic DHCP works just fine.
>
> thanks
>
>

You cannot assign an address in the DHCP pool as a static address. At
some point it will be assigned elsewhere via DHCP and cause a conflict.
Choose a different address that is -not- in the DHCP pool.

Ken

I apologize Ken but I don’t know what you mean.
When this PC had a wireless connection, I was able to assign 192.168.1.211 so I can’t figure out why the switch to wired would not be allowed.
Is 192.168.1.211 reserved somewhere.
Does that mean that I will need to get into the router and reserve or unreserve 192.168.1.211 ?

thanks

Well, it works now. Apparently I needed to restart the network. I guess that just changing the connection and saving it did not take effect immediately.

“systemctl restart network” was the magic.

thanks again

I would of course use YaST to do this. And then also switch from Network Manager to “ifup”.

But you should take kensch’s advice for serious. When that DHCP server on your network is still active, you may only use IP addresses that it has not in his list of IP addresses to give to DHCP clients. You could end up with two systems on your network using the same address.

On 03/06/2014 09:36 AM, hcvv wrote:
>
> I would of course use YaST to do this. And then also switch from Network
> Manager to “ifup”.

For a box that never moves, sure. For a laptop, it’s much more convenient
(imo) to create a wired connect configuration, or change the current wired
connection configuration, to use a static IP address. When you move next,
you can still easily enable wireless, or switch back to the DHCP
configuration, or whatever. Easy peasy.

> But you should take kensch’s advice for serious. When that DHCP server
> on your network is still active, you may only use IP addresses that it
> has not in his list of IP addresses to give to DHCP clients. You could
> end up with two systems on your network using the same address.

Which often isn’t a big deal, and (the bigness of the deal, as well as the
likelihood that you can get into this situations) depends entirely on the
network. For example, DHCP servers will often do a quick check (via ICMP
echo request, aka ping) for the address they’re about to give out. If no
response, or if nobody responded to the required ARP packet to find the
MAC of the host that had the IP address, give out the address. If not,
try another. Beyond the DHCP server side many clients do the same thing
(quickly check to make sure it’s not assigned) and will reject an offered
IP if already in use.

Worst case, two boxes get the same IP. Now the network configuration
decides how bad this is. If it’s a switched network (as most are today)
it could cause intermittent pain and suffering. If it’s all hub-based (or
acting like it), you probably won’t notice unless you watch your host’s
firewall unless you’re trying to reach one of the boxes and the other one
is accepting or resetting connections faster than the intended one.
Nothing too bad, but could be annoying.

Ideally go change your DHCP server to recognize your box’s MAC address and
give you the correct/desired IP every time you connect. No configuration
needed on your box, and you should be safe from all of the above.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

On 03/06/2014 12:32 PM, ab pecked at the keyboard and wrote:
> On 03/06/2014 09:36 AM, hcvv wrote:
>> I would of course use YaST to do this. And then also switch from Network
>> Manager to “ifup”.
> For a box that never moves, sure. For a laptop, it’s much more convenient
> (imo) to create a wired connect configuration, or change the current wired
> connection configuration, to use a static IP address. When you move next,
> you can still easily enable wireless, or switch back to the DHCP
> configuration, or whatever. Easy peasy.
>
>> But you should take kensch’s advice for serious. When that DHCP server
>> on your network is still active, you may only use IP addresses that it
>> has not in his list of IP addresses to give to DHCP clients. You could
>> end up with two systems on your network using the same address.
> Which often isn’t a big deal,

Sorry but it is always a big deal. The DHCP server will check it’s
database to see what numbers are available and assign one. After a
number is assigned the DHCP server will note the assignment in it’s
database (so it is not assigned to another device) and keep it reserved
until it becomes time for the address to be renewed. At this point the
DHCP server will ask the device if it still wants the address and if so
renew the lease. If there is no response from the device the address
will be put back in the pool so it can be handed out to another device.
This operates through ack/nac between the server and client. Have you
ever used a program like wireshark to analyze network traffic between a
DHCP server and device needing an address? The DHCP server will assigh
the address to another device without checking to see if another device
stole the address (through a static setup) and errors will result.

> and (the bigness of the deal, as well as the
> likelihood that you can get into this situations) depends entirely on the
> network.
> For example, DHCP servers will often do a quick check (via ICMP
> echo request, aka ping)

No they don’t!

> for the address they’re about to give out. If no
> response, or if nobody responded to the required ARP packet to find the
> MAC of the host that had the IP address, give out the address. If not,
> try another. Beyond the DHCP server side many clients do the same thing
> (quickly check to make sure it’s not assigned) and will reject an offered
> IP if already in use.
>
> Worst case, two boxes get the same IP. Now the network configuration
> decides how bad this is.

No, you will always end up with collisions on the network resulting in so many retries that the devices will become almost useless as well as slow down the rest of the network due to excess traffic.

> If it’s a switched network (as most are today)
> it could cause intermittent pain and suffering. If it’s all hub-based (or
> acting like it), you probably won’t notice unless you watch your host’s
> firewall unless you’re trying to reach one of the boxes and the other one
> is accepting or resetting connections faster than the intended one.
> Nothing too bad, but could be annoying.
>
> Ideally go change your DHCP server to recognize your box’s MAC address and
> give you the correct/desired IP every time you connect. No configuration
> needed on your box, and you should be safe from all of the above.
>

One right statement, always ask the network admin for a static address
-if- one is needed.

Ken

> Sorry but it is always a big deal. The DHCP server will check it’s
> database to see what numbers are available and assign one. After a number
> is assigned the DHCP server will note the assignment in it’s database (so
> it is not assigned to another device) and keep it reserved until it
> becomes time for the address to be renewed. At this point the DHCP server
> will ask the device if it still wants the address and if so renew the
> lease. If there is no response from the device the address will be put
> back in the pool so it can be handed out to another device. This
> operates through ack/nac between the server and client. Have you ever used
> a program like wireshark to analyze network traffic between a DHCP server
> and device needing an address? The DHCP server will assigh the address to
> another device without checking to see if another device stole the address
> (through a static setup) and errors will result.

Sure, errors will result if two boxes have the same IPs, but the magnitude
of those errors varies a lot, and in fact a lot of the time things will
just work. Try it out; I’ve done it a thousand times (possible
exaggeration), including when I knew I was duplicating an address on the
network for my own evil purposes.

A LAN trace showing what happens in this case can be pretty interesting,
and while most of our wired networks are switched, wireless world can
still work this same way, especially on open networks. Changing your IP
to match somebody else’s and then watching the wire (well, the non-wire)
shows some neat things as packets you solicited come back to you (and may
be rejected by the other host) or packets for the other host come to them
(but are rejected by your host). At the end of the day the default
firewall on openSUSE ignores these, so no extra traffic put on the wire
for things that come to you but were destined for the other box.

>> and (the bigness of the deal, as well as the
>> likelihood that you can get into this situations) depends entirely on the
>> network.
>> For example, DHCP servers will often do a quick check (via ICMP
>> echo request, aka ping)
>
> No they don’t!

Calm down… this isn’t the end of the world, either way.

Some do. I didn’t say all do, but some do. Google for dhcp ping check if
you don’t believe me. In fact, as an opensuse user you probably have the
option to setup DHCP within openSUSE (ISC’s dhcp server). This one, as
well, has an option for a ping check (see the manpage).

>> for the address they’re about to give out. If no
>> response, or if nobody responded to the required ARP packet to find the
>> MAC of the host that had the IP address, give out the address. If not,
>> try another. Beyond the DHCP server side many clients do the same thing
>> (quickly check to make sure it’s not assigned) and will reject an offered
>> IP if already in use.
>>
>> Worst case, two boxes get the same IP. Now the network configuration
>> decides how bad this is.
>
> No, you will always end up with collisions on the network resulting in so
> many retries that the devices will become almost useless as well as slow
> down the rest of the network due to excess traffic.

Always avoid absolutes.

A collision is an event that happens regardless of who has what IPs,
unique or otherwise. I think you are thinking of something else. These
happened primarily on the same old networks (not switched) mentioned
above, and it’s why CSMA/CD exists for wired networks (or I think CSMA/CA
for wireless, but it’s been a while since I looked into that).

If you have duplicates you will end up with some interesting symptoms, but
always ending up with slowing of the rest of the network is a bit extreme.
Why would that happen? A hub sends all packets to all interfaces in any
case. A switch should keep track of which box has the IP, so it should
only send packets to one port or another, and while there may be confusion
there for each end user, the overall network’s pain/suffering shouldn’t be
that extreme. Or consider wireless networks; like hubs, they broadcast
and everybody receives everything. Again, no major slowdown.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

On 2014-03-06 18:32, ab wrote:

> For a box that never moves, sure. For a laptop, it’s much more convenient
> (imo) to create a wired connect configuration, or change the current wired
> connection configuration, to use a static IP address. When you move next,
> you can still easily enable wireless, or switch back to the DHCP
> configuration, or whatever. Easy peasy.

> For example, DHCP servers will often do a quick check (via ICMP
> echo request, aka ping) for the address they’re about to give out. If no
> response, or if nobody responded to the required ARP packet to find the
> MAC of the host that had the IP address, give out the address. If not,
> try another.

Ah… that can be an explanation of why when using dhcp connection up is
slower. The dhcp server has to timeout for the ping request.

Interesting.

> Ideally go change your DHCP server to recognize your box’s MAC address and
> give you the correct/desired IP every time you connect. No configuration
> needed on your box, and you should be safe from all of the above.

Ah, yes :slight_smile:

I do that, with Network Manager with automatic config, via dhcp. I
configure the router to always give the same address to the laptop,
based on its MAC address. There is a MAC for the WiFi interface, and
another for the cable.

When I change sites, I do nothing at all, just power up :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Wow, did I start a firestorm or what !

Very interesting stuff and I am very careful to avoid static I/P.
In this case, the PC where I was working, had the I/P address previously so I was pretty sure no one else had it.
Only about 10 devices on the network.

Lol, and now I need to switch back to wireless and am having a heck of a time working it out.
Sigh, more reading for sure.

thanks

Why? The only thing is hat you and the DHCP server must not compete in giving out IP addresses. Looks naturaly to me. Same as there are no two administers that give out telephone numbers uncoordinated.

I configured my DHCP server (it is in my router) to give out only IP addresses in a certain range (a subset of the IP addresses possible in my LAN). And I have static IP addresses for all my “normal” systems outside that range. So the casual passer by system that has to connect to my network, will get an address from the DHCP server that will never collide with my “normal” addresses.

The only thing is that you either must be the network manager or have a good relation with her/him. :wink: