2010年5月14日 星期五

LEAF VLAN 和 Cisco 3750 交換器建立10 個以上獨立網段的防火牆應用

LEAF 是使用電腦設備作為防火牆的軟體,所能提供的網段數量取決於實體的網路卡界面,但一般電腦設備不管以任何方式增加網路卡,能提供10個以上的網路卡界面的硬體成本所費不低,要提供 20,30 以上的網段更是不容易。

在LEAF 上應用 VLAN 技術,並搭配 Cisco 交換器 VLAN 功能,可以較少的實體網路界面來達成所需。

以下使用 Cisco 3750 交換器及一組網路界面的LEAF,實作兩個網路界面的防火牆架構

線路連接方式:
LEAF-eth0 <--> Cisco 3750-port 24
192.168.6.x <--> Cisco 3750-port 6
192.168.7.x <--> Cisco 3750-port 7

Cisco 3750 交換器設定如下:
interface GigabitWthernet1/0/6 設定如下
switchport access vlan 6
switchport mode access

interface GigabitWthernet1/0/7 設定如下
switchport access vlan 7
switchport mode access

interface GigabitWthernet1/0/24 設定如下
switchport trunk encapsulation dot1q
switchport mode trunk

LEAF 上的設定如下:
1.安裝 VLAN 相關程式 vlan.lrp

2.載入 802.1q模組 (位置 2.4.34/kernel/net/8021q/8021q.o)

3.建立 VLAN 6,VLAN 7,並給定 IP
ip link set eth0 up

vconfig add eth0 6
ip link set eth0.6 up
ip addr add 192.168.6.1/24 dev eth0.6

vconfig add eth0 7
ip link set eth0.7 up
ip addr add 192.168.7.1/24 dev eth0.7

4.其他
1.LEAF 上設定(如SHOREWALL),有關網路界面裝置名稱的使用,使用 eth0.6、eth0.7,勿使用 eth0
2.eth0.6及eth0.7為VLAN 界面,必須透過 Cisco 3750 Port 24(trunk設定支援802.1Q協定) 才能讓封包通過,不能直接連接到一般的HUB。
3./etc/network/interfaces 中,直接使用 eth0.6、eth0.7指定開機時的IP設定,不用使用vconfig建立vlan

沒有留言: