Routing on a dual-homed pc

Routing on a dual-homed pc

Post by Pigg » Thu, 13 Mar 1997 04:00:00



I am using FreeBSD 2.1.0 on a dual-homed pc, one ethernet card (ed0) for local
network xxx.xxx.22.0 and another (ed1) goes to the internet xxx.xxx.228.0. I
set the default route to my internet router at xxx.xxx.228.x. The links in
local (Windows 95s) is quite slow, except a Linux box. I think it might because
it's because of wrong route settings. It seems that only one default route is
allowed and I want to know if I can set different default route to each
ethernet card. I tried to use route add -net xxx.xxx.22.0 localhost (my local)
but it doesn't work. (I used to use Linux on this pc and in Linux, just add two
default route to different networks and everything goes OK.) I do not want to
enable ip-forwarding and do not run routed. I read the 2.1.0 handbooks
and the FAQs but can not find how to do this. Thanks for any suggestions.
BTW, it does not seem like a dns problem, I use NIS at local and things are
going fine.
BTW, 1. does anybody know any FreeBSD mirror site in PRChina has versions
greater than 2.1.0? 2. If I use a Linux box with shadow password as a NIS
server, can m FreeBSD box run NIS client fine (/etc/shadow->/etc/master.passwd)?

Weiyi Yang

 
 
 

Routing on a dual-homed pc

Post by Pigg » Sat, 15 Mar 1997 04:00:00




> : I am using FreeBSD 2.1.0 on a dual-homed pc, one ethernet card (ed0) for
local
> : network xxx.xxx.22.0 and another (ed1) goes to the internet xxx.xxx.228.0.
I
> : set the default route to my internet router at xxx.xxx.228.x. The links in
> : local (Windows 95s) is quite slow, except a Linux box. I think it might
because
> : it's because of wrong route settings. It seems that only one default route
is
> : allowed and I want to know if I can set different default route to each
> : ethernet card. I tried to use route add -net xxx.xxx.22.0 localhost (my
local)
> : but it doesn't work. (I used to use Linux on this pc and in Linux, just add
two
> : default route to different networks and everything goes OK.) I do not want
to
> : enable ip-forwarding and do not run routed. I read the 2.1.0 handbooks
> : and the FAQs but can not find how to do this. Thanks for any suggestions.
> : BTW, it does not seem like a dns problem, I use NIS at local and things are
> : going fine.
> : BTW, 1. does anybody know any FreeBSD mirror site in PRChina has versions
> : greater than 2.1.0? 2. If I use a Linux box with shadow password as a NIS
> : server, can m FreeBSD box run NIS client fine

(/etc/shadow->/etc/master.passwd)?

Quote:

> Have no idea what your saying...

> FBSD 1.1.5.1 and up work fine with multiple interfaces.
> You do not add route lines (thats why route add -net xxx.xxx.22.0 localhost
> did not work)

> Basically make your default to the internet.
> and it works perfectly, you can't flub it up.

> Now if you have machines on 22.0 that want access to 228.0
> then you MUST turn on ip.forwarding or it will not work.

> Risner

I think I'll need to make thing clearer.

1. I have two ethernet card on a Freebsd box pc, ed0 to internet ed1 to
local.

2. I found that the local connection is slow and not reliable, while the
internet connection works perfectly.
3. I do not know why, and tried adding static routes and fails.

4. As another case which might has relation with this problem, I also met
some problem during installation. I use ftp installation from a site
inside China. When I set internet-connected netcard to ed1 and local to
ed0, the installation always fails. And the system auto-load some
interfaces which I did not assign, like ppp connection via lpt0. When I
swtich back the ed0 and ed1 setting, it works but not reliable, often
break during the installation. I have to set ONE ed0 to the internet
connection and disabled the ed1, and thus the systems works fine. It
should not be my pc or netcards' problem, since I have running Linux
1.2.x and Linux 2.0.x on it for more than a year and everything works
fine.

Thanks for any further suggestions and best regards,


Department of Computer Science,
Harbin Inst of Tech,Harbin, Heilongjiang 150001, PRChina.

 
 
 

Routing on a dual-homed pc

Post by N Fun » Wed, 19 Mar 1997 04:00:00



Quote:> I think I'll need to make thing clearer.

> 1. I have two ethernet card on a Freebsd box pc, ed0 to internet ed1 to
> local.

> 2. I found that the local connection is slow and not reliable, while the
> internet connection works perfectly.
> 3. I do not know why, and tried adding static routes and fails.

I had a similar problem recently while trying to set up a dual-homed PC;
interface to the internet was fine but a ping to the next machine on the
LAN took forever.  It turned out that there was a conflict between one of
the ethercard's IRQ with another device on the system.  I would suggest
checking for IRQ conflicts first.

Quote:> 4. As another case which might has relation with this problem, I also met
> some problem during installation. I use ftp installation from a site
> inside China. When I set internet-connected netcard to ed1 and local to
> ed0, the installation always fails. And the system auto-load some
> interfaces which I did not assign, like ppp connection via lpt0.

This normal.  The PPP is in case you want to use your modem to dial out
and ftp while the lpt0 is (I believe) in case you want to use the parallel
port to download stuff.

Quote:> When I swtich back the ed0 and ed1 setting, it works but not reliable,
> often break during the installation. I have to set ONE ed0 to the
> internet connection and disabled the ed1, and thus the systems works
> fine. It should not be my pc or netcards' problem, since I have running
> Linux 1.2.x and Linux 2.0.x on it for more than a year and everything
> works fine.

That seems normal to me.  Just configure ONE of your ethernet interface to
download the stuff. After which, you are given a chance to configure other
interfaces.  It should work after that.

Hope that helps.

N. Fung

 
 
 

1. static routing problem on dual-homed firewall

We are using RedHat Linux 5.0 on an Intel box as a dual-homed firewall.
The machine has one network card connected to our internal network, and
the other connected to a cable modem that connects us to the Net.  The
server is running the latest version of socks5, and the PC's on our
internal network are running sockscap32.
Everything had been working fine, but sometime since the server was last
rebooted (2 months ago) our static routing table got changed.  (I
suspect that one of our power users ran the netcfg utility and
inadvertantly caused /etc/sysconfig files to be modified.)  Here's what
happens:  machines on the internal network can access the Linux box.
These same machines can access the outside world through the linux box
using sockscap32/socks5.  The linux box can ping machines on the
internal network and the Internet.  The problem is the linux box cannot
access ITSELF.  If you are logged into the server, and you attempt to
access the server itself with any standard network services (ie. ping,
telnet, ftp, etc.) you get "Network unreachable" errors.  The real
problem with this weirdness is that if you try to access the pop3/http
services on the linux box from the internal network using socksified
applications, the access attempts fail, since the request goes from the
PC to socks5 on the server, which then tries to direct the request to
the server itself, and poof - Network unreachable.  I'm sure it's
related to the fact that there are two network cards in the machine (and
thus multiple interfaces).  BTW packet forwarding is disabled (a
requirement by our network's ISP).  Everything had been working before
we rebooted the machine and the changes to networking files kicked in.
Here is our /etc/sysconfig/static-routes file with IP's changed to
words:

eth0 net 0.0.0.0 netmask 255.255.255.0 gw EXTERNALROUTER
eth0 net EXTERNALNET netmask 255.255.255.0 gw EXTERNALROUTER
eth1 net INTERNALNET netmask 255.255.255.0 gw INTERNALROUTER
eth1 net SISTERNET netmask 255.255.255.0 gw INTERNALROUTER
eth1 net 0.0.0.0 netmask 255.255.255.0 gw EXTERNALROUTER

"eth0" is the NIC that is connected to our cable modem to provide the
Internet connection.  "eth1" is connected to the internal network.
SISTERNET is a second subnet that we are connected to with a T1.  I know
there's probably a dumb mistake in the static-routes file, and if
someone could enlighten me I'd appreciate it.

-Terry

2. Changing System name ?

3. dual-homed routing: DSL + backup modem interfaces?

4. 2.2.5 doesnt recognize my SMC Ultra ethernet card

5. Routing Dual-Homed Network to Share Network Resources

6. ? quicktime/avi generator

7. Benefits of dual-homed firewall for home network?

8. .htaccess file permission problem

9. Dual homed, non-routing Linux configuration

10. simple routing on dual homed Fedora 6

11. dual homed web server routing

12. Dual Homed System and Routing

13. Linux Dual Homed route config help for Internet intranet