当前位置:
文档之家› vlan_vlan间路由知识和配置的详细过程
vlan_vlan间路由知识和配置的详细过程
单臂路由:目的就是使得在每个vlan里都要有相应接受和发送信息 多臂路由器:牺牲路由器的接口,让每个vlan 的接口 由器的物理接口工作在相应的vlan里面来完成 这里要使用到子接口,每个子接口都处于相应的vlan里面,也就是 收。 说通过每个子接口发出来的桢都被相应封装成了对应vlan的桢。 实现原理和单臂是一致的,不同在于性能上它比单臂要好 交换机上的操作 牺牲了性价比。 将交换机上连接路由器的端口设置为trunk模式 交换机上的操作 int fa0/10 将交换机上连接路由器的端口设置为访问相应的 switchport mode trunk interface FastEthernet0/10 路由器上的操作 switchport access vlan 10 interface FastEthernet0/0 switchport mode access no ip address interface FastEthernet0/11 duplex auto switchport access vlan 20 speed auto switchport mode access interface FastEthernet0/0.10 interface FastEthernet0/12 encapsulation dot1Q 10 switchport access vlan 30 ip address 192.168.10.254 255.255.255.0 switchport mode access interface FastEthernet0/0.20 路由器上的操作 encapsulation dot1Q 20 interface FastEthernet0/0 ip address 192.168.20.254 255.255.255.0 ip address 192.168.10.254 255.255.255. interface FastEthernet0/0.30 interface FastEthernet0/1 encapsulation dot1Q 30 ip address 192.168.20.254 255.255.255. ip address 192.168.30.254 255.255.255.0 interface FastEthernet1/0 PC>tracert 192.168.30.1 ip address 192.168.30.254 255.255.255. PC>tracert 192.168.20.1 Tracing route to 192.168.30.1 over a maximum of 30 hops: Tracing route to 192.168.20.1 over a maximum of 1 94 ms 94 ms 79 ms 192.168.10.254 2 187 ms 140 ms 156 ms 192.168.30.1 1 94 ms 94 ms 78 ms 192 2 140 ms 174 ms 172 ms 192 Trace complete. Trace complete. PC>tracert 192.168.20.1 PC>tracert 192.168.30.1 Tracing route to 192.168.20.1 over a maximum of 30 hops: Tracing route to 192.168.30.1 over a maximum of 1 78 ms 93 ms 94 ms 192.168.10.254 2 * 171 ms 172 ms 192.168.20.1 1 94 ms 94 ms 94 ms 192 2 187 ms 172 ms 127 ms 192 Trace complete. Trace complete.
192.168.10.254 192.168.20.1
Tracecert 192.168.30.1 Tracing route to 192.168.30.1 over a maximum of 30 hops: 1 2 94 ms 187 ms 94 ms 172 ms 94 ms 127 ms 192.168.10.254 192.168.30.1
vlan都能有一个现实的路 三层交换机: 里面来完成vlan信息的发送和接 原理和单臂路由器一致,是使用svi交换虚拟接口来完成不同vlan 间信息的发送和接收,然后再各个相应的svi上设置相应vlan子网 同在于性能上它比单臂要好很多,但 的ip地址,就可以完成各个vlan之间的通信。 将交换机上连接三层交换机的端口设置trunk interface FastEthernet0/12 switchport mode trunk 设置为访问相应的vlan 三层交换上的操作 interface Vlan10 ip address 192.168.10.254 255.255.255.0 interface Vlan20 ip address 192.168.20.254 255.255.255.0 interface Vlan30 ip address 192.168.30.254 255.255.255.0 interface Vlan40 ip address 192.168.40.254 255.255.255.0 interface Vlan50 ip address 192.168.50.254 255.255.255.0 interface Vlan60 255.0 ip address 192.168.60.254 255.255.255.0 PC>tracert 192.168.20.1 255.0 255.0
Tracing route to 192.168.20.1 over a maximum of 30 hops: 1 2 94 ms 140 ms 94 ms 174 ms 78 ms 172 ms 192.168.10.254 192.168.20.1
over a maximum of 30 hops:
over a maximum of 30 hops: 192.168.10.254 192.168.30.1
Trace complete.