LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   NetworkManager query (http://www.linuxquestions.org/questions/slackware-14/networkmanager-query-4175468752/)

d34dmau5 07-07-2013 02:59 AM

NetworkManager query
 
I'm quiet new to Slackware and was wondering if NetworkManager could be used to act as a router. I want to connect my pc (with NetworkManager) to my Andriod phone via wifi and have my Ethernet card for other Pc's to connect to.

Thanks...

STDOUBT 07-07-2013 04:23 AM

Quote:

Originally Posted by d34dmau5 (Post 4985554)
I'm quiet new to Slackware and was wondering if NetworkManager could be used to act as a router. I want to connect my pc (with NetworkManager) to my Andriod phone via wifi and have my Ethernet card for other Pc's to connect to.

Thanks...

This would work:
PC (with wifi) >-----> Android phone (with "tethering" capability) >-----> Internet
But in that case your PC (running NetworkManager) would not be acting as a router, the phone would.
It seems like you're saying you want your PC to route your phone's connection...?

Maybe you could be more precise in describing your goal? Feel free to draw us pictures ;-)

jostber 07-07-2013 11:19 AM

You have a good description on how to set up a router with Slackware here:

http://computechtips.com/295/slackware-linux-pc-router

d34dmau5 07-09-2013 11:47 AM

Thanks for the replies, sorry been away for a few days. jostber, I've read that article which was helpful, but I have to connect to WPA on my Android phone so will have to look at setting up wpa_supplicant. STDOUBT, here's a little diagram...

________
|laptop | --ethernet---> |Slackware| --> Wifi----> |Android|->net

STDOUBT 07-10-2013 11:10 PM

d34dmau5,
That's a real non-standard way of creating a LAN.
Connecting your machines via a proper (dedicated) router and using a switch is really
the way to go. If you can't afford that extra hardware, and you want to connect both
machines to the glorious internet and also be able to share files between laptop<->pc,
you should be able to use the droidphone as a wireless "router". If it hands out more than one IP address, it should let the machines communicate.

You could also look into an ethernet "crossover cable" for a direct connection. Not sure about the
software/configs required since I haven't done it but once before on a lark. Again, non-standard.

volkerdi 07-10-2013 11:28 PM

Quote:

Originally Posted by d34dmau5 (Post 4987096)
Thanks for the replies, sorry been away for a few days. jostber, I've read that article which was helpful, but I have to connect to WPA on my Android phone so will have to look at setting up wpa_supplicant. STDOUBT, here's a little diagram...

________
|laptop | --ethernet---> |Slackware| --> Wifi----> |Android|->net

I've done that. I set up the wireless connection in rc.inet1.conf (this will run wpa_supplicant for you... you should not have to configure it or rc.wireless.conf). I also set up the Ethernet port to give it a static IP of 192.168.1.1. Then I edited /etc/dnsmasq.conf with interface=eth0, and dhcp-range=192.168.1.2,192.168.1.20,12h (i.e. more than enough if a switch or hub is attached). Then I made /etc/rc.d/rc.dnsmasq executable.

That's all it takes. If you only have one machine you'll be attaching to the Ethernet, you probably won't need a special cable. All ports now support Auto-MDIX, which automatically crosses over the connection if needed. You only need a crossover cable for really old gear.

d34dmau5 07-11-2013 12:37 PM

Thanks pat, I didn't realise editing rc.wireless would mean I wouldn't need to configure wpa_supplicant....so I really don't need NetworkManager even if I just use it so a standalone desktop. I was just using it because I've never used wpa_supplicant before. I've never used dnsmasq before so I'll have to read up on that.

mrclisdue 07-11-2013 06:44 PM

Alas, if your android device is acting as the access point for your slack install, then you *can* use network manager to extend your wan via your ethernet port.

Edit your wired connection, under the ipv4 (or ipv6) tab, select *shared to other computers* under method, et voila! you have an new subnet generated by nm and shared to your wired friends....

cheers,

d34dmau5 07-12-2013 12:49 PM

Thanks mrclisdue, I'll try that too

d34dmau5 07-12-2013 02:06 PM

Looking at /etc/rc.d/rc.wireless.conf I don't see anything for wpa encryption, only wep?

Do I enter my wpa passphrase there?

volkerdi 07-12-2013 02:16 PM

Quote:

Originally Posted by d34dmau5 (Post 4989233)
Looking at /etc/rc.d/rc.wireless.conf I don't see anything for wpa encryption, only wep?

Do I enter my wpa passphrase there?

As I mentioned before, you shouldn't edit rc.wireless.conf at all. Everything can be set up in rc.inet1.conf. There are examples near the bottom of the file. You *can* use rc.wireless.conf, but it's harder to work with.

AlienBOB's documention should be helpful:

http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network

d34dmau5 07-13-2013 05:28 AM

I've edited my /etc/rc.d/rc.inet1.conf and added my essid to my line

WLAN_ESSID[4]="my essid"

but when I restart inet1 I get this message /etc/rc.d/rc.inet1: eth1 information: 'Any ESSID'

anyone know why?

jostber 07-13-2013 01:20 PM

See post #12 here:

http://www.linuxquestions.org/questi...13-1-a-849535/

Also verify your config with this:

http://alien.slackbook.org/dokuwiki/...ckware:network


All times are GMT -5. The time now is 01:56 AM.