路由器主要配置:
interface FastEthernet0/1.100
encapsulation dot1Q 100
ip address 192.168.100.1 255.255.255.0
exit
interface FastEthernet0/1.200
encapsulation dot1Q 200
ip address 192.168.200.1 255.255.255.0
exit
interface FastEthernet0/1
no shutdown
交换机主要配置:
interface Vlan100
exit
interface Vlan200
exit
interface FastEthernet0/1
switchport mode trunk
exit
interface FastEthernet0/2
switchport access vlan 100
switchport mode access
spanning-tree portfast
exit
interface FastEthernet0/3
switchport access vlan 200
switchport mode access
spanning-tree portfast
exit
在router的两个接口上配上两个vlan所在子网上的网关地址,就OK了!
去电脑自学网里找不就什么都有啦~~