Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-13-2005, 08:28 PM
|
#16
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
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.
|
|
|
09-13-2005, 08:30 PM
|
#17
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Original Poster
Rep:
|
what if i said that i dont have access to the config for that router, only access to the .0.1 subnet?
|
|
|
09-13-2005, 08:41 PM
|
#18
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
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
|
|
|
09-13-2005, 08:49 PM
|
#19
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
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?
|
|
|
09-13-2005, 08:51 PM
|
#20
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Original Poster
Rep:
|
man interfaces
i can't find it online, i'm looking
Last edited by FliesLikeABrick; 09-13-2005 at 08:54 PM.
|
|
|
09-13-2005, 08:59 PM
|
#21
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
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.
|
|
|
09-13-2005, 09:03 PM
|
#22
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Original Poster
Rep:
|
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
|
|
|
09-13-2005, 09:10 PM
|
#23
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Looks like you'll have to remove the route yourself as in post #18.
|
|
|
09-13-2005, 09:56 PM
|
#24
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Original Poster
Rep:
|
i switched to a static ip on eth1 and it still auto-adds those routing entries like it did with dhcp
|
|
|
09-13-2005, 10:22 PM
|
#25
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
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.
|
|
|
09-13-2005, 10:41 PM
|
#26
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Original Poster
Rep:
|
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 
|
|
|
09-13-2005, 10:53 PM
|
#27
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Yay!
|
|
|
All times are GMT -5. The time now is 08:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|