怎么给交换机端口配置固定IP的,具体的命令是什么?

发布网友 发布时间:2022-04-23 08:06

我来回答

4个回答

热心网友 时间:2022-06-18 03:11

简单就是 sw(config)#interface vlan1
#ip address ip地址 子网掩码
# no shutdown
这就行了 。没别的!

热心网友 时间:2022-06-18 03:12

不明白中兴的
cisco的配置是
sw(config)#interface vlan1
sw(vlan)#ip address ip地址 子网掩码
sw(vlan)# no shutdown

热心网友 时间:2022-06-18 03:12

<Sysname>display interface GigabitEthernet1/1
GigabitEthernet1/1 current state : UP
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 000f-e214-aa69
Description: to_GGSN3-S1-P1(Gi)
The Maximum Transmit Unit is 1500
Media type is optical fiber, loopback not set
Port hardware type is 1000_BASE_SX_MMF
1000Mbps-speed mode, full-plex mode
Link speed type is force link, link plex type is force link
Flow-control is not supported
The Maximum Frame Length is 1536
Allow jumbo frame to pass
PVID: 30
Port link-type: access
Tagged VLAN ID : none
Untagged VLAN ID : 30
Last 5 minutes output: 1037 packets/sec 4770 bytes/sec
Last 5 minutes input: 916 packets/sec 372706 bytes/sec
input: 2143716912 packets, 812336171573 bytes
931 broadcasts, 0 multicasts
input: 0 input errors, 0 runts, 0 giants, 0 throttles, 0 CRC
0 frame, - overruns, - aborts, - ignored, - parity errors
Output: 2360109251 packets, 1094809872937 bytes
4561 broadcasts, 42144 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
- aborts, 0 deferred, 0 collisions, 0 late collisions
- lost carrier, - no carrier

热心网友 时间:2022-06-18 03:13

利用交换机的Port-Security功能实现
  以下是一个配置实例:

  switch#config t

  switch(config)#int f0/1

  switch(config-if)#switchport mode access

  //设置交换机的端口模式为access模式,注意缺省是dynamic

  //dynam ic模式下是不能使用Port-security功能

  switch(config-if)#switchport port-security

  //打开port-security功能

  switch(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx

  //xxxx.xxxx.xxxx就是你要关联的mac地址

  switch(config-if)#switchport port-security maximum 1

  //其实缺省就是1

  switch(config-if)#switchport port-security violation shutdown

  //如果违反规则,就shutdown端口

  //这个时候你show int f0/1的时候就会看到接口是err-disable的

  附:

  switchport port-security命令语法

  Switch(config-if)#switchport port-security ?

  aging Port-security aging commands

  mac-address Secure mac address

  //设置安全MAC地址

  maximum Max secure addresses

  //设置最大的安全MAC地址的数量,缺省是1

  violation Security violation mode

  //设置违反端口安全规则后的工作,缺省是shutdown

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com