Operating System - Linux
1825524 Members
2064 Online
109681 Solutions
New Discussion юеВ

two ethernet cards on Alpha DS20E

 
Dasaradharamaraju
Occasional Advisor

two ethernet cards on Alpha DS20E

Hi guys

i had a DS20E server and i want to configure two ethernet cards one for intranet and the other for internet. Iam facing a problem with gateway's. Can i have more than one gateway in a 2 ethernet card machine..

Thanks in anticipation...
9 REPLIES 9
Vernon Brown_4
Trusted Contributor

Re: two ethernet cards on Alpha DS20E

The card configured for internet is your gateway to the internet. The card configured for your LAN doesn't need a gateway to do its LAN tasks.

I have a similar situation; two eth cards on my workstation. Eth0 goes to my LAN. My LAN is running Apache with proxy for LAN to the internet.

My workstation eth1 is connected to a cable modem to the internet. When the cable modem connects, its DHCP sets itself up as a gateway complete with DNS IP addresses.

If we knew your setup; we could probably get you going with what you want to do.

Vern
Dasaradharamaraju
Occasional Advisor

Re: two ethernet cards on Alpha DS20E

Hi Vernon,

Here there is no DHCP configured and its basically a C Class network with star topology in a span of >700 km connecting with OFC. Now i want to configure this DS20E as a gateway to Internet so that all networks in my intranet can access the internet from one place. Now i had given the IP for internet and gateway, the problem iam facing is iam able to ping the IP address of Yahoo.com but not able to Yahoo.com.

Thanks and regards,
Ramaraju
Matt Palmer_2
Respected Contributor

Re: two ethernet cards on Alpha DS20E

Hi have you checked the /etc/resolv.conf and made sure that the settings in there are what you would expect?? You should be able to have more than one gateway I think by setting up routes in the route table. The OS will try the default gw first to obtain its route and then try other routes to reach its destination.

If you can ping yahoo though, yet cannot connect I would assume that it is an issue with your resolv.conf.

HTH

regards

Matt
Jeroen Peereboom
Honored Contributor

Re: two ethernet cards on Alpha DS20E

Ramaraju,

Using the 'route add' statement you can define as many gateways as you like. You may define the internet gateway as a default gateway, and you may need a few route statements to route intranet traffic to the other (intranet) gateway.
Depending on the destination IP address your Linux server will check for the correct route. If no corresponding route-entry is found, the default route will be taken.

First thing to try is to be able to surf the internet from the DS20E (what is a DS20E?). This involves gateway settings and DNS settings (resolv.conf).

If you can surf the internet from the DS20E, the next step is to enable router functionality on your DS20E and tell other systems they can use your DS20E as router (using route statements).

JP
Dasaradharamaraju
Occasional Advisor

Re: two ethernet cards on Alpha DS20E

hi Matt,

The /etc/resolv.conf is having the following

domin "my domain name"
nameserver 202.9.145.94
nameserver 202.9.145.38
nameserver 202.9.145.4

These DNS servers ip's are given by ISP DISHNET DSL. Is any other changes req. in this.

Thanks and regards,
Ramaraju.
Matt Palmer_2
Respected Contributor

Re: two ethernet cards on Alpha DS20E

Hi Dasaradharamaraju,

it sounds like what you are trying to do is route traffic from one interface to the other. Is this correct?

ie:

tu0 = intranet
tu1 = internet

do you want traffic from tu0 to be able to route out and back in from tu1??

If so then the issue might not be your resolv.conf, but more of a routing problem. It might be that you need to use ip forwarding or something similar to pass traffic from one interface to another.

Can you confirm this is the issue??

regards

Matt
Vernon Brown_4
Trusted Contributor

Re: two ethernet cards on Alpha DS20E

You can use iptables to couple your LAN to the internet like this:

iptables -A POSTROUTING -o eth1 -j MASQUERADE

Replace eth1 with the device name of your internet connection.

Vern
Dasaradharamaraju
Occasional Advisor

Re: two ethernet cards on Alpha DS20E

Hi Matt,

It is exactly same. Now iam able to connect to internet and intranet but the only problem iam facing is that iam not able to ping to internet sites by there name i.e., www.yahoo.com instead of this i have to ping to the ipaddress of the yahoo.com. May be it is name resolving problem. Is there any thing to be checked for this...

Thanks and regards,
Ramaraju.
Stuart Browne
Honored Contributor

Re: two ethernet cards on Alpha DS20E

standard DNS stuff..

check 'nameserver' entries in '/etc/resolv.conf'

If there is an entry that says 'nameserver 127.0.0.1' or one of the IP addresses of your ethernet interfaces, ensure that 'named' is runnnig (ps -elf | grep nam), and make sure it's listening on that ip address (netstat -nulp | grep nam).

If not, then make sure you can talk to the nameservers listed there using the command:

nslookup -

Put in a host-name.

If this works, then your nameservers should be working fine.

If this doesn't, then you possibly have a firewalling issue. Temporarily disable your firewall (service iptables stop), try it again.

If it does work after you've disabled the firewall, then show us your rules, and we'll give some advice.
One long-haired git at your service...