Find the answer to your Linux question:
Results 1 to 4 of 4
Hi. I am performing a wifi domestic network which has a wifi router as heart of the net. I want to assign static IPs for the computers hanging on the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2

    linux routing


    Hi. I am performing a wifi domestic network which has a wifi router as heart of the net.
    I want to assign static IPs for the computers hanging on the router, and I,ve deactivated DHCP server on router.
    For starting the network connection in every computer (each runnig linux: Suse 10.1, Suse 10.3, Slackware 12...), I,ve made an script:

    #!/bin/sh
    echo activating wifi interface
    ifconfig wlan0 up
    ifconfig wlan0 192.168.1.4 netmask 255.255.255.0
    echo configuring wifi interface
    iwconfig wlan0 mode managed essid wireless channel 6
    echo made

    It works fine, but when I try access the internet connection trhough the router, no way.
    I can access the configuration page inside the router, but no sites outside.
    I know it is a problem of DNS, so i,ve checked /etc/resolv.conf, and nameserver is OK.
    The only way to get it working is to execute in the suse machines

    ifup wlan0

    after the execution of my script (who loads the default configuration stablished in Yast -the same fixed by the script-).
    Why I,m not using ifup directly?
    Because it don,t fix the essid, I don,t know why.
    Some ideas??
    Do I have forget somethig related to DNS??
    Thanks

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    478
    depending on yr router, and yr firmware, you can do this on the router.
    using a Linksys wrt54g v.6 with dd-wrt micro, we assign ip addrs to our
    network machines--to their network interfaces actually--as we wish
    the sun is new every day (heraclitus)

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Quote Originally Posted by kavra View Post
    Hi. I am performing a wifi domestic network which has a wifi router as heart of the net.
    I want to assign static IPs for the computers hanging on the router, and I,ve deactivated DHCP server on router.
    For starting the network connection in every computer (each runnig linux: Suse 10.1, Suse 10.3, Slackware 12...), I,ve made an script:

    #!/bin/sh
    echo activating wifi interface
    ifconfig wlan0 up
    ifconfig wlan0 192.168.1.4 netmask 255.255.255.0
    echo configuring wifi interface
    iwconfig wlan0 mode managed essid wireless channel 6
    echo made

    It works fine, but when I try access the internet connection trhough the router, no way.
    I can access the configuration page inside the router, but no sites outside.
    I know it is a problem of DNS, so i,ve checked /etc/resolv.conf, and nameserver is OK.
    The only way to get it working is to execute in the suse machines

    ifup wlan0

    after the execution of my script (who loads the default configuration stablished in Yast -the same fixed by the script-).
    Why I,m not using ifup directly?
    Because it don,t fix the essid, I don,t know why.
    Some ideas??
    Do I have forget somethig related to DNS??
    Thanks
    Where in your ifconfig script have you set the router IP/default gateway?

    After you use your ifconfig script, look at the default route - do you have one?

    Code:
    netstat -nr
    If not, you need to add a "route add" command to your script.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2

    It works fine now

    Thank you for the answers, but I get it working now.
    Just add

    ap XX:XX:XX:XX:XX:XX

    in the iwconfig line to fix the MAC of the AP, and VOILA!!

Posting Permissions

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