LinuxQuestions.org
Visit Jeremy's Blog.
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 09-13-2005, 08:28 PM   #16
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97

Have a look in the configuration of the router on the .1.0 subnet, and see if you can reserve, say, 192.168.1.2 (to stop the DHCP server on the router from handing out that address), then configure eth1 on the server to use 192.168.1.2. That way your server will always be at the same address, and the router shouldn't try to hand that IP out to anyone else. If you're not using dhclient on the eth1 interface (i.e. by assigning it a static IP), then the 192.168.1.1 default route problem shouldn't happen any more.

Servers typically don't get involved with DHCP. It's best to assing static IPs to them.

Dave

Last edited by ilikejam; 09-13-2005 at 08:30 PM.
 
Old 09-13-2005, 08:30 PM   #17
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
what if i said that i dont have access to the config for that router, only access to the .0.1 subnet?
 
Old 09-13-2005, 08:41 PM   #18
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Ah. Interesting.

If there's no way to stop dhclient from adding a default route for the interface it's been run on (in your case eth1), then you might have to remove that route at the end of the boot sequence. Have a look at the man page for dhclient to see if there's any options.

As I said, I'm running RedHat based systems here, so I'm used to having an rc.local script which runs at the very end of the boot sequence, where you can add scripts etc to run. Debian based systems don't have this, so have a look here:
http://www.plope.com/Members/chrism/...rc_local_equiv

and replace his 'rdate -s clock-1.cs.cmu.edu && hwclock --systohc' line with 'route del default gw 192.168.1.1'. That should remove the redundant default route just after the machine boots.

Dave
 
Old 09-13-2005, 08:49 PM   #19
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
I've just had a look at what goes into /etc/network/interfaces.

You you might be able to stop the default route there. Is there a man page for this file?
 
Old 09-13-2005, 08:51 PM   #20
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
man interfaces

i can't find it online, i'm looking

Last edited by FliesLikeABrick; 09-13-2005 at 08:54 PM.
 
Old 09-13-2005, 08:59 PM   #21
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
What do you have in /etc/network/interfaces right now? In my experience, dhclient doesn't add a default route, but having googled around, I see this isn't typical. If /etc/network/interfaces is setting the default route for eth1, then try removing that line. If it *is* dhclient which is setting it, then you'll probably have to remove that route as in post #18.
 
Old 09-13-2005, 09:03 PM   #22
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
auto eth1
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.92.226.9

iface eth1 inet dhcp
 
Old 09-13-2005, 09:10 PM   #23
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Looks like you'll have to remove the route yourself as in post #18.
 
Old 09-13-2005, 09:56 PM   #24
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
i switched to a static ip on eth1 and it still auto-adds those routing entries like it did with dhcp
 
Old 09-13-2005, 10:22 PM   #25
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
What does /etc/network/interfaces contain when you assign a static IP for eth1?

This default route is being assigned somewhere - ifconfig is the only utility used to configure ethernet devices, so somewhere along the line it's being used to set that default route.
 
Old 09-13-2005, 10:41 PM   #26
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
alright, well i made that startup script from that link you gave me, it is exactly what i needed to solve this and another issue. everything seems to work perfectly on boot now
http://troy.u13.net/phpsysinfo/ <-- see
 
Old 09-13-2005, 10:53 PM   #27
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Yay!
 
  


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
fun stuff - most helpful user recently titanium_geek LQ Suggestions & Feedback 8 06-22-2005 10:58 AM
Fun stuff we've installed Kroenecker Linux From Scratch 2 10-08-2004 05:03 AM
add your fun quotes and stuff Mattentaart General 16 05-05-2004 04:24 PM
fonts, desktop customization, fun stuff = newb here. spiffdoodle Linux - Newbie 6 02-25-2004 10:05 PM
linux fun stuff punt Linux - General 14 08-30-2001 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:45 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration