Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Short DHCP lease causes VPN to lose connection

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
haarp
Guru
Guru
Posts: 535
Joined: Wed Oct 31, 2007 12:44 pm

Short DHCP lease causes VPN to lose connection

  • Quote

Post by haarp » Wed Oct 27, 2010 7:22 pm

Hey.

My uni sets internet access up by providing unencrypted WLAN, but connecting to their VPN is necessary (PPTP). IPs are assigned via DHCP by the VPN, static is _not_ possible.

My problem is that the lease for DHCP expires after 20 minutes, causing the dhcpcd to renegotiate after 10 minutes. I lose my IP after 10 minutes and get a new one, causing the VPN to fail and forcing me to reconnect. Every 10 minutes. :?

Any idea how to fix this? I know its possible to keep your IP ("extend" the lease) instead of renegotiation, but how do I do that? I'm running dhcpcd-5.2.8.
Top
TJNII
l33t
l33t
User avatar
Posts: 648
Joined: Sun Nov 09, 2003 3:16 am
Location: for(;;);

  • Quote

Post by TJNII » Thu Oct 28, 2010 12:13 am

Try the -l option:
dhcpcd man page wrote: -l <leasetime>
Specifies (in seconds) the recommended lease time to the server. (Note that the server can override this value if it sees fit). This value is used in the DHCP_DISCOVER message. The default is infinite (0xffffffff).
Frankly, I'd call your IT guy and complain about it. 20 minutes sounds like a testing value that never got reset.

[EDIT]
As I think about it, there is something else going on here. You shouldn't lose your IP, dhcpcd should renew it automatically. This should all happen transparently underneath you. I'd sniff the traffic to see if dhcpcd is trying to renew the lease and if the server is ACK or NAKing it.
[/edit]
Top
haarp
Guru
Guru
Posts: 535
Joined: Wed Oct 31, 2007 12:44 pm

  • Quote

Post by haarp » Tue Nov 02, 2010 9:19 am

Mhh. It appears they they fixed their DHCP server over the weekend. I now get to keep my IP.

Code: Select all

Nov  2 10:03:28 marauder dhcpcd[6487]: wlan0: renewing lease of 192.168.42.246
Nov  2 10:03:28 marauder dhcpcd[6487]: wlan0: acknowledged 192.168.42.246 from 192.168.42.3
Nov  2 10:03:28 marauder dhcpcd[6487]: wlan0: leased 192.168.42.246 for 1200 seconds
The VPN connection however still drops for no apparent reason. There's no console log by pptp/pppd, it just doesn't work anymore. When I reconnect pppd manually, I am assigned a new VPN IP (WLAN IP stays the same):

Code: Select all

Nov  2 10:15:18 marauder pppd[13638]: pppd 2.4.5 started by root, uid 0
Nov  2 10:15:18 marauder pppd[13638]: Using interface ppp0
Nov  2 10:15:18 marauder pppd[13638]: Connect: ppp0 <--> /dev/pts/0
Nov  2 10:15:18 marauder pptp[13639]: anon log[main:pptp.c:310]: The synchronous pptp option is NOT activated
Nov  2 10:15:18 marauder pptp[13646]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Nov  2 10:15:18 marauder pptp[13646]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Nov  2 10:15:18 marauder pptp[13646]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Nov  2 10:15:19 marauder pptp[13646]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Nov  2 10:15:19 marauder pptp[13646]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Nov  2 10:15:19 marauder pptp[13646]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 32640).
Nov  2 10:15:20 marauder pppd[13638]: CHAP authentication succeeded
Nov  2 10:15:20 marauder pppd[13638]: local  IP address xxx.xxx.xxx.xxx
Nov  2 10:15:20 marauder pppd[13638]: remote IP address xxx.xxx.xxx.xxx
Nov  2 10:15:20 marauder pppd[13638]: primary   DNS address xxx.xxx.xxx.xxx
Nov  2 10:15:20 marauder pppd[13638]: secondary DNS address xxx.xxx.xxx.xxx
"local IP address" is the part that changes.
Last edited by haarp on Mon Nov 08, 2010 10:41 am, edited 1 time in total.
Top
haarp
Guru
Guru
Posts: 535
Joined: Wed Oct 31, 2007 12:44 pm

  • Quote

Post by haarp » Mon Nov 08, 2010 10:41 am

no ideas?
Top
depontius
Advocate
Advocate
Posts: 3533
Joined: Wed May 05, 2004 4:06 pm

  • Quote

Post by depontius » Mon Nov 08, 2010 1:24 pm

I run a short lease on my home dhcp server - actually right in the 20 minute ballpark, too. I've also used several different VPNs to contact my place of work, and never had a dhcp-induced fail in the VPN itself. The issue I have had comes when I try to assign the VPN hostname to my machine, so it appears to be fully "inside" my employer's network. (Required by some of the software I need to run.) Then at the next lease time that name got overwritten with the dhcp-granted hostname from my LAN. I've since scripted that problem away.
.sigs waste space and bandwidth
Top
dimaq
n00b
n00b
Posts: 5
Joined: Thu Sep 09, 2004 3:13 pm
Contact:
Contact dimaq
Website

  • Quote

Post by dimaq » Mon Feb 07, 2011 8:07 pm

[quote="depontius"]I run a short lease on my home dhcp server - actually right in the 20 minute ballpark, too. I've also used several different VPNs to contact my place of work, and never had a dhcp-induced fail in the VPN itself. The issue I have had comes when I try to assign the VPN hostname to my machine, so it appears to be fully "inside" my employer's network. (Required by some of the software I need to run.) Then at the next lease time that name got overwritten with the dhcp-granted hostname from my LAN. I've since scripted that problem away.[/quote]

This sounds like a valid explanation - 2 dhcp's (wlan and vpn) conflict setting haarp's laptop hostname, default route, dns server, etc.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy