配置交换机IP地址的命令
5.3.2.1 ip address

    命令:ip address [ip-address] [mask] [secondary]

    no ip address [[ip-address] [mask]] [secondary]

    功能:设置交换机的ip地址及掩码;本命令的no操作为删除该ip地址配置。

    参数:[ip-address]为ip地址,点分十进制格式;[mask]为子网掩码,点分十进制格式; [secondary]为表示配置的ip地址为从ip地址。

    缺省情况:出厂时交换机无ip地址。

    命令模式:vlan接口配置模式

    使用指南:用户若要为交换机配置ip地址,必须首先创建一个vlan接口。

    举例:设置vlan1接口的ip地址为10.1.128.1/24。

    switch(config)#interface vlan 1

    switch(config-if-vlan1)#ip address 10.1.128.1 255.255.255.0

    switch(config-if-vlan1)#no shut

    switch(config-if-vlan1)#exit

    switch(config)#

    相关命令:ip bootp-client enable、ip dhcp-client enable

    5.3.2.2 ip bootp-client enable

    命令:ip bootp-client enable

    no ip bootp-client enable

    功能:使能交换机为bootp client,通过bootp协商方式获取ip地址及网关地址;本命令的no操作为关闭bootp client功能,并且释放以bootp方式获取的地址和网关地址。

    缺省情况:缺省关闭bootp client功能。

    命令模式:vlan接口配置模式

    使用指南:通过bootp方式获取ip地址和手工配置、dhcp方式获取ip地址是互斥的,不允许同时打开两种获取ip地址的方式。

    举例:通过bootp方式获取ip地址。

    switch(config)#interface vlan 1

    switch(config-if-vlan1)#ip bootp-client enable

    switch(config-if-vlan1)#no shutdown

    switch(config-if-vlan1)#exit

    switch(config)#

    相关命令:ip address、ip dhcp-client enable

    5.3.2.3 ip dhcp-client enable

    命令:ip dhcp-client enable

    no ip dhcp-client enable

    功能:使能交换机为dhcp client,通过dhcp协商方式获取ip地址及网关地址;本命令的no操作为关闭dhcp client功能,并且释放以dhcp方式获取的地址和网关地址。

    缺省情况:缺省关闭dhcp client功能。

    命令模式:vlan接口配置模式

    使用指南:通过dhcp方式获取ip地址和手工配置、bootp方式获取ip地址是互斥的,不允许同时打开两种获取ip地址的方式。

    举例:通过dhcp方式获取ip地址。

    switch(config)#interface vlan 1

    switch(config-if-vlan1)#ip dhcp-client enable

    switch(config-if-vlan1)#no shut

    switch(config-if-vlan1)#exit

    switch(config)#

    相关命令:ip address、ip bootp-client enable

   
神州数码 DCRS-5512GC 相关内容:报价 | 参数 | 图片 | 论坛 | 评测