Cisco單臂路由

單臂路由實驗:儘管現在已經很少使用這種技術,而採用了三層交換,但是熟悉這一技術未必沒有好處。
  本實驗中,用到了一臺路由,兩臺交換,router1和switch3之間的鏈路爲trunk,並且分別爲vlan2,vlan3設置了一個子接口,採用了802.1q封裝方式。配置了vtp是爲了簡化操作,這其實也正是vtp技術本身的意義所在。配置如下:
 
Router1
Router(config)#int f0/0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int f0/0.2
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#en
Router(config-subif)#encapsulation
Router(config-subif)#encapsulation dot1Q ?
  <1-1005>  IEEE 802.1Q VLAN ID
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 2.2.2.1 255.0.0.0
Router(config-subif)#no shut
Router(config-subif)#int f0/0.3
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 3.3.3.1 255.0.0.0
Router(config-subif)#no shut
Router(config-subif)#exit
 
Switch3:
Switch(config)#int f0/4
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
Switch(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
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)#vtp domain 000
Changing VTP domain name from NULL to 000
Switch(vlan)#vtp server
Device mode already VTP SERVER.
Switch(vlan)#vlan 2
VLAN 2 added:
    Name: VLAN0002
Switch(vlan)#vlan 3
VLAN 3 added:
    Name: VLAN0003
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : 000
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x1D 0x63 0x23 0xA2 0x18 0xB6 0xDE 0x31
Configuration last modified by 0.0.0.0 at 3-1-93 00:02:46
Local updater ID is 0.0.0.0 (no valid interface found)
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to
Switch(config-if)#int f0/1
Switch(config-if)#switchport mode trunk
 
Switch4:
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
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)#vtp domain 000
Domain name already set to 000.
Switch(vlan)#vtp client
Setting device to VTP CLIENT mode.
Switch(vlan)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Client
VTP Domain Name                 : 000
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x1D 0x63 0x23 0xA2 0x18 0xB6 0xDE 0x31
Configuration last modified by 0.0.0.0 at 3-1-93 00:02:46
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章