CISCO交换机命令全集加说明3( 二 )


port Port interface number ranging from 1 to 27:1 to 25 Ethernet (fixed)26, 27 Fast Ethernet (fixed)1 to 4 Fast Ethernet (4-port Fast Ethernet repeater module)1 to 8 Fast Ethernet (8-port Fast Ethernet repeater module)

Default
No default interface.
Command Mode
Global configuration
Example
This example shows how to enable configuration on Ethernet port 1.
hostname(config)# interface ethernet 0/1

This example shows how to enable configuration on ATM module 1.
hostname(config)# interface atm 1
Related Commands
configure
disable
enable
end
exit
line console
ip (address)
Use the ip address global configuration command to configure the IP address and subnet mask. Use the no ip address command to set the IP address and subnet mask to default values.
ip address ipaddress mask
no ip address
Syntax Description
ipaddress IP address.
mask Subnet mask.

Default
IP address and subnet mask both have the value 0.0.0.0.
Command Mode
Global configuration
Example
This example shows how to set the device IP address to 172.20.128.126 and the subnet mask to 255.255.255.0 on the specified interface.
hostname(config)# ip address 172.20.128.126 255.255.255.0
Related Commands
ip (default-gateway)
ip (domain-name)
ip (http port)
ip (http server)
ip (mgmt-vlan)
ip (name-server)
show (ip)
ip (default-gateway)
Use the ip default-gateway global configuration command to configure the default gateway. Use the no ip default-gateway command to delete a configured default gateway and to set the gateway address to the default value.

ip default-gateway ip-address
no ip default-gateway
Syntax Description
ip-address Gateway IP address.

Default
Gateway address has the value 0.0.0.0.
Command Mode
Global configuration
Example
This example shows how to set the default gateway address to 172.20.128.126.
hostname(config)# ip default-gateway 172.20.128.126
Related Commands
ip (address)
ip (domain-name)
ip (http port)
ip (http server)
ip (mgmt-vlan)
ip (name-server)
show (ip)
ip (domain-name)
Use the ip domain-name global configuration command to configure a domain name. Use the no ip domain-name command to clear any configured domain name.
ip domain-name domain-name
no ip domain-name
Syntax Description
domain-name A string between 1 and 62 characters that specifies the domain name.

Default
No domain name is configured.
Command Mode
Global configuration
Example
This example shows how to configure the domain name of the switch to your_company.com.
hostname(config)# ip domain-name your_company.com
Related Commands
ip (address)
ip (default-gateway)
ip (http port)
ip (http server)
ip (mgmt-vlan)
ip (name-server)
show (ip)
ip (http port)
Use the ip http port global configuration command to select a Transmmission Control Protocol (TCP) port on which the Hypertext Transfer Protocol (HTTP) server accepts connections. Use the no ip http port command to select the default TCP port.
ip http port port-number
no ip http port
Syntax Description
port-number TCP port number between 0 and 65535.

Default
TCP port 80.
Command Mode
Global configuration
Example
This example shows how to set the server to listen on TCP port 8080 for HTTP connections. With this (nondefault) setting, you must instrUCt your browser to connect to port 8080 rather than 80.
hostname(config)# ip http port 8080
Related Commands
ip (address)
ip (default-gateway)
ip (domain-name)
ip (http server)
ip (mgmt-vlan)
ip (name-server)
show (ip)
ip (http server)
Use the ip http server global configuration command to enable Hypertext Transfer Protocol (HTTP) server functions. Use the no ip http server command to disable HTTP server functions.
ip http server
no ip http server
Syntax Description

推荐阅读