Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 1995 11:16:07 +0100
From:      jg@euronet.nl (Jan_Guldemond)
To:        questions@FreeBSD.org
Subject:   Routing two ethernets
Message-ID:  <199503161016.LAA10882@mail.euronet.nl>

next in thread | raw e-mail | index | archive | help
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                   <no name>
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<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 193.78.175.65 netmask 0xffffffc0 broadcast 193.78.175.127
	ether 08:00:00:19:67:32 
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 65532
	inet 127.0.0.1 netmask 0xff000000 
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> 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<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 193.78.175.66 netmask 0xffffffc0 broadcast 193.78.175.127
	ether 00:00:1b:4f:b9:38 
ed1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 193.78.175.129 netmask 0xffffffc0 broadcast 193.78.175.191
	ether 00:00:1b:4f:bd:fc 
lp0: flags=810<POINTOPOINT,SIMPLEX> mtu 1500
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 65532
	inet 127.0.0.1 netmask 0xff000000 
sl0: flags=9010<POINTOPOINT,LINK0,MULTICAST> mtu 552
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> 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!!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503161016.LAA10882>