配置DTP

拓扑一  结果:NO

默认auto(被动)模式

Switch>show interfaces fastEthernet 0/1 switchPort 
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false

Switch>show interfaces trunk

 

Switch>

 

 

拓扑二   结果:YES

修改2端主动模式(desirable)

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode dynamic desirable 

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch#show interfaces trunk

Port Mode Encapsulation Status Native vlan

Fa0/1 desirable n-802.1q trunking 1

 

Port Vlans allowed on trunk

Fa0/1 1-1005

 

Port Vlans allowed and active in management domain

Fa0/1 1

 

Port Vlans in spanning tree forwarding state and not pruned

Fa0/1 1

 

拓扑三  结果:YES

修改一端主动模式(desirable)

Switch>en
Switch#conf t

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode dynamic desirable 


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch#show interfaces trunk

Port Mode Encapsulation Status Native vlan

Fa0/1 desirable n-802.1q trunking 1

 

Port Vlans allowed on trunk

Fa0/1 1-1005

 

Port Vlans allowed and active in management domain

Fa0/1 1

 

Port Vlans in spanning tree forwarding state and not pruned

Fa0/1 1

 

拓扑四 结果:YES

修改一端 trunk

Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]? conf t
?Must be "terminal", "memory" or "network"
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#interface  fastEthernet 0/1

Switch(config-if)#switchport mode trunk 

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up


Switch#show interfaces trunk 
Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       on           802.1q         trunking      1

Port        Vlans allowed on trunk
Fa0/1       1-1005

Port        Vlans allowed and active in management domain
Fa0/1       1

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/1       1

 

默认auto,修改desirable

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.


Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode dynamic desirable 

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
 

Switch#show interfaces  trunk 
Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       desirable    n-802.1q       trunking      1

Port        Vlans allowed on trunk
Fa0/1       1-1005

Port        Vlans allowed and active in management domain
Fa0/1       1

Port        Vlans in spanning tree forwarding state and not 

 

 

拓扑五  结果:NO

修改一端 access

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode access 

Switch(config-if)#end

%SYS-5-CONFIG_I: Configured from console by console
s
% Ambiguous command: "s"

Switch#show interfaces trunk 

 

默认auto,修改desirable

 

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode dynamic desirable 

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console


Switch#show interfaces trunk 

 

拓扑六  结果:YES

 

转载于:https://www.cnblogs.com/peter1007/p/9397432.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值