回文章列表
作者ychia.bbs@twolights.twbbs.org (ychia), 信區: 386bsd
標題[問題] NAT, DHCP on FreeBSD
時間伊甸˙園 (Mon Oct 30 15:37:32 2006)
轉信站: GIBBS!ccnews.ncku!news.ccns.ncku!news.mksh.phc!news.nsysu!news.cis.nctu
Origin: eden.math.nctu.edu.tw

我的主機上有三張網卡,兩張連 LAN 的 switch,一張連外。
在 pf.conf 是這樣配置的:

ext_if = "em0"              ext_addr = "1.2.3.4"
int1_if = "fxp0"            int1_net = "192.168.2.0/24"
int2_if = "fxp1"            int2_net = "192.168.3.0/24"


現在想要做到 LAN switch 上面的電腦,
一部份由我的主機動態分配(或靜態)虛擬IP,
另一部份用實體IP(client端自行設定/freebsd主機指派?)。

簡略的架構圖:

client1 (1.2.3.5)          |
client2 (1.2.3.6)          |   _________ fxp0  _________  em0
client3 (192.168.3.22)     |--|         |-----|         |-----[router]
client4 (192.168.2.11)     |  | switch1 |     | FreeBSD |
..                         |  |_________|     |_________|
..                         |                  /
..                         |                 /fxp1
...                        |   __________ __/
....                       |--|          |
.......                    |  | switch2  |
                           |  |__________|
    [LAN]


DHCP 分配虛擬 IP 和 NAT 我用 /usr/ports/isc-dhcp 和 PF (Freebsd 5.3) 達成了,
不過這樣實體 IP 就無法通過。

請問有辦法達成這樣的需求嗎?
能不能用類似 Linux 底下的 iptable 做到?  感謝

--
※Post by ychia         from 140.112.94.5            
  Eden.Math    伊甸˙園   twolights.twbbs.org/140.113.22.100
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻