Cisco Router and switch 配置命令(五)

一、交换机上设置登陆口令

Switch(config)# enable password level level password 

Switch(config)# no enable password level level password

hostname

1900/2900(config)#hostname hostname
IP Address

1900(config)#ip address {ip address} {mask}

1900(config)#ip address 10.5.5.11 255.255.255.0
2950(config#interface vlan 1

2950(config-if)#ip address {ip_address} {mask}

2950(config)#interface vlan 1

2950(config-if)#ip address 10.5.5.11 255.255.255.0
default gateway

1900/2950(config)#ip default-gateway {ip address}

1900/2950(config)#ip default-gateway 172.20.137.1

二、查看交换机的IP地址

1900#show ip

IP address: 10.5.5.11

Subnet mask: 255.255.255.0

Default gateway: 10.5.5.3

Management VLAN: 1

2950#show interface vlan 1

Vlan1 is up, line protocol is up

Hardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800)

Internet address is 172.16.80.79/24

Broadcast address is 255.255.255.255

三、设置双工选项

1900(config)#interface e0/1

1900(config-if)#duplex {auto | full |full-flow-control | half}

2950(config)#interface fe0/1

2950(config-if)#duplex {auto | full | half}

四、设置端口速度:switch(config-if)# speed {10|100|auto}

五、查勘双工选项

Switch#show interfaces fastethernet0/3
     查看MAC地址表

1900/2950#show mac-address-table

六、配置永久MAC地址

1900(config)#mac-address-table permanent {mac-address type module/port}

1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/3

1900#show mac-address-table

2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]

七、配置受限静态MAC地址

1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}

1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1

1900#show mac-address-table

2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]

2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 1

2950#show mac-address-table

八、配置端口安全性

1900(config-if)#port secure max-mac-count count

1900(config)#interface e0/4

1900(config-if)#port secure

1900(config-if)#port secure max-mac-count 1

1900(config)#address-violation {suspend | disable | ignore

1900# show mac-address-table security
2950(config-if)#port security max-mac-count count

2950(config)#interface fa0/1

2950(config-if)#port security

2950(config-if)#port security max-mac-count 10

2950(config-if)#port security action {shutdown | trap}

2950#show mac-address-table secure

2950#show port-security

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值