Announcement

Collapse
No announcement yet.

edit /etc/network/interfaces for static: help

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

    edit /etc/network/interfaces for static: help

    Please help me edit my /etc/network/ file?

    I have my file edited when I use a wired connection. I thought that part was easy. But, there seems to be way more to configuration when using wireless. I found an example and I might have found it here. I can't remember. Sorry, my mind is all screwed up right now. I cannot recall where I found the example but it was from a linux distro forum.

    If you are the author or recognize the post (and author), please help!!!

    Okay, here is my current 'wired' file for /etc/network/interfaces:

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.1.XX
    netmask 255.255.255.0
    gateway 192.168.1.

    I didn't include a broadcast and I don't know if I should or not... Perhaps, someone could comment on that, too?

    Anyway, without further adieu...

    Here is the example:
    auto wlan0
    iface wlan0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    gateway xxx.xxx.xxx.xxx
    pre-up iwconfig wlan0 mode managed
    pre-up ifconfig wlan0 up
    pre-up iwconfig wlan0 essid "sjsjdjdjdjdjdjdjd"
    pre-up iwpriv wlan0 set AuthMode=WPAPSK
    pre-up iwpriv wlan0 set WPAPSK=sjsjsjsjjsjsjs
    pre-up iwpriv wlan0 set EncrypType=TKIP

    Can someone explain the "pre-up" lines? What is going on there? How do I find wlan? Also, what is 'iwpriv' and what is going on in the above example? I am googling but I'm still sufficiently unsure so that I don't want to edit the file until I'm understanding it better. I think I need the wireless configuration in the config file (which is the /etc/network/interfaces file, right)? I believe I know most of what is happening in terms of the router which I'm using. But, I don't quite know what is going on with the rest of the lines.

    So, I'll have "two" instances of a connection, wired and wireless?

    I am also using this site:
    http://ubuntu-unleashed.blogspot.com...g-f5d7050.html

    Right now, my wired works with my edit of the /etc/network/interfaces file which is a static configuration.

    #2
    Re: edit /etc/network/interfaces for static: help

    My solution would be
    Code:
    sudo apt-get install knetworkmanager
    It will sort out your every wired/wlan problems...
    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    Comment


      #3
      Re: edit /etc/network/interfaces for static: help

      Knetworkmanager doesn't work, at least for me. My suggestion would be
      Code:
      sudo apt-get install wlassistant
      .

      The Nomad's Land - some Linux humor too

      Comment


        #4
        Re: edit /etc/network/interfaces for static: help

        knetworkmanager doesn't work for you It was an absolute blessing for me - wpa, hidden networks, network hopping, all no problem...
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #5
          Re: edit /etc/network/interfaces for static: help

          Originally posted by toad
          knetworkmanager doesn't work for you It was an absolute blessing for me - wpa, hidden networks, network hopping, all no problem...
          Good for you, AFAIK it's simpler to manage, but no soup for me. I have a Ralink, if it matters.
          The Nomad's Land - some Linux humor too

          Comment


            #6
            Re: edit /etc/network/interfaces for static: help

            Ralink-based chips are supposed to have decent support in Linux but some of them can be unreliable/unstable. I believe the support is supposed to improve in a later kernel (2.6.23+) or so I've read.

            I want to edit the file, not use Network Manager. Sometimes, it works, sometimes it doesn't. I don't want this 'unknown.' I guess I will just read and google how to edit the file. I already did it for my wired connection and it works fine with a static ip configured for my router. It's just that there is extra context or lines needed for the wireless and terms that I am unfamiliar with. I think if I understand what each line is doing or have a general idea, I'll be able to edit it with no problem.

            Comment


              #7
              Re: edit /etc/network/interfaces for static: help

              All I know about the pre-up commands is that they were introduced with wpa - in the good ole wep days they weren't needed
              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

              Comment


                #8
                Re: edit /etc/network/interfaces for static: help

                i found wcid the best of the bunch, esp switching between static wireless, dchp wireless, dchp wired and static wired, it does it with just a click and seemless too.
                Using:<br />Mint Kubuntu 7.10 (kde4 dual core 2.2ghz 4gb)<br />Freenas (nx6325 hp laptop)<br />Mint Gnome 7.10 (EEE Pc 4g white 1 gb ram)

                Comment


                  #9
                  Re: edit /etc/network/interfaces for static: help

                  Originally posted by kbunt
                  Please help me edit my /etc/network/ file? [...]
                  You don't have necessarily to put the broadcast address, as your kernel will figured it out from your IP address and your network mask number.

                  The "pre-up" means what ifplugd has to do == before == the said interface is configured. In your case, I guess your file is wrong, because you only invoke iwconfig after your wireless card is up. So the said lines would have to be preceded by "up", and not "pre-up". It doesn't make sense trying to contact your wireless Access Point before your wireless card even is configured and ready for connections.

                  Your question about iwpriv (from the manual page):

                  Code:
                  Iwpriv is the companion tool to iwconfig(8). Iwpriv deals with parameters and setting specific to each driver (as opposed to iwconfig which deals with generic ones).
                  Your "interfaces" file is configured as you were using the ndiswrapper driver. I think you will have to give us some more info, like the wireless card you have and depending on it, if you will use ndiswrapper or a native Linux driver. The command lspci will do the trick. Post its contents here.


                  Comment


                    #10
                    Re: edit /etc/network/interfaces for static: help

                    KNetwork Manager 'broke' again and is not usable. This is definitely the worst program in any Linux distro. By far! I bet anyone who says 'it works for me' will eventually post or complain that it's not working. I think I am abandoning Linux until they come up with something that works. I would configure manually but that takes up a lot of time. I am only 50% there. KWireless Manager is out yet or not? Is it any good? Since there are virtually no posts about it, I wonder if it's another failure. I know it is supposed to be a program for KDE 4.0 but if it was any good, wouldn't it be backported to previous KDE 3.5.x versions?

                    I truly believe using KNetwork Manager is a waste of time and I think people should stop using it.

                    Comment


                      #11
                      Re: edit /etc/network/interfaces for static: help

                      did you try WICD?
                      Using:<br />Mint Kubuntu 7.10 (kde4 dual core 2.2ghz 4gb)<br />Freenas (nx6325 hp laptop)<br />Mint Gnome 7.10 (EEE Pc 4g white 1 gb ram)

                      Comment


                        #12
                        Re: edit /etc/network/interfaces for static: help

                        Originally posted by JuliaKuiper
                        You don't have necessarily to put the broadcast address, as your kernel will figured it out from your IP address and your network mask number.

                        The "pre-up" means what ifplugd has to do == before == the said interface is configured. In your case, I guess your file is wrong, because you only invoke iwconfig after your wireless card is up. So the said lines would have to be preceded by "up", and not "pre-up". It doesn't make sense trying to contact your wireless Access Point before your wireless card even is configured and ready for connections.

                        Your question about iwpriv (from the manual page):

                        Code:
                        Iwpriv is the companion tool to iwconfig(8). Iwpriv deals with parameters and setting specific to each driver (as opposed to iwconfig which deals with generic ones).
                        Your "interfaces" file is configured as you were using the ndiswrapper driver. I think you will have to give us some more info, like the wireless card you have and depending on it, if you will use ndiswrapper or a native Linux driver. The command lspci will do the trick. Post its contents here.
                        You sound like you might be interested in answering my question(s). Are you still around to read this thread? In case you are and/or anyone else is interested:

                        *Belkin usb wireless adapter, model F5D7050 v.4 which uses zd1211rw driver (mac zd1211b?)

                        *Zydas chipset with native Linux drivers (built into recent kernels)

                        I assume the edit of the config file would be universal for any Debian-based distro with more recent kernels - such as 2.6.20+)

                        I appreciate your answer. It was specific and direct to my question.

                        I have an 'lsusb' output somewhere... But, I cannot connect. I have to somehow use ntfs-3g so that I can access the output in Windows and while switched to the Windows partition, use it to copy/paste here.

                        Edit: I found a lsusb output I had from when I had Debian (install) in a partition in the same computer. So, the output should be similar:

                        Bus 001 Device 002: ID 050d:705c Belkin Components

                        Comment


                          #13
                          Re: edit /etc/network/interfaces for static: help

                          Hi kbunt,

                          sorry, the thread got a little off track...

                          May I also suggest trying the Ubuntu forum (if you haven't already done so) as there are a _lot_ more people on it.
                          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                          Comment

                          Working...
                          X