分享
 
 
 

Cisco Catalyst 2950 配置-实现端口与IP的绑定

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

在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#

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有