2010年8月7日

跨Vlan Lab實作一


Router的設定
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int F0/0
Router(config-if)#speed 100
Router(config-if)#duplex full
Router(config-if)#no shut
Router(config-if)#int f0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#int F0/1
Router(config-if)#speed 100
Router(config-if)#duplex full
Router(config-if)#no shut

Router(config-if)#int f0/1.20
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 20.0.0.1 255.255.255.0
Router(config-if)#int F1/0
Router(config-if)#speed 100
Router(config-if)#duplex full
Router(config-if)#no shut
Router(config-if)#int f1/0.30
Router(config-subif)#encapsulation dot1q 30
Router(config-subif)#ip address 30.0.0.1 255.255.255.0
Router(config-if)#end
Router#copy run start

Sales_Switch的設定
Sales_Switch>en
Sales_Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sales_Switch(config)#vlan 10
Sales_Switch(config-vlan)#name Sales
Sales_Switch(config)#int F1/0
Sales_Switch(config-if)#switchport mode access
Sales_Switch(config-if)#switchport access vlan 10
Sales_Switch(config-if)#spanning-tree portfast
Sales_Switch(config-if)#no shut
Sales_Switch(config-if)#int F1/1
Sales_Switch(config-if)#switchport mode access
Sales_Switch(config-if)#switchport access vlan 10
Sales_Switch(config-if)#spanning-tree portfast
Sales_Switch(config-if)#no shut
Sales_Switch(config-if)#int F1/15
Sales_Switch(config-if)#speed 100
Sales_Switch(config-if)#duplex full
Sales_Switch(config-if)#switchport mode trunk
Sales_Switch(config-if)#switchport trunk encapsulation dot1q
Sales_Switch(config-if)#no shut
Sales_Switch(config-if)#int vlan 1
Sales_Switch(config-if)#ip add 10.0.0.2 255.255.255.0
Sales_Switch(config)#exit
Sales_Switch(config)#ip default-gateway 10.0.0.1
Sales_Switch(config)#exit
Sales_Switch#copy run start

MIS_Switch的設定
MIS_Switch>en
MIS_Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
MIS_Switch(config)#vlan 20
MIS_Switch(config-vlan)#name MIS
MIS_Switch(config)#int F1/0
MIS_Switch(config-if)#switchport mode access
MIS_Switch(config-if)#switchport access vlan 20
MIS_Switch(config-if)#spanning-tree portfast
MIS_Switch(config-if)#no shut
MIS_Switch(config-if)#int F1/1
MIS_Switch(config-if)#switchport mode access
MIS_Switch(config-if)#switchport access vlan 20
MIS_Switch(config-if)#spanning-tree portfast
MIS_Switch(config-if)#no shut
MIS_Switch(config-if)#int F1/15
MIS_Switch(config-if)#speed 100
MIS_Switch(config-if)#duplex full
MIS_Switch(config-if)#switchport mode trunk
MIS_Switch(config-if)#switchport trunk encapsulation dot1q
MIS_Switch(config-if)#no shut
MIS_Switch(config-if)#int vlan 1
MIS_Switch(config-if)#ip add 20.0.0.2 255.255.255.0
MIS_Switch(config)#exit
MIS_Switch(config)#ip default-gateway 20.0.0.1
MIS_Switch(config)#exit
MIS_Switch#copy run start

IT_Switch的設定
IT_Switch>en
IT_Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
IT_Switch(config)#vlan 30
IT_Switch(config-vlan)#name IT
IT_Switch(config)#int F1/0
IT_Switch(config-if)#switchport mode access
IT_Switch(config-if)#switchport access vlan 30
IT_Switch(config-if)#spanning-tree portfast
IT_Switch(config-if)#no shut
IT_Switch(config-if)#int F1/1
IT_Switch(config-if)#switchport mode access
IT_Switch(config-if)#switchport access vlan 30
IT_Switch(config-if)#spanning-tree portfast
IT_Switch(config-if)#no shut
IT_Switch(config-if)#int F1/15
IT_Switch(config-if)#speed 100
IT_Switch(config-if)#duplex full
IT_Switch(config-if)#switchport mode trunk
IT_Switch(config-if)#switchport trunk encapsulation dot1q
IT_Switch(config-if)#no shut
IT_Switch(config-if)#int vlan 1
IT_Switch(config-if)#ip add 30.0.0.2 255.255.255.0
IT_Switch(config)#exit
IT_Switch(config)#ip default-gateway 30.0.0.1
IT_Switch(config)#exit
IT_Switch#copy run start

測試是否可
跨Vlan成功PING通
VPCS 1 >trace 30.0.0.4
traceroute to 30.0.0.4, 64 hops max
1 10.0.0.1 14.348 ms 3.705 ms 2.266 ms
2 30.0.0.4 6.273 ms 6.307 ms 4.841 ms

VPCS 1 >ping 20.0.0.3
20.0.0.3 icmp_seq=1 time=4.440 ms
20.0.0.3 icmp_seq=2 time=5.840 ms
20.0.0.3 icmp_seq=3 time=9.301 ms
20.0.0.3 icmp_seq=4 time=3.420 ms
20.0.0.3 icmp_seq=5 time=3.991 ms

VPCS 1 >ping 20.0.0.4
20.0.0.4 icmp_seq=1 time=3.315 ms
20.0.0.4 icmp_seq=2 time=3.787 ms
20.0.0.4 icmp_seq=3 time=4.505 ms
20.0.0.4 icmp_seq=4 time=4.245 ms
20.0.0.4 icmp_seq=5 time=4.587 ms

0 回應:

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.