LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-17-2001, 11:07 AM   #1
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Rep: Reputation: 18
Renewing DHCP Lease


I'm running Mandrake 8.1 as a firewall/router for my LAN which has 4 Win98 boxes. I'm connected to the Internet via DSL on the Linux box (as eth1) and get my external IP address via DHCP from my ISP. Twice in the past three weeks I've apparently failed to renew the lease on the address, and lost connectivity. Both times, rebooting the Linux box brought everything back -- but that seems to be a Win9x solution rather than a *nix way to do things. Can someone tell me the sequence of commands needed to force renewal without taking the system down to do so?

I'd also like to know how to make portsentry work; it appears that my firewall (iptables) is preventing any scan attempts from getting to portsentry. My logs show a dozen or more attempts to get into port 111 each day (I maintain an open FTP server, which is a beacon for the script kiddies), but portsentry doesn't have anything in its files to reflect that...
 
Old 12-18-2001, 01:01 AM   #2
ryandelany
Member
 
Registered: Dec 2001
Location: Orange County, CA
Distribution: RedHat 7.2, 7.3, 8.0
Posts: 66

Rep: Reputation: 15
Don't know about Mandrake specifically, but you can try reading up on the pump command with man pump

Also try just restarting the network services. In RedHat you can use service network restart , if that doesn't work try /etc/rc.d/init.d/network restart

You should almost never have to reboot in *nix, that is a nasty Windows habit you need to get away from!

Ryan
 
Old 12-18-2001, 08:22 AM   #3
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Original Poster
Rep: Reputation: 18
Smile

No trace of a "pump" command but I suspect that "service network restart" should do the trick. Will try that next time it happens.

Agreed that rebooting isn't a Good Thing. That's one of the major reasons I switched over for the firewall/router box (which is doubling as a file server but using a different drive). The other was to have better control of my system...
 
Old 12-18-2001, 12:02 PM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
this does not sound like dhcp

it sounds like you are loosing connection on the dsl which should reconnect automatically if you are using rp-pppoe

put DEMAND=no

in /etc/ppp/pppoe.conf
 
Old 12-18-2001, 01:05 PM   #5
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Original Poster
Rep: Reputation: 18
As best I've been able to determine, swbell.net isn't using PPPoE. It acts more like a simple WAN; while I'm paying only for a dynamic IP, for the first 11 months I had the service it never changed. Then the network went down for several days and when it came back up I had a new IP, which has remained constant for almost 5 months now. The "DSL modem" is a SpeedStream 5260 with four LEDs on the front of it. When the service won't let me connect to anything outside, all four of them are still showing green; I would expect the DSL light to be off, if the DSL connection was actually gone.

Last time it happened I checked "route" to make certain I still had the gateway configured; all looked good but I wasn't able to ping the gateway using its IP address until after the reboot -- and then everything worked again.

Next time I'll try "service network restart" and see if that does the trick. I suspect it's something a bit flaky in the way swbell.net handles its DSL circuits in this area, possibly causing the other end to stop listening to me...
 
Old 12-19-2001, 04:48 AM   #6
Sylhouette
Member
 
Registered: Oct 2001
Location: Beverwijk (Holland
Distribution: Red Hat 7.1
Posts: 132

Rep: Reputation: 15
YYou can also use command ifdown eth0 and then ifup eth0

It stops and starts the interface eth0 without laying down all networking within your pc
 
Old 12-19-2001, 01:49 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
what do you get when you run ifconfig
 
Old 12-19-2001, 02:02 PM   #8
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Original Poster
Rep: Reputation: 18
Here's what ifconfig shows:

eth0 Link encap:Ethernet HWaddr 00:80:C6:F2:E2:67
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1306457 errors:0 dropped:0 overruns:0 frame:0
TX packets:1089386 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1465897549 (1397.9 Mb) TX bytes:610640897 (582.3 Mb)
Interrupt:11 Base address:0x6100

eth1 Link encap:Ethernet HWaddr 00:00:B4:54:51:AF
inet addr:64.217.15.253 Bcast:255.255.255.255 Mask:255.255.248.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:124882 errors:0 dropped:0 overruns:0 frame:150
TX packets:96005 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:112146482 (106.9 Mb) TX bytes:23919554 (22.8 Mb)
Interrupt:9 Base address:0x6300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8697 errors:0 dropped:0 overruns:0 frame:0
TX packets:8697 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:850546 (830.6 Kb) TX bytes:850546 (830.6 Kb)

I did, however, determine that swbell.net really does use PPPoE; now I'm wondering how I've managed to stay connected as well as I have, and why I wasn't able to configure the internet NIC (eth1, not eth0) for PPPoE using Mandrake Control Center... I did download a generic PPPoE script from the swbell ISP tech support site but am not certain how well it will work with the Mandrake setup, which is similar to Red Hat but not exactly the same in all respects...
 
Old 12-19-2001, 02:18 PM   #9
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I had no luck with their software, it was outdated and I had rp already installed.

I started by running adsl-setup, he gave me a name and password to enter.

By the time he could tell me they did not support Linux and I said thats ok you don't need to support it. I saw the lights flash a few times and I knew It was connected.

Don't let them give you any crap either. If the link light is flashing it's not in your system and it will came up when the light locks in. The only thing, you might have to power cycle the modem.

Ours went out last month and it took them a week to come out and give us a new modem, the other one had bit the dust.

If it goes out tell them you want a phone number for free dialup access until it's fixed. Your login and password will work. They did not hesitate to give me one. It was really something having 25 people on a dialup account.



Last edited by DavidPhillips; 12-19-2001 at 02:23 PM.
 
Old 07-17-2004, 06:15 PM   #10
moismoje
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
Same issue on a wireless isp connection

I get the same kind of issue when running on a Wireless ISP connection. Doing and ifconfig eth0 down and the a up doesn't renew the address, nor does running the network interface configuration. A reboot is the only thing I have found thus far that does it. The ISP connection is not a PPPoA/E type service. Basically it's a web page log in currently but they are supposed to be working on some other authentication types.

In my Mandrake 10 box I have 2 ethernet cards. Eth0 goes to a Linksys WET 11 bridge that connects to an antenna for my ISP connection. Thus it handles all the wirless configuration portion but is transparent as far as addressing is concerned. I will have to try the network restart command suggested above to see if that works.

One other thing...if that does work how would somone get that to run automatically? Right now I'm away from home and my connection has failed in this way. Is there a good script that you could use to detect if you have an active connection to the ISP gateway and if not to try some kind of reset commands to bring it back up?
 
Old 07-18-2004, 06:54 PM   #11
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
You could actually have a script that runs all of the time which will ping an address to see if there is a connection, then restart networking if it's down. You may want to ping by name if it turns out to be a dns problem.

It would seem that if this uses dhcp you should be able to restart it using dhcpcd or dhclient.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP lease unavailable bwilliam79 Linux - Networking 9 01-31-2008 05:37 AM
Automatically renewing DHCP addresses? irishbear Linux - Networking 6 01-21-2005 11:53 AM
DHCP Lease Delete! kofi Linux - Networking 2 07-29-2004 07:00 PM
dhcp - get new IP when lease renewed chrisnewey Linux - Networking 0 03-30-2004 05:41 AM
dhcp clients not renewing lease tuxguy Linux - Networking 0 03-21-2004 11:27 AM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration