Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 18:00:46 -0400
From:      "Joseph Gleason" <clash@tasam.com>
To:        "Peter Warrick" <peter@guest-tek.com>, <freebsd-net@FreeBSD.ORG>
Subject:   Re: Routing. :)
Message-ID:  <000901c10e42$c507fcf0$0b2d2d0a@battleship>
References:  <200107162141.PAA27335@mail.guest-tek.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This very much sounds like you need to learn IP subnetting.  I highly
recommend the Cisco Press CCNA book.  I can dig up ISBN number if you want.

There are very few cases that call for a subnet mask of 255.255.255.255.

You probably want 255.255.255.0

You can specify the subnetmask on the command line:
ifconfig xyz0 alias 1.2.3.1 netmask 255.255.255.0


IP subnetting and routing is in my mind one of those things you can't just
pick up.  You really need some training or reading some text in addition to
hands on experience to really know what is going on.


----- Original Message -----
From: "Peter Warrick" <peter@guest-tek.com>
To: <freebsd-net@FreeBSD.ORG>
Sent: Monday, July 16, 2001 17:44
Subject: Routing. :)


> I hope I am not sending to the wrong address but here goes. :)
>
> I need to be able to alias an IP and route to another IP. For example..
> I have a computer behind my BSD server with an IP of 1.2.3.4 and it
> requires a gateway IP of 1.2.3.1. So I simply issue an ifconfig en1
> 1.2.3.1 alias. But this results in the entire 1.x.x.x subnet to become a
> part of my server's network.
>
> I've been able to do this in Redhat Linux where I alias the gateway and
> then route the second address (1.2.3.4) with a gateway of 0.0.0.0 and a
> netmask of 255.255.255.255 on the en1 (or for linux the eth1) network.
> This results in just the 1.2.3.1 and 1.2.3.4 IPs existing on my network
> and it will still go out to 1.4.5.3 (just a random example IP) on the
> internet through en0 (If I have natd enabled).
>
> To give you an idea of what my Redhat Linux calls are to make this
> work.. They are..
>
> ifconfig eth1:0 1.2.3.1 netmask 255.255.255.255
> route add -host 1.2.3.4 dev eth1:0
>
> In BSD the closest thing I have tried to this is...
>
> ifconfig en1 1.2.3.1 netmask 255.255.255.255 broadcast 1.255.255.255
> alias
> route add -host 1.2.3.4 -interface en1
>
> I added the broadcast to the ifconfig line in BSD because I noticed in
> linux my broadcast was 1.255.255.255 by default and BSD wasn't doing
> this.
>
> I hope this makes a little sense but in summary I wish to just bring 2
> IPs into my network and route them so they can talk to each other
> without having to bring the entire subnet on to my network.
>
> Thanks for any help.. I've been struggling with this for the past week
> without success. Its frustrating that I know how to do it on Linux but
> not BSD. :(
>
> Pete
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
>


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000901c10e42$c507fcf0$0b2d2d0a>