你的上个问题,就提示过你,要好好学习,这些都是很基础的,看来你真没做实验。。。
这里,我截图一下笔记上的,你参考一下吧(原理一样):

拓扑要求:
- 交换机下联2 台PC,又连接一台路由器。路由器作为内网VLAN10、VLAN20 用户的网关。交换机增加一个VLAN255 用于其自身的设备管理,交换机的管理IP 为192.168.255.1,网关在路由器上;
- 交换机创建VLAN10、VLAN20,这是用户VLAN,是PC 用户的VLAN;
- 路由器FE0/0 口划分子接口做单臂,作为VLAN10、VLAN20 及VLAN255 的网关;
- 要求VLAN10、VLAN20 之间的用户能够互访,同时只允许VLAN10 的用户Telnet 交换机进
行设备的管理。
原理提示:

然后对上面这拓扑的理解:

交换机的配置:
switch# config terminal
switch(config)# vlan 10
switch(config-vlan)# exit
switch(config)# vlan 20
switch(config-vlan)# exit
switch(config)# vlan 255 # 管理VLAN
switch(config-vlan)# exit
switch(config)# interface fastethernet0/1
switch(config-if)# swtichport mode access
switch(config-if)# swtichport access vlan 10
switch(config-if)# interface fastethernet0/2
switch(config-if)# swtichport mode access
switch(config-if)# swtichport access vlan 20
switch(config-if)# interface fastethernet0/15
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)# switchport mode trunk
switch(config-if)# exit
switch(config)# interface vlan 255
switch(config-if)# ip address 192.168.255.1 255.255.255.0 # 给VLAN255 配置IP 地址,这个IP 地址就是交换机的管理IP
switch(config-if)# exit
switch(config)# ip default-gateway 192.168.255.254 # 为交换机指定网关
switch(config)# line vty 0 4 # 配置VTY
switch(config-line)# password ccietea
switch(config-line)# login
switch(config-line)# exit
switch(config)#
路由器的配置:
Router(config)# hostname GW
GW(router)# interface fastethernet 0/0
GW(router-if)# no shutdown # 注意一定要将物理接口打开
GW(router)# interface fastethernet 0/0.10 # 这个子接口作为VLAN10 的网关
GW(router-if)# encapsulation dot1Q 10
GW(router-if)# ip address 192.168.10.254 255.255.255.0
GW(router-if)# interface fastethernet 0/0.20 # 这个子接口作为VLAN20 的网关
GW(router-if)# encapsulation dot1Q 20
GW(router-if)# ip address 192.168.20.254 255.255.255.0
GW(router-if)# interface fastethernet 0/0.255 # 这个子接口作为VLAN255 的网关
GW(router-if)# encapsulation dot1Q 255
GW(router-if)# ip address 192.168.255.254 255.255.255.0
然后,就算用你那边,一样的原理方式去配置,你先好好理解,再来玩耍,加油!