Router>ena
Router#conf t
Router(config)#interface f0/0
Router(config-if)#no shutdown
Router(config)#interface f0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address
192.168.10.1 255.255.255.0
Router(config-subif)#int f0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address
192.168.20.1 255.255.255.0
Router(config-subif)#int f0/0.30
Router(config-subif)#encapsulation dot1Q 30
Router(config-subif)#ip address
192.168.30.1 255.255.255.0
Router(config-subif)#exit
Switch#vlan database
Switch(vlan)#vlan 10 name vlan10
Switch(vlan)#vlan 20 name vlan20
Switch(vlan)#vlan 30 name vlan30
Switch(vlan)#exit
Switch#conf t
Switch(config)#interface f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#exit
Switch#conf t
Switch(config)#interface f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#^Z
Switch#
Switch#sh vla
VLAN Name Status Ports
---- --------------------------------
--------- -------------------------------
1
default
active Fa0/1, Fa0/5, Fa0/6,
Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24, Gig1/1, Gig1/2
10
vlan10 active Fa0/2
20
vlan20
active Fa0/3
30
vlan30
active Fa0/4
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
Switch#sh interfaces trunk
Switch#
%LINK-5-CHANGED: Interface FastEthernet0/1,
changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on
Interface FastEthernet0/1, changed state to up
Switch#sh 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,10,20,30
Port
Vlans in spanning tree forwarding state and not pruned
Fa0/1
none
Switch#
0 komentar:
Posting Komentar