




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
交換機(jī)的mac/vlanACL和VLANMAP
(2009-10-1700:28:31)
轉(zhuǎn)載
macaccess-listextendedmatch
vlan
filter
map
vlan-list
雜談
分類:cisco路由器和交換機(jī)置
SWITCH特有的macacl,匹配楨,不是匹配包
ipcef
misqos
macaccess-listextendedmaclistl
permit0001.0000.00010.0.00002.0000.00010.0.0
掩碼
permit0001.0000.00020.0.00002.0000.00020.0.0aarp
匹配對從主機(jī)0001.0000.0001到0002.0000.0001的流量。
顯然這是SW的ACL,如果在ROUTERI:,目的MAC肯定是接口MAC地址
class-mapmacclassl
matchaccess-groupmaclistl
matchvlan1020-3040
I
policy-mapmacpolicyl
classmacclassl
I
intfa0/24
service-policyinputmacpolicyl
macACL掩碼可換成host參數(shù)
?mac打頭
?都是extendacl
?最好采用host參數(shù),或any參數(shù),mac的掩碼非常麻煩
Switch(config)#macaccess-listextendedmaclistl
Switch(config-ext-macl)#permithost0001.0000.0001host0002.0000.0001
matchvlan(用于trunk口)
class-mapmatch-allvlan_class
matchvlan1020-3040
intfa0/24
service-policyinputtest
matchVLAN,10,20T030,40上的流量
一看就是用在trunk口
vlanmap是唯一過濾VLAN內(nèi)流量的工具
?VLANmap沒有方向性
?可以看出VLAN-MAP的優(yōu)勢,不管HOST連在哪個(gè)FE口上,只要屬于VLAN20-22,都
禁止??梢詮浹a(bǔ)接口ACL的缺陷(用戶換口)
將VLAN20-22中主機(jī)10.1.L32到4的WWW流量都drop,其他的轉(zhuǎn)發(fā)
ipaccess-listextendedhttp
permittcphost2host4eqwww
I
vlanaccess-mapmap210
matchipaddresshttp
actiondrop
I
vlanaccess-mapmap220
actiontoward
vlanfiltermapmap2vlan-list20-22
交換機(jī)802.lx
(2009-10-1700:11:01)
轉(zhuǎn)載
標(biāo)簽:
dotlx
system-auth
-control
port-control
auto
雜談
分類:cisco路由器和交換機(jī)配置
802.1X三大基本配置
ipcef
aaanew-model
radius-serverhost...
radius-serverkey...
aaaauthenticationdotlxdefaultgroupradius
dotlxsystem-auth-control802.lx全局enable
interfacefastethernetO/1
switchportmodeaccess
switchportaccessvlan5
dotlxport-controlauto接口enabledotlx
dotlxhost-modemulti-host允許一個(gè)端口認(rèn)證多臺(tái)host,指下聯(lián)了HLIBs
不支持802.lx的client,就被放入dotlxguestvlan
interfacefastethernetO/1
dotlxguest-vlan9把VLAN9設(shè)成guestvlan
如果認(rèn)證失敗,client被放入dotlxrestrictedvlan
interfacegigabitethernetO/1
dotlxauth-failvlan2
dotlxauth-failmax-attempts3認(rèn)證失敗3次,就被移入VLAN
arp表和mac表
(2009-10-1623:36:39)
轉(zhuǎn)載
標(biāo)簽:
mac-address
-table
secure
static
雜談
分類:cisco路由器和交換機(jī)配置
arp.........alias只有當(dāng)IP地址與MAC地址符合定義的,才會(huì)發(fā)送arp回應(yīng)
?CausesthesoftwaretorespondtoARPrequestsasifitweretheownerofboththespecified
IPaddressandhardwareaddress
?Ifthealiaskeywordisnotspecified
theentryisjustastaticentryandwillnotlearnthenewhardwareaddressforthatIPaddress一
—不學(xué)習(xí)更新ARP
ThesoftwaredoesnotrespondtoanyARPrequestsreceivedforthatIPaddress-------不回應(yīng)ARP
請求
ARP表和MAC-address-table表是完全不同的兩個(gè)表
?前者是IP-MACMAP表
后者是MAC-接口表
?showmac-address-table是一個(gè)二層的命令。
showiparp是一個(gè)三層命令。
如果你在一個(gè)二層接口上showiparp是什么也不會(huì)顯示的。同樣的在一個(gè)三層接口上show
mac-address-table也是沒有具體內(nèi)容的。
swl#sharp
ProtocolAddressAge(min)HardwareAddrTypeInterface
Internet61-0009.b714.5ec0ARPAVLAN1
Internet5310000.0c47.bd82ARPAVLAN1
swl#shmac-address-table
Non-staticAddressTable:
DestinationAddressAddressTypeVLANDestinationPort
0010.7be7.9bebDynamic12FastEthernetO/11
0040.cac9.a476Dynamic1FastEthernetO/1
00e0.b064.242cDynamic1FastEthernetO/3
0010.7b80.94d7Secure13FastEthernetO/13
00e0.b064.242dSecure13FastEthernetO/14
Swl(config)#mac-address-table?
secureConfigureasecureaddress
staticConfigureastatic802.Idstaticaddress
aging-timeSetMACaddresstableentrymaximumage
dynamicConfigureadynamic802.Idaddress
notificationEnable/DisableMACNotificationontheswitch
mac-address-tablestatic建立靜態(tài)MACaddress條目
switch(config)#mac-address-tablestatic1111.1111.1111vlan1interfacefa0/21
switch#showmac-address-table
MacAddressTable
VianMacAddressTypePorts
10015.585a.6066DYNAMICGi0/l
10015.c6c3.821bDYNAMICGi0/l
10015.f915.8e80DYNAMICGi0/l
10016.413e.280aDYNAMICGi0/l
10016.ec07.3b5cDYNAMICGi0/l
10020.edl4.399cDYNAMICGiO/1
10030.b637.8el0DYNAMICGiO/1
10090.fbal.00cfDYNAMICGiO/1
100d0.d3a4.7cecDYNAMICGiO/1
11111.1111.1111STATICFaO/21
mac-address-tablestatic可以用來過濾楨
macaddress-tablestaticmac-addressvlan...drop
mac-address-tablesecure與switchportport-security功自且差不多
mac-address-tablesecure0010.7b80.94d7FastEthernetO/13vlan13
mac-address-tablesecure00e0.b064.242dFastEthernetO/14vlan13
實(shí)驗(yàn):將兩根線倒換一下,R5接F/13,R2接F/14
提示出錯(cuò)
Securityviolationoccurredonmodule0port13(綁定給R2)causedbyMACaddress
00e0.b064.242d(R5MAC地址)
r5#shipintb接口還是雙up但已經(jīng)PING不通了
InterfaceIP-AddressOK?MethodStatusProtocol
EthernetlYESNVRAMupup
r5-2514#ping
Sending5,100-byteICMPEchosto,timeoutis2seconds:
Successrateis0percent(0/5)
mac-address-table語句中的mac-address是與條目中的interface,vlan綁定在一起的
mac-address-tableaging-time
macaddress-tableaging-timesec[vlan..]缺省300s
0秒,不是立刻老化,而是永不老化
交換機(jī)的流量控制和端口安全
(2009-10-1623:13:14)
轉(zhuǎn)載
標(biāo)簽:
storm-
control
switchport
protected
block
port-
security
雜談
分類:cisco路由器和交換機(jī)配置
四大trafficcontrol:
?storm-control-------用于限制廣播/組播/單播流量不超過門限只有storm-control不是
switchport語句
?switchprotect,------用于接口隔離,配protect的接口互相隔離
?switchblock------用于blockunknownunicast/multicast包
?switchport-security------只允許某個(gè)MAC地址的包
storm-control------其實(shí)就是流量控制
storm-control{broadcast|multicast|unicast}level{level[level-low]|ppspps[pps-low]}
interfacefastethernetO/1
storm-controlbroadcastlevel8765
廣播流量大于87%,就關(guān)閉接口,低于65%,再開啟接口
如果百分比設(shè)為0就是完全禁止廣播/組播/單播流量
如果百分比設(shè)為100流量無限制
ProtectedPorts
interfacefastethernetO/1
switchportprotected
?protectedport和另一個(gè)protectedport肯定隔離
?常用于接入服務(wù):要求流量只被uplink轉(zhuǎn)出,不轉(zhuǎn)發(fā)到SW其他端口,即端口間互相隔
離,只和上層連接
switchportblock是針對unknown包
interfacegigabitethernetO/1
switchportblockmulticast
switchportblockunicast
unknownmulticast
unknowndunicast
Switch#showinterfacesfastethernet0/1switchport
Protected:false
Unknownunicastblocked:disabled
Unknownmulticastblocked:disabled
swichportsecurity配置
3550-B(config-if)#switchportmodeaccess
enable起用
3550-B(config-if)#switchportport-security
最大允許數(shù)目
Thedefaultis1
如果不設(shè)VLAN,最大數(shù)目就涵蓋所有VLAN
3550-B(config-if)#switchportport-securitymaximumvalue
靜態(tài)綁定MAC地址
可以配置多條
如果接口配置的secureMACaddress的條數(shù)低于maximumnumberofsecureMACaddresses,
剩下的會(huì)動(dòng)態(tài)學(xué)習(xí)
3550-B(config-if)#switchportport-securitymac-addressmac-address
定義MAC地址沖突時(shí)的ACTION
?protect-dropped
?restrict—dropped
anSNMPtrapissent,
asyslogmessageislogged,
?shutdown—Theinterfaceiserror-disabled
anSNMPtrapissent,
asyslogmessageislogged
3550-B(config-if)#switchportport-securityviolation[protect|restrict|shutdown]
酉己置agingtimer
3550-B(config-if)#switchportport-securityaging[static]timetimetype[absolute|inactivity]
PortSecurityAging
switchportport-securityaging{static|time...|type{absolute|inactivity}}
staticstatic參數(shù)使swtchportsecuremac-address語句配置的靜態(tài)條目也可以aging
因?yàn)槿笔ging是針對針對動(dòng)態(tài)條目
這個(gè)參數(shù)很少見,因?yàn)橥ǔlo態(tài)條目都是手工配置的,所以無時(shí)間限制
timeagingtime
如果time=0,就是disableaging了
typeagingtime超時(shí)后的action
typeabsolute------到時(shí)間后所有MAC地址被移除,過時(shí)就刪
typeinactivity------到時(shí)間后只有在agingtime內(nèi)inactivity(沒有traffic的MAC),才remove條
目
switchportport-securityagingtime2agingtime2分鐘
switchportport-securityagingstaticagingtime對靜態(tài)條目也有效
switchportport-securityagingtypeinactivity到期的不活動(dòng)條目會(huì)被移除
swichportsecurity配置經(jīng)驗(yàn)
?switchportmodeaccess
配置switchportport-security前,先顯工t酉d置switchportmodeaccess
否則提示錯(cuò)誤
?因?yàn)槭莝witchport指令,所以不能應(yīng)用在三層口如intvlan20
?配前一定要先shutdown接口,否則端口會(huì)報(bào)告地址重復(fù)
verifyport-security
RackO7Swl#shport-security
SecurePortMaxSecureAddrCurrentAddrSecurityviolationSecurityAction
(Count)(Count)(Count)
FaO/12110Protect
TotalAddressesinSystem(excludingonemacperport):0
MaxAddresseslimitinSystem(excludingonemacperport):5120
驗(yàn)證port-security,改R2的MAC-ADDRESS,這樣會(huì)造成沖突
r2(config-if)#mac-address1001.leel.10e2
r2#showintel
Ethernetlisup,lineprotocolisup
HardwareisLance,addressis1001.leel.10e2(bia00e0.b064.242d)
交換機(jī)privatevlan------PVLAN
(2009-10-1622:26:03)
轉(zhuǎn)載
標(biāo)簽:
isolate
community
private
vlan
associate
10-30
雜談
分類:cisco路由器和交換機(jī)配置
什么是privatevlan?
?(類似BGPconfederation的概念):
?對內(nèi)劃分PVLAN
?對外還有個(gè)統(tǒng)?的VLAN
?不同子VLAN間可以互相隔離,也可互相通信
privatevlan的主要作用
?在VLAN內(nèi)引入隔離的功能
?但又都能通過trunk連出去
privateVLAN配置四步:兩創(chuàng)建,兩應(yīng)用
?創(chuàng)建privatevlan
(config)#Vlan10
(config-vlan)#privatevlanisolate
Member端口間互相隔離,只和primaryvlan相連
(config)#vlan20
(config-vlan)#privatevlancommunity
Member端口間互相連通
(config)#vlan30
(config-vlan)#privatevlancommunity
?創(chuàng)建primaryvlan
Vlan100
privatevlanprimary
privatevlanassociate10-30
將primaryvlan100與各privatevlan建立關(guān)聯(lián)
?privatevlan應(yīng)用在downlink(朝內(nèi)的,類型是host)端口
Intfe1/1
Switchportmodeprivate-vlanhost
Swichportprivate-vlanhost-associate100(主)10(private)
Intfe1/2
Switchportmodeprivate-vlanhost
Swichportprivate-vlanhost-associate10020
Intfe1/3
Switchportmodeprivate-vlanhost
Swichportprivate-vlanhost-associate10030
?Primary應(yīng)用在uplink端口(朝外的,類型是promicious)
Promicious(混合)一般都是uplink端口,trunk端口
intfe2/1
Switchportmodeprivate-vlanpromicious
Swichportprivate-vlanmapping10010-30
10,20,30所接ROUTER或HOST,對外都認(rèn)為是VLAN100,是同一VLAN,即使內(nèi)部還細(xì)分為
PVAN
把primaryVLAN的SVI的地址都MAP到次級VLAN
intvlan100
ipaddress
Private-vlanmapping10-30
VLAN1020,30其實(shí)是同一網(wǎng)段,SVI接口都是
交換機(jī)spanning-tree
(2009-10-1621:11:18)
轉(zhuǎn)載
標(biāo)簽:
802.Id
bpdu
timer
pritority
portfast
uplinkfast
雜談
分類:cisco路由器和交換機(jī)配置
SPT概念
Spt是防止冗余鏈路造成環(huán)路的二層協(xié)議
802.Id
spt主要?jiǎng)幼?/p>
,定義一個(gè)ROOT,形成一個(gè)無looptopo
?在網(wǎng)橋/SW之間傳遞BPDU
配置BPDU由ROOT每2秒發(fā)一次
拓?fù)涓腂PDU(TCNBPDU)山檢測到鏈路更改的SW發(fā)
設(shè)STPload-sharing,先要明確缺省值是多少?取高還是取低?
SwitchpriorityPortpriorityPortpathcost
作用最低成為ROOT最低TRUNK傳送最低TRUNK傳送
Range4096的倍數(shù)16的倍數(shù)無
缺省值32768128不定,隨鏈路接口
取值取低取低取低
spanning-treetimer
spanning-treevlan…h(huán)ello-timesecondsSW廣播hello包的時(shí)長
spanning-treevlan…forward-timeseconds在接口開始轉(zhuǎn)發(fā)前,listeningorlearning
states持續(xù)的時(shí)長
spanning-treevlan...max-agesecondsThemaximum-agingtimeisthenumberof
secondsaswitchwaitswithoutreceiving
spanning-treeconfigurationmessagesbefore
attemptingareconfiguration.
是SW在企圖發(fā)出改變前的delay時(shí)長,用于避免頻繁改變
Switch接口級spanning-tree沒有命令,只有cost和port-priority
Switch(config)#intfa0/12
Switch(config-if)#spanning-tree?
vlanVLANSwitchSpanningTrees
costChangeaninterface'sspanningtreepathcost
port-priorityChangeaninterface'sspanningtreepriority
portfastAllowachangefromblockingtoforwarding
rootguardEnforcerootguard
配TRUNK口,使得swl成為rootswitch.
?Lspanningtee在接口模式下沒什么配置,即使是TRUNK口
?2.全局模式,要按VLAN配,不能配無VLAN參數(shù)的root
Switch(config)#spanning-treevlan231113priority8192
#shspanning-treevlan14
Switch#shspanning-treebrief
VLAN14
SpanningtreeenabledprotocolIEEE
ROOTIDPriority8192
Address0009.b714.5ec3
Thisbridgeistheroot
HelloTime2secMaxAge16secForwardDelay14sec
BridgeIDPriority8192
Address0009.b714.5ec3
HelloTime2secMaxAge16secForwardDelay14sec
PortDesignated
NamePortIDPrioCostStsCostBridgeIDPortID
FaO/7128.19128100FWD00009.b714.5ec3128.19
Portfast
?不經(jīng)過listen和learn(及portfast不經(jīng)過forwardtime),直接由block進(jìn)入forward.
?一般配在access口,但也可以配在trunk口,用[trunk]參數(shù)
intfa0/3
spanning-treeportfast
intfa0/3
spanning-treeportfast[trunk]trunk參數(shù)可以使portfast引用在TRUNK口
但很少見,因?yàn)閠runk口配portfast是非常危險(xiǎn)的,
容易引起loop
(config)#spanning-treeportfastdefault全局所有口(二層口)起用
errdisablerecoverycausebpduguard〃可以把由于bpdu而disable的端口從disable狀態(tài)自動(dòng)
enable
errdisablerecoveryinterval400
Uplinkfast鏈路組
動(dòng)作:SWA檢測到連到SWC的鏈路2故障斷后,立刻把連到SWB的鏈路1enable
(config)#spanning-treeeuplinkfast[max-update-ratepkts-per-second]全局起用
如果將max-update-rate設(shè)為0
station-learningframesarenotgenerated4攵斂會(huì)彳艮'慢
?uplinkfast針對交換機(jī),即所有VLAN,不是單個(gè)VLAN,所以必須全局起用
?uplinkfast不支持VLANpriority,起用該特性后,VLAN優(yōu)先級都將恢復(fù)成缺省
交換機(jī)VTP
(2009-10-1617:13:16)
轉(zhuǎn)載
標(biāo)簽:
vtp
server
client
transparent
pruning
雜談
分類:cisco路由器和交換機(jī)配置
VTP配置
?配置VTP服務(wù)器
switch(config)#vtpdomaindomain-name
switch(config)#vtpmodeserver
switchtfshowvtpstatus
?配置VTP客戶端
switch(config)#vtpdomaindomain-name
switch(config)#vtpmodeclient
?配置VTP透明模式
switch(config)#vtpdomaindomain-name
switch(config)#vtpmodetransparent
VTP信息暢通的兩個(gè)條件
?VTPDOMAIN相同
?VTPPASS相同
不管是trunkprunning還是vtpprunning,都是為了提高帶寬利用率的
vtppruning
or
(vlan-database)#vtpserverdomainMLSprunningenable缺省pruningisdisabled
只能在VTPservermode下打開
針對不存在VLAN的廣播和未知單點(diǎn)楨不會(huì)發(fā)到對端
switchporttrunkpruningvlan{add|except|none|remove}vlan-listbvlanbvlanb,,]]trunkl¥j
pruning-eligible
針對不存在VLAN的廣播和未知單點(diǎn)楨不會(huì)發(fā)到對端
trunk,EC等和VTP無關(guān)
實(shí)驗(yàn),vtp配transparent,trunk,FEC仍然通
vtpdomainxxx
vtpmodetransparent
Optionvtp
vtpinterface
vtpfile定義用于儲(chǔ)存VTPconfiguration的IFS文件系統(tǒng)
vtpupdatesourceVTPsourceinterface
為什么大于1005的擴(kuò)展VLAN,只能配VTPTRANSPARENT?
因?yàn)閂TP只學(xué)習(xí)1-1005的VLANID
vtptransparent相當(dāng)于disablevtp
WhentheswitchisinVTPtransparentmode(VTPdisabled),youcancreateextended-range
VLANs(intherange1006to4094)
交換機(jī)EC(EthernetChannel)
(2009-10-1616:55:55)
轉(zhuǎn)載
標(biāo)簽:
12
ec
13
channel-group
雜談
分類:cisco路山器和交換機(jī)配置
channel-group…mode下的兩大協(xié)議---PAgP和LACP
?PAgP
是CISCO私有EC協(xié)商協(xié)議
channel-group...mode{{auto[non-silent]|desirable[non-silent]|on}
?LACP
國際標(biāo)準(zhǔn)協(xié)議LACP
channel-group...mode{active|passive}
Iayer2ECconfig
?接口都要設(shè)置成trunk
intrangefa0/1-4
swichportmodetrunk
swichporttrunkencapisl
?將每個(gè)接口分配給channel-group
intrangefa0/1-4
channel-group5mode{auto|desirable|on|active|passive}
?配intportchannel,(和接口的配置比只少一句channel-group)
intportchannel5
swichportmodetrunk
swichporttrunkencapisl
Layer3EtherChannels(intport-channel+noswitchport)
?子接口不能有swichport語句,只能是三層口
但也不能配IP地址,noipadd
Intrangefe0/1-4
noswitchport
noipadd
channel-group1mode{auto|desirable|on|active|passive}
?intport-channel配地址
interfaceport-channel1
noswitchport
ipaddress0
L2配置例子
interfaceGigabitEthernetl/1
descriptionMLS_LINK-193-1-1
switchport
switchporttrunkencapsulationisl
switchportmodetrunk
channel-group1modedesirable
interfaceGigabitEthernetl/2
descriptionMLS_LINK-193-l-2
switchport
switchporttrunkencapsulationisl
switchportmodetrunk
channel-group1modedesirable
!
interfacePort-channell
descriptionMLS_TRUNK-193-1
switchport
switchportmodetrunk
switchporttrunkencapsulationisl
配channle-group前,先把接口shutdown,等把Channel-group1配到接口下時(shí)再noshut.
否則,接口會(huì)出現(xiàn)DOWN狀態(tài)。
如果這樣,大家可以noshut把接口喚醒
port-channelload-balance
(config)#port-channelload-balance{dst-mac|src-mac}
全局起用port-channelload-balance
Thedefaultissrc-mac.
(config)#spanning-treeethernetchannelguardmisconfig
把EC中配置錯(cuò)誤的接口狀態(tài)置為error-disable(即shutdown其中接口)
EC內(nèi)接口的portpritority,優(yōu)先級高的EC內(nèi)接口更容易傳數(shù)據(jù)(主要用于不同帶寬接口捆綁
在一起的EC)
interfacefe0/3
pagpport-priority255
值取0-255,值越大表示約可能用作PAgPtransmission,defaultis128
interfacefe0/3
lacpsystem-priority...
和pagpport-priority…作用差不多
單臂接口
(2009-10-1616:08:43)
轉(zhuǎn)載
標(biāo)簽:
雜談
分類:cisco路山器和交換機(jī)配置
router的單臂接口和SW接口配置。
Routerswitch
IntfaO.l
Encapdotlq2
Intfa0.2
Encapdotlq11Intfa0/2
Switchmodetrunk
Switchtrunkencapdotlq
swtrunkallowvlannone
swtrunkallowvlan2,11
vlandatabase
vlan2namexx
vlan11namyy
intfa0/10
switchmodeaccess
switchaccvlan2
intfa0/11
switchmodeaccess
switchaccvlan11
如果理解單臂接口?
就當(dāng)作ROUTER用兩個(gè)接口和SWITCH的分屬兩個(gè)VLAN的switch接口相連。
交換機(jī)trunk配置
(2009-10-1615:55:17)
轉(zhuǎn)載
標(biāo)簽:
on/trunk
switchport
mode
dynamic
/desirable
/auto
雜談
分類:cisco路山器和交換機(jī)配置
檢查trunk最常用語句
Intfa0/24
Switchporttrunkencaisl
Swimodetrunk
RackO7Swl#shinttrunk
PortModeEncapsulationStatusNativevlan
FaO/24onisltrunking1
mode三個(gè)值:
on-----switchmodetrunk
auto-----switchmodedynamicauto
desirable-----switchmodedynamicdesirable
和switchportmodetrunk比較,switchportmodedynamic/desirable/auto有什么不同?
?靜態(tài)
switchportmodetrunk
?動(dòng)態(tài)協(xié)商
switchportmodedynamic/desirable/auto
desirable:Unconditionally無條件,主動(dòng),對端可以是trunk,auto,desirable.
auto:被動(dòng),不能對auto,對端只能是trunk或desirable
不可以auto--------auto
TRUNK口也可以有VLAN:兩種方式
?ISLtrunk口
定義一個(gè)缺省VLAN,萬一接口stopstrunking,還可做個(gè)access口
switchportmodetrunk
switchportaccessvlan...
?dotlqtrunk□
switchportmodetrunk
switchporttrunkencapdotlq
switchporttrunknativevlan5
酉己置NativeVLAN(802.1q)
交換機(jī)向nativevlan傳送untagged的數(shù)據(jù)流
“不允許端口用自動(dòng)協(xié)商”----switchnonegociate
TRUNKload-balance
有容錯(cuò)要求----port-priority,cost
無容錯(cuò)要求,就是劈開流量——allowvlan即可
IRB橋接
(2009-10-1614:53:51)
轉(zhuǎn)載
標(biāo)簽:
bridge-group
bridge
irb
bvil
discard
雜談
分類:cisco路由器和交換機(jī)配置
配置IRB三大步驟
基本橋接
InterfaceFastEthernetO/O
noipaddress
bridge-group1
!
interfaceFastEthernetO/1
noipaddress
bridge-group1
!
bridge1protocolieee
全局起用IRB
bridgeirb此句經(jīng)常忘記配
interfaceBVI1
ipaddress6324
?BVI接口號與bridge-group組號匹配
?BVI和實(shí)際接口一樣,也有MAC地址
兩個(gè)ROUTER四個(gè)接口都設(shè)橋組,都不設(shè)地址
RIR3
interfaceEthernetO/O
bridge-group1
interfaceserial0/0
bridge-group1
bridge1protocolieeeinterfaceserial0
bridge-group1
interfaceEthernet0
bridge-group1
bridge1protocolieee
bridge-group過濾---橋接同時(shí)按MAC地址過濾一些楨(顯然橋接不支持ACLCOVERIP
subnet)
基本橋接配置
interfaceEthernet0
bridge-group1
interfaceSeriall
bridge-group1
!
bridge1protocolieee
在橋接口過濾楨
bridge1address0000.8635.46eldiscard
bridge1address2222.2222.2222forwardfa0/2
bridge1address3333.3333.3333discardfa0/3
specifytheMAC-layerdestinationaddresstobefiltered.
showbridge1verbose
BGHashAddressActionInterfaceVCAGE
1A7/00000.8635.46ediscard
ipsec配置例子
(2009-10-1613:10:40)
轉(zhuǎn)載
標(biāo)簽:
ipsec
基本配置
nat配置
雜談
分類:cisco路山器和交換機(jī)配置
一個(gè)典型的IPsec的例子
routeri一側(cè)的hostA(3)試圖訪問router2一側(cè)的WWWSERVER(4)
RIR2
cryptoisakmppolicy1
authenticationpre-share
cryptoisakmpkeyciscol234address
I
cryptoipsectransform-setrule_lah-sha-hmacesp-desesp-sha-hmac
I
cryptomaptesttag10ipsec-isakmp
setpeer
settransform-setrule_l
matchaddress155
!
interfaceSerial3/1
ipaddress
cryptomaptesttag
I
interfaceEthernetO/O
ipaddress
I
iproute
靜態(tài)路由應(yīng)該在IPSEC前先配通
access-list155permittcphost3host4eqwww
access-list155permittcphost3eqwwwhost4cryptoisakmp
policy1
authenticationpre-share
cryptoisakmpkeyciscol234address
!
cryptoipsectransform-setrule_lah-sha-hmacesp-desesp-sha-hmac
I
cryptomaptesttag10ipsec-isakmp
setpeer
settransform-setrule_l
matchaddress155
I
interfaceSerial0/0
ipaddress
cryptomaptesttag
I
interfaceEthernetO/1
ipaddress
iproute
靜態(tài)路由應(yīng)該在IPSEC前先配通
access-list155permittcphost4host3eqwww
access-list155permittcphost4eqwwwhost3
?先配通地址,靜態(tài)路由(設(shè)對端的SERVER的靜態(tài)路由,指向?qū)Χ说刂罚?/p>
?再配ipsec的ACL表,此時(shí)也不應(yīng)該配IPSEC
即靜態(tài)路由和IPSEC的ACL表應(yīng)該基于沒配IPSEC前的基本網(wǎng)絡(luò)路由狀況
,再開始配cryptoisakmp/cryptoipsectransform/cryptomap
IPSEC沒有NAT功能,也沒有GRE的封裝功能
一個(gè)典型的(IPsec+NAT)例子
router1一側(cè)的hostA試圖訪問router2一側(cè)的WWWSERVER
RIR2
cryptoisakmppolicy1
authenticationpre-share
cryptoisakmpkeyciscol234address(ipnatoutside接口public地址)
cryptoipsectransform-setrule_lah-sha-hmacesp-desesp-sha-hmac
!
cryptomaptesttag10ipsec-isakmp
setpeer(ipnatoutside接口public地址)
settransform-setrule_l
matchaddress155
interfaceFastEthernetO
ipaddress
interfaceS2/0
ipaddress
cryptomaptesttag
!
iproute
!
access-list155permittcphost3host00eqwww
access-list155permittcphost3eqwwwhost00
cryptoisakmppolicy1
authenticationpre-share
cryptoisakmpkeyciscol234address
cryptoipsectransform-setrule_lah-sha-hmacesp-desesp-sha-hmac
I
cryptomaptesttag10ipsec-isakmp
setpeer
settransform-setrule_l
matchaddress155
!
interfaceEthernetO/1
ipaddress
ipnatinside
i
interfaceSerial2/0
ipaddress
ipnatoutside
cryptomaptesttag
!
iproute
!
access-list155permittcphost00host3eqwww
access-list155permittcphost00eqwwwhost3
ipnatinsidesourcestatic400
?本例IPSEC+NAT模式:ipsec的peer地址是nat的外部public地址。
?ipsece的ACL,靜態(tài)路由,都以public地址為準(zhǔn)。
AuthenticationProxy
(2009-10-1612:06:51)
轉(zhuǎn)載
標(biāo)簽:
aaa
authorization
auth-proxy
ip
ppp
雜談
分類:cisco路由器和交換機(jī)配置
AuthenticationProxy原理
?當(dāng)一個(gè)用戶發(fā)起HTTP訪問穿過ROUTER,theauthenticationproxyistriggered(在接口截
獲用戶通過ROUTER的http包進(jìn)行認(rèn)證)
?authproxy先檢查現(xiàn)存的entry有沒有此用戶的entry
?沒有,就根據(jù)其httprequest包,發(fā)回一個(gè)httprepond包,但顯示的是一個(gè)認(rèn)證網(wǎng)頁(ip
httpserver提供)
?用戶在認(rèn)證網(wǎng)頁輸入的username/passwd被proxy到aaaserver
?用戶屬于用戶名密碼正確,一個(gè)entry被建立,以后用戶再訪問就不必重復(fù)認(rèn)證了
?如果radiusserver返回認(rèn)證失敗,則該連接被中斷
?要求認(rèn)證用戶不一定直連到起用ipauth?proxy的接口??梢允沁h(yuǎn)程用戶,只要他HTTP
包通過ROUTER,就會(huì)被截獲并強(qiáng)行認(rèn)證
authen-proxy酉己置(用于ROUTER,PPP口)
aaanew-model
I
radius-serverhost4
radius-serverkeycisco
i
aaaauthorizationauth-proxydefaultgroupradius
ipauth-proxynamepxyhttplist10auth-cache-time3
access-list10permitany
I
interfaceSerial2/0:23
ipaddress
encapsulationppp
ipauth-proxypxy
interfaceSerial2/0:23
ipaccess-group105in
!
access-list105denytcpanyany
access-list105denyudpanyany
access-list105permitipanyany
接口先deny,否則認(rèn)證沒什么意義
為避免這種"不認(rèn)證反而直接穿過去”的問題,在接口設(shè)置過濾
起用HTTP訪問ROUTER
iphttpserver
iphttpauthenticationaaa
直接HTTP訪問ROUTER,要完全deny
iphttpaccess-class15
access-list15denyany
ipauth-proxyname...http[list...]可以限定具體用戶認(rèn)證
list.,可以針對具體網(wǎng)段的用戶進(jìn)行認(rèn)證
permit的需要認(rèn)證
deny的不需要認(rèn)證,反而可以直接穿過去
ipauth-proxy新feature,支持telnet,ftp
ipauth-proxyname...{ftp|http|telnet}[list...]
option
ipauth-proxyauth-cache-timemin用戶的條目存活時(shí)間是,缺省60min
ipauth-proxyauth-proxy-banner設(shè)置auth-proxy的banner;缺省是disable
ipauth-proxy{inactivity-timer...|absolute-timer...}
verifty
showipauth-proxy
CISCOAAA認(rèn)證配置
(2009-10-1523:39:28)
轉(zhuǎn)載
標(biāo)簽:
radius
aaa
authetication
radius-server
group
server
分類:cisco路山器和交換機(jī)配置
三個(gè)SecurityServerProtocols的區(qū)另ll
RADIUSTACACS+Kerberos
distributedclient/server
AAAsystem普通AAA提供AAAservice的secret-keynetwork
authenticationprotocol
UDP1645(認(rèn)證)
1646(accounting)TCP(49)
AAA配置五大部分:
1.enableaaanew-model
2.securityprotocolserverradius-serverhost...
tacacs-serverhost...
相關(guān)配置,等
radius-serverkeyztimeout
3.aaalistaaaautheticationppp/loginlistname/default....
aaaauthoricationnetwork/execdefault...
aaaaccoutingnetworkdefault...
4.aaalist引用line0-16/linevty04
loginauthentication...
login
intserial0
encapppp
pppauthenticationpap/chap/papchap...
pppauthenticationpap/chap/papchap
radius-serverhost
radius-serverhost{hostname|ip-address}[auth-portport-number][acct-portport-number]
[timeoutseconds][retransmitretries][keystring][alias{hostname|
ipaddress}]
ip-add,key,udp-port,timeout,retransmit,都是具體UNIXSERVER上的配置,一定要和UNIX
SERVER的KEY匹配
auth-port/acct-port:是udpport
缺省是authenticationport(1645)andaccountingport(1646):
radius-serverkey力口密
radius-serverkey{0string|7string|string}
0表示不加密
7表示加密
定義認(rèn)證串的時(shí)候,不能直接引用radiusserver,必須groupradius或者groupaaa-group-name
aaaauthenticationpppdialinsgroupradiuslocal
aaaauthenticationlogindefaultgroupradiuslocal
RADIUSServerGroupExamples
aaanew-model
aaaauthenticationpppdefaultgroupgroupl
aaaauthenticationlogindefaultgroupgroup2
!
aaagroupserverradiusgroupl(進(jìn)入(config-sg)#模式)
serverauth-port1645acct-port1646
serverauth-port2000acct-port2001
deadtime1
I
aaagroupserverradiusgroup2
serverauth-port2000acct-port2001
server33.3.3auth-port1645acct-port1646
deadtime2
I
radius-serverhostauth-port1645acct-port1646
radius-serverhostauth-port2000acct-port2001
radius-serverhost3.33.3auth-port1645acct-port1646
aaagroupserver定義,同時(shí)也要有radius-server定義。二者不能混淆。
本例中radius-server為兩個(gè)groupserver服務(wù)
Authenticationdefine
aaaauthenticationlogindefaultenable用enable密碼作為用戶telnetlogin的密碼
aaaauthenticationlogindefaultline
!
linevty04
password3333line:采用line下的password指令的密碼
aaaauthenticationenabledefaultgroupradiusenable密碼在RADIUS上設(shè)
enable的串都是default的
(用戶輸入enable的時(shí)候,router發(fā)request包
至ijRADIUSserver,username是H$enabl5$.H)
authentication的Line引用
Linevty04
loginauthenticationlist-name
loginauthenticationdefault
loginauthentication
改變aaa認(rèn)證顯示authenticationprompt
aaanew-model
aaaauthenticationbanner*inputyournameandpass*
aaaauthenticationfail-message*Failedlogin.Tryagain.*
aaaauthenticationlogindefaultgroupradius
將顯示如下
inputyournameandpass
Username:
Failedlogin.Tryagain
aaaauthenticationpassword-prompttext-string
改變輸入password的prompt
aaaauthorizationexecdefaultgroupradiusif-authenticated
一旦前面的authenticaion成功,立刻就獲得authorization
常規(guī)路山器安全配置
(2009-10-1519:14:34)
轉(zhuǎn)載
標(biāo)簽:
icmp回包
rfc-1918
地址欺騙
源地址欺騙
well-known欺騙
雜談
分類:cisco路山器和交換機(jī)配置
安全方面的一些建議:
?noipdirected-broadcast(因?yàn)槿菀妆籨enial-of-serviceattacks使用)
?noipproxy-arp
?noservicetcp-small-servers
?noserviceudp-small-servers
只permit一些icmp的回包
intefacefa0/1
ipaccess-group100in
access-list100permiticmpanyanyecho-reply
access-list100permiticmpanyanytime-exceeded
access-list100permiticmpanyanytraceroute
access-list100permiticmpanyanyunreachable
access-list100permiticmpanyanypacket-too-big
防止源內(nèi)部地址spoon
access-list111denyip281anylog
防止源RFC-1918地址欺騙
access-list111denyip55anylog
access-list111denyip55anylog
access-list111denyip55anylog
防止源well-known欺騙
access-list105denyipho
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 益陽醫(yī)學(xué)高等??茖W(xué)?!度瞬潘刭|(zhì)測評與選拔》2023-2024學(xué)年第二學(xué)期期末試卷
- 做賬實(shí)操-機(jī)械制造公司的賬務(wù)處理分錄
- 鄭州經(jīng)貿(mào)學(xué)院《網(wǎng)路原理與技術(shù)》2023-2024學(xué)年第二學(xué)期期末試卷
- 陜西服裝工程學(xué)院《專業(yè)課程綜合2(酒店)》2023-2024學(xué)年第二學(xué)期期末試卷
- 貴陽人文科技學(xué)院《環(huán)境與食品安全》2023-2024學(xué)年第二學(xué)期期末試卷
- 2025山西省建筑安全員-C證考試題庫
- 廣西財(cái)經(jīng)學(xué)院《老年社會(huì)工作》2023-2024學(xué)年第二學(xué)期期末試卷
- 大連理工大學(xué)城市學(xué)院《地理空間數(shù)據(jù)庫》2023-2024學(xué)年第二學(xué)期期末試卷
- 常德職業(yè)技術(shù)學(xué)院《藥劑學(xué)A》2023-2024學(xué)年第二學(xué)期期末試卷
- 山西金融職業(yè)學(xué)院《公共危機(jī)治理》2023-2024學(xué)年第二學(xué)期期末試卷
- 2024年萍鄉(xiāng)衛(wèi)生職業(yè)學(xué)院單招職業(yè)技能測試題庫標(biāo)準(zhǔn)卷
- 2025年重慶三峰環(huán)境集團(tuán)招聘筆試參考題庫含答案解析
- 育嬰培訓(xùn)課件
- 《管理品牌資產(chǎn)》戴維·阿克著
- 藥品網(wǎng)絡(luò)交易服務(wù)三方平臺(tái)質(zhì)量管理體系文件-B2B平臺(tái)(完整版)
- 粵教粵科版三年級下冊科學(xué)全冊課時(shí)練(同步練習(xí))
- 電網(wǎng)數(shù)字化項(xiàng)目工作量度量規(guī)范應(yīng)用指南(2020版)
- 小學(xué)開學(xué)第一課禁毒安全
- 2025年砌筑工職業(yè)技能(中級)知識考試題庫及答案
- 開題報(bào)告:適應(yīng)人口發(fā)展趨勢的區(qū)域教育結(jié)構(gòu)優(yōu)化與政策調(diào)整研究
- 【MOOC】跨文化交際-蘇州大學(xué) 中國大學(xué)慕課MOOC答案
評論
0/150
提交評論