Announcement

Collapse
No announcement yet.

mixing static internal IP and DHCP, KNetwork Manager, other simple quandries?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    mixing static internal IP and DHCP, KNetwork Manager, other simple quandries?

    Oops, posted this in the wrong place, now it's here:

    Hi - forgive the probable cluelessness here, but:

    Wanting to have a computer (in this case using a wireless interface, but could be anything) claim a fixed IP within a LAN that is governed by DHCP. In this example, it wants 192.168.0.253. I'm not worried about collisions.

    If I understand things correctly, I add to /etc/network/interfaces something akin to:

    iface eth1 inet static
    address 192.168.0.253
    netmask 255.255.255.0
    gateway 192.168.0.1

    ...but I think my issue is that my router, when DHCP is "on", won't talk to me unless I do a dhclient on eth1, which assigns it some other random IP (and if I'm correct, I can't alter dhclient.conf or .leases to change this behavior). After editing the "interfaces" file as described above, setting "ifconfig eth1 192.168.0.253", and doing "ifconfig eth1 up", I can ping the router but I can't get out.

    So, is my theory (that it's my router being stubborn) correct? I even tried editing /var/lib/dhcp3/dhclient.leases and changing the IP to 253, but the DHCP may be "authoritative" because it ignores my client requests for a spoofed IP lease and offers the last IP it had for my MAC address instead...

    So, get a new router? Or is there another way (e.g. to configure dhclient to request a specific IP)? The goal is serving web/etc to the WAN from inside the LAN, but still having DHCP active for the many guests that we have.

    When I tried with KNetwork Manager in "manual IP" mode for the connection in question, it just hung at the grey-earth state, which implies something out of the ordinary to me... like it somehow knew that it was not a legit connection... quitting/running it again, no luck. I'm going to check the syslog for clues, but I thought it was time to toss this one up for the experts.

    The DHCP options in the router (Actiontec GT701-WG, if I have it right) are very limited (on/off, IP range, etc.)

    Thanks for any ideas!
    -c

    #2
    Re: mixing static internal IP and DHCP, KNetwork Manager, other simple quandries?

    Ah, got it, or at least some of it.

    http://kubuntuforums.net/forums/inde...opic=3100052.0

    ...showed me that I needed a

    # /etc/init.d/networking restart

    ...and now it's humming. But if anyone has any tips/links as to why that was needed I'm all ears. I.e. what magical thing it does so I can do more than just ping the router.

    Thanks,
    -c

    Comment


      #3
      Re: mixing static internal IP and DHCP, KNetwork Manager, other simple quandries?

      ...and: is /etc/rc.local the proper place for me to put the iwconfig / ifconfig stuff so that after booting the machine starts up it's connection without requiring anyone to log in? Thanks, -c

      Comment

      Working...
      X