Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all I am having a strange problem. I am having an NIC in my system and my friends also. We are trying to connect to each others system. So ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Posts
    25

    How to set an IP Address for my System.


    Hi all

    I am having a strange problem. I am having an NIC in my system and my friends also. We are trying to connect to each others system. So we did. I assigned an IP address to both the systems, and the ping command is working well.

    But i am writing some networking program in Qt and that program is showing me the address as 127.0.0.1.

    Do i have to change the Ip address of my system any where else. I changed it in the Network Configurtation Window.

    I am using RH9.0

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    the ip address of your system is also 127.0.0.1, this is correct. depending on how you are resolving your IP, if your machine has a dns name other than "localhost" setup, then you could query a DNS server for the IP address.

    However, the easiest thing to do would be to:
    1) Ask user for the IP address
    2) Store IP address in a config file which is read by the program at runtime.

    Jason

  3. #3
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    You will always have two ip addresses.

    1. System assigned as the local loopback address of 127.0.0.1 which is only good for local use on that machine only. All modern computers OS's use this.

    2. User or DHCP assigned ip for connecting to other machines. This is normally the ip you'll want to give out if you don't have a FQDN.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •