[上課筆記] 真正練習,chapter5-DHCP-new.pka

***基本環境設定***

目標:將環境中的Router、Switch與DNS server之基本設定完成,並測試三台機器互Ping可以通。

一、路由器基本設定
1-1 請將Router的設備名稱改為「HQ-RO」
1-2 請設定Router的enable secret 為「cisco」
1-3 請設定Router的console密碼為「pccu」
1-4 請設定Router的vty 0 4 連線密碼為「pccu」
1-5 請設定將所有密碼加密:service password-encryption

二、交換基本設定
2-1 請將Switch的設備名稱改為「HQ-SW」
2-2 請設定Switch的enable secret 為「cisco」
2-3 請設定Switch的console密碼為「pccu」
2-4 請設定Switch的vty 0 4 連線密碼為「pccu」
2-5 請設定將所有密碼加密:service password-encryption

三、IP設定:
----------------------------------------------------------------------------------------
設備名稱 介面 IP位址 及網路遮罩 Default-Gateway
---------------------------------------------------------------------------------------
HQ-RO fa0/0 172.16.1.100 /16
HQ-SW vlan 1 172.16.1.200 /16 172.16.1.100
DNS server NIC 172.16.1.103/16 172.16.1.100
----------------------------------------------------------------------------------------

四、三台機器互ping會通。


***DHCP設定之實驗環境***

目標:圖中有數台職員用電腦,IP位址需用DHCP自動取得;並且將圖中Router設定為DHCP server。

一、IP設定:
-----------------------------------------------------------------------
設備名稱 介面 IP位址 及網路遮罩
-----------------------------------------------------------------------
(PC)職員1 NIC DHCP自動取得IP及網路遮罩
(PC)職員2 NIC DHCP自動取得IP及網路遮罩
------------------------------------------------------------------------

二、請用 test作為DHCP pool name。

三、DHCP配發給職員網段的IP網段是:172.16.0.0 /16。

四、上述派發給職員網段的IP中,有一部份保留下來不派發出去。
保留下來的IP位址為172.16.1.100 /16 、 172.16.1.103 /16。

五、DHCP server中必須指定DNS server為172.16.1.103。

六、設定要派發出去的預設路由器IP位址為該網段的Default Gateway(即Router之fa0/0的IP位址)

--------------------------------------------------------
拿到真正的題目了,趕快來做一做吧。

步驟1*路由器基本設定

  • Router>enable
  • Router#config t
  • Router#config terminal
  • Enter configuration commands, one per line. End with CNTL/Z.
  • Router(config)#hostname HQ-RO //更改名字
  • HQ-RO(config)#enable secret cisco //設定進去特權模式的密碼
  • HQ-RO(config)#line console 0 //進入這個介面的設定
  • HQ-RO(config-line)#password pccu //這個介面設定密碼為pccu
  • HQ-RO(config-line)#login //何時狀況輸入密碼?login時
  • HQ-RO(config-line)#exit //出去這個介面設定
  • HQ-RO(config)#line vty 0 4 //設定終端機,開放0~4共五點同時進入控制
  • HQ-RO(config-line)#password pccu//密碼密碼~
  • HQ-RO(config-line)#login//登入時
  • HQ-RO(config-line)#exit//一樣要離開
  • HQ-RO(config)#service password-en
  • HQ-RO(config)#service password-encryption //所有的密碼都加密
  • HQ-RO(config)#int fa 0/0 //IP設定fa 0/0介面
  • HQ-RO(config-if)#ip address 172.16.1.100 255.255.0.0 //IP位址 及網路遮罩
  • HQ-RO(config-if)#no shutdown //設定開啟
  • HQ-RO(config-if)#end
  • %SYS-5-CONFIG_I: Configured from console by console
  • HQ-RO#copy run start //設定儲存
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
  • HQ-RO#
步驟2*交換基本設定(這裡設定雷同上面,故不再全註解)

  • Switch>
  • Switch>enable
  • Switch#config t
  • Enter configuration commands, one per line. End with CNTL/Z.
  • Switch(config)#hostname HQ-SW
  • HQ-SW(config)#enable secret cisco
  • HQ-SW(config)#line console 0
  • HQ-SW(config-line)#password pccu
  • HQ-SW(config-line)#login
  • HQ-SW(config-line)#exit
  • HQ-SW(config)#line vty 0 4
  • HQ-SW(config-line)#password pccu
  • HQ-SW(config-line)#login
  • HQ-SW(config-line)#exit
  • HQ-SW(config)#service password-en
  • HQ-SW(config)#service password-encryption
  • HQ-SW(config)#int vlan 1 //switch介面較單純,這裡介面為vlan的第一個孔
  • HQ-SW(config-if)#ip address 172.16.1.200 255.255.0.0
  • HQ-SW(config-if)#no shutdown
  • %LINK-5-CHANGED: Interface Vlan1, changed state to up
  • %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
  • HQ-SW(config-if)#exit
  • HQ-SW(config)#ip default-gateway 172.16.1.100 //設定gateway,因為RO本身就為gateway,故不用設,上一篇打錯設定可以省
  • HQ-SW(config)#exit
  • %SYS-5-CONFIG_I: Configured from console by console
  • HQ-SW#copy run start
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
  • HQ-SW#
--------------------
步驟3*設定clint PC與DNS server的ip

一樣到各電腦的Desktop->IP configuration設定大功告成。

步驟4*設定DHCP(上一篇有寫過)

  • User Access Verification
  • Password:
  • HQ-RO>enable
  • Password:
  • HQ-RO#config t
  • Enter configuration commands, one per line. End with CNTL/Z.
  • HQ-RO(config)#ip dhcp pool test
  • HQ-RO(dhcp-config)#network 172.16.0.0 255.255.0.0
  • HQ-RO(dhcp-config)#dns-server 172.16.1.103
  • HQ-RO(dhcp-config)#default-router 172.16.1.100
  • HQ-RO(dhcp-config)#exit
  • HQ-RO(config)#ip dhcp excluded-address
  • % Incomplete command.
  • HQ-RO(config)#ip dhcp excluded-address 172.16.1.100
  • HQ-RO(config)#ip dhcp excluded-address 172.16.1.103
  • HQ-RO(config)#exit
  • %SYS-5-CONFIG_I: Configured from console by console
  • HQ-RO#copy run start
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
  • HQ-RO#

去Check Results看看對多少吧!應該32個QQ

留言