Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
Well, i dont know much... my router is 192.168.0.1 so i assume that, that is my gateway.... 192.168.0.102 is my computer's ip... 255.255.255.0 is the subnet mask... now how do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Posts
    35

    Configuring my network


    Well, i dont know much...
    my router is 192.168.0.1 so i assume that, that is my gateway.... 192.168.0.102 is my computer's ip...
    255.255.255.0 is the subnet mask...
    now how do i enterthis in and make it work!?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    well to set the netmask and the IP you can do:
    Code:
    su -
    ifconfig eth0 netmask 255,255.255.0 address 192.168.0.102

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Make sure that you do:

    Code:
    ifconfig eth0 up
    after you run lakerdonald's command.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    Just Joined!
    Join Date
    Sep 2004
    Posts
    35
    i found out my ip was actully 192.168.0.103.... so i typed in so this is what i got

    Code:
    nallelcm@nall:~$ su
    Password:
    root@nall:/home/nallelcm# ifconfig eth0 netmask 255.255.255.0 address 192.168.0.103
    SIOCSIFNETMASK: Cannot assign requested address
    address: Host name lookup failure
    ifconfig: '--help' gives usage information.
    root@nall:/home/nallelcm# _
    And I'm still unclear on where to put my gateway information

  5. #5
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    Here is how I get mine working:
    I run netconfig as root
    one of the questions is confusing. It asks for a qualified domain name and when you enter one it writes it to /etc/resolv.conf Now if you put in something like <your isp.com> it writes that to the file. Well that doesn't work for me, so I have to re-edit that file to use my isp dns IP
    example:
    cd /etc
    pico resolv.conf
    nameserver 63.blah.blah.10
    nameserver 63.blah.blah.11
    Blah being whatever your ISP dns of course.
    CNTRL-X Y enter
    Reboot
    Here is something else I have had to do in the past.

    Sometimes the gateway doesn't get written. So if you do the preceding and you type
    ifconfig and you have an ip and subnet mask
    then go to
    cd /etc/rc.d/
    pico
    rc.inet1.conf
    at the very bottom you will see "gateway" with after the word gateway there will be quotes, inside the quotes type your gateway

    gateway"192.168.0.1"

    Save it then reboot.

    I actually have written scripts for different places that I take my laptop I run the scripts and it does all of this for me when I go to where ever I go.

    I hope this helps. There is probably a better way of doing this but this way works for me.

    Let me know if that is not clear.

    Good Luck
    Mike

  6. #6
    Just Joined!
    Join Date
    Sep 2004
    Posts
    35
    Quote Originally Posted by adrenaline
    Here is how I get mine working:
    I run netconfig as root
    one of the questions is confusing. It asks for a qualified domain name and when you enter one it writes it to /etc/resolv.conf Now if you put in something like <your isp.com> it writes that to the file. Well that doesn't work for me, so I have to re-edit that file to use my isp dns IP
    example:
    cd /etc
    pico resolv.conf
    nameserver 63.blah.blah.10
    nameserver 63.blah.blah.11
    Blah being whatever your ISP dns of course.
    CNTRL-X Y enter
    Reboot
    Here is something else I have had to do in the past.

    Sometimes the gateway doesn't get written. So if you do the preceding and you type
    ifconfig and you have an ip and subnet mask
    then go to
    cd /etc/rc.d/
    pico
    rc.inet1.conf
    at the very bottom you will see "gateway" with after the word gateway there will be quotes, inside the quotes type your gateway

    gateway"192.168.0.1"

    Save it then reboot.

    I actually have written scripts for different places that I take my laptop I run the scripts and it does all of this for me when I go to where ever I go.

    I hope this helps. There is probably a better way of doing this but this way works for me.

    Let me know if that is not clear.

    Good Luck
    Mike
    i dont seem to have a rc.inet1.conf i have a rc.inet1 but no .conf?

  7. #7
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    Let me see your rc.d file.

  8. #8
    Just Joined!
    Join Date
    Sep 2004
    Posts
    35
    Quote Originally Posted by adrenaline
    Let me see your rc.d file.
    Code:
    ./
    ../
    rc.0@
    rc.4
    rc.6
    rc.K
    rc.M
    rc.S
    rc.acpid
    rc.atalk
    rc.font.sample
    rc.gpm-sample
    rc.hotplug
    rc.httpd
    rc.inet1
    rc.inet2
    rc.local
    rc.modules
    rc.news@
    rc.nfsd
    rc.pcmcia
    rc.samba
    rc.sendmail
    rc.serial
    rc.sshd
    rc.syslog
    rc.sysninit
    rc.yp
    i hope this what you wanted to see

  9. #9
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    What Slackware version are you running?
    In my rc.inet1 it starts out

    get the configuration from /etc/rc.d/rc.inet1.conf;
    ./etc/rc.d/rc.inet1.conf

    Check yours

    Mike

    BTW I am using slack 10.

  10. #10
    Just Joined!
    Join Date
    Sep 2004
    Posts
    35
    I am using version 9.0

Page 1 of 2 1 2 LastLast

Posting Permissions

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