|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Correct setup of routing table - 2 static IPs
I have 2 static IPs from my ISP. Thus far I have only needed and used 1, but now I will require the second one to meet the demands of IP based virtual hosting for a secure site under construction.
The ISP's signals arrive through a D-Link DSL300G ADSL modem which feeds a Sure-com hub. The 2 external IPs are 142.179.101.34 (netmask 255.255.248.0) and 142.179.101.35 (netmask 255.255.228.0). The O/S is Mandrakelinux 10. with DNS, Sendmail and Apache2. The initial problem was the inability to ping the second (.35) from an external source. Then I discovered that host -a no longer functioned correctly - it could locate the zone records but could not provide the IN records (ie no ADDITIONAL SECTION) displayed. Now the routing table shows 2 separate route lines to 142.179.96.0 via eth1, whereas I thought it would at least show the first route through eth0 which is where it actually exists. Seems the eth1 interface somehow overrides the etho. I have thought of changing the mask of each external connection to 255.255.255.255 - thereby making them hosts. (eth0 is setup by Mandrake as the internet connection, but I am uncertain as to whether this causes problems at the internet level. This has been frustrating me for some time, which is usually a clear signal that I am mistaking forests for trees, but I don't really want to do more damage than already exists. Could somebody maybe help set me along the correct path? (Then I can crawl back into my applications hole where I belong .... ![]() |
|
#2
|
||||
|
||||
|
This appears to be a networking question, but I decided to talk about it anyway (and move the topic to another forum).
Are you configuring eth0 and eth1 for the same network card? Cause if you've got only the one ethernet card, and 2 IPs, then you should configure things as eth0 and eth0:1.
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links: Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts |
|
#3
|
|||
|
|||
|
No, there are 2 separate nic cards because the ISP requires the registration of separate MAC addresses for eack static IP.
There are 3 other nic cards in the configuration, but they are all lans - the idea being to keep each site development area separate for ease in eventual transfer to a co-location machine. No trouble anywher on the lans. And thanks very much for responding. |
|
#4
|
||||
|
||||
|
what is the routing table contents.
|
|
#5
|
|||
|
|||
|
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2 142.179.96.0 0.0.0.0 255.255.248.0 U 0 0 0 eth1 142.179.96.0 0.0.0.0 255.255.248.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 142.179.96.254 0.0.0.0 UG 0 0 0 eth0 I've tried using a mask of 255.255.255.255 to make the 2 ips hosts, but while they then appear to be correctly routed to eth0 and eth1, the default gateway disappears. Again, my sincerest thanks for taking the trouble to help. George |
|
#6
|
||||
|
||||
|
This is what I recommend:
Code:
Destination Gateway Genmask Flags M R U Interface 192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2 142.179.101.34 0.0.0.0 255.255.255.255 U 0 0 0 eth0 142.179.101.35 0.0.0.0 255.255.255.255 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 142.179.96.254 0.0.0.0 UG 0 0 0 eth0 Nothing wrong with having host routes. I considered combining the two IPs under a single route with a netmask of 255.255.255.254 but since they're on different interfaces I figure that's a bad idea. Last edited by SilentRage : May 25th, 2004 at 05:42 PM. |
|
#7
|
|||
|
|||
|
Thank you so much for following along with this.
It lookls like what I thought it should. I'll give it a whirl later today. The only problem before was that Mandrake was wiping out the gateway. I'll force it through webmin so I can get on with setting up the DNS zones for the individual sites. Its so nice to feel I am not alone when working through system problems, and I am very, very grateful for your support and direction. Know that someone 'out there' appreciates your efforts. George |
|
#8
|
|||
|
|||
|
Well, it seems there might be.
I rebuilt the configuration earlier - mainly to prepare a full set of documentation for future use. This allowed me to stop the network setup before the lan was established - just the 2 external IPs. The only way the system will establish internet connectivity is by assigning 142.179.101.34 with netmask 255.255.248.0 to eth0. Netstat reports the route to 142.179.96.0 via eth0 and the default gateway 132.179.96.254. I tried establishing 142.179.101.35 on eth1 with a mask of 255.255.255.255. I can add it to the routing table manually, but it doesn't remain after a reboot. Seems to me that this would be a problem with the hub which requires all connections to have the same netmask, right? Would a switch instead of a hub allow me to get around this and direct the trafiic to the correct nic card??? I guess for the time being, I'll have to disable eth1 so I can at least tackle other concerns. George O |
|
#9
|
|||
|
|||
|
Oops, sorry, the default gateway is, of course, 142.179.96.254 - NOT 132.179.96.254.
GJW |
|
#10
|
||||
|
||||
|
Not sure what the problem is. Is the problem only that things don't stay after you reboot? Put some commands in your rc script. That'll make sure things stay after boot. Otherwise, figure out what the heck is editing your routes and stop it.
If the routes themselves work, then goody. Otherwise, I can't halp ya. As for talking about a unswitched hub and it's effect on routes... ummmm... it shouldn't be a problem. unswitched just means that all recieved signals get sent through all other wires it is connected to. It has no clue what you set as the hostmask for a given route and doesn't care. If you use a switched hub that learns it's routes... ummmm... shouldn't be a problem. It probably uses ARP to figure out who all is on the network. It sends packets accordingly. I don't know if there's some means to setup routes on them. Certainly with a switched router you can and it should have a couple of host routes to your NICs just like you have a couple of host routes on the computer WITH those nics. |
|
#11
|
|||
|
|||
|
I recently purchased the exact same modem (the DSL-300G), and was looking for information on how I may be able to configure it, when I found this article:
URL Pay particular attention to the 3rd paragraph, 5th line. It basically states that the modem only knows how to connect to one MAC address at a time. A little silly methinks! This would explain why you can only hit one IP address at a time. I would suggest that this modem is going to make your life very difficult, if your ISP has a requirement to know about the MAC address. Otherwise you could route information for IP2 through IP1 (but I guess this is something you had already thought of). |
![]() |
| Viewing: Dev Shed Forums > System Administration > Networking Help > Correct setup of routing table - 2 static IPs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|