From owner-freebsd-questions Sun Apr 30 19:45:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from stimpy.sasknow.com (stimpy.sasknow.com [207.195.92.132]) by hub.freebsd.org (Postfix) with ESMTP id 7E0D337B5E5 for ; Sun, 30 Apr 2000 19:45:45 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by stimpy.sasknow.com (8.9.3/8.9.3) with ESMTP id UAA00475; Sun, 30 Apr 2000 20:46:10 GMT (envelope-from ryan@sasknow.com) X-Authentication-Warning: stimpy.sasknow.com: ryan owned process doing -bs Date: Sun, 30 Apr 2000 20:46:10 +0000 (GMT) From: Ryan Thompson To: Fabio Miranda Cc: FreeBSD-questions@FreeBSD.ORG Subject: Re: Routing questions over leased lines In-Reply-To: <20000430235226.4630.qmail@web122.yahoomail.com> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Fabio Miranda wrote to FreeBSD-questions@FreeBSD.ORG: > Hi: > I have a FreeBSD host that is connected to a leased > line using a internal routing card (etinc et5025-16). > The other end is a cisco 2905 and in order to connect > to it, i need to set up my card(eth0) to belongs to > same cisco's subnet/netmask,etc.: > ifconfig eth0 inet 209.90.252.105 209.90.252.106 > netmask 255.255.255.248 > Now, it works good, i have full access to > 209.90.255.104 network ( i can telnet/finger/etc to ^^^-- surely a miskey? 255 => 252? > the cisco router). And what is the address of the Cisco router? Usually the convention is to use the FIRST available IP in the block... So, unless your ISP is being a bit deviant, this would be 209.90.252.105. This *isn't* a hard fast rule, but, if you happen to be blindly using the .105 address when it should belong to your uplink router, you're going to have some moderately serious problems :-) Your ISP should have provided you with all this information, anyway... So I won't waste any more breath here. Just a fair warning and a point to consider. > But, i want to have access to internet to the same > host and its lan, i have assigned 5 ips: Perhaps a slight language difference between us exists, but do you mean to say that your ISP has assigned you these 5 IP addresses? If you're assigning them to yourself ("i have assigned..."), you'll probably earn yourself a mildly annoyed ISP and a broken configuration. If what you want are private addresses for some internal reason, use an RFC 1918 network from 10.0.0.0/8, 172.16.0.0/16, or 192.168.0.0/16. "Borrowing" routable public IPs is a Bad Idea :-) If I misread your comment, there, and your ISP has indeed assigned you another block of addresses, you WILL need to add an alias for this host (see my note below). > 209.90.252.113 to 118 BUT they belongs to other > network; subnet: 209.90.252.112 > the questions is, How can i set up my host for have > access to the others ips or at least one IP? Unless I'm missing something in your description, this is just: # ifconfig eth0 alias 209.90.252.113 netmask 0xfffffff8 Note that this uses ALL of the IPs on the higher network. Using ONE only is quite messy and (to be done correctly) probably requires NAT on the router with a static route to an inside address at the destination machine. # route add -net 209.90.252.112 netmask 0xfffffff8 127.0.0.1 ...may also be helpful depending on your host configuration Why you would want two networks of 8 hosts each is beyond me. For ease of configuration, you should ask your ISP to move your network to the start of a /28 boundary (or larger) so you can have ONE block of 16 addresses. IMHO, a bit of network renumbering is worth the pain in the neck saved from unnecessarily routing two separate networks... Especially tiny subnets on non-octet boundaries. > The idea of my ISP network topology, is that they give > me one ip, that allow to their wan, and other 5 ips > that allow to my new network; and i dont have a router > (it's "internal" on the host), so, I need my host to > belongs to my isp WAN (209.90.252.104), and belongs to > my network (209.90.252.112). But your ISP is responsible for routing 209.90.252.112/29. If you do indeed have privileges to use those addresses, they should have routed those addresses to your machine already, making the setup for THIS network the same as the setup for the PREVIOUS network. So, the differentiation you make here between "ISP WAN" and "MY NETWORK" doesn't make sense. Please explain what you mean, here. Further, 209.90.252.104 is NOT a valid host address in this case. Since you are using a netmask of 0xfffffff8, ALL of the bits in the address comprise the network portion of the address. Meaning, this is your NETWORK address, not a host address. The same applies for 209.90.252.112. 209.90.252.111 and 209.92.252.119 are ALSO unusable, as they are your subnet broadcast addresses. Don't assign any of these addresses to hosts! > How is this posible? > Thanks alot. > p.s. if it's posible with routed, how can i set up > /etc/gateways? i havent make it possible. routed is perhaps overkill.. It sounds like whatever it is you're doing can be accomplished easily with static routes and possibly NAT (which, in itself, is probably overkill, too.. but it works so well most of the time :-). --------- I hope I've been able to help... I'm not sure if I'm understanding your problem correctly, so, if I haven't answered your question, please clarify the questions that I raised in this reply so I (we) can achieve a better understanding of your situation. > > thanks alot freebsd team. > > Virtually yours, - Ryan Thompson -- Ryan Thompson Systems Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message