關於Cisco路由器配置DHCP全面詳解

2021-05-22 08:44:53 字數 1724 閱讀 9351

了解一些關於路由器配置

dhcp的知識還是很重要的,這裡主要分析了cisco

路由器配置dhcp的主要步驟和配置語句。某單位使用cisco 3620作為ios dhcp server,它和內網相連的fastethernet0埠的ip位址為192.168.1.4,二層交換機採用兩台cisco 2950,三層交換機採用一台cisco 3550。

在整個網路中有二個vlan,為簡化描述,假設每個vlan都採用24位網路位址,其中vlan1的ip位址為192.168.1.254,vlan2的ip位址為192.168.2.254。在cisco裝置上實現ios dhcp server功能以使各vlan中的主機自動獲得ip位址。

路由器配置dhcp伺服器的資料庫被組織成乙個樹形結構,樹根是用於動態分配的所有網路段的位址池,樹枝是子網位址池,樹葉是手工繫結給節點的位址。具體操作步驟如下:首先登陸到cisco 3640路由器上:

ghq>enable  

password(輸入路由器的特權口令)  

ghq #config terminal (進入配置模式)  

enter configuration commands one per line.  end with cntl/z.  

ghqconfig # ip dhcp pool global  

ghq dhcp-config #network 192.168.0.0 255.255.0.0(動態分配的位址段)  

ghqdhcp-config #domain-name ghq.com(為客戶機配置域字尾)  

ghqdhcp-config #dns-server 192.168.1.1(為客戶機配置dns伺服器)  

ghqdhcp-config #netbios-name-server 192.168.1.1(為客戶機配置wins伺服器)  

ghqdhcp-config #netbios-node-type h-node(為客戶機配置h節點模式)  

ghqdhcp-config #lease 30 (位址租用期為30天)  

ghqdhcp-config #ip dhcp pool vlan1   

ghqdhcp-config #network 192.168.1.0 255.255.255.0   

ghqdhcp-config#default-router 192.168.1.254   

ghqdhcp-config #ip dhcp pool vlan2   

ghqdhcp-config#network 192.168.2.0 255.255.255.0  

ghqdhcp-config #default-router 192.168.2.254 

設定不能用於動態分配的ip位址

在整個網路中,有些ip位址需要靜態的指定給一些特定的裝置,例如路由器埠、wins伺服器以及vlan的位址等。顯然,這些靜態ip位址是不能用於動態分配的,這就需要將它們排除掉。其步驟如下:

ghqconfig #ip dhcp excluded-address 192.168.1.1 192.168.1.5    

ghqconfig # ip dhcp excluded-address 192.168.1.254  

ghqconfig # ip dhcp excluded-address 192.168.2.254  

在CISCO路由器上配置DHCP與DHCP中繼

企業dhcp需求描述 在大型企業中,一般都有很多個部門,各部門之間有時要求不能互通,這可以通過使用vlan來解決,但是上千個人ip配置也是一件極大耗費人力的事。所以我們迫切需求一種全自動的,高效的配置方法,通過dhcp配置ip位址的方法很好地為我們解決了這個問題。網路拓撲如下 650 this.wi...

cisco路由器配置

cisco路由器配置的幾個常用命令 router enable 進入特權模式 router conf t 進入配置模式 router config int fa0 0 進入fa0 0介面 router config if ip add 192.168.1.1 255.255.255.0 給fa0 0...

CISCO路由器DHCP 配置

實驗拓撲 基本配置 r5充當dhcp 伺服器 ip dhcp pool vlan146 network 155.1.146.0 24 default router 155.1.146.4 dns 202.106.46.151 exit ip dhcp excluded address 155.1.1...