Announcement

Collapse
No announcement yet.

Need help fixing interface file

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

    Need help fixing interface file

    I always have to type the following 3 commands into Konsole to get my wireless card working on a static IP. Can you help me fix my interfaces file (see below) to automate this? Notice that I have to use WLAN1 not WLAN0.

    sudo ifconfig wlan1 192.168.1.36

    sudo route add default gw 192.168.1.1

    sudo iwconfig wlan1 key 72xxxxxxxx



    =======================
    auto lo
    iface lo inet loopback

    #pre-up /wifi/wlan0up
    #post-down /wifi/wlan0down

    address 127.0.0.1
    netmask 255.0.0.0

    mapping hotplug
    script grep
    map wlan0


    iface wlan0 inet static
    address 192.168.1.41
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.1.1

    wireless-essid jrb&e
    wireless-key s:72FFxxxxxx

    #2
    Re: Need help fixing interface file

    you could make a shell script for that and store it in
    Code:
    ~/.kde/Autostart/
    it will run your script when you start kde.

    to make a shell script you basicly make a text file and put in your code like
    Code:
    sudo ifconfig wlan1 192.168.1.36
    
    sudo route add default gw 192.168.1.1
    
    sudo iwconfig wlan1 key 72xxxxxxxx
    then save it change the ext to .sh and you should be good to go. however this will prompt for a password for that first sudo every logon if you don't have kwalletmanager handling you passwords.(and might even if you do)
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    Comment


      #3
      Re: Need help fixing interface file

      I consider myself a newbie, but will share my information if it helps.

      My interface file only has the first 4 lines of yours i.e 'auto lo' to 'netmask etc..'

      I did all my setting up in Knetworkmanager, where you just need the ESSID, the router IP (192.168.1.1) , and your WPA password or WEP key. I didn't choose a static IP, I just let the router negotiate it.

      I put knetworkmanager into the autostart directory, and everything works fine.

      If you need a static IP, you can do this in knetworkmanager (I haven't tried it though)

      Hope this is of some help

      Comment


        #4
        Re: Need help fixing interface file

        I haven't yet found a good way to configure /etc/interfaces to connect to my WLAN; I rely on the KDE services for that. Additionally, I would go as far as to say that earlier versions of knetworkmanager (pre-8.10) are of dubious use. The one in KDE 4.2b2 is much better, much more reliable.

        You could give wicd a go; it's a very good replacement. It comes as a package so it's easy to uninstall (it replaces the normal networking manager). I think it wants your interface file empty though, so back that one up before installing.

        Lastly, using DHCP (while slower to connect) helps. Then it takes care of the routing table automatically.
        KDE, I heart thee.

        Comment


          #5
          Re: Need help fixing interface file

          Originally posted by evans62
          I always have to type the following 3 commands into Konsole to get my wireless card working on a static IP. Can you help me fix my interfaces file (see below) to automate this? Notice that I have to use WLAN1 not WLAN0.

          sudo ifconfig wlan1 192.168.1.36

          sudo route add default gw 192.168.1.1

          sudo iwconfig wlan1 key 72xxxxxxxx



          =======================
          auto lo
          iface lo inet loopback

          #pre-up /wifi/wlan0up
          #post-down /wifi/wlan0down

          address 127.0.0.1
          netmask 255.0.0.0

          mapping hotplug
          script grep
          map wlan0


          iface wlan0 inet static
          address 192.168.1.41
          netmask 255.255.255.0
          network 192.168.0.0
          broadcast 192.168.0.255
          gateway 192.168.1.1

          wireless-essid jrb&e
          wireless-key s:72FFxxxxxx
          Keeping in mind that I am not familiar with this file at all, I use wicd to do my networking...

          However, you can't have a network of 192.168.0.0, with a mask of 255.255.255.0, and an IP address of 192.168.1.41.

          the network should be 192.168.1.0

          I don't know why you would need to use wlan 1, but I would suspect that because networking doesn't know what to do with this conflicting info, it makes you rename the interface to wlan1. you may get lucky, by changing this, it might work...

          just a guess though.

          mm0
          Dell Inspiron 1720 Laptop<br />Intel T9300 Core2Duo Processor @ 2.5Ghz<br />4 GB Ram | 1920 X 1200 Resolution<br />2 X 160 GB SATA HD Internal<br />Nvidia GeForce 8600M Graphics Adapter<br />Using Kubuntu 9.10

          Comment

          Working...
          X