ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

CISCO router实现VLAN间路由的两种方式,交换机配置问题

2014-7-24 08:03| 发布者: admin| 查看: 582| 评论: 0

摘要: 1、单臂路由配置的方法: Switch Switchenable Switch#config Configuring from terminal, memory, or network ? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface f0/1 Swi ...

1、单臂路由配置的方法:

Switch>
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
% Access VLAN does not exist. Creating vlan 10
Switch(config-if)#interface f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
% Access VLAN does not exist. Creating vlan 20
Switch(config-if)#interface f0/3
Switch(config-if)#switchport trunk en?
% Unrecognized command
Switch(config-if)#switchport port
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk ?
allowed Set allowed VLAN characteristics when interface is in trunking mode
native Set trunking native characteristics when interface is in trunking
mode
Switch(config-if)#switch trunk allow vlan all

Router>enable
Router#config
Router(config)#interface f0/0
Router(config-if)#no shutdown
Router(config-if)#interface f0/0.10
Router(config-subif)#encapsulation dot1Q ?
<1-1005> IEEE 802.1Q VLAN ID
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 172.16.10.254 255.255.255.0
Router(config-subif)#interface f0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 172.168.20.254 255.255.255.0
Router(config-subif)#end
Router#copy runn start
会用到的一些命令:
show ip route
show running-config
ping ip
tracert ip

2、VLAN三层交换配置的方法:

PC1 PC2
Switch>enable
Switch#config terminal
Switch(config)#interface f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
% Access VLAN does not exist. Creating vlan 10
Switch(config-if)#interface f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
% Access VLAN does not exist. Creating vlan 20
Switch(config-if)#interface vlan 10
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#interface vlan 20
Switch(config-if)#ip address 192.168.20.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip routing
Switch(config)#exit
Switch#copy running start
在 pc2 ping测试
查看路由,命令show ip route

3 排查VLAN间路由故障的方法。

3.1 交换机配置问题

VLAN分配不正确及接入模式不正确
校验
S#show interfaces FastEthernet0/0switchport
S#show runn
3.2 路由器配置问题。
3.3 IP 编址问题。

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-11-2 04:29 , Processed in 0.061663 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部