|
R1#disable
#############使用 disable 命令退出特权模式
R1>
R1>enable
#############使用 enable 命令进入特权模式
R1#show privilege
Current privilege level is 15
#############查看特权模式的级别
############# 进入配置模式
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#exit
#############查看接口状态
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
#############进入接口进行配置
R1(config)#int fastEthernet 0/0
R1(config-if)#no shutdown
R1(config-if)#
*Aug 1 19:39:28.523: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Aug 1 19:39:29.523: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip address 123.1.1.1 255.255.255.0
R1(config-if)#
R1(config-if)#
#############在配置模式中查看接口状态需要加 do 前缀
R1(config-if)#do show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 123.1.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
R1(config-if)#
#############也可使用 end 命令退出配置模式
R1(config-if)#end
R1#
R1#
*Aug 1 19:43:17.991: %SYS-5-CONFIG_I: Configured from console by console
R1#
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
#############开启dhcp server 功能
R1(config)#service dhcp
R1(config)#ip dhcp pool R123
R1(dhcp-config)#network 123.1.1.0 255.255.255.0
#############将客户端的网关指向 dhcp server 接口的IP
R1(dhcp-config)#default-router 123.1.1.1
#############将客户端的DNS指向 dhcp server 接口的IP
R1(dhcp-config)#dns-server 123.1.1.1
#############设置租期为1天0时1分
R1(dhcp-config)#lease 1 0 1
#############配置域名为cisco.com
R1(dhcp-config)#domain-name cisco.com
R1(dhcp-config)# |
|