PLEASE Help on two network cards in server

Hi all,

(Sorry my spelling Im danish)

We have a 10.4.5 server with 2 network cards in it. How does I get the server to route betwin the two networks so that mac's on net 1 (en0) can see mac's and printers on net 2 (en1) and visa versa

The mac's on net 1 can see and use the server (but not print on net 2) The mac's on net 2 cant see or use the server!

The mac's on net 1 get backuped by Retospect on the server. Retospect can't see the mac's on net 2

How does I get this to work?

G5 1.8 Dual - 2GB RAM, Mac OS X (10.4.5)

Posted on Feb 27, 2006 7:39 AM

Reply
14 replies

Feb 27, 2006 9:22 AM in response to Dan Henriksen

There isn't enough information in your post to answer your question fully.

In general you need to enable IP forwarding on the server. That way it will forward packets from one NIC over the other NIC:

sudo sysctl -w net.inet.ip.forwarding=1

However, that's only part of the story. Devices on each network need to know how to get to the other network, and that's usually done by editing the routing table on each system. Without knowing the network addresses in use on each side of the server I can't tell you what changes you need to make.

In addition it's not common for a printer to have an option to manipulate the route table in this way. It may be easier/necessary to setup a print server on the Mac that can accept print jobs from nodes on net1 and print them on the printer on net2.

Feb 28, 2006 12:16 AM in response to Camelot

"sudo sysctl -w net.inet.ip.forwarding=1"

That will start forwariding immediately but woun't survive a reboot.

In Tiger Server Admin NAT setup you can make this permanent by choosing "start Ipforwarding Only".

(Or by adding a line to /etc/hostconfig:
IPFORWARDING=-YES-

Or by adding a new file /etc/sysctl.conf
with this line in it:
net.inet.ip.forwarding=1)


"Devices on each network need to know how to get to the other network, and that's usually done by editing the routing table on each system."

Not necessary. What's necessary is a static route in each Internet router that use the server IP for each LAN as the gateway/router for the other LAN.

Example network 1: 192.168.100.0/24
Internet router 192.168.100.1
Server IP for that LAN 192.168.100.254
Static route in Internet router: 192.168.200/24 gw 192.168.100.254


Example network 2: 192.168.200.0/24
Internet router 192.168.200.1
Server IP for that LAN 192.168.200.254
Static route in Internet router: 192.168.100/24 gw 192.168.200.254


"In addition it's not common for a printer to have an option to manipulate the route table in this way"

Correct, but you need to add the correct gw/router and netmask to the printer IP settings for this setup. This is sometimes achievable via Telneting to the printer in question to set it up (older Apple printers).


For performance reason it could be better using a static route in each machine if the internet router doesn't send out route redirect packets.

Some DHCP servers should be able to send out a static route to it's clients with the rest of the IP info thus making it easier to provide each machine with a static route.

Feb 28, 2006 1:07 AM in response to Camelot

print2people:~ dan$ netstat -rn
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 165 333 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 10 3547 lo0
169.254 link#4 UCS 0 0 en0
192.168.1 link#4 UCS 4 0 en0
192.168.1.1 0:6:b1:1e:63:14 UHLW 4 0 en0 814
192.168.1.2 0:12:3f:71:7b:2b UHLW 1 80 en0 1047
192.168.1.50 0:14:51:63:8:52 UHLW 2 1174 en0 1135
192.168.1.88 127.0.0.1 UHS 3 273 lo0
192.168.1.176 127.0.0.1 UHS 0 22 lo0
192.168.1.255 link#4 UHLWb 4 28 en0

Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UH lo0
fe80::%en0/64 link#4 UC en0
fe80::230:65ff:feda:89e2%en0 0:30:65:da:89:e2 UHL lo0
fe80::%en1/64 link#5 UC en1
fe80::211:6bff:fe33:4a14%en1 0:11:6b:33:4a:14 UHL lo0
ff01::/32 ::1 U lo0
ff02::/32 ::1 UC lo0
ff02::/32 link#4 UC en0
ff02::/32 link#5 UC en1
print2people:~ dan$

Mar 1, 2006 6:17 AM in response to Dan Henriksen

"http://docs.info.apple.com/article.html?artnum=106453"

This is for AppleTalk routing, I would stay away form it.

Use IP instead (LPR, Bonjour, RAW), maybe using the server as a printserver from one of the LANs (the one where the printers are not) otherwise use direct printing to the printer/RIP.

And the netstat -rn output above wasn't done on the server was it?

Mar 3, 2006 10:44 PM in response to Leif Carlsson

Ive got a similiar problem, and in Terminal, on my Mac mini, setup with two interfaces (yes, really), I can ping one interface to another: en0 set to LAN and en1 set to WAN.

The problem is that the WAN link from the server cant ping anything other than the other interface (built in ethernet - en0).

using Terminal to try to ping from one specific interface to a valid/reachable IP, one tries to use the -L switch so as to tell the hardware from which interface the packets will come from (I believe this is right but please correct me if Im wrong). So, reasonably interpreting the man page for ping, one should use ping as follows: (here I try to ping my WAN gateway)

VOTSERVER:~ chrisc$ ping -I en1 70.141.57.222
ping: invalid multicast interface: `en1'
VOTSERVER:~ chrisc4

What am I missing here ?

I checked my /etc/hostconfig file and it already has the

IPFORWARDING=-YES-

by default.



Mac mini Mac OS X (10.4.5)

Mar 3, 2006 11:48 PM in response to Dan Henriksen

"Yes I copied it from the Terminal on the server and pasted from there? Isn't it as it should be?"

There's only mentioning of en0 in there. You can't have en1 configured correctly.

To solve your problems - start by setting en1 up (and paste a new netstat -rn here afterwards). Don't enter a default gw/router (or nameserver) info for en1.

In Retrospect (at least in the "server" version) you can setup/add remotes by IP-number or "configure a subnet for broadcast".

Mar 3, 2006 11:57 PM in response to Chris Chamberlain1

I've never used any flags when using ping.

If the interfaces are "lined up" correctly: WAN interface on top of the interface list in Network setup the computer will know what interface to use to send packets out on.

Make sure the LAN interface doesn't have the "router" field filled in (or if you have used "GW setup" has the same ip as the interface have).

There should only be one default gw.

Mar 6, 2006 2:36 AM in response to Dan Henriksen

That article is "overkill" for your setup.

It's not the server that needs extra routes it's the routers (or each client). If you configure two interfaces on different subnets (only one default gw/router) routing will work if IPFORWARDING=-YES- in /etc/hostconfig.

Really, why not make just one subnet out of it and use the different internet routers on the "right" computers? Static IP number machines use the fast Internet and DHCP setup machines the "slow"?

If still you want to add routes to all clients you need to have them activated at boot. StartupItems still work under Tiger but you might prefer a Launchd script.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

PLEASE Help on two network cards in server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.