From owner-freebsd-questions Thu Mar 16 02:16:17 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA05729 for questions-outgoing; Thu, 16 Mar 1995 02:16:17 -0800 Received: from mail.euronet.nl (mail.euronet.nl [193.67.112.150]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id CAA05723 for ; Thu, 16 Mar 1995 02:16:13 -0800 Received: from p314.euronet.nl (p314.euronet.nl [193.67.112.109]) by mail.euronet.nl (8.6.4.1/A/UX 3.1) with SMTP id LAA10882 for ; Thu, 16 Mar 1995 11:16:07 +0100 Date: Thu, 16 Mar 1995 11:16:07 +0100 Message-Id: <199503161016.LAA10882@mail.euronet.nl> X-Sender: jg@mail.euronet.nl Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: questions@FreeBSD.org From: jg@euronet.nl (Jan_Guldemond) Subject: Routing two ethernets X-Mailer: Sender: questions-owner@FreeBSD.org Precedence: bulk Hi all, Here's how I got the routing working. First of all the configuration of our network(s) FreeBSD FreeBSD MS-Windows f. workgr. 3.11 host.jcn.nl router.jcn.nl netmask 0xffffffc0 netmask 0xffffffc0 netmask 0xffffffc0 193.78.175.65 193.78.175.66 193.78.175.129 193.78.175.128 | | | | \--------------------/ \-----------------/ First the configuration of the host.jcn.nl: *** ifconfig -a: ed1: flags=8863 mtu 1500 inet 193.78.175.65 netmask 0xffffffc0 broadcast 193.78.175.127 ether 08:00:00:19:67:32 lo0: flags=8009 mtu 65532 inet 127.0.0.1 netmask 0xff000000 sl0: flags=c010 mtu 552 sl1: flags=c010 mtu 552 *** netstat -rn: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 193.78.175.66 UGSc 0 0 ed1 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.78.175.64 link#1 UC 0 0 ed1 -4672 193.78.175.65 8:0:0:19:67:32 UHLW 0 88 lo0 193.78.175.66 0:0:1b:4f:b9:38 UHLW 5 82 ed1 1032 Then the configuration of router.jcn.nl: *** ifconfig -a: ed0: flags=8863 mtu 1500 inet 193.78.175.66 netmask 0xffffffc0 broadcast 193.78.175.127 ether 00:00:1b:4f:b9:38 ed1: flags=8863 mtu 1500 inet 193.78.175.129 netmask 0xffffffc0 broadcast 193.78.175.191 ether 00:00:1b:4f:bd:fc lp0: flags=810 mtu 1500 lo0: flags=8009 mtu 65532 inet 127.0.0.1 netmask 0xff000000 sl0: flags=9010 mtu 552 sl1: flags=c010 mtu 552 *** netstat -rn: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.78.175.64 link#1 UC 0 0 ed0 -4730 193.78.175.65 8:0:0:19:67:32 UHLW 1 109 ed0 962 193.78.175.66 0:0:1b:4f:b9:38 UHLW 1 8 lo0 193.78.175.128 link#2 UC 0 0 ed1 -4730 193.78.175.129 0:0:1b:4f:bd:fc UHLW 1 35 lo0 The routing works fine: I can access the Windows station from host.jcn.nl and the host.jcn.nl from the WIndows station. Here's what I did: * Configured the ethernet-cards (.65, .66, .129 and .138) all with the netmask 255.255.255.192. The mask 255.255.255.128 also seems to work, but some of you told me that is not allowed to use a subnet-mask with all 0's or 1's. So I made a subnet mask with two bits, ans only use 01 and 10. So 50% of my class C-address is lost :-( * Enabled the routing on router.jcn.nl with 'sysctl -w net.inet.ip.forwarding = 1'. This enables the router function of this machine. I have a SLIP connection from the router.jcn.nl to my Internet-provider. I can't access external sources from the Windows machine. Because my provider doesn't know (yet) to route all information for 193.78.175.0 to that SLIP connection. It's a SLIP connection with a fixed IP-number (193.78.242.118), so its understandable that my provider doesn't know to route 193.78.175.0 to this connection. A leased line is comming up, so when that arrives we can connect the entire class C-network to the Internet using the leased-line. If you had any problems routing (like I did), I hope this helped. If not, feel free to ask!!