如何配置cisco交换机以启动DHCP服务?

2026-04-02 11:321阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计556个文字,预计阅读时间需要3分钟。

如何配置cisco交换机以启动DHCP服务?

图示如下:

说明设备使用途径:

1.使用R1配置dhcpserver2。

2.使用R2和R3代替电脑作为dhcpclient3。

3.SW1用作路由器交换机。

dhcpserver配置(R1配置):

R1> ip dhcp pool pool1R1(dhcp-config)# network 192.168.1.0 255.255.255.0R1(dhcp-config)# default-router 192.168.1.1R1(dhcp-config)# lease 24hR1(dhcp-config)# exit

如何配置cisco交换机以启动DHCP服务?

拓扑图如下:上述设备用途说明:1、使用R1做dhcpserver2、使用R2和R3代替电脑做dhcpclient3、SW1用做傻瓜交换机。dhcpserver配置(R1配置):R1

拓扑图如下:

650) this. src="img.558idc.com/uploadfile/allimg/0629/a9555102a786ae66.jpg" title="1.jpg" alt="wKiom1mAbhHgLT-uAABkvE_XhAg204.jpg" />

上述设备用途说明:

1、使用R1做dhcp server

2、使用R2和R3代替电脑做dhcp client

3、SW1用做傻瓜交换机。

dhcp server配置(R1配置):

R1#disable#############使用disable命令退出特权模式R1>R1>enable#############使用enable命令进入特权模式R1#showprivilegeCurrentprivilegelevelis15#############查看特权模式的级别#############进入配置模式R1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.R1(config)#exit#############查看接口状态R1#showipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0unassignedYESunsetadministrativelydowndownFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############进入接口进行配置R1(config)#intfastEthernet0/0R1(config-if)#noshutdownR1(config-if)#*Aug119:39:28.523:%LINK-3-UPDOWN:InterfaceFastEthernet0/0,changedstatetoup*Aug119:39:29.523:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/0,changedstatetoupR1(config-if)#ipaddress123.1.1.1255.255.255.0R1(config-if)#R1(config-if)##############在配置模式中查看接口状态需要加do前缀R1(config-if)#doshowipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0123.1.1.1YESmanualupupFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR1(config-if)##############也可使用end命令退出配置模式R1(config-if)#endR1#R1#*Aug119:43:17.991:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleR1#R1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############开启dhcpserver功能R1(config)#servicedhcpR1(config)#ipdhcppoolR123R1(dhcp-config)#network123.1.1.0255.255.255.0#############将客户端的网关指向dhcpserver接口的IPR1(dhcp-config)#default-router123.1.1.1#############将客户端的DNS指向dhcpserver接口的IPR1(dhcp-config)#dns-server123.1.1.1#############设置租期为1天0时1分R1(dhcp-config)#lease101#############配置域名为cisco.comR1(dhcp-config)#domain-namecisco.comR1(dhcp-config)#

dhcp client配置(R2和R3配置):

R2#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############禁用iprouting路由转发表,将路由器模拟为pcR2(config)#noiproutingR2(config)#intfastEthernet0/0R2(config-if)#noshutdownR2(config-if)#*Aug119:07:41.279:%LINK-3-UPDOWN:InterfaceFastEthernet0/0,changedstatetoup*Aug119:07:42.279:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/0,changedstatetoup#############开启dhcp动态获取R2(config-if)#ipaddressdhcpR2(config-if)#*Aug119:11:47.891:%DHCP-6-ADDRESS_ASSIGN:InterfaceFastEthernet0/0assignedDHCPaddress123.1.1.2,mask255.255.255.0,hostnameR2R2(config-if)#end#############查看接口状态R2#showipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0123.1.1.2YESDHCPupupFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR2##############查看单独接口状态R2#showrunning-configinterfacefastEthernet0/0Buildingconfiguration...Currentconfiguration:94bytes!interfaceFastEthernet0/0ipaddressdhcpnoiproute-cacheduplexautospeedautoend

本文出自 “甘木” 博客,请务必保留此出处ganmu.blog.51cto.com/9305511/1952781

本文共计556个文字,预计阅读时间需要3分钟。

如何配置cisco交换机以启动DHCP服务?

图示如下:

说明设备使用途径:

1.使用R1配置dhcpserver2。

2.使用R2和R3代替电脑作为dhcpclient3。

3.SW1用作路由器交换机。

dhcpserver配置(R1配置):

R1> ip dhcp pool pool1R1(dhcp-config)# network 192.168.1.0 255.255.255.0R1(dhcp-config)# default-router 192.168.1.1R1(dhcp-config)# lease 24hR1(dhcp-config)# exit

如何配置cisco交换机以启动DHCP服务?

拓扑图如下:上述设备用途说明:1、使用R1做dhcpserver2、使用R2和R3代替电脑做dhcpclient3、SW1用做傻瓜交换机。dhcpserver配置(R1配置):R1

拓扑图如下:

650) this. src="img.558idc.com/uploadfile/allimg/0629/a9555102a786ae66.jpg" title="1.jpg" alt="wKiom1mAbhHgLT-uAABkvE_XhAg204.jpg" />

上述设备用途说明:

1、使用R1做dhcp server

2、使用R2和R3代替电脑做dhcp client

3、SW1用做傻瓜交换机。

dhcp server配置(R1配置):

R1#disable#############使用disable命令退出特权模式R1>R1>enable#############使用enable命令进入特权模式R1#showprivilegeCurrentprivilegelevelis15#############查看特权模式的级别#############进入配置模式R1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.R1(config)#exit#############查看接口状态R1#showipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0unassignedYESunsetadministrativelydowndownFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############进入接口进行配置R1(config)#intfastEthernet0/0R1(config-if)#noshutdownR1(config-if)#*Aug119:39:28.523:%LINK-3-UPDOWN:InterfaceFastEthernet0/0,changedstatetoup*Aug119:39:29.523:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/0,changedstatetoupR1(config-if)#ipaddress123.1.1.1255.255.255.0R1(config-if)#R1(config-if)##############在配置模式中查看接口状态需要加do前缀R1(config-if)#doshowipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0123.1.1.1YESmanualupupFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR1(config-if)##############也可使用end命令退出配置模式R1(config-if)#endR1#R1#*Aug119:43:17.991:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleR1#R1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############开启dhcpserver功能R1(config)#servicedhcpR1(config)#ipdhcppoolR123R1(dhcp-config)#network123.1.1.0255.255.255.0#############将客户端的网关指向dhcpserver接口的IPR1(dhcp-config)#default-router123.1.1.1#############将客户端的DNS指向dhcpserver接口的IPR1(dhcp-config)#dns-server123.1.1.1#############设置租期为1天0时1分R1(dhcp-config)#lease101#############配置域名为cisco.comR1(dhcp-config)#domain-namecisco.comR1(dhcp-config)#

dhcp client配置(R2和R3配置):

R2#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.#############禁用iprouting路由转发表,将路由器模拟为pcR2(config)#noiproutingR2(config)#intfastEthernet0/0R2(config-if)#noshutdownR2(config-if)#*Aug119:07:41.279:%LINK-3-UPDOWN:InterfaceFastEthernet0/0,changedstatetoup*Aug119:07:42.279:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/0,changedstatetoup#############开启dhcp动态获取R2(config-if)#ipaddressdhcpR2(config-if)#*Aug119:11:47.891:%DHCP-6-ADDRESS_ASSIGN:InterfaceFastEthernet0/0assignedDHCPaddress123.1.1.2,mask255.255.255.0,hostnameR2R2(config-if)#end#############查看接口状态R2#showipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0123.1.1.2YESDHCPupupFastEthernet0/1unassignedYESunsetadministrativelydowndownSerial1/0unassignedYESunsetadministrativelydowndownSerial1/1unassignedYESunsetadministrativelydowndownSerial1/2unassignedYESunsetadministrativelydowndownSerial1/3unassignedYESunsetadministrativelydowndownR2##############查看单独接口状态R2#showrunning-configinterfacefastEthernet0/0Buildingconfiguration...Currentconfiguration:94bytes!interfaceFastEthernet0/0ipaddressdhcpnoiproute-cacheduplexautospeedautoend

本文出自 “甘木” 博客,请务必保留此出处ganmu.blog.51cto.com/9305511/1952781