单臂路由的配置与概念
实验配置图
路由器
interface fastEthernet 0/0
ip address 10.1.1.1 255.255.255.0
no shutdown
intface fastEthernet 0/0.2
ip address 10.2.2.1 255.255.255.0
encapsulation dot1q 2
交换机
interface fastEthernet 0/0
switchport trunk encapsulation dot1q
switchport mode trunk
interface fastEthernet 0/1(默认情况下端口0/1在vlan 1中)
switchport access vlan 1
switchport mode access
interface fastEthernet 0/2
switchport access vlan 2
switchport mode access
*在单臂路由中,要实现本真(native)vlan 1,能够在子接口中应用,可以使用命令:interface fastEthernet 0/0.1
encapsulation dot1Q 1 native
清空arp缓存的命令:
clear arp-cache
显示running-config中的左右端口信息可以使用:
show running-config | section interface
中继端口有两种类型,一种是802.1Q,一种是ISL
ISL的配置方法是:
交换机配置:
int fastEthernet 0/3
switchport trunk encapsulation isl
switchport mode trunk
ip address ...
路由器配置子接口:
int fastEthernet 0/0
no shutdown
no ip address
int fastEthernet 0/0.1
encapsulation isl 1 *注意ISL没有本真(native)vlan的概念
ip address ...
一个交换区块内所有交换机的vlan信息要完全一致,因为一个交换机收到有vlan 标记的帧,会优先判断本地的vlan.dat中是否包含这个vlan,如果包含继而查我们的arp表,然后转发。
如果没有这个vlan的信息,就将他丢弃。
如图所示两台交换机都必须要有健全的vlan信息,数据才能够通过路由器转发。
所以要添加vtp在两台交换机中传递vlan信息。
还要注意因为两台交换机用两个两路相连形成了环路,所以要启用生成树协议。
*单臂路由的主干一般不低于百兆
不过单臂路由在现实生活中应用很少,因为所有的数据都要从一条链路去传递。
当传递的数据过多,会影响带宽;接着如果该路由带端口down掉了,影响的面积将会很广。