目录
一.单臂路由
1.单臂路由的目的
通过在路由器上划分出逻辑接口实现不通vlan之间直接通信。
2.单臂路由链路类型
- 交换机与主机的端口为access类型;
- 交换机与路由器之间端口为trunk链路,仅在单臂路由模式下。
3.实验步骤
实验视图:
实验步骤:
sw1
vlan batch 10 20 30
int e0/0/1
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 20
int e0/0/3
port link-type access
port default vlan 30
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
sw2
vlan batch 10 20 30 100
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
int g0/0/2
port link-type access
port default vlan 100
int Vlanif10
ip address 192.168.1.254 255.255.255.0
int Vlanif20
ip address 192.168.2.254 255.255.255.0
int Vlanif30
ip address 192.168.3.254 255.255.255.0
int Vlanif100
ip address 192.168.4.1 255.255.255.0
ip route-static 192.168.5.0 255.255.255.0 192.168.4.2
R1
int g0/0/0
ip address 192.168.4.2 255.255.255.0
int g0/0/1
ip address 192.168.5.254 255.255.255.0
int g0/0/2
ip route-static 0.0.0.0 0.0.0.0 192.168.4.1
4.实验结果
本次实验后,PC1、PC2、PC3和PC4之间可以进行通信。
二.三层交换机实例演示
1.实验视图
2.实验步骤
配置好PC1 PC2 PC3 PC4 服务器的IP地址等。
依次配置SW1 SW2 SW3 SW4 SW5 SW6设备
SW4:
SW5:
SW2 :
SW3:
SW1:
SW1:
R1
int g0/0/0
ip add 10.1.11.1 30
int g0/0/1
ip add 172.16.1.254 24
ip route-static 0.0.0.0 0 10.1.11.2