Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Feb 2002 06:15:58 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Jordan Breeding <jordan.breeding@attbi.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Problems setting up TCP/IP in 5.0-CURRENT...
Message-ID:  <3C628C1E.E68A972E@mindspring.com>
References:  <3C627FE2.5010809@attbi.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Jordan Breeding wrote:
> #ifconfig xl0 192.168.1.2 netmask 255.255.255.0
> #ifconfig xl1 192.168.1.3 netmask 255.255.255.0

This is bogus.  You are telling the machine that the 192.168.1
net exists on both xl0 and xl1.  It exists on only one or the
other of them.  To which interface do you expect it to send a
packet destined for 192.168.1.7?

> #route delete -net 192.168.1.0
> #route add -net default 192.168.1.1
> #route add -net 192.168.1.0 -interface 192.168.1.3
> #netstat -r

This is still pretty bogus.  The 192.168.1.0 route is before
the other one, or it doesn't know how to frind the gateway
192.168.1.1, since it doesn't know which interface to write
to.


> This shows no problems at all and works whether I use the routing daemon
> or use static routes at boot up, however -current will not allow me to
> do the same thing that I have done above, instead I get the following:

[ ... ]

> bash-2.05a# ifconfig xl1 192.168.1.3 netmask 255.255.255.0
> ifconfig: ioctl (SIOCAIFADDR): File exists
> 
> The only thing which I can think of is that either a) it is a userland
> change in -current, or b) I was only ever running the GENERIC kernel for
> 4.5-RELEASE and never recompiled my kernel until I was compiling with
> -current source so maybe it is some option in the GENERIC config file
> for the -current source.  If it is b) could someone please tell me which
> option is causing this so that I may turn it back off.  I would really
> like to try and get this working exactly as I have in Linux, Solaris,
> FreeBSD 4.5-RELEASE.  Thanks for any help.

Change the netmask to 255.255.255.255 to tell it that it is a
point-to-point link.

If you want to build a bridge, then you need to turn on ip
forwarding (net.inet.ip.forwarding=1).

Really, you need to think through your network setup a bit
more; each interface needs to be on its own network, so if
you mask off the top parts using the netmask, no two interfaces
are equal.

-- Terry

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




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