LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-27-2003, 03:56 PM   #1
sornman
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Rep: Reputation: 0
2 NICs, RH9, Outgoing IP Address Problem...


I am having a problem as I need to set the outgoing IP address for a machine. The box is assigned 9 external IPs on eth0. eth1 is a direct link to another of our servers for backups/queries. The problem is that outgoing requests are being made on eth0:8, rather than eth0 directly. And since the request is being made to a machine that requires a certain IP address, it won't work as is.

Here is some of the relevant information. If you need more, please let me know.

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
xx.zz.yy.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         xx.zz.yy.1     0.0.0.0         UG        0 0          0 eth0

My background is more in web development (apache/postgresql/mysql/php/etc) and not really in routing/etc, so please, any examples, urls would be helpful! Thanks!
 
Old 08-27-2003, 04:07 PM   #2
sornman
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Just a little more information... I had changed /etc/sysconfig/network so that GATEWAY=external ip, and it worked fine when I restarted the network. However, named starting spitting out all kinds of errors such as the following:

Aug 27 15:03:45 www named[28110]: client ww.xx.yy.zz#55286: error sending response: not enough free resources

And after many of those, and the server rebooted, we began getting:

Aug 27 15:10:36 dp1 kernel: NET: 193 messages suppressed.
Aug 27 15:10:36 dp1 kernel: Neighbour table overflow.
Aug 27 15:10:41 dp1 kernel: NET: 178 messages suppressed.
Aug 27 15:10:41 dp1 kernel: Neighbour table overflow.
Aug 27 15:10:46 dp1 kernel: NET: 194 messages suppressed.
Aug 27 15:10:46 dp1 kernel: Neighbour table overflow.
Aug 27 15:10:51 dp1 kernel: NET: 202 messages suppressed.
Aug 27 15:10:51 dp1 kernel: Neighbour table overflow.

And more of the same... After changing the GATEWAY back, and restarting the network, these errors quit.

BTW, I also tried setting /etc/sysconfig/network-scripts/ifcfg-eth0 with SRCADDR=external ip, but that didn't change anything...
 
Old 08-28-2003, 12:22 AM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
the routing table looks kinda ugly. you have listed there like 17 or so different gateways for default traffic.

you have several default routes (0.0.0.0)


you could always insert and iptables rule:

iptables -A POSTROUTING -t nat -j SNAT --to $IP_ADDRESS

that will change the ip of all outgoing traffic to the one u want. but that's a bad hack for your situation.

i dont really know the entire network topology, but 17 different gateways for default traffic seems....crazy (from what i have learned about networking). you only USUALLY specify 1 default route (or maybe u have 16 backup routers...i dont know).
 
Old 08-28-2003, 12:28 AM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
try this:

Code:
Destination      Gateway      Genmask              Iface
yy.zz.0        xx.yy.zz.1     255.255.255.0        eth0
default        xx.yy.zz.1     0.0.0.0              eth0
that will send all xx.yy.zz.0 traffic to xx.yy.zz.1 and sets your default route to xx.yy.zz.1

default = 0.0.0.0 by the way, in RH7.3 it says "default"

you should be able to loose all those extra default rules (i think, i dont really know what the network looks like).

Last edited by Robert0380; 08-28-2003 at 12:30 AM.
 
Old 08-28-2003, 09:02 AM   #5
sornman
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your reply. I don't know why those other entres for default routes are there. The network is simply 2 nics, 1 going directly to another server we have (eth1), and the other is assigned 9 IPs and is external. These 2 are dedicated machines we purchased, and both have the same routing table setup.

As for how to remove all the extra gateways, I am not sure what to do. I tried 'route del default' with no success. Any additional help on this would be appreciated.

Last edited by sornman; 08-28-2003 at 09:04 AM.
 
  


Reply



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
to change outgoing mac and ip address korenje Linux - Networking 3 12-31-2005 12:41 AM
IP address for PC with 2 NICs? Trio3b Linux - Networking 1 12-02-2005 01:03 AM
Sharing one IP address with multiple NICs Astryk Linux - Software 4 06-02-2004 03:39 PM
outgoing source ip address ram_dhupkar Linux - Networking 1 08-26-2003 01:40 PM
problem with outgoing ftp Thaas Linux - General 2 06-09-2002 03:17 PM

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

All times are GMT -5. The time now is 02:06 PM.

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