CISCO不同VLAN的DHCP

來源:本站原創 網絡技術 超過2,021 views圍觀 0條評論

最近在學習cisco 的packet tracer,試著在3560上為不同vlan,dhcp不同的ip地址信息。在網上查閱的一些資料都不能順利的調試出來。現在自己寫一個出來與大家分享。先上拓撲圖。

試驗環境為packet tracer 5.3.0.0088,灰色背景字體為輸入命令。

clip_image002

以下為具體的操作步驟

Switch>en

Switch#vlan database

% Warning: It is recommended to configure VLAN from config mode,

as VLAN database mode is being deprecated. Please consult user

documentation for configuring VTP/VLAN in config mode.

Switch(vlan)#vlan 10

VLAN 10 added:

Name: VLAN0010

Switch(vlan)#vlan 20

VLAN 20 added:

Name: VLAN0020

Switch(vlan)#exit

APPLY completed.

Exiting….

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int vlan 10

%LINK-5-CHANGED: Interface Vlan10, changed state to up

Switch(config-if)#ip add 192.168.6.1 255.255.255.0

Switch(config-if)#no shut

Switch(config-if)#int vlan 20

%LINK-5-CHANGED: Interface Vlan20, changed state to up

Switch(config-if)#ip add 192.168.50.1 255.255.255.0

Switch(config-if)#no shut

Switch(config)#int fa0/1

Switch(config-if)#switchport access vlan 10

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#no shut

Switch(config-if)#int fa0/11

Switch(config-if)#switchport access vlan 20

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

Switch(config-if)#no shut

Switch(config-if)#exit

Switch(config)#ip dhcp pool vlan10

Switch(dhcp-config)#network 192.168.6.0 255.255.255.0

Switch(dhcp-config)#dns 202.96.134.133

Switch(dhcp-config)#default 192.168.6.1

Switch(dhcp-config)#exit

Switch(config)#ip dhcp pool vlan20

Switch(dhcp-config)#network 192.168.50.0 255.255.255.0

Switch(dhcp-config)#dns 202.96.134.134

Switch(dhcp-config)#default 192.168.50.1

Switch(dhcp-config)#exit

Switch(config)#ip dhcp excluded-address 192.168.6.2 192.168.6.3

Switch(config)#ip dhcp excluded-address 192.168.50.2 192.168.50.3

最后兩行為保留的ip地址。附pc2的效果圖

clip_image004

文章出自:CCIE那點事 http://www.qdxgqk.live/ 版權所有。本站文章除注明出處外,皆為作者原創文章,可自由引用,但請注明來源。 禁止全文轉載。
本文標題:CISCO不同VLAN的DHCP
本文鏈接:http://www.qdxgqk.live/?p=3373轉載請注明轉自CCIE那點事
如果喜歡:點此訂閱本站
上篇文章:
  • 相關文章
  • 為您推薦
  • 各種觀點
?
暫時還木有人評論,坐等沙發!
發表評論

您必須 [ 登錄 ] 才能發表留言!

?
?
萌宠夺宝游戏