Giving my computer a fixed IP address. - Mandriva

This is a discussion on Giving my computer a fixed IP address. - Mandriva ; I am trying to configure Samba on Mandriva 2007.1, and find that assigning a fixed network address for my computer helps. At first I confused it with the external address, and tried to set it with the Ethernet tool in ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Giving my computer a fixed IP address.

  1. Giving my computer a fixed IP address.

    I am trying to configure Samba on Mandriva 2007.1, and find that assigning a
    fixed network address for my computer helps. At first I confused it with
    the external address, and tried to set it with the Ethernet tool in
    DrakConf. Naturally, giving my computer an external address from the
    blocks intended for networks gave strange results. That is how hard I find
    coming to terms with networking concepts, although I should not have made
    that mistake.

    My computer is assigned 192.168.1.2 by the router. How do I hard-code that
    into the OS? I don't see why I have to, but it does make a difference.

    Doug.
    --
    Judge a man by his questions rather than by his answers.
    - Voltaire


  2. Re: Giving my computer a fixed IP address.

    On Mon, 23 Jul 2007 11:23:46 +1000, Doug Laidlaw wrote:
    >
    > My computer is assigned 192.168.1.2 by the router. How do I hard-code that
    > into the OS?


    You delete the network connection to the router in MCC.
    Then create it again as static, supplying your values.
    Then verify here values <===========

    $ hostname
    wb.home.invalid <===========

    $ head -4 /etc/hosts
    127.0.0.1 localhost
    192.168.2.30 wb.home.invalid wb <===========

    $ cat /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    BOOTPROTO=static <===========
    IPADDR=192.168.2.30 <===========
    NETMASK=255.255.255.0
    GATEWAY=192.168.2.1 <===========
    ONBOOT=yes
    METRIC=10
    MII_NOT_SUPPORTED=yes
    USERCTL=no
    DNS1=24.93.41.125 <===========
    DNS2=24.93.41.126 <===========
    RESOLV_MODS=yes
    IPV6INIT=no
    IPV6TO4INIT=no

  3. Re: Giving my computer a fixed IP address.


    "Doug Laidlaw" wrote in message
    news:2icdn4-hh6.ln1@dougshost.douglaidlaw.net...
    >I am trying to configure Samba on Mandriva 2007.1, and find that assigning
    >a
    > fixed network address for my computer helps. At first I confused it with
    > the external address, and tried to set it with the Ethernet tool in
    > DrakConf. Naturally, giving my computer an external address from the
    > blocks intended for networks gave strange results. That is how hard I
    > find
    > coming to terms with networking concepts, although I should not have made
    > that mistake.



    >
    > My computer is assigned 192.168.1.2 by the router. How do I hard-code
    > that
    > into the OS? I don't see why I have to, but it does make a difference.


    I prefer all static addresses, because then I can ping each by number, and
    also do some status testing.

    I have a linux file/print server, and a 'bunch' of win98/winxp/linux boxes
    here
    the gateway is a d-link router, 192.168.0.1
    dhcp is enbaled on the router for when my son or daughter bring their
    laptops over
    range is x.x.x.100 to x.x.x.199. This keeps the dhcp addresses separate from
    the static addresses

    Desktop machines usually have static addresses, below the 100 range
    server is 192.168.0.8 (because at one time 0 to 7 were occupied)
    go to control centre, network & internet, reconfigure
    you will get the 'manage connections' page
    for protocol, select 'static' rather than dhcp
    specify desired address, netmask (255.255.255.0), and gateway (192.168.0.1)
    You may have to specify the dns servers if linux does not pick then up from
    the router.
    If so, they are available from the router's status page

    I can help you through the rest of the samba setup if you need it. Generally
    it is quite easy, but there are a few traps.

    Stuart



  4. Re: Giving my computer a fixed IP address.

    Bit Twister wrote:

    > On Mon, 23 Jul 2007 11:23:46 +1000, Doug Laidlaw wrote:
    >>
    >> My computer is assigned 192.168.1.2 by the router. How do I hard-code
    >> that into the OS?

    >
    > You delete the network connection to the router in MCC.
    > Then create it again as static, supplying your values.
    > Then verify here values <===========
    >
    > $ hostname
    > wb.home.invalid <===========
    >
    > $ head -4 /etc/hosts
    > 127.0.0.1 localhost
    > 192.168.2.30 wb.home.invalid wb <===========
    >
    > $ cat /etc/sysconfig/network-scripts/ifcfg-eth0
    > DEVICE=eth0
    > BOOTPROTO=static <===========
    > IPADDR=192.168.2.30 <===========
    > NETMASK=255.255.255.0
    > GATEWAY=192.168.2.1 <===========
    > ONBOOT=yes
    > METRIC=10
    > MII_NOT_SUPPORTED=yes
    > USERCTL=no
    > DNS1=24.93.41.125 <===========
    > DNS2=24.93.41.126 <===========
    > RESOLV_MODS=yes
    > IPV6INIT=no
    > IPV6TO4INIT=no


    Thanks BT. I did that and it advertised me to the Web as 192.168.1.2, as I
    said. At the moment my assigned address is 58.179.184.7, according to
    checkip.dyndns.org. A comment in a forum said that I can have a fixed
    network address and still have DHCP "outside."

    You know my knowledge and limitations pretty well by now. Is there a good
    general book on Linux that I could use to round my knowledge out? The
    RH "Bible" is in the library; that may be near enough, if old. The Rute
    book is good, but I would like something in my hand - I hate reading online
    docs. I think that it is still available from amazon.com. It even covers
    hardware and how a HD is constructed. I have the Linux cookbook, which is
    good for the odd unusual thing, although perhaps more for the console
    operator, but it assumes that I know the basics. I know enough to make
    sense of it.

    Half the tech people in the city where I live have only heard of Linux, if
    that.

    Doug.
    --
    Judge a man by his questions rather than by his answers.
    - Voltaire


  5. Re: Giving my computer a fixed IP address.

    Stuart Miller wrote:

    >
    > "Doug Laidlaw" wrote in message
    > news:2icdn4-hh6.ln1@dougshost.douglaidlaw.net...
    >>I am trying to configure Samba on Mandriva 2007.1, and find that assigning
    >>a
    >> fixed network address for my computer helps. At first I confused it with
    >> the external address, and tried to set it with the Ethernet tool in
    >> DrakConf. Naturally, giving my computer an external address from the
    >> blocks intended for networks gave strange results. That is how hard I
    >> find
    >> coming to terms with networking concepts, although I should not have made
    >> that mistake.

    >
    >
    >>
    >> My computer is assigned 192.168.1.2 by the router. How do I hard-code
    >> that
    >> into the OS? I don't see why I have to, but it does make a difference.

    >
    > I prefer all static addresses, because then I can ping each by number, and
    > also do some status testing.
    >
    > I have a linux file/print server, and a 'bunch' of win98/winxp/linux boxes
    > here
    > the gateway is a d-link router, 192.168.0.1
    > dhcp is enbaled on the router for when my son or daughter bring their
    > laptops over
    > range is x.x.x.100 to x.x.x.199. This keeps the dhcp addresses separate
    > from the static addresses
    >
    > Desktop machines usually have static addresses, below the 100 range
    > server is 192.168.0.8 (because at one time 0 to 7 were occupied)
    > go to control centre, network & internet, reconfigure
    > you will get the 'manage connections' page
    > for protocol, select 'static' rather than dhcp
    > specify desired address, netmask (255.255.255.0), and gateway
    > (192.168.0.1) You may have to specify the dns servers if linux does not
    > pick then up from the router.
    > If so, they are available from the router's status page
    >
    > I can help you through the rest of the samba setup if you need it.
    > Generally it is quite easy, but there are a few traps.
    >
    > Stuart


    Thanks for the offer about Samba, Stuart. I was receiving help on
    comp.os.linux.networking, but I ran into a strange permission problem. I
    will come back when I am ready to proceed.

    Doug.
    --
    Perhaps the most important thing we give each other is our attention.
    -- Dr R. N. Remen.


  6. Re: Giving my computer a fixed IP address.

    On Mon, 23 Jul 2007 18:57:27 +1000, Doug Laidlaw wrote:

    > My computer is assigned 192.168.1.2 by the router. How do I hard-code
    > that into the OS?


    [ snipped distro specific info ]

    > Thanks BT. I did that and it advertised me to the Web as 192.168.1.2, as I
    > said.


    Maybe, but I gave the answer to the question you asked.

    > At the moment my assigned address is 58.179.184.7, according to
    > checkip.dyndns.org. A comment in a forum said that I can have a fixed
    > network address and still have DHCP "outside."


    Your ISP assigns you a WAN ip (58.179.184.7) via DHCP.
    Your router assigns you a LAN ip (192.168.1.2) which you can/did make fixed.
    The Network Address Translation (NAT) code in the router
    hooks the two together for internet traffic between the WAN and LAN ip.

    If I wanted to ping your node, I would ping 58.179.184.7
    which would send a packet to your router, Not your PC.
    You would have to poke a hole in the router to allow the ping to hit
    your PC.


    My SWAG;
    you are having some interaction between your dyndns.org code in the PC.
    If you look in your router it has your WAN dhcp address and that is the
    address your dyndns.org code would send back for advertising.

    Only thing I can suggest is, using wget to fetch router's web page
    containing WAN ip, parse it and pass it to your pc dyndns.org code
    which sends it instead of you LAN ip address.

  7. Re: Giving my computer a fixed IP address.

    Doug Laidlaw wrote:

    > My computer is assigned 192.168.1.2 by the router.


    Be sure you also hard code that into your router. Generally there's a
    way for the router to assign a given MAC address to a fixed 192.169.x.x
    address. Otherwise there's a possibility that if machines boot up in
    your subnet in some other order your samba server might be assigned a
    different IP number by the router than what it has hardcoded, and that
    would really screw things up.

    Regards,

    David Mathog



  8. Re: Giving my computer a fixed IP address.

    Bit Twister wrote:

    > On Mon, 23 Jul 2007 18:57:27 +1000, Doug Laidlaw wrote:
    >
    >> My computer is assigned 192.168.1.2 by the router. How do I hard-code
    >> that into the OS?

    >
    > [ snipped distro specific info ]
    >
    >> Thanks BT. I did that and it advertised me to the Web as 192.168.1.2, as
    >> I said.

    >
    > Maybe, but I gave the answer to the question you asked.
    >
    >> At the moment my assigned address is 58.179.184.7, according to
    >> checkip.dyndns.org. A comment in a forum said that I can have a fixed
    >> network address and still have DHCP "outside."

    >
    > Your ISP assigns you a WAN ip (58.179.184.7) via DHCP.
    > Your router assigns you a LAN ip (192.168.1.2) which you can/did make
    > fixed. The Network Address Translation (NAT) code in the router
    > hooks the two together for internet traffic between the WAN and LAN ip.
    >
    > If I wanted to ping your node, I would ping 58.179.184.7
    > which would send a packet to your router, Not your PC.
    > You would have to poke a hole in the router to allow the ping to hit
    > your PC.
    >
    >
    > My SWAG;
    > you are having some interaction between your dyndns.org code in the PC.
    > If you look in your router it has your WAN dhcp address and that is the
    > address your dyndns.org code would send back for advertising.
    >
    > Only thing I can suggest is, using wget to fetch router's web page
    > containing WAN ip, parse it and pass it to your pc dyndns.org code
    > which sends it instead of you LAN ip address.


    Actually, my observations were incorrect - again.

    The IP address is indeed fixed (I thought that I had put back the original
    config,) and DNS lookups are no longer a problem, but now I have to re-run
    my router's config page every time I boot into Linux. That may have been
    covered in an earlier exchange between us. It won't be too difficult to
    re-set the router to factory defaults AND delete the interface in MCC and
    start from scratch.

    The effect on Samba (trying to get my wife's XP computer to see my printer -
    we have no need for file sharing) is what I expected - 2 more lines of
    verbose output before it fails - but Stuart has offered to help with that.
    There are some Google links to the new error message, that I can try before
    posting about it.

    Doug.
    --
    Judge a man by his questions rather than by his answers.
    - Voltaire


+ Reply to Thread