- A+
配置CISCO路由測試兩臺主機是連接 Router(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#interface f0/1
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#no shutdown
R3(config)#interface fastEthernet 0/1
R3(config-if)#ip address 192.168.3.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.4.254 255.255.255.0
R3(config-if)#no shutdown
R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2
R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2
R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1
查看路由表
R1#show ip route
【思科技術】Cisco路由器SSH配置
1、 給路由器配置一個IP地址
interface GigabitEthernet 0/0
ip address x.x.x.x 255.255.255.0
2、 配置路由器的名字(默認名字一定要改變)
hostname R1
3、 配置路由器的域名。路由器的域名一定要配置,隨便配置一個就可以了
Ip domain-name test.com
4、 產生非對稱密鑰,密鑰的名字是:R1.test.com。然后詢問密鑰的長度,這里輸入1024。
稍后路由器提示“SSH 1.99 has been enabled”,表示路由器可以支持SSH了。聯合網訊官方微信SYUNI-1024
crypto key generate rsa
5、 配置VTY用戶使用本地驗證,驗證的方法是SSH
username cisco,123 password cisco,123
line vty 0 4
login local
transport input ssh
6、 優化調整SSH
ip ssh timeout 15 SSH窗口的超時時間,此時提示輸入密碼,如果用戶遲疑15秒鐘,然后再輸入,則認為已經超時,需刷新后重新輸入
ip ssh authentication-retries 3 每次SSH連接允許嘗試的次數,三次登錄失敗后,需再次連接SSH聯合網訊官方微信SYUNI-1024
-THE END -
有人用微信聊天,有人卻在微信中每天學習,自我成長。我們現在的很多時間都是碎片的,你可以用它來發呆,也可以用它來玩游戲,也可以關注一些優質的微信公眾號(聯合網訊官方微信SYUNI-1024),每天成長一點點。
※版權與免責聲明:
本平臺所發布、轉載、摘編的文章部分來源于互聯網,轉載目的在于傳遞更多信息, 如作品內容、版權和其它問題侵害到您的權益,請與本平臺聯系, 聯系方式:QQ39367144
請您多多關注聯合網訊官方微信每天發送的文章,只要發現以【網訊活動公告】為標題的文章,那恭喜您了,快按要求操作100%送您禮品每期禮品內容不定,請多留意聯合網訊官方微信SYUNI-1024
Cisco路由器配置入門知識(基礎)
Cisco路由配置基礎
剛剛接觸cisco路由配置,下面是學習的筆記,感覺命令還是多敲才能熟悉
一、 所處狀態各類
router>
用戶處于用戶命令狀態,可以查看網絡和主機
router#
用戶處于特權模式,可以查看狀態,還可以看到和更改路由器的設置內容
router(config)#
全局配置狀態,可以設置路由的全局參數
router(config-if)#;router(config-line)#;router(config-router)#.....
處于局部配置狀態,可以設置路由的局部參數
二、配置端口ip
命令
en
config t //全局模式
interface f0/0
ip address 192.168.1.1 255.255.255.0 //設置端口ip
no shu //生效
exit
interface f0/1
ip address 192.168.10.1 255.255.255.0
no shu
exit
end
disable
三、配置靜態路由
命令
en
config t //全局模式
ip route 192.168.100.0 255.255.255.0 192.168.10.2 //到192.168.100.0/24通過192.168.10.2接口
end
show ip route //可以看到前面標明S,即為靜態路由
四、配置動態路由(RIP)
命令
en
config t //全局模式
no route rip //禁止rip協議
route rip
network 192.168.1.0 //network參數為路由的兩個端口對應的網絡地址
network 192.168.10.0
exit
end
disable
五、配置DHCP
命令
en
config t //全局模式
ip dhcp excluded-address 192.168.1.1 //需要排除的ip地址
ip dhcp pool gr-dhcp-pool //ip地址池名
default-server 192.168.1.1 //指定dhcp服務器
network 192.168.1.0 255.255.255.0 //配置網絡
dns-server 61.177.7.1 //配置dns服務器
exit
end
disable
可以通過 ip helper-address指定 DHCP中繼代理
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
ip helper-address 192.168.10.2 \\配置DHCP中繼代理,DHCP
六、配置NAT
命令
en
config t //全局模式
interface f0/0
ip address 192.168.1.1 255.255.255.0
ip nat inside //內部端口
no shu
exit
interface f0/1
ip address 192.168.10.1 255.255.255.0
ip nat outside //外部端口
no shu
exit
access-list 1 permit any //設置一個可訪問列表
ip nat pool gr-nat-pool 192.168.10.3 192.168.10.254 netmask 255.255.255.0 //設置分配池
ip nat inside resource list 1 pool gr-nat-pool overload
show ip nat traslations
clear ip nat traslation *
七、其它
sh running-config //顯示當前運行配置
sh startup-config //顯示開機配置
sh ip route //顯示路由
sh nat traslations //顯示nat當前情況
微思網址:http://www.xmws.cn
騰訊微博:http://t.qq.com/xmwisdom
新浪微博:http://weibo.com/xmwisdom
思科路由器配置端口帶寬限制
網絡傳輸速率變慢的主要原因,往往是某些用戶對網絡的濫用。當使用MRTG等流量監控軟件檢測到流量來源于某個端口時,可以在核心交換機、匯聚交換 機,甚至接入交換機上,對相應的端口作必要的處理,限制其傳輸帶寬,從而限制每個用戶所允許的最大流量,以便使其他網絡用戶能夠Oracle_shujuku/index.html' target='_blank'>恢復正常的網絡應用服務。
第一步:進入全配置模式。
Switch# config terminal
第二步:指定欲配置的接口。
Switch(config)# interface interface-id
第三步:配置端口帶寬控制。其中,input/output表明在輸入和輸出方向應用該帶寬限制,通常情況下,應當進 行雙向限制。access-group acl-index用于定義使用該帶寬限制的訪問列表。bps用于定義限制帶寬,以bps為單位,并采用8 kbps的增量。burst-normal用于定義所允許的普通突發速率,burst-max用于定義所允許的最大突發速率。conform- action conform-action用于指定在規定最大帶寬時所執行的操作,通常為transmit,即允許發送。exceed-action exceed-action則用于指定在規定最大帶寬時所執行的操作,通常為drop,即丟棄。
Switch(config-if)# rate-limit {input | output} [access-group acl-index] bps burst-normal burst-max conform-action conform-action exceed-action exceed-action
第四步:返回特權配置模式。
Switch(config-if)# end
第五步:顯示并校驗該接口當前的配置。
Switch# show interface interface-id
第六步:保存帶寬限制配置。
Switch# copy running-config startup-config
例如,若欲限制GigabitEthernet4/4帶寬為128 kbps,當連接的普通突發速率、最大突發在8 kBytes(即64 kbps)9 kBytes(即72 kbps)范圍內時,所執行的操作是transmit(傳輸即發送);當超出該范圍時,則相應的操作就是drop.其中,128 000用于限制最大帶寬,8 000和9 000則用于限制突發連接,保證不因個別用戶的大量傳輸而使整個鏈路性能大幅度下降。限制輸入和輸出速率后,該端口配置如下:
interface GigabitEthernet4/4
no switchport
description tushuguan
ip address 211.82.220.9 255.255.255.248
ip access-group 120 in
ip access-group 120 out [nextpage]
rate-limit output access-group 102 128000 8000 9000 conform-action transmit exceed-action drop
rate-limit input access-group 102 128000 8000 9000 conform-action transmit exceed-action drop!
IP訪問列表只需設置應用帶寬限制的IP地址范圍(192.168.0.0 ~ 192.168.255.255)即可,內容如下:
access-list 102 permit ip 192.168.0.0 0.0.255.255 any
【注意】 在啟用寬帶限制之前,必須先在全局模式下執行"ip cef"命令,啟用交換機的快速轉發技術。
微思網址:http://www.xmws.cn
騰訊微博:http://t.qq.com/xmwisdom
新浪微博:http://weibo.com/xmwisdom
思科路由器初始配置
CISCO路由器初始配置手冊
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: y
您是否進入初始化配置對話,選Y
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.Basic management setup configures
only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system
Would you like to enter basic management setup? [yes/no]: n
您是否進入基本配置安裝,選N
First, would you like to see the current interface summary? [yes]: y
首先,您是否看一下當前端口狀態
Any interface listed with OK? value "NO" does not have a valid configuration
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0unassigned NO unset up down
Serial0/0 unassigned NO unset down down
FastEthernet0/1unassigned NO unset up down
Configuring global parameters:
Enter host name [Router]:RouterA
輸入路由器的名字
The enable secret is a password used to protect access to
privileged EXEC and configuration modes. This password, after
entered, becomes encrypted in the configuration.
Enter enable secret: aaa
輸入密文
The enable password is used when you do not specify an
enable secret password, with some older software versions, and
some boot images.
Enter enable password: bbb
輸入密碼(不能和密文相同)
The virtual terminal password is used to protect
access to the router over a network interface.
Enter virtual terminal password: ccc
輸入虛擬終端的密碼(以備遠程登錄)
Configure SNMP Network Management? [yes]: n
配置簡單網管嗎?選N
Configure IP? [yes]: y
配置IP嗎?選Y
Configure IGRP routing? [yes]: n
配置IGRP路由選擇協議嗎?選N
Configure RIP routing? [no]:
配置IGRP路由選擇協議嗎?選N
Configure bridging? [no]:
配置橋接嗎?選N
Async lines accept incoming modems calls. If you will have
users dialing in via modems, configure these lines.
Configure Async lines? [yes]: n
配置異步線路嗎?選N
Configuring interface parameters:
Do you want to configure FastEthernet0/0 interface? [yes]: y
您是否想配置fastethernet0/0接口?選Y
Use the 100 Base-TX (RJ-45) connector? [yes]: y
用RJ45的連接器嗎?選Y
Operate in full-duplex mode? [no]: y
選用全雙工模式?選Y
Configure IP on this interface? [yes]: y
在這個接口上配置IP嗎?選Y
IP address for this interface: 192.168.0.1
配置該接口的IP地址(在此地址為192.168.0.1
Subnet mask for this interface [255.255.255.0] :
配置該接口的子網掩碼.(默認的是255.255.255.0,可以手工輸入修改)
Class C network is 192.168.0.0, 24 subnet bits; mask is /24
Do you want to configure Serial0/0 interface? [yes]: y
您想配置serial0/0接口嗎?選Y
Some supported encapsulations are
ppp/hdlc/frame-relay/lapb/x25/atm-dxi/smds
Choose encapsulation type [hdlc]:
選擇封裝方式(默認的封裝方式是HDLC,您可根據與您的路由器相連選用的封裝類型來決
定用什么樣的封裝類型
No serial cable seen.
Choose mode from (dce/dte) [dte]:
(因為沒有連串口線所以會讓您選擇設備類型)
Configure IP on this interface? [yes]: y
(在接口上配置IP)
Configure IP unnumbered on this interface? [no]:
IP address for this interface: 172.16.0.5
配置該接口的IP地址(在此地址為172.16.0.5)
Subnet mask for this interface [255.255.0.0] : 255.255.255.252
配置該接口的子網掩碼.(默認的是255.255.0.0,可以手工輸入修改為255.255.255.252)
Class B network is 172.16.0.0, 30 subnet bits; mask is /30
(以下配置同上)
Do you want to configure FastEthernet0/1 interface? [yes]:
Use the 100 Base-TX (RJ-45) connector? [yes]:
Operate in full-duplex mode? [no]: y
Configure IP on this interface? [yes]: y
IP address for this interface: 172.16.0.9
Subnet mask for this interface [255.255.0.0] : 255.255.255.252 Class B network is 172.16.0.0, 30 subnet bits; mask is /30
The following configuration command script was created:
(把您的配置顯示出來)
hostname aaa
enable secret 5 $1$ul/V$ezbZFgvzGHD.YPSieC0Ew/
enable password RouterA
line vty 0 4
password ccc
no snmp-server
!
ip routing
no bridge 1
!
interface FastEthernet0/0
media-type 100BaseX
full-duplex
ip address 192.168.0.1 255.255.255.0
!
interface Serial0/0
encapsulation hdlc
ip address 172.16.0.5 255.255.255.252
!
interface FastEthernet0/1
media-type 100BaseX
full-duplex
ip address 172.16.0.9 255.255.255.252
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
!
end
以下提示您是否保存這次設置
[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
Enter your selection [2]: 2
選擇2保存設置并存入NVRAM中
Building configuration...
[OK] Use the enabled mode 'configure' command to modify this configuration.
Press RETURN to get started!
路由器重新啟動
00:00:08: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down
00:00:08: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:00:08: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
00:03:18: %IP-5-WEBINST_KILL: Terminating DNS process
00:03:24: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) 3600 Software (C3640-I-M), Version 12.1(2)T, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Tue 16-May-00 12:26 by ccai
RouterA>
進入用戶模式
RouterA>en
Password:
RouterA#
進入全局模式
RouterA#sh run
查看現在運行的配置
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname RouterA
!
enable secret 5 $1$ul/V$ezbZFgvzGHD.YPSieC0Ew/
enable password bbb
!
memory-size iomem 25
ip subnet-zero
!
interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.0
speed auto
full-duplex
!
interface Serial0/0
ip address 172.16.0.5 255.255.255.252
clockrate 2000000
!
interface FastEthernet0/1
ip address 172.16.0.9 255.255.255.252
speed auto
full-duplex
!
ip classless
no ip http server
!
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
!
line con 0
transport input none
line aux 0
line vty 0 4
password ccc
login
!
end
現在您就完成了了一個新路由器的基本配置,接下來就可以進行進一步的詳細配置了.
cisco路由器配置出錯解決辦法
網管可能遇到過這樣的情況,在一個公司或機構里有個多名網管,如果大家都對路由器進行配置的話,就有可能造成配置的丟失,或不能完全執行命令,這樣就會造成網絡的不穩定或是直接斷網,如何避免這樣的問題出現呢?
一般思科路由器特意加入了配置鎖功能,它可以對配置的改變進行專門的控制,包含了訪問會話鎖定功能。
一、命令內容
Router(config)# configuration mode exclusive {auto manual} [expire seconds] [lock-show] [interleave] [terminate] [config_wait seconds] [retry_wait seconds]
二、設置配置鎖
1、激活配置鎖功能。
Router(config)# configuration mode exclusive auto
2、手動
關鍵字采用手動,在每次進入全局配置模式都啟用配置鎖功能,使用以下命令加入關鍵字:
Router# configure terminal lock
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#
3、自動
關鍵字采用自動,這使得在使用終端配置路由器的時間,將自動鎖定相關的配置。
三、顯示命令
這里會有人要問,我們如何知道是否有人在改動配置呢,當然是使用顯示配置命令,在有鎖和同鎖的情況下,結果是不同的。
1、有人配置輸出結果:
Router# show configuration lock
Parser Configure Lock
Owner PID : 3
User : unknown
TTY : 0
Type : EXCLUSIVE
State : LOCKED
Class : EXPOSED
Count : 1
Pending Requests : 0
User debug info : configure terminal
Session idle state: TRUE
No of exec cmds getting executed : 0
No of exec cmds blocked : 0
Config wait for show completion : FALSE
Remote ip address : Unknown
Lock active time (in Sec) : 6
Lock Expiration timer (in Sec): 593
Router(config)#
2、無人配置輸出結果:
Router(config)# show configuration lock
Parser Configure Lock
Owner PID: 10
User : User3
TTY : 3
Type : EXCLUSIVE
State: LOCKED
Class: Exposed
Count: 0
Pending Requests : 0
User debug info : 0
我們可以利用配置鎖來鎖定其它人的配置或是查看命令的執行情況,在配置鎖的幫助下,網絡管理的效率將會大大地提高。Cisco路由器PPPOE配置實例
vpdn enable
!
!
interface Ethernet0
no ip address
pppoe enable
pppoe-client dial-pool-number 1
!
interface Dialer0
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1
dialer-group 1
ppp chap hostname cisco
ppp chap password 0 cisco
!
沃爾康國際認證中心:edu.wolktech.com
咨詢電話:0851-5989268
關注我們:
1、點擊標題下方沃爾康選擇關注
2、搜索公眾號wolk-tech或沃爾康點擊關注
3、使用微信掃描下面的二維碼
思科路由器設置IS-IS具體步驟
IS-IS很多熟悉思科路由器的朋友都知道,但是對于新手來說,就不知道思科路由器設置IS-IS該怎么處理了,本文將從實驗的角度來講解思科路由器設置IS-IS的具體步驟。以下是思科路由器使用IS-IS路由IP的基本設置步驟:
思科路由器設置時區和自動重啟
一、人工進行設置CISCO時間
如果在你配置一個本地時間源或網絡時間源之前,一臺Cisco路由器就已經啟動了,它將顯示時間是1993年3月1日。這里是一個示例:
Router> show clock *00:01:10.415 UTC Mon Mar 1 1993 Router>
這個在Log文件中出現的日期,是尚未有人設置過路由器的時間源或本地時間的良好標志。而路由器log入口的確是從1993年開始的可能性則小的多。更多信息請關注聯合網訊官方微信SYUNI-1024
在一個路由器上正確設置時間,真的那么重要么?雖然正確的時間設置對一個路由器的完全運作并非必需,但是那并不意味著你不應設置正確的時間。在路由器上正確設置時間,有下述益處:
1.Log文件會顯示正確的時間標記,可以幫助解決疑難問題。
2.正確的時間允許你在兩個完全不同的時期內建立連接。
3.你可以通過路由器的Kron調度程序,安排在指定的時間執行命令。
設置時區
要正確設置一個路由器(或交換機)的時間,首要的第一步是設定正確的時區。這成為第一步的理由是:如果你先設定了時間,而后再設定時區,那么你將不得不再次重新設定時間。
要記住的關鍵點是,僅僅知道你是在東部或者西部時區是不夠的。你需要知道你所在地區離格林威治標準時間(GMT,Greenwich Mean Time)相差多少小時。
舉例來說,如果你在美國的東部標準時區,你落后GMT時間5個小時。你應當設置路由器為-5.如果你不確定你和GMT時間到底相差多少,美國海軍的網站提供了一個很好的資源--世界時區分布地圖。更多信息請關注聯合網訊官方微信SYUNI-1024
在你已經確定了你的時區值后,你就可以設定時區了。舉例來說,我住在中部標準時區(CST,Central Standard Time),那么我是這么設置路由器的:
Router(config)# clock timezone GMT 8
設置夏令時
設定了正確的時區之后,你需要設定路由器,是否需要調節夏令時。你可以使用summer-time命令來完成這點。照例使用我們的CST作為示例,下面是如何進行夏令時設置的命令:
Router(config)# clock summer-time CDT recurring
Summer命令告訴路由器引用的夏令時是CDT(中部夏令時,Central Daylight Time),路由器會自動根據自身預先設定好的日期和時間而對時間進行調校。(你可以使用同樣的命令進行人工設置夏令時)。而recurring的選項則告知路由器,使用公認的美國夏令時規則進行每年一次的4月和10月時間變更。更多信息請關注聯合網訊官方微信SYUNI-1024
設置時鐘
設定完畢時區和夏令時后,最后的一步就是設定路由器的時間。你必須在特權模式(Privileged Mode),而不是全程設定模式(Global Configuration Mode)
如果你以前從未這么做過,格式可能有點點復雜。這里是你需要注意的一些事項:
使用clock set命令
使用軍用時間。
設定時間時需要指定"秒數"
使用特定的3位縮寫輸入月份
加上日期和年份
下面是一個示例:
Router# clock set 10:50:00 Oct 26 2006
察看時間
配置完畢時區,夏令時,以及時間后,你可以使用show clock命令查看時間。下面是一個事例:
Router# show clock
10:51:33.208 CDT Thu Oct 19 2006
Router#
要留意,絕大多數Cisco路由器和交換機都沒有內部時鐘,所以無法保存時間,也就是關掉機器將會丟失時間設置。這意味著重起一臺設備也將丟失本地時間。而唯一不會改變的是時區設置,因為路由器在它的配置文件中對其進行了保存
調整顯示log和debug時間方式
有些時候Cisco 交換機的日志顯示是X年X周的格式(如1y21w),怎么樣設置才可以讓Log顯示年月日和時間
siwtch(config)#service timestamps debug datetime msec localtime show-timezone
siwtch(config)#service timestamps log datetime msec localtime show-timezone
二、cisco路由器定時執行命令
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#kron policy-list NEOSHI
Router(config-kron-policy)#cli write memory
Router(config-kron-policy)#exit
Router(config)#kron occurrence DAILYat5 at 17:00 recurring
Router(config-kron-occurrence)#policy-list NEOSHI
Router(config-kron-occurrence)#end
Router#
注釋 從IOS12.3(1)開始引入了這個類似Unix Cron 的特性,不過也有一些缺點,只能運行EXEC 模式下的命令,不能運行配置模式下的命令,同時輸入的命令不能是交互性的,比如不能輸入copyrunning-config startup-config 來保存配置,因為是需要確認的,必須使用write memory 來代替
cisco路由器DHCP簡單配置實例
今天給大家分享一下思科路由器配置成DHCP服務器;由于實例很簡單,于是精簡講解;示:
示:
路由0:F0/0:59.40.78.185/28;
DHCP:192.168.1.0/24 GW:192.168.1.1;
配置如下:
outer(config)#ip dhcp pool dhcplist #定義DHCP地址池的名稱為dhcplist
Router(dhcp-config)#default-router 192.168.1.1 #設置默認網關
Router(dhcp-config)#dns-server 8.8.8.8 #設置DNS
Router(dhcp-config)#network 192.168.1.0 255.255.255.0 #設定網段
Router(dhcp-config)#lease 30 #設置租用地址為30天,可以適當的調整 www.centos9.com
Router(dhcp-config)#ip dhcp excluded-address 192.168.1.1 #排除網關地址DHCP分配,還可以增加其它的排除地址,比如服務器的地址
Router(dhcp-config)#end
Router#wr #保存
如上配置所示:可以看到DHCP配置起來只有幾步,很容易實現;
那么現在讓我們來驗證;
在路由器通過命令:show ip DHcp binding可以查到一個客戶端已經獲取了IP地址:192.168.1.2 255.255.255.0 網關192.168.1.1;DNS:8.8.8.8;
PC>ipconfig /all
Physical Address................: 0030.A3A1.776B
IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1
DNS Servers.....................: 8.8.8.8
由此思科路由器的DHCP服務已經設置成功;
總結:路由器DHCP功能默認是關閉的,可以通過:service DHCP 開啟DHCP服務,然后再做配置;其實原理都一樣,配置DHCP幾個步驟:建議DHCP分配池,網關,分配的IP段,DNS;就這么幾個設置;
如果需要關閉已配置DHCP服務,只需要 no ip dhcp pool dhcplist 即可關閉,關閉DHCP服務,no service dhcp
我的名稱:源云技術







