View previous topic :: View next topic |
Author |
Message |
nusch Tux's lil' helper
Joined: 19 May 2007 Posts: 115 Location: Katowice(Poland)
|
Posted: Mon Oct 29, 2007 1:42 pm Post subject: resolv.conf overwriting |
|
|
I have problem with net scripts. I'm connected to to wireless networks through 2 interfaces - wlan0 - source of internet, open network , obtaining IP by dhcp. And eth1 - connected to home wireless gateway, with WPA via wpa_supplicant, at the moment it isn't connected to Internet, but I need it to connect other boxes.
Problem is that eth1 is overwriting dns'es in resolv.conf and ocassionally default gw. I'm running once it happen cat /etc/resolv.bak > /etc/resolv.conf but don't like such workaround.
I changed IP to static for home network but it still happens once a few minutes:
Code: |
nusch@nuschbox ~ $ cat /etc/resolv.conf
# Generated by net-scripts for interface eth1
domain nuschNET
|
Here is my conf.d/net:
Code: |
...
modules_eth1=( "wpa_supplicant" )
modules_WantToChallenge=( "wpa_supplicant" )
modules_eduroam=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
config_eduroam=( "dhcp") #used with eth1
config_Security_Lounge=( "192.168.10.3/24") #used with eth1
dhcp_Security_Lounge=( "-R" )
config_WantToChallenge=( "dhcp" ) # used with eth1
config_wlan0=( "dhcp" )
...
essid_wlan0="ISP"
mode_wlan0="managed"
iwconfig_wlan0="rate 1M"
...
|
If it's possible would like to obtain IP through DHCP but ignore gateway and dns's from it. |
|
Back to top |
|
|
Sleipnir Guru
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Mon Oct 29, 2007 2:05 pm Post subject: |
|
|
Does
solve your problem? _________________ A)bort, R)etry, I)nfluence with large hammer. |
|
Back to top |
|
|
nusch Tux's lil' helper
Joined: 19 May 2007 Posts: 115 Location: Katowice(Poland)
|
Posted: Mon Oct 29, 2007 3:02 pm Post subject: |
|
|
Still happens, also tried:
Code: |
metric_wlan0=10
metric_Security_Lounge=20
|
|
|
Back to top |
|
|
Sleipnir Guru
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Mon Oct 29, 2007 5:38 pm Post subject: |
|
|
Does
help? I don't get the "Security_Lounge" stuff in your config. Whats about this?
Btw can you please try to manually retrive an address for both interfaces using
Code: |
dhcpcd wlan0
dhcpcd -R eth1
|
"-R" prevents dhcp to overwrite the resolv.conf. You maybe have to kill the dhcpcd
beforehand... _________________ A)bort, R)etry, I)nfluence with large hammer. |
|
Back to top |
|
|
nusch Tux's lil' helper
Joined: 19 May 2007 Posts: 115 Location: Katowice(Poland)
|
Posted: Mon Oct 29, 2007 6:49 pm Post subject: |
|
|
Sleipnir wrote: | Does
help? I don't get the "Security_Lounge" stuff in your config.
|
It's ESSID, I'm using laptop in different places and want to disable dhcp only for this specified one.
Quote: |
Btw can you please try to manually retrive an address for both interfaces using
Code: |
dhcpcd wlan0
dhcpcd -R eth1
|
|
I can also do
Code: |
rc-update del net.wlan0
rc-update del net.eth1
iwconfig wlan0 essid ISP
iwconfig wlan0 rate 1M mode managed
wpa_supplicant foobar foobar foobar eth1
dhcpcd -d wlan0
|
But gentoo is not slackware and I want to use bulit-in scripts for this |
|
Back to top |
|
|
Sleipnir Guru
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Mon Oct 29, 2007 7:36 pm Post subject: |
|
|
Sometimes its nice to try a certain idea on commandline before trying to fiddle
around with the config stuff... _________________ A)bort, R)etry, I)nfluence with large hammer. |
|
Back to top |
|
|
|