




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
交换机的mac/vlanACL和VLANMAP
(2009-10-1700:28:31)
转载
macaccess-listextendedmatch
vlan
filter
map
vlan-list
杂谈
分类:cisco路由器和交换机置
SWITCH特有的macacl,匹配桢,不是匹配包
ipcef
misqos
macaccess-listextendedmaclistl
permit0001.0000.00010.0.00002.0000.00010.0.0
掩码
permit0001.0000.00020.0.00002.0000.00020.0.0aarp
匹配对从主机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参数
•mac打头
•都是extendacl
•最好采用host参数,或any参数,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内流量的工具
•VLANmap没有方向性
•可以看出VLAN-MAP的优势,不管HOST连在哪个FE口上,只要属于VLAN20-22,都
禁止。可以弥补接口ACL的缺陷(用户换口)
将VLAN20-22中主机10.1.L32到4的WWW流量都drop,其他的转发
ipaccess-listextendedhttp
permittcphost2host4eqwww
I
vlanaccess-mapmap210
matchipaddresshttp
actiondrop
I
vlanaccess-mapmap220
actiontoward
vlanfiltermapmap2vlan-list20-22
交换机802.lx
(2009-10-1700:11:01)
转载
标签:
dotlx
system-auth
-control
port-control
auto
杂谈
分类:cisco路由器和交换机配置
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允许一个端口认证多台host,指下联了HLIBs
不支持802.lx的client,就被放入dotlxguestvlan
interfacefastethernetO/1
dotlxguest-vlan9把VLAN9设成guestvlan
如果认证失败,client被放入dotlxrestrictedvlan
interfacegigabitethernetO/1
dotlxauth-failvlan2
dotlxauth-failmax-attempts3认证失败3次,就被移入VLAN
arp表和mac表
(2009-10-1623:36:39)
转载
标签:
mac-address
-table
secure
static
杂谈
分类:cisco路由器和交换机配置
arp.........alias只有当IP地址与MAC地址符合定义的,才会发送arp回应
•CausesthesoftwaretorespondtoARPrequestsasifitweretheownerofboththespecified
IPaddressandhardwareaddress
•Ifthealiaskeywordisnotspecified
theentryisjustastaticentryandwillnotlearnthenewhardwareaddressforthatIPaddress一
—不学习更新ARP
ThesoftwaredoesnotrespondtoanyARPrequestsreceivedforthatIPaddress-------不回应ARP
请求
ARP表和MAC-address-table表是完全不同的两个表
•前者是IP-MACMAP表
后者是MAC-接口表
•showmac-address-table是一个二层的命令。
showiparp是一个三层命令。
如果你在一个二层接口上showiparp是什么也不会显示的。同样的在一个三层接口上show
mac-address-table也是没有具体内容的。
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建立静态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
实验:将两根线倒换一下,R5接F/13,R2接F/14
提示出错
Securityviolationoccurredonmodule0port13(绑定给R2)causedbyMACaddress
00e0.b064.242d(R5MAC地址)
r5#shipintb接口还是双up但已经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秒,不是立刻老化,而是永不老化
交换机的流量控制和端口安全
(2009-10-1623:13:14)
转载
标签:
storm
control
switchport
protected
block
port
security
杂谈
分类:cisco路由器和交换机配置
四大trafficcontrol:
•storm-control-------用于限制广播/组播/单播流量不超过门限只有storm-control不是
switchport语句
•switchprotect,------用于接口隔离,配protect的接口互相隔离
•switchblock------用于blockunknownunicast/multicast包
•switchport-security------只允许某个MAC地址的包
storm-control------其实就是流量控制
storm-control{broadcast|multicast|unicast}level{level[level-low]|ppspps[pps-low]}
interfacefastethernetO/1
storm-controlbroadcastlevel8765
广播流量大于87%,就关闭接口,低于65%,再开启接口
如果百分比设为0就是完全禁止广播/组播/单播流量
如果百分比设为100流量无限制
ProtectedPorts
interfacefastethernetO/1
switchportprotected
•protectedport和另一个protectedport肯定隔离
•常用于接入服务:要求流量只被uplink转出,不转发到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
最大允许数目
Thedefaultis1
如果不设VLAN,最大数目就涵盖所有VLAN
3550-B(config-if)#switchportport-securitymaximumvalue
静态绑定MAC地址
可以配置多条
如果接口配置的secureMACaddress的条数低于maximumnumberofsecureMACaddresses,
剩下的会动态学习
3550-B(config-if)#switchportport-securitymac-addressmac-address
定义MAC地址冲突时的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参数使swtchportsecuremac-address语句配置的静态条目也可以aging
因为缺省aging是针对针对动态条目
这个参数很少见,因为通常静态条目都是手工配置的,所以无时间限制
timeagingtime
如果time=0,就是disableaging了
typeagingtime超时后的action
typeabsolute------到时间后所有MAC地址被移除,过时就删
typeinactivity------到时间后只有在agingtime内inactivity(没有traffic的MAC),才remove条
目
switchportport-securityagingtime2agingtime2分钟
switchportport-securityagingstaticagingtime对静态条目也有效
switchportport-securityagingtypeinactivity到期的不活动条目会被移除
swichportsecurity配置经验
•switchportmodeaccess
配置switchportport-security前,先显工t酉d置switchportmodeaccess
否则提示错误
•因为是switchport指令,所以不能应用在三层口如intvlan20
•配前一定要先shutdown接口,否则端口会报告地址重复
verifyport-security
RackO7Swl#shport-security
SecurePortMaxSecureAddrCurrentAddrSecurityviolationSecurityAction
(Count)(Count)(Count)
FaO/12110Protect
TotalAddressesinSystem(excludingonemacperport):0
MaxAddresseslimitinSystem(excludingonemacperport):5120
验证port-security,改R2的MAC-ADDRESS,这样会造成冲突
r2(config-if)#mac-address1001.leel.10e2
r2#showintel
Ethernetlisup,lineprotocolisup
HardwareisLance,addressis1001.leel.10e2(bia00e0.b064.242d)
交换机privatevlan------PVLAN
(2009-10-1622:26:03)
转载
标签:
isolate
community
private
vlan
associate
10-30
杂谈
分类:cisco路由器和交换机配置
什么是privatevlan?
•(类似BGPconfederation的概念):
•对内划分PVLAN
•对外还有个统•的VLAN
•不同子VLAN间可以互相隔离,也可互相通信
privatevlan的主要作用
•在VLAN内引入隔离的功能
•但又都能通过trunk连出去
privateVLAN配置四步:两创建,两应用
•创建privatevlan
(config)#Vlan10
(config-vlan)#privatevlanisolate
Member端口间互相隔离,只和primaryvlan相连
(config)#vlan20
(config-vlan)#privatevlancommunity
Member端口间互相连通
(config)#vlan30
(config-vlan)#privatevlancommunity
•创建primaryvlan
Vlan100
privatevlanprimary
privatevlanassociate10-30
将primaryvlan100与各privatevlan建立关联
•privatevlan应用在downlink(朝内的,类型是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应用在uplink端口(朝外的,类型是promicious)
Promicious(混合)一般都是uplink端口,trunk端口
intfe2/1
Switchportmodeprivate-vlanpromicious
Swichportprivate-vlanmapping10010-30
10,20,30所接ROUTER或HOST,对外都认为是VLAN100,是同一VLAN,即使内部还细分为
PVAN
把primaryVLAN的SVI的地址都MAP到次级VLAN
intvlan100
ipaddress
Private-vlanmapping10-30
VLAN1020,30其实是同一网段,SVI接口都是
交换机spanning-tree
(2009-10-1621:11:18)
转载
标签:
802.Id
bpdu
timer
pritority
portfast
uplinkfast
杂谈
分类:cisco路由器和交换机配置
SPT概念
Spt是防止冗余链路造成环路的二层协议
802.Id
spt主要动作
,定义一个ROOT,形成一个无looptopo
•在网桥/SW之间传递BPDU
配置BPDU由ROOT每2秒发一次
拓扑更改BPDU(TCNBPDU)山检测到链路更改的SW发
设STPload-sharing,先要明确缺省值是多少?取高还是取低?
SwitchpriorityPortpriorityPortpathcost
作用最低成为ROOT最低TRUNK传送最低TRUNK传送
Range4096的倍数16的倍数无
缺省值32768128不定,随链路接口
取值取低取低取低
spanning-treetimer
spanning-treevlan…hello-timesecondsSW广播hello包的时长
spanning-treevlan…forward-timeseconds在接口开始转发前,listeningorlearning
states持续的时长
spanning-treevlan...max-agesecondsThemaximum-agingtimeisthenumberof
secondsaswitchwaitswithoutreceiving
spanning-treeconfigurationmessagesbefore
attemptingareconfiguration.
是SW在企图发出改变前的delay时长,用于避免频繁改变
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参数的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
•不经过listen和learn(及portfast不经过forwardtime),直接由block进入forward.
•一般配在access口,但也可以配在trunk口,用[trunk]参数
intfa0/3
spanning-treeportfast
intfa0/3
spanning-treeportfast[trunk]trunk参数可以使portfast引用在TRUNK口
但很少见,因为trunk口配portfast是非常危险的,
容易引起loop
(config)#spanning-treeportfastdefault全局所有口(二层口)起用
errdisablerecoverycausebpduguard〃可以把由于bpdu而disable的端口从disable状态自动
enable
errdisablerecoveryinterval400
Uplinkfast链路组
动作:SWA检测到连到SWC的链路2故障断后,立刻把连到SWB的链路1enable
(config)#spanning-treeeuplinkfast[max-update-ratepkts-per-second]全局起用
如果将max-update-rate设为0
station-learningframesarenotgenerated4攵敛会彳艮'慢
•uplinkfast针对交换机,即所有VLAN,不是单个VLAN,所以必须全局起用
•uplinkfast不支持VLANpriority,起用该特性后,VLAN优先级都将恢复成缺省
交换机VTP
(2009-10-1617:13:16)
转载
标签:
vtp
server
client
transparent
pruning
杂谈
分类:cisco路由器和交换机配置
VTP配置
•配置VTP服务器
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信息畅通的两个条件
•VTPDOMAIN相同
•VTPPASS相同
不管是trunkprunning还是vtpprunning,都是为了提高带宽利用率的
vtppruning
or
(vlan-database)#vtpserverdomainMLSprunningenable缺省pruningisdisabled
只能在VTPservermode下打开
针对不存在VLAN的广播和未知单点桢不会发到对端
switchporttrunkpruningvlan{add|except|none|remove}vlan-listbvlanbvlanb,,]]trunkl¥j
pruning-eligible
针对不存在VLAN的广播和未知单点桢不会发到对端
trunk,EC等和VTP无关
实验,vtp配transparent,trunk,FEC仍然通
vtpdomainxxx
vtpmodetransparent
Optionvtp
vtpinterface
vtpfile定义用于储存VTPconfiguration的IFS文件系统
vtpupdatesourceVTPsourceinterface
为什么大于1005的扩展VLAN,只能配VTPTRANSPARENT?
因为VTP只学习1-1005的VLANID
vtptransparent相当于disablevtp
WhentheswitchisinVTPtransparentmode(VTPdisabled),youcancreateextended-range
VLANs(intherange1006to4094)
交换机EC(EthernetChannel)
(2009-10-1616:55:55)
转载
标签:
12
ec
13
channel-group
杂谈
分类:cisco路山器和交换机配置
channel-group…mode下的两大协议---PAgP和LACP
•PAgP
是CISCO私有EC协商协议
channel-group...mode{{auto[non-silent]|desirable[non-silent]|on}
•LACP
国际标准协议LACP
channel-group...mode{active|passive}
Iayer2ECconfig
•接口都要设置成trunk
intrangefa0/1-4
swichportmodetrunk
swichporttrunkencapisl
•将每个接口分配给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配到接口下时再noshut.
否则,接口会出现DOWN状态。
如果这样,大家可以noshut把接口唤醒
port-channelload-balance
(config)#port-channelload-balance{dst-mac|src-mac}
全局起用port-channelload-balance
Thedefaultissrc-mac.
(config)#spanning-treeethernetchannelguardmisconfig
把EC中配置错误的接口状态置为error-disable(即shutdown其中接口)
EC内接口的portpritority,优先级高的EC内接口更容易传数据(主要用于不同带宽接口捆绑
在一起的EC)
interfacefe0/3
pagpport-priority255
值取0-255,值越大表示约可能用作PAgPtransmission,defaultis128
interfacefe0/3
lacpsystem-priority...
和pagpport-priority…作用差不多
单臂接口
(2009-10-1616:08:43)
转载
标签:
杂谈
分类:cisco路山器和交换机配置
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
如果理解单臂接口?
就当作ROUTER用两个接口和SWITCH的分属两个VLAN的switch接口相连。
交换机trunk配置
(2009-10-1615:55:17)
转载
标签:
on/trunk
switchport
mode
dynamic
/desirable
/auto
杂谈
分类:cisco路山器和交换机配置
检查trunk最常用语句
Intfa0/24
Switchporttrunkencaisl
Swimodetrunk
RackO7Swl#shinttrunk
PortModeEncapsulationStatusNativevlan
FaO/24onisltrunking1
mode三个值:
on-----switchmodetrunk
auto-----switchmodedynamicauto
desirable-----switchmodedynamicdesirable
和switchportmodetrunk比较,switchportmodedynamic/desirable/auto有什么不同?
•静态
switchportmodetrunk
•动态协商
switchportmodedynamic/desirable/auto
desirable:Unconditionally无条件,主动,对端可以是trunk,auto,desirable.
auto:被动,不能对auto,对端只能是trunk或desirable
不可以auto--------auto
TRUNK口也可以有VLAN:两种方式
•ISLtrunk口
定义一个缺省VLAN,万一接口stopstrunking,还可做个access口
switchportmodetrunk
switchportaccessvlan...
•dotlqtrunk□
switchportmodetrunk
switchporttrunkencapdotlq
switchporttrunknativevlan5
酉己置NativeVLAN(802.1q)
交换机向nativevlan传送untagged的数据流
“不允许端口用自动协商”----switchnonegociate
TRUNKload-balance
有容错要求----port-priority,cost
无容错要求,就是劈开流量——allowvlan即可
IRB桥接
(2009-10-1614:53:51)
转载
标签:
bridge-group
bridge
irb
bvil
discard
杂谈
分类:cisco路由器和交换机配置
配置IRB三大步骤
基本桥接
InterfaceFastEthernetO/O
noipaddress
bridge-group1
!
interfaceFastEthernetO/1
noipaddress
bridge-group1
!
bridge1protocolieee
全局起用IRB
bridgeirb此句经常忘记配
interfaceBVI1
ipaddress6324
•BVI接口号与bridge-group组号匹配
•BVI和实际接口一样,也有MAC地址
两个ROUTER四个接口都设桥组,都不设地址
RIR3
interfaceEthernetO/O
bridge-group1
interfaceserial0/0
bridge-group1
bridge1protocolieeeinterfaceserial0
bridge-group1
interfaceEthernet0
bridge-group1
bridge1protocolieee
bridge-group过滤---桥接同时按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)
转载
标签:
ipsec
基本配置
nat配置
杂谈
分类:cisco路山器和交换机配置
一个典型的IPsec的例子
routeri一侧的hostA(3)试图访问router2一侧的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
静态路由应该在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
静态路由应该在IPSEC前先配通
access-list155permittcphost4host3eqwww
access-list155permittcphost4eqwwwhost3
•先配通地址,静态路由(设对端的SERVER的静态路由,指向对端地址)
•再配ipsec的ACL表,此时也不应该配IPSEC
即静态路由和IPSEC的ACL表应该基于没配IPSEC前的基本网络路由状况
,再开始配cryptoisakmp/cryptoipsectransform/cryptomap
IPSEC没有NAT功能,也没有GRE的封装功能
一个典型的(IPsec+NAT)例子
router1一侧的hostA试图访问router2一侧的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,静态路由,都以public地址为准。
AuthenticationProxy
(2009-10-1612:06:51)
转载
标签:
aaa
authorization
auth-proxy
ip
ppp
杂谈
分类:cisco路由器和交换机配置
AuthenticationProxy原理
•当一个用户发起HTTP访问穿过ROUTER,theauthenticationproxyistriggered(在接口截
获用户通过ROUTER的http包进行认证)
•authproxy先检查现存的entry有没有此用户的entry
•没有,就根据其httprequest包,发回一个httprepond包,但显示的是一个认证网页(ip
httpserver提供)
•用户在认证网页输入的username/passwd被proxy到aaaserver
•用户属于用户名密码正确,一个entry被建立,以后用户再访问就不必重复认证了
•如果radiusserver返回认证失败,则该连接被中断
•要求认证用户不一定直连到起用ipauth・proxy的接口。可以是远程用户,只要他HTTP
包通过ROUTER,就会被截获并强行认证
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,否则认证没什么意义
为避免这种"不认证反而直接穿过去”的问题,在接口设置过滤
起用HTTP访问ROUTER
iphttpserver
iphttpauthenticationaaa
直接HTTP访问ROUTER,要完全deny
iphttpaccess-class15
access-list15denyany
ipauth-proxyname...http[list...]可以限定具体用户认证
list.,可以针对具体网段的用户进行认证
permit的需要认证
deny的不需要认证,反而可以直接穿过去
ipauth-proxy新feature,支持telnet,ftp
ipauth-proxyname...{ftp|http|telnet}[list...]
option
ipauth-proxyauth-cache-timemin用户的条目存活时间是,缺省60min
ipauth-proxyauth-proxy-banner设置auth-proxy的banner;缺省是disable
ipauth-proxy{inactivity-timer...|absolute-timer...}
verifty
showipauth-proxy
CISCOAAA认证配置
(2009-10-1523:39:28)
转载
标签:
radius
aaa
authetication
radius-server
group
server
分类:cisco路山器和交换机配置
三个SecurityServerProtocols的区另ll
RADIUSTACACS+Kerberos
distributedclient/server
AAAsystem普通AAA提供AAAservice的secret-keynetwork
authenticationprotocol
UDP1645(认证)
1646(accounting)TCP(49)
AAA配置五大部分:
1.enableaaanew-model
2.securityprotocolserverradius-serverhost...
tacacs-serverhost...
相关配置,等
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表示加密
定义认证串的时候,不能直接引用radiusserver,必须groupradius或者groupaaa-group-name
aaaauthenticationpppdialinsgroupradiuslocal
aaaauthenticationlogindefaultgroupradiuslocal
RADIUSServerGroupExamples
aaanew-model
aaaauthenticationpppdefaultgroupgroupl
aaaauthenticationlogindefaultgroupgroup2
!
aaagroupserverradiusgroupl(进入(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定义,同时也要有radius-server定义。二者不能混淆。
本例中radius-server为两个groupserver服务
Authenticationdefine
aaaauthenticationlogindefaultenable用enable密码作为用户telnetlogin的密码
aaaauthenticationlogindefaultline
!
linevty04
password3333line:采用line下的password指令的密码
aaaauthenticationenabledefaultgroupradiusenable密码在RADIUS上设
enable的串都是default的
(用户输入enable的时候,router发request包
至ijRADIUSserver,username是H$enabl5$.H)
authentication的Line引用
Linevty04
loginauthenticationlist-name
loginauthenticationdefault
loginauthentication
改变aaa认证显示authenticationprompt
aaanew-model
aaaauthenticationbanner*inputyournameandpass*
aaaauthenticationfail-message*Failedlogin.Tryagain.*
aaaauthenticationlogindefaultgroupradius
将显示如下
inputyournameandpass
Username:
Failedlogin.Tryagain
aaaauthenticationpassword-prompttext-string
改变输入password的prompt
aaaauthorizationexecdefaultgroupradiusif-authenticated
一旦前面的authenticaion成功,立刻就获得authorization
常规路山器安全配置
(2009-10-1519:14:34)
转载
标签:
icmp回包
rfc-1918
地址欺骗
源地址欺骗
well-known欺骗
杂谈
分类:cisco路山器和交换机配置
安全方面的一些建议:
•noipdirected-broadcast(因为容易被denial-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
防止源内部地址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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 大学生职业规划大赛《舞蹈编导专业》生涯发展展示
- 企业单位劳动合同汇编
- 企业竞业禁止合同模板
- 三方技术转让合同范本
- 与象共舞的课件
- 职工福利购房借款合同细则
- 昆明卫生职业学院《BM建模技术》2023-2024学年第二学期期末试卷
- 漯河医学高等专科学校《特殊儿童康复学A》2023-2024学年第二学期期末试卷
- 建省宁德市福鼎一中2024-2025学年初三第一次模拟考试(1月)生物试题试卷含解析
- 连云港市2025届三下数学期末学业质量监测模拟试题含解析
- 山东省济宁市任城区2024-2025学年六年级下学期期中考试生物试题(含答案)
- DB4331T 7-2024 农村社区社会工作室建设与服务
- 香港外汇管理制度规定
- 2023年中国海洋石油集团有限公司校园招聘笔试参考题库附带答案详解
- 2025年磁粉探伤工职业技能鉴定理论考试题库(浓缩500题)
- 婚姻保证忠诚协议书
- 工信委选调试题及答案
- GB/T 17591-2025阻燃织物
- 2025年中国白高粱行业发展趋势预测及投资战略咨询报告
- 详解家庭教育指导师考试试题及答案
- 2025长沙市存量房买卖合同(合同版本)
评论
0/150
提交评论