Re: [gentoo-user] WLAN with fixed IP
On 11/13/2012 07:08:24 PM, Florian Philipp wrote: Am 13.11.2012 17:27, schrieb Bruce Hill: On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local map MAC addresses to IP addresses. [...] If you just want to setup a static IP per machine, /etc/conf.d/net: config_wlan0=192.168.1.2/24 routes_wlan0=default via 192.168.1.1 Hope this helps. If it's too confusing, might mention where DHCP is handed out, and some more about your LAN. The following is taken directly from my /etc/conf.d/net with minimal editing. It assigns configs based on SSIDs. If I'm not mistaken (haven't tested it in a long time) this means it will default to DHCP for unspecified nets. Good for quick and dirty setups while traveling: modules_wlan0=wpa_supplicant config_MySSID=192.168.2.5 netmask 255.255.255.0 routes_MySSID=default via 192.168.2.1 dns_servers_MySSID=192.168.6.1 dns_domain_MySSID=example.net config_SomeHotelSSID=dhcp config_HotelWithVPN=dhcp dhcp_HotelWithVPN=nodns dns_servers_HotelWithVPN=192.168.6.1 # DNS server via VPN dns_domain_HotelWithVPN=vpn.example.net Hope this helps, Thanks Florian, it *nearly* works. The line routes_MySSID=default via 192.168.2.1 (adapted to my IPs) doesn't seem to have any effect. Only if I add route add default gw 192.168.2.1 wlan0 to /etc/local.d/local.start it does work. I have no idea why the routes_MySSID=... line doesn't have any effect. Helmut.
Re: [gentoo-user] WLAN with fixed IP
Am 14.11.2012 18:55, schrieb Helmut Jarausch: On 11/13/2012 07:08:24 PM, Florian Philipp wrote: Am 13.11.2012 17:27, schrieb Bruce Hill: On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local map MAC addresses to IP addresses. [...] If you just want to setup a static IP per machine, /etc/conf.d/net: config_wlan0=192.168.1.2/24 routes_wlan0=default via 192.168.1.1 Hope this helps. If it's too confusing, might mention where DHCP is handed out, and some more about your LAN. The following is taken directly from my /etc/conf.d/net with minimal editing. It assigns configs based on SSIDs. If I'm not mistaken (haven't tested it in a long time) this means it will default to DHCP for unspecified nets. Good for quick and dirty setups while traveling: modules_wlan0=wpa_supplicant config_MySSID=192.168.2.5 netmask 255.255.255.0 routes_MySSID=default via 192.168.2.1 dns_servers_MySSID=192.168.6.1 dns_domain_MySSID=example.net config_SomeHotelSSID=dhcp config_HotelWithVPN=dhcp dhcp_HotelWithVPN=nodns dns_servers_HotelWithVPN=192.168.6.1 # DNS server via VPN dns_domain_HotelWithVPN=vpn.example.net Hope this helps, Thanks Florian, it *nearly* works. The line routes_MySSID=default via 192.168.2.1 (adapted to my IPs) doesn't seem to have any effect. Only if I add route add default gw 192.168.2.1 wlan0 to /etc/local.d/local.start it does work. I have no idea why the routes_MySSID=... line doesn't have any effect. Helmut. Just guessing, could it be related to iproute2? From net.example: # If you don't specify an interface then we prefer iproute2 if it's # installed. To prefer ifconfig over iproute2 modules=!iproute2 signature.asc Description: OpenPGP digital signature
[gentoo-user] WLAN with fixed IP
Hi, I'd like to assign fixed IP numbers to computers of a local network. Using dhcp as in modules=wpa_supplicant wpa_supplicant_wlan0=-Dwext -iwlan0 config_wlan0=dhcp works just fine but depends on dhcp for IP assignment. The following does not work, i.e. the network is not working modules=wpa_supplicant wpa_supplicant_wlan0=-Dwext -iwlan0 config_wlan0=192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255 routes_wlan0=default via 192.168.1.1 dns_servers_wlan0=192.168.1. What am I missing. What does the dhcp option imply? Are there any additional necessary initialization (like an ifup) ? Many thanks for a hint, Helmut.
Re: [gentoo-user] WLAN with fixed IP
On Tue, 13 Nov 2012 11:39:40 +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local network. I prefer to do this on the DHCP server, that way all my network configuration is in one place and if I move a computer to a different network it will still work as DHCP is enabled. Most DHCP servers let you map MAC addresses to IP addresses. config_wlan0=192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255 routes_wlan0=default via 192.168.1.1 dns_servers_wlan0=192.168.1. That last line is wrong, is the network not working at all or is it just DNS resolution that is failing? -- Neil Bothwick Apple I (c) Copyright 1767, Sir Isaac Newton. signature.asc Description: PGP signature
Re: [gentoo-user] WLAN with fixed IP
On 11/13/2012 11:53:49 AM, Neil Bothwick wrote: On Tue, 13 Nov 2012 11:39:40 +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local network. I prefer to do this on the DHCP server, that way all my network configuration is in one place and if I move a computer to a different network it will still work as DHCP is enabled. Most DHCP servers let you map MAC addresses to IP addresses. config_wlan0=192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255 routes_wlan0=default via 192.168.1.1 dns_servers_wlan0=192.168.1. Yes, that's a typo of course It should read dns_servers_wlan0=192.168.1.1 I've written this from memory since I don't have access to that machine at the moment. That last line is wrong, is the network not working at all or is it just DNS resolution that is failing? It says something like network not ready, but I'll check this afternoon. I remember that ifconfig wlan0 did show the right IP. Thanks, Helmut.
Re: [gentoo-user] WLAN with fixed IP
On 11/13/2012 12:15:35 PM, Helmut Jarausch wrote: On 11/13/2012 11:53:49 AM, Neil Bothwick wrote: On Tue, 13 Nov 2012 11:39:40 +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local network. I prefer to do this on the DHCP server, that way all my network configuration is in one place and if I move a computer to a different network it will still work as DHCP is enabled. Most DHCP servers let you map MAC addresses to IP addresses. config_wlan0=192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255 routes_wlan0=default via 192.168.1.1 dns_servers_wlan0=192.168.1. Yes, that's a typo of course It should read dns_servers_wlan0=192.168.1.1 I've written this from memory since I don't have access to that machine at the moment. That last line is wrong, is the network not working at all or is it just DNS resolution that is failing? It says something like network not ready, but I'll check this afternoon. I remember that ifconfig wlan0 did show the right IP. Now, from the machine in question, I get connect: Network is unreachable /var/log/messages shows Nov 13 14:54:34 localhost kernel: wlan0: authenticate with 00:1d:6a:83:9f:75 Nov 13 14:54:34 localhost kernel: wlan0: send auth to 00:1d:6a:83:9f:75 (try 1/3) Nov 13 14:54:34 localhost kernel: wlan0: authenticated Nov 13 14:54:34 localhost kernel: wlan0: associate with 00:1d:6a:83:9f:75 (try 1/3) Nov 13 14:54:34 localhost kernel: wlan0: RX AssocResp from 00:1d:6a:83:9f:75 (capab=0x431 status=0 aid=1) Nov 13 14:54:34 localhost kernel: wlan0: associated Nov 13 14:54:34 localhost kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Nov 13 14:54:34 localhost wpa_cli: interface wlan0 CONNECTED Nov 13 14:54:35 localhost /etc/init.d/net.wlan0[3605]: ERROR: net.wlan0 failed to start Nov 13 14:54:35 localhost wpa_cli: executing '/etc/init.d/net.wlan0 --quiet start' failed ^^^ This is the reason But where is wpa_cli started, when I have config_wlan0=dhcpinstead of config_wlan0=192.168.1.33 netmsk 255.255.255.0 broadcast 192.168.1.255 Sometimes, openrc is hard. I even don't know where to start searching. Many thanks for a hint, Helmut.
Re: [gentoo-user] WLAN with fixed IP
On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local map MAC addresses to IP addresses. This is what your /etc/dhcp/dhcp.conf would look like on the router, or how it should be configured wherever DHCP is handed out: authoritative; ddns-update-style none; default-lease-time 1800; max-lease-time 1800; subnet 192.168.54.0 netmask 255.255.255.0 { range 192.168.54.10 192.168.54.50; option broadcast-address 192.168.54.255; option domain-name-servers 192.168.54.1; option routers 192.168.54.1; } subnet 192.168.100.0 netmask 255.255.255.0 { range 192.168.100.10 192.168.100.50; option broadcast-address 192.168.100.255; option domain-name-servers 192.168.100.1; option routers 192.168.100.1; } host server { hardware ethernet 00:d0:68:0b:87:66; fixed-address 192.168.100.3; } You of course need to adjust for your network(s). And I'd install dhcpcd and put it in the default runlevel. Then on the client you have /etc/conf.d/net like this: modules_wlan0=wpa_supplicant wpa_supplicant_wlan0=-Dwext config_wlan0=dhcp if you're using wpa_supplicant (you mentioned wpa_cli). And your /etc/wpa_supplicant/wpa_supplicant.conf would look like: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel #ap_scan=0 #update_config=1 network={ ssid=YourSSID psk=your-secret-key scan_ssid=1 proto=WPA2 key_mgmt=WPA-PSK group=CCMP TKIP pairwise=CCMP TKIP priority=5 } If you just want to setup a static IP per machine, /etc/conf.d/net: config_wlan0=192.168.1.2/24 routes_wlan0=default via 192.168.1.1 Hope this helps. If it's too confusing, might mention where DHCP is handed out, and some more about your LAN. -- Happy Penguin Gymnastics ') 126 Fenco Drive ( \ Tupelo, MS 38801 ^^ ad...@happypenguingymnastics.com 662-321-7009 http://happypenguingymnastics.com/ FB: http://tiny.cc/HappyPenguinGymnastics Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting
Re: [gentoo-user] WLAN with fixed IP
Am 13.11.2012 17:27, schrieb Bruce Hill: On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: I'd like to assign fixed IP numbers to computers of a local map MAC addresses to IP addresses. [...] If you just want to setup a static IP per machine, /etc/conf.d/net: config_wlan0=192.168.1.2/24 routes_wlan0=default via 192.168.1.1 Hope this helps. If it's too confusing, might mention where DHCP is handed out, and some more about your LAN. The following is taken directly from my /etc/conf.d/net with minimal editing. It assigns configs based on SSIDs. If I'm not mistaken (haven't tested it in a long time) this means it will default to DHCP for unspecified nets. Good for quick and dirty setups while traveling: modules_wlan0=wpa_supplicant config_MySSID=192.168.2.5 netmask 255.255.255.0 routes_MySSID=default via 192.168.2.1 dns_servers_MySSID=192.168.6.1 dns_domain_MySSID=example.net config_SomeHotelSSID=dhcp config_HotelWithVPN=dhcp dhcp_HotelWithVPN=nodns dns_servers_HotelWithVPN=192.168.6.1 # DNS server via VPN dns_domain_HotelWithVPN=vpn.example.net Hope this helps, Florian Philipp signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] WLAN with fixed IP
On Tue, Nov 13, 2012 at 11:39:40AM +0100, Helmut Jarausch wrote: Hi, I'd like to assign fixed IP numbers to computers of a local network. Using dhcp as in modules=wpa_supplicant wpa_supplicant_wlan0=-Dwext -iwlan0 config_wlan0=dhcp works just fine but depends on dhcp for IP assignment. The following does not work, i.e. the network is not working modules=wpa_supplicant wpa_supplicant_wlan0=-Dwext -iwlan0 config_wlan0=192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255 routes_wlan0=default via 192.168.1.1 dns_servers_wlan0=192.168.1. What am I missing. What does the dhcp option imply? Are there any additional necessary initialization (like an ifup) ? Many thanks for a hint, Helmut. Forgot to mention that /usr/share/doc/openrc*/net.example* is pretty well commented and 'recommended'. -- Happy Penguin Gymnastics ') 126 Fenco Drive ( \ Tupelo, MS 38801 ^^ ad...@happypenguingymnastics.com 662-321-7009 http://happypenguingymnastics.com/ FB: http://tiny.cc/HappyPenguinGymnastics Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting