Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Feb 2000 00:20:29 -0500
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        Barry Edwin <buttonhol@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Networking help...
Message-ID:  <20000222002029.C3426@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <200002220407.UAA23873@www.geocrawler.com>; from archiver@db.geocrawler.com on Mon, Feb 21, 2000 at 08:07:06PM -0800
References:  <200002220407.UAA23873@www.geocrawler.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 21, 2000 at 08:07:06PM -0800, Barry Edwin wrote:
> This message was sent from Geocrawler.com by "Barry Edwin" <buttonhol@hotmail.com>
> Be sure to reply to that address.
> 
>   Hi all. I'm a little unsure about the nitty-
> grittys of networking and need some advice.
>   I need a small network to look like this: 

Wh...

> (don't ask why)

Oh.

> /-----------           /---------------
> |  comp 1   |  10.0.0   |    comp 2     |
> | (win98)   |<--------->|   (FreeBSD)   |<-----
> | 10.10.0.2 |       xl0 | xl0: 10.0.0.1 | xl1  |
> -----------/           | xl1: 10.0.1.1 |      |
>                         ---------------/      |
>                                                |
> /-------------                                |
> | computer 2  |             /-----    10.0.1  |
> |   (win98)   |<----------  | hub |<-----------
> |  10.0.1.2   |             -----/
> -------------/                ^
>                                |
> /-------------                |
> | computer 3  |                |
> |   (win98)   |<---------------
> |  10.0.1.3   |
> -------------/
> 
> 1. I'm assuming that the above IP address
>    configuration above looks good.

It should work.

> 2. I tried to make all three clients in the same
>    subnetwork. However, when I did:
> 
>    'ifconfig xl0 inet 10.0.0.1'
>    'ifconfig xl1 inet 10.0.0.2'

You would have to have them on different networks by masking
appropriately... which would be hard for those two choices.

>    To the FreeBSD box, the routing table would
>    not show Link#2:
> 
>    Destination  Gateway   ...
>    127.0.0.1    127.0.0.1 ...
>    10.0      Link#1    ...
> 
>    Only when I configured xl0 and xl1 on two
>    different subnets, like my diagram, did I see
>    Link#2.
> 
>    Destination  Gateway    ...
>    127.0.0.1    127.0.0.1
>    10.0         Link#1
>    10.0.1       Link#2

Well... I hope you entered a netmask of 255.255.255.0. Doesn't
ifconfig(8) default to a 255.0.0.0 mask for an history class A net
like 10.0.0.0?

>    Why is this? Is it possible to have both nics
>    in a duel homed box be a part of the same
>    subnet? If not, why? If so, how?

Well, they are not on the same subnet are they? You might want to
consider setting up the FreeBSD box as a bridge(4) if you want to Win98
box to be on the same LAN as the others.

> 3. Is it better to use static routes in such a
>    small network or use routed?

The only route you need to set for this is the location of the default
router. Everything else takes care of itself.

> 4. I want Computer 2 to be able to ping 10.0.1.1, 
>                      to be able to ping 10.0.0.1,
>                  and to be able to ping 10.0.0.2. 

Don't we all?

>    What configuration settings do I need in
>    FreeBSD?
> 
>    Here's what I have in rc.conf:
> 
>    gateway_enable="YES" (I assume this allows
>                          traffic from xl0 to xl1)
>    ifconfig_lo0="inet 127.0.0.1 netmask
>                  255.255.255.0"

Make the mask 255.0.0.0 for that.

>    ifconfig_xl0="inet 192.168.0.1 netmask
>                  255.255.255.0"
>    ifconfig_xl1="inet 192.168.1.1 netmask
>                  255.255.255.0"

Thos are fine ignoring the line-wrap damage from your mailer.

>    Now adding the static routes, I did the
>    following:
> 
>    'route add 10.0.0.1 -interface xl0'
>    'route add 10.0.0.2 10.0.0.1'
>    'route add 10.0.1.1 -interface xl1'
>    'route add 10.0.1.2 10.0.1.1'
>    'route add 10.0.1.3 10.0.1.2'

Eep! Don't do that. You do not need to add any static routes. Just a
'defaultrouter' entry if ou have such a beast.

>    Here is what the routing table according to
>    'netstat -r' said:
> 
>    Destination  Gateway         ...  Netif  Expire
>    127.0.0.1    127.0.0.1       ...  lo0
>    10.0         Link#1          ...  xl0
>    10.0.0.1     0:50:4:d8:38:b3 ...  lo0
>    10.0.0.2     10.0.0.1        ...  xl0
>    10.0.1       Link#2          ...  xl1
>    10.0.1.1     0:50:4:d8:37:a1 ...  lo0
>    10.0.1.2     10.0.1.1        ...  xl1
>    10.0.1.3     10.0.1.1        ...  xl1
> 
>    When computer 2 is used to ping 10.0.1.1 (xl1)
>    I get this message:
> 
>    '/kernel arplookup 10.0.1.2 failed: host is
>     not on local network'
> 
>    on the FreeBSD box.
> 
>    When computer 2 is used to ping 10.0.0.1 (xl0)
>    Win98 ping says that the host is unreachable.
> 
>    Obviously I've made a mistake or left
>    something out.
>    Why do I get the arp lookup failure on xl1?
>    Why is the other subnet 10.0.0 unreachable
>    by 10.0.1?

'Cause your routing is totally messed up. You left your PC with no way
to get packets out. You route packets for 10.0.0.2 to 10.0.0.1, and
10.0.0.1 is our host... How do the packets get out?
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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