DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th October 2011
Pjoter's Avatar
Pjoter Pjoter is offline
Shell Scout
 
Join Date: Sep 2008
Posts: 92
Default Routing through subnets

Hello all !

I have small problem as I don't use often pf and IT related tools though I set up a print server on OpenBSD.

I need to create WIFI subnet using some WIFI router.

Here is topology of how it looks like:


Code:
192.168.1.1 (Gate)->192.168.0.113 (OpenBSD server)->10.0.1.1 (WIFI router)->10.0.1.100 (WIFI router client)

So 192.168.0.113 on ral0 is in the same WIFI network as 192.168.1.1.
From 192.168.0.113 on vr0 (ethernet) I connect to WIFI router (what ip to give on vr0? 192.168.0.114 or bridge vr0 with ral0?)
10.0.1.1 WIFI router is AP for my clients, i.e. 10.0.1.100. Should I configure somehow that WIFI router like gate adress?

Do you know how to configure through PF that 10.0.1.100 will send and receive packets thorough 192.168.0.113 and finally 192.168.1.1?


If you have some similar setup for two subnets I would appreciate it (just a sketch so I understand how it works).

Thank you for your help.

Piotr.

Last edited by Pjoter; 4th October 2011 at 10:03 AM. Reason: Code tags
Reply With Quote
  #2   (View Single Post)  
Old 4th October 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
So 192.168.0.113 on ral0 is in the same WIFI network as 192.168.1.1.
I do not understand what you mean by this. Is the netmask for the subnet on vr0 (192.168.0.113) for a /24 network (255.255.255.0), or is it for a wider subnet?
Quote:
From 192.168.0.113 on vr0 (ethernet) I connect to WIFI router (what ip to give on vr0? 192.168.0.114 or bridge vr0 with ral0?)
I think you are confused....you have certainly confused me. If I understand what you have written, you have two NICs -- vr0 and ral0, and they will be two separate subnets: 192.168.1/24 (perhaps) and 10.0.1/24. Now, you want to know how to configure this?

1. Set your OpenBSD system to be a router (also called a "gateway") by enabling IP forwarding as described in FAQ 6.2.7.

2. Either add a route to your ISP gateway device for the 10.0.1/24 network through 192.168.0.113, or provision your OpenBSD system to use Network Address Translation (NAT) when it routes packets to/from the 10.0.1/24 subnet. This latter requires the use of PF. If this were my topology, I would add a route to the gateway device so it knows how to reach 10.0.1.x addresses. NAT would then be unnecessary.

-----

If this is not what you were looking for, please be more clear when you ask again.
Reply With Quote
  #3   (View Single Post)  
Old 4th October 2011
Pjoter's Avatar
Pjoter Pjoter is offline
Shell Scout
 
Join Date: Sep 2008
Posts: 92
Default

Hi Jggimi,

sorry for confusion: 192.168.0.113 is in the same network- my typo.

I will experiment with ISP router and come back once I find solution- I prefer to solve it in hardware layer rather than software.

Thanks.

Piotr.
Reply With Quote
  #4   (View Single Post)  
Old 4th October 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
192.168.1.1 (Gate)->192.168.0.113
You have said that 192.168.1 and 192.168.0 are the same network twice, now. While that is possible, it is likely you are mistaken, since you have a gateway between them. I asked you about the network you control, 192.168.0, and if it had a /24 netmask. You did not reply to that question. As you asked about giving your wireless NIC an address on your wired NIC's subnet, I think you may be confused about IP subnetting generally.

See if the descriptions in http://en.wikipedia.org/wiki/Subnetwork provide you with additional insight.
Reply With Quote
  #5   (View Single Post)  
Old 5th October 2011
Pjoter's Avatar
Pjoter Pjoter is offline
Shell Scout
 
Join Date: Sep 2008
Posts: 92
Default

Hi Jiggmi,

yet again I do confirm: we are talking about 192.168.0.1 and 192.168.0.113.

So the same network. I am sorry.

Yes I am confused about networks

Thanks.

Piotr.
Reply With Quote
  #6   (View Single Post)  
Old 5th October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Pjoter View Post
yet again I do confirm: we are talking about 192.168.0.1 and 192.168.0.113.

So the same network. I am sorry.

Yes I am confused about networks
By definition, routers separate uniquely identifiable networks.

One of the better subnetting guides is the classic 3Com whitepaper:

holdenweb.com/static/docs/3comip.pdf

Traditionally, problems existed with how exponents were formatted in this document, but apparently someone has corrected how exponents are rendered in this version.

Other subnetting guides can be found on the Internet, but many don't go into much detail.

Unfortunately, configuring routes is highly dependent upon understanding subnets. Studying the above document is a very good start on the subject.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
routing over a tunnel n0ah NetBSD General 0 22nd October 2009 05:20 PM
double nat routing giagni General software and network 5 22nd May 2009 07:10 PM
dhcpd and multiple subnets vdubjunkie OpenBSD General 5 11th March 2009 11:02 PM
Routing and routing some more! Weaseal FreeBSD General 1 19th August 2008 01:39 PM
OpenBSD and routing cchapman OpenBSD General 5 25th July 2008 05:55 PM


All times are GMT. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick