×

关注微信公众号

免备案网站空间虚拟主机双线空间域名查询PS数码后期
photoshop互助课堂数百G视频教程下载英语培训机构初中英语如何学随时随地聆听大师开讲/课堂
酷素材!视频教程打包下手绘教程抠图教程路径专辑photoshop cs3视频教程
楼主: yangcage

Extended ACL来实现端口与IP的绑定

[复制链接]
发表于 2008-1-4 14:01:30 | 显示全部楼层 |阅读模式
在Cisco catalyst 2950交换机上,通过配置extended ACL来实现端口与IP的绑定。
配置如下:

2950#show run
Current configuration : 5396 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2950
!
enable secret 5 $1$kJ.v$gF4osmkOwfvOy7vkwI3j/.
!
ip subnet-zero
!
no ip domain-lookup
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
spanning-tree uplinkfast
!
interface FastEthernet0/1
switchport access vlan 30
switchport mode access
ip access-group ip1 in
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
ip access-group ip2 in
spanning-tree portfast
!
interface FastEthernet0/3
switchport access vlan 30
switchport mode access
ip access-group ip3 in
spanning-tree portfast
!
interface FastEthernet0/4
switchport access vlan 30
switchport mode access
ip access-group ip4 in
spanning-tree portfast
!
interface FastEthernet0/5
switchport access vlan 30
switchport mode access
ip access-group ip5 in
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 30
switchport mode access
ip access-group ip6 in
spanning-tree portfast
!
interface FastEthernet0/7
switchport access vlan 30
switchport mode access
ip access-group ip7 in
spanning-tree portfast
interface FastEthernet0/8
switchport access vlan 30
switchport mode access
ip access-group ip8 in
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 30
switchport mode access
ip access-group ip9 in
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 30
switchport mode access
ip access-group ip10 in
spanning-tree portfast
!
interface FastEthernet0/11
switchport access vlan 30
switchport mode access
ip access-group ip11 in
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 30
switchport mode access
ip access-group ip12 in
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 30
switchport mode access
ip access-group ip13 in
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 30
switchport mode access
ip access-group ip14 in
spanning-tree portfast
!
interface FastEthernet0/15
switchport access vlan 30
switchport mode access
ip access-group ip15 in
spanning-tree portfast
!
interface FastEthernet0/16
switchport access vlan 30
switchport mode access
ip access-group ip16 in
spanning-tree portfast
!
interface FastEthernet0/17
switchport access vlan 30
switchport mode access
ip access-group ip17 in
spanning-tree portfast
!
interface FastEthernet0/18
switchport access vlan 30
switchport mode access
ip access-group ip18 in
spanning-tree portfast
!
interface FastEthernet0/19
switchport access vlan 30
switchport mode access
ip access-group ip19 in
spanning-tree portfast
!
interface FastEthernet0/20
switchport access vlan 30
switchport mode access
ip access-group ip20 in
spanning-tree portfast
!
interface FastEthernet0/21
switchport access vlan 30
switchport mode access
ip access-group ip21 in
spanning-tree portfast
!
interface FastEthernet0/22
switchport access vlan 30
switchport mode access
ip access-group ip22 in
spanning-tree portfast
!
interface FastEthernet0/23
switchport access vlan 30
switchport mode access
ip access-group ip23 in
spanning-tree portfast
!
interface FastEthernet0/24
switchport access vlan 30
switchport mode access
ip access-group ip24 in
spanning-tree portfast
!
interface GigabitEthernet0/1
switchport mode trunk
!
interface GigabitEthernet0/2
spanning-tree stack-port
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
interface Vlan100
ip address 192.168.100.22 255.255.255.0
no ip route-cache
!
ip default-gateway 192.168.100.254
ip http server
!
ip access-list extended ip1
permit ip host 192.168.30.1 any
ip access-list extended ip10
permit ip host 192.168.30.10 any
ip access-list extended ip11
permit ip host 192.168.30.11 any
ip access-list extended ip12
permit ip host 192.168.30.12 any
ip access-list extended ip13
permit ip host 192.168.30.13 any
ip access-list extended ip14
permit ip host 192.168.30.14 any
ip access-list extended ip15
permit ip host 192.168.30.15 any
ip access-list extended ip16
permit ip host 192.168.30.16 any
ip access-list extended ip17
permit ip host 192.168.30.17 any
ip access-list extended ip18
permit ip host 192.168.30.18 any
ip access-list extended ip19
permit ip host 192.168.30.19 any
ip access-list extended ip2
permit ip host 192.168.30.2 any
ip access-list extended ip20
permit ip host 192.168.30.20 any
ip access-list extended ip21
permit ip host 192.168.30.21 any
ip access-list extended ip22
permit ip host 192.168.30.22 any
ip access-list extended ip23
permit ip host 192.168.30.23 any
ip access-list extended ip24
permit ip host 192.168.30.24 any
ip access-list extended ip3
permit ip host 192.168.30.3 any
ip access-list extended ip4
permit ip host 192.168.30.4 any
ip access-list extended ip5
permit ip host 192.168.30.5 any
ip access-list extended ip6
ip access-list extended ip5
permit ip host 192.168.30.5 any
ip access-list extended ip6
permit ip host 192.168.30.6 any
ip access-list extended ip7
permit ip host 192.168.30.7 any
ip access-list extended ip8
permit ip host 192.168.30.8 any
ip access-list extended ip9
permit ip host 192.168.30.9 any
snmp-server community private RO
!
line con 0
line vty 0 4
password !@#$%
login
line vty 5 15
password !@#$%
login
!
!
end
2950#
本帖的地址:http://bbs.jcwcn.com/forum.php?mod=viewthread&tid=149580
跟着教程做一遍,做完的图要到这里评论交作业,教程有看不懂的地方,可以在贴子下面评论
发表于 2017-8-30 13:55:11 | 显示全部楼层
酷素材
楼主是超人
回复 支持 反对

使用道具 举报

发表于 2017-8-30 13:37:03 | 显示全部楼层
难得一见的好帖
回复 支持 反对

使用道具 举报

发表于 2017-8-30 13:24:00 | 显示全部楼层
说的非常好
回复 支持 反对

使用道具 举报

发表于 2017-8-30 13:41:28 | 显示全部楼层
酷素材
果断收藏了
回复 支持 反对

使用道具 举报

发表于 2017-8-30 13:57:59 | 显示全部楼层
酷素材
楼主我支持你
回复 支持 反对

使用道具 举报

发表于 2017-11-11 16:13:32 | 显示全部楼层
很不错。。。
回复 支持 反对

使用道具 举报

发表于 2017-11-11 15:56:48 | 显示全部楼层
好帖就是要顶
回复 支持 反对

使用道具 举报

发表于 2017-11-11 16:34:20 | 显示全部楼层
说的非常好
回复 支持 反对

使用道具 举报

发表于 2017-11-11 16:34:45 | 显示全部楼层
学习了。。。
回复 支持 反对

使用道具 举报

发表于 2017-11-11 15:49:48 | 显示全部楼层
好帖子要收藏
回复 支持 反对

使用道具 举报

发表于 2018-3-22 13:03:26 | 显示全部楼层
很不错。。。
回复 支持 反对

使用道具 举报

发表于 2018-3-22 13:23:10 | 显示全部楼层
顶顶多好
回复 支持 反对

使用道具 举报

发表于 2018-3-22 13:42:34 | 显示全部楼层
真心顶。。。。
回复 支持 反对

使用道具 举报

发表于 2018-3-22 13:13:20 | 显示全部楼层
说的非常好
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | [立即注册]

本版积分规则

2345