標題:
[轉貼]Cisco & Extreme L3 Switch VLAN port mirror設定
[打印本頁]
作者:
chun
時間:
2009-3-17 16:50
標題:
[轉貼]Cisco & Extreme L3 Switch VLAN port mirror設定
http://nsysumis94.pixnet.net/blog/post/13798028
VLAN
在網路管理實做中,常常使用VLAN(Virtual LAN)將同一台(或者是一群Trunk的switch)機器上面的Port達到像實體網路(LAN)一般的切割,以下圖為例:
我 將這台Switch上面分割成兩個VLAN(VLAN 1與VLAN 2),如此一來,VLAN 1與VLAN 2上面就成了兩個互相獨立的LAN,可接上不同的網路,抑或者可接上同一台Router的兩個介面,各分配一個subnet使用,以上是port- based VLAN概念大致講解,其他還有taged VLAN等,通常我使用VLAN的原因多半是出於安全性考量,可將不同用途的各式網路切割成幾個VLAN分開來管理,eg.有線、無線以及網管分成3個 VLAN。
Mirror
除了VLAN之外,Mirror是另外一個可以幫助我們管 理網路的好方法,我們可以將整個VLAN或者某幾個特定Port的流量複製一份到機器上的某一個port,再將一些監控設備像是IDS或者是 sniffer-based流量監控軟體接在這些port上面來監控網路狀態,如上圖範例就是將VLAN 1的流量複製一份到23跟24port。
由 於這幾天都在玩Cisco 3750跟Extreme summit 48si,所以就來寫一下如何Config VLAN跟Port mirror好了,Cisco 3750值得一提的是,Cisco 3750支援port isolate,也就是說當每個Port都打開port isolate之後,各個port之間就不會有流量了,當然UP LINK是不能打開port isolate不然每個port就自己玩自己就好啦(為了這個笨問題搞了我一天@@),如此一來,在Switch環境下面常用的ARP Spoofing攻擊,在這樣的環境下是無法生效的,算是對ARP弱點的一個Solution,Port isolate的config方式如下(將1-23各port流量獨立):
cisco>enable
cisco# config terminal
cisco(config)# interface range gi1/0/1-23
cisco(config int-rang)#switch-ports protected
大致上是這樣,憑印象打的,錯了就自己翻一下help,大概就是這樣。
Extreme 比較令我印象深刻的是,Exetreme的指令比較直覺,而且還可以用英文命名VLANㄟ,真的是不賴,但是我用的這台Extreme的port isolate功能不太實用(畢竟人家是routing switch做L2的事情有點浪費),所以這邊就不提了。
Cisco 3750設定(default VLAN是VLAN 1)
Switch(config)# vlan 2 //建立VLAN 2
Switch(config-vlan)# exit
Switch(config)# int range gi1/0/1-22 //設定1-22 port
Switch(config-in)# switch-ports access vlan 2 //把1-22 port加到VLAN 2下面
Switch(config-in)# exit
Switch(config)# monitor session 1 source vlan 2 both //把vlan2的rx tx流量當作來源
Switch(config)# monitor session 1 destination interface gi1/0/23-24 //把剛剛的source流量吐給port 23跟24
如果port是不連續的話可以使用",(逗號)"來分隔,eg. gi1/0/23 , 25
Extreme summit 48si設定
create vlan Test1
create vlan Test2
configure "Test1" add port 1-12
configure "Test2" add port 13-24
enable mirroring to port 25
configure mirroring add vlan "Test1"
Extreme summit這台好玩的部分還有Routing的設定,等玩熟再來寫心得
作者:
chun
時間:
2009-3-17 16:57
標題:
[轉貼]
http://ithelp.ithome.com.tw/question/10006716
對Cisco而言,VLAN Interface就是Switched Virtual Interface。
假設你的Switch切了兩個VLAN,為了使你的Switch可以在兩個VLAN間進行路由,就必須在VLAN上建立SVI。
例如在先在Switch上,切割兩個VLAN:
vlan database
vlan1
vlan2
將gi0/1-gi0/6分配到VLAN1
interface range gi0/1 - gi0/6
switchport mode access
switchport access vlan1
將gi0/7-gi0/12分配到VLAN2
interface range gi0/7 - gi0/12
switchport mode access
switchport access vlan2
設定SVI的IP
interface vlan1
ip address <interface_ip> <subnet_mask>
interface vlan2
ip address <interface_ip> <subnet_mask>
設定VLAN間的路由
ip route <net_ip> <subnet_mask> <gateway_ip>
歡迎光臨 百利工頭 (http://bb.pc104.tw/)
Powered by Discuz! 6.0.0