日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

网络设备配置与管理--使用VTP实现扩展VLAN配置

發(fā)布時(shí)間:2025/1/21 编程问答 49 豆豆
生活随笔 收集整理的這篇文章主要介紹了 网络设备配置与管理--使用VTP实现扩展VLAN配置 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

理論學(xué)習(xí)

問題1:本地VLAN和擴(kuò)展VLAN有什么區(qū)別?

不需要跨交換機(jī)實(shí)現(xiàn)VLAN中繼,所有的VLAN配置僅在本地交換機(jī)起作用,該種VLAN配置方式為本地VLAN

需通過VLAN中繼技術(shù)跨交換機(jī)實(shí)現(xiàn)統(tǒng)一VLAN內(nèi)主機(jī)通信的技術(shù)稱為擴(kuò)展VLAN?

問題2:擴(kuò)展VLAN有哪些實(shí)現(xiàn)方式?

1?PVLAN技術(shù)(Private?VLAN

2?SuperVLAN技術(shù)(SuperVLAN)

3?SVLAN技術(shù)(Stack?VLAN

問題3:VTP的含義是什么,有哪些特點(diǎn)?

VTP是一種Cisco專有的消息協(xié)議,用于域內(nèi)同步VLAN信息(如VLAN的添加、刪除、或重命名)。配置VTP后,只要在一臺交換機(jī)上配置VLAN信息后,借助VTP即可自動完成網(wǎng)絡(luò)中所有交換機(jī)內(nèi)的VLAN信息同步,實(shí)現(xiàn)VLAN配置的一致性,以減少網(wǎng)絡(luò)管理事務(wù)的繁瑣性。

VTP的特點(diǎn)

l①VTP遵循C/S結(jié)構(gòu),采用域的管理模式。VTP服務(wù)器用于建立、管理和維護(hù)VLAN信息。VTP客戶機(jī)加入到域后可自動接收并使用VLAN信息,但不能管理VLAN(添加、修改、刪除)。

l②VTP協(xié)議通過組播的方式向域內(nèi)的交換機(jī)傳送VLAN信息。

l③使用VTP修剪可減少不必要的VLAN信息發(fā)送到其它交換機(jī),缺省為關(guān)閉狀態(tài)。

問題4:VTP的工作模式有哪些?各有什么含義?

VTP域中,交換機(jī)可以工作于如下三種模式。

Server模式:交換機(jī)配置為VTP?Server模式,可以為整個(gè)VTP域建立、修改和刪除VLAN信息,并制定其它配置參數(shù)。VTP服務(wù)器向其它在相同VTP域的交換機(jī)宣告自己的VLAN配置,是交換機(jī)的默認(rèn)VTP模式。

Client模式:充當(dāng)VTP?Client模式的交換機(jī)不能建立、修改或刪除VLAN信息,但可以查詢和使用VLAN信息。

Transparent模式:VTP透明模式,配置為該模式的交換機(jī)不會加入到VTP域中,既不接收VLAN信息也不宣告VLAN信息,然而在VTP版本2Transparent交換機(jī)可以向其中繼接口轉(zhuǎn)發(fā)它接收到的VTP宣告信息。

?

工作任務(wù)描述

某企業(yè)現(xiàn)有網(wǎng)絡(luò)為二層網(wǎng)絡(luò)結(jié)構(gòu),有一臺三層交換機(jī)做核心交換機(jī),下面通過Trunk鏈路連接兩臺二層交換機(jī)作為接入層交換機(jī)。其中計(jì)財(cái)處和業(yè)務(wù)部分別有一臺計(jì)算機(jī)連接在兩臺二層交換機(jī)上,管理部有一臺計(jì)算機(jī)連接在核心交換機(jī)上,現(xiàn)在公司規(guī)定各部門之間不能進(jìn)行網(wǎng)絡(luò)通信,而部門內(nèi)部可以通信,考慮如何實(shí)現(xiàn)該網(wǎng)絡(luò)。

工作任務(wù)實(shí)施

網(wǎng)絡(luò)拓?fù)浣Y(jié)構(gòu)設(shè)計(jì)(粘貼PT的拓?fù)鋱D)

具體配置

(1)?各個(gè)交換機(jī)的VTP配置

?

RS:

RS>en

RS#conf?t

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

RS(config)#h?RS

RS(config)#vlan?2

RS(config-vlan)#vlan?3

RS(config-vlan)#vlan?4

RS(config-vlan)#e

RS(config)#vtp?m,

RS(config)#vtp?m

RS(config)#vtp?mode?s

RS(config)#vtp?mode?server?

Device?mode?already?VTP?SERVER.

RS(config)#vtp?d

RS(config)#vtp?domain?vtp1

Domain?name?already?set?to?vtp1.

RS(config)#int?f0/22

RS(config-if)#sw

RS(config-if)#switchport?m

RS(config-if)#switchport?mode?a

RS(config-if)#switchport?mode?access?

RS(config-if)#sw

RS(config-if)#switchport?a

RS(config-if)#switchport?access?vlan?4

RS(config-if)#int?f0/23

RS(config-if)#sw

RS(config-if)#switchport?t

RS(config-if)#switchport?trunk?e

RS(config-if)#switchport?trunk?encapsulation?d

RS(config-if)#switchport?trunk?encapsulation?dot1q?

RS(config-if)#sw

RS(config-if)#switchport?m

RS(config-if)#switchport?mode?r

RS(config-if)#switchport?mode?t

RS(config-if)#switchport?mode?trunk?

RS(config-if)#int?f0/24

RS(config-if)#sw

RS(config-if)#switchport?t

RS(config-if)#switchport?trunk?e

RS(config-if)#switchport?trunk?encapsulation?d

RS(config-if)#switchport?trunk?encapsulation?dot1q?

RS(config-if)#sw

RS(config-if)#switchport?m

RS(config-if)#switchport?mode?t

RS(config-if)#switchport?mode?trunk?

RS(config-if)#

?

SW1:

Switch>en

Switch#conf?t

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

Switch(config)#h?SW1

SW1(config)#

SW1(config)#vtp?d

SW1(config)#vtp?domain?c

SW1(config)#vtp?domain?c

Changing?VTP?domain?name?from?vtp1?to?c

SW1(config)#vtp?d

SW1(config)#vtp?domain?vtp1

Changing?VTP?domain?name?from?c?to?vtp1

SW1(config)#int?f0/24

SW1(config-if)#sw

SW1(config-if)#switchport?m

SW1(config-if)#switchport?mode?t

SW1(config-if)#switchport?mode?trunk?

SW1(config-if)#e

SW1(config)#int?f0/1

SW1(config-if)#sw

SW1(config-if)#switchport?m

SW1(config-if)#switchport?mode?a

SW1(config-if)#switchport?mode?access?

SW1(config-if)#sw

SW1(config-if)#switchport?a

SW1(config-if)#switchport?access?vl

SW1(config-if)#switchport?access?vlan?2

SW1(config-if)#e

SW1(config)#int?f0/2

SW1(config-if)#sw

SW1(config-if)#switchport?m

SW1(config-if)#switchport?mode?a

SW1(config-if)#switchport?mode?access?

SW1(config-if)#sw

SW1(config-if)#switchport?a

SW1(config-if)#switchport?access?v

SW1(config-if)#switchport?access?vlan?3

SW1(config-if)#

?

SW2:

Switch>en

Switch#conf?t

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

Switch(config)#h?SW2

SW2(config)#vtp?d

SW2(config)#vtp?domain?c

SW2(config)#vtp?domain?c

Changing?VTP?domain?name?from?vtp1?to?c

SW2(config)#vtp?00:03:42?%DTP-5-DOMAINMISMATCH:?Unable?to?perform?trunk?negotiation?on?port?Fa0/24?because?of?VTP?domain?mismatch.

?

m

SW2(config)#vtp?mode?c

SW2(config)#vtp?mode?client?

Device?mode?already?VTP?CLIENT.

SW2(config)#vtp?d

SW2(config)#vtp?domain?vtp1

Changing?VTP?domain?name?from?c?to?vtp1

SW2(config)#int?f0/24

SW2(config-if)#sw

SW2(config-if)#switchport?,

SW2(config-if)#switchport?m?t

SW2(config-if)#int?f0/1

SW2(config-if)#sw?m?a

SW2(config-if)#sw?a?v2

?????????????????????^

%?Invalid?input?detected?at?'^'?marker.


SW2(config-if)#sw?a?v?2

SW2(config-if)#int?f0/2

SW2(config-if)#sw?m?a

SW2(config-if)#sw?a?v?3

SW2(config-if)#

?

2)VLAN測試

PC>ping?192.168.1.3

?

Pinging?192.168.1.3?with?32?bytes?of?data:

?

Reply?from?192.168.1.3:?bytes=32?time=234ms?TTL=128

Reply?from?192.168.1.3:?bytes=32?time=125ms?TTL=128

Reply?from?192.168.1.3:?bytes=32?time=109ms?TTL=128

Reply?from?192.168.1.3:?bytes=32?time=93ms?TTL=128

?

Ping?statistics?for?192.168.1.3:

????Packets:?Sent?=?4,?Received?=?4,?Lost?=?0?(0%?loss),

Approximate?round?trip?times?in?milli-seconds:

????Minimum?=?93ms,?Maximum?=?234ms,?Average?=?140ms

?

3)VTP查看

?

Rs

?

RS#show?vtp?status?

VTP?Version?????????????????????:?2

Configuration?Revision??????????:?0

Maximum?VLANs?supported?locally?:?1005

Number?of?existing?VLANs????????:?8

VTP?Operating?Mode??????????????:?Server

VTP?Domain?Name?????????????????:?vtp1

VTP?Pruning?Mode????????????????:?Disabled

VTP?V2?Mode?????????????????????:?Disabled

VTP?Traps?Generation????????????:?Disabled

MD5?digest??????????????????????:?0x6F?0xC6?0x69?0xD0?0x95?0x73?0x0F?0xAA?

Configuration?last?modified?by?0.0.0.0?at?3-1-93?00:23:34

Local?updater?ID?is?0.0.0.0?(no?valid?interface?found)

?

SW1

?

Switch1#show?vtp?status?

VTP?Version?????????????????????:?2

Configuration?Revision??????????:?0

Maximum?VLANs?supported?locally?:?255

Number?of?existing?VLANs????????:?8

VTP?Operating?Mode??????????????:?Client

VTP?Domain?Name?????????????????:?vtp1

VTP?Pruning?Mode????????????????:?Disabled

VTP?V2?Mode?????????????????????:?Disabled

VTP?Traps?Generation????????????:?Disabled

MD5?digest??????????????????????:?0x6F?0xC6?0x69?0xD0?0x95?0x73?0x0F?0xAA?

Configuration?last?modified?by?0.0.0.0?at?3-1-93?00:23:34

?

SW2

?

Switch2#show?vtp?status?

VTP?Version?????????????????????:?2

Configuration?Revision??????????:?0

Maximum?VLANs?supported?locally?:?255

Number?of?existing?VLANs????????:?8

VTP?Operating?Mode??????????????:?Client

VTP?Domain?Name?????????????????:?vtp1

VTP?Pruning?Mode????????????????:?Disabled

VTP?V2?Mode?????????????????????:?Disabled

VTP?Traps?Generation????????????:?Disabled

MD5?digest??????????????????????:?0x6F?0xC6?0x69?0xD0?0x95?0x73?0x0F?0xAA?

Configuration?last?modified?by?0.0.0.0?at?3-1-93?00:23:34

?

工作擴(kuò)展

擴(kuò)展ACL的配置

如果上面的任務(wù)要求通過某一個(gè)VLAN實(shí)現(xiàn)對所有交換機(jī)進(jìn)行全局管理(比如使用telnet調(diào)試),考慮該如何實(shí)現(xiàn)?

?????具體配置:

Rs

Building?configuration...

?

Current?configuration?:?1492?bytes

!

version?12.2

no?service?timestamps?log?datetime?msec

no?service?timestamps?debug?datetime?msec

no?service?password-encryption

!

hostname?RS

!

!

!

enable?password?cisco

!

!

!

ip?routing

!

!

!

spanning-tree?mode?pvst

!

interface?FastEthernet0/1

!

(省略……)

!

interface?FastEthernet0/21

!

interface?FastEthernet0/22

?switchport?access?vlan?4

?switchport?mode?access

!

interface?FastEthernet0/23

?switchport?trunk?encapsulation?dot1q

?switchport?mode?trunk

!

interface?FastEthernet0/24

?switchport?trunk?encapsulation?dot1q

?switchport?mode?trunk

!

interface?GigabitEthernet0/1

!

interface?GigabitEthernet0/2

!

interface?Vlan1

?ip?address?192.168.100.1?255.255.255.0

!

interface?Vlan2

?ip?address?192.168.1.254?255.255.255.0

!

interface?Vlan3

?ip?address?192.168.2.254?255.255.255.0

!

interface?Vlan4

?ip?address?192.168.3.254?255.255.255.0

!

ip?classless

!

!

line?con?0

!

line?aux?0

!

line?vty?0?4

?password?cisco

?login

!

end?

?

?

Sw1

?

Building?configuration...

?

Current?configuration?:?1181?bytes

!

version?12.1

no?service?timestamps?log?datetime?msec

no?service?timestamps?debug?datetime?msec

no?service?password-encryption

!

hostname?Sw1

!

enable?password?cisco

!

!

spanning-tree?mode?pvst

!

interface?FastEthernet0/1

?switchport?access?vlan?2

?switchport?mode?access

!

interface?FastEthernet0/2

?switchport?access?vlan?3

?switchport?mode?access

!

interface?FastEthernet0/3

!

(省略……)

!

interface?FastEthernet0/23

!

interface?FastEthernet0/24

?switchport?mode?trunk

!

interface?Vlan1

?ip?address?192.168.100.2?255.255.255.0

!

ip?default-gateway?192.168.100.1

!

!

line?con?0

!

line?vty?0?4

?password?cisco

?login

line?vty?5?15

?login

!

!

End

?

?

Sw2

?

Building?configuration...

?

Current?configuration?:?1181?bytes

!

version?12.1

no?service?timestamps?log?datetime?msec

no?service?timestamps?debug?datetime?msec

no?service?password-encryption

!

hostname?Sw2

!

enable?password?cisco

!

!

spanning-tree?mode?pvst

!

interface?FastEthernet0/1

?switchport?access?vlan?2

?switchport?mode?access

!

interface?FastEthernet0/2

?switchport?access?vlan?3

?switchport?mode?access

!

interface?FastEthernet0/3

!

(省略……)

!

interface?FastEthernet0/23

!

interface?FastEthernet0/24

?switchport?mode?trunk

!

interface?Vlan1

?ip?address?192.168.100.3?255.255.255.0

!

ip?default-gateway?192.168.100.1

!

!

line?con?0

!

line?vty?0?4

?password?cisco

?login

line?vty?5?15

?login

!

!

End

?

?

telnet?RS

telnet??Sw1


?

telnet?Sw2

思考問題:

問題1:管理VLAN的作業(yè)是什么?

?

用來遠(yuǎn)程管理的,后期維護(hù)的時(shí)候不用管理員跑到機(jī)器跟前,你在網(wǎng)絡(luò)內(nèi)任意一臺電腦可以登錄任意一臺網(wǎng)管交換機(jī)。

?


轉(zhuǎn)載于:https://blog.51cto.com/shan123/1666103

總結(jié)

以上是生活随笔為你收集整理的网络设备配置与管理--使用VTP实现扩展VLAN配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。