|
实验 11:配置单臂路由
实验目标:
1.学会配置路由器子接口.
2.配置单臂路由实现VLAN间通信.
3.理解单臂路由的缺点:路由器单个接口流量为200G,但是多个VLAN会超过200G.
实验步骤:
1.参照实验8、9完成交换机的基本配置.
2.配置SW1的上行中继.
3.配置路由器的子接口.
4.配置终端PC的网关.
5.测试VLAN间通信.
1.参照实验8、9完成交换机的基本配置.
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host SW1
SW1(config)#vlan 2
SW1(config-vlan)#name fd
SW1(config-vlan)#vlan 3
SW1(config-vlan)#name it
SW1(config-vlan)#inter range f0/1-2
SW1(config-if-range)#swi mo acc
SW1(config-if-range)#swi acc vlan 2
SW1(config-if-range)#inter range f0/3-5
SW1(config-if-range)#swi mo acc
SW1(config-if-range)#swi acc vlan 3
SW1(config-if-range)#do show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
2 fd active Fa0/1, Fa0/2
3 it active Fa0/3, Fa0/4, Fa0/5
SW1(config)#inter g0/1
SW1(config-if)#swi mo trunk
SW1(config-if)#swi nonegotiate
SW1(config-if)#do show inter trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 1
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host SW2
SW2(config)#vlan 2
SW2(config-vlan)#name fd
SW2(config-vlan)#vlan 3
SW2(config-vlan)#name it
SW2(config)#inter f0/1
SW2(config-if)#swi mo acc
SW2(config-if)#swi acc vlan 2
SW2(config-if)#inter f0/2
SW2(config-if)#swi mo acc
SW2(config-if)#swi acc vlan 3
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
2 fd active Fa0/1
3 it active Fa0/2
SW2(config-if)#inter g0/1
SW2(config-if)#swi mo tr
SW2(config-if)#swi none
SW2(config-if)#do show inter trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 1
2.配置SW1的上行中继.
SW1(config-if)#inter f0/24
SW1(config-if)#swi mo tr
SW1(config-if)#swi none
3.配置路由器的子接口.
路由器的子接口先要封装才能配地址.
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#inter f0/0
R1(config-if)#no shu
R1(config-if)#inter f0/0.2
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip add 192.168.2.254 255.255.255.0
R1(config-subif)#inter f0/0.3
R1(config-subif)#en do 3
R1(config-subif)#ip add 192.168.3.254 255.255.255.0
R1#show ip inter br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/0.2 192.168.2.254 YES manual up up
FastEthernet0/0.3 192.168.3.254 YES manual up up
4.配置终端PC的网关.
VLAN 2的PC配192.168.2.254
VLAN 3的PC配192.168.3.254
5.测试VLAN间通信.successful.
|
-
|