Seven-arm routing of test applications

Single-arm routing applications

1, the purpose of the experiment
by the present experiment:
1) control on the switch and create division VLAN
2) to grasp the effect of trunk
3) the role of master to the configuration of VTP
4) control-arm configuration and routing principles
5) on the trunk of understanding action 802.1Q tag
2, the topology
Seven-arm routing of test applications
-arm routing topology implemented
3. experimental demand
1) Referring logical topology using a suitable cable to complete the physical topology of the building
2) to create two VLAN, VLAN10 and VLAN20 on Switch1, and the VLAN10 named
as sales, will VLAN20 named Engineers
3) to complete the necessary configuration to achieve VLAN database two exchange synchronization, and with the command of inspection
certificate and view the information VLAN database
4) connect the switch port is divided into PC1 and PC3 VLAN10, PC2 switch ports connecting the
division into VLAN20 and configure the appropriate IP address for the gateway and the PC
. 5) using a VLAN interface show vlan brief view of each switch
6) test connectivity between the host
7) complete the required configuration on switches and routers, can realize mutual communication among the host
4, the experimental procedure
step a
construct of the present experiment required network develops
Seven-arm routing of test applications

IOU2#configure ——进入配置模式
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
IOU2(config)#vlan 10——创建一个vlan 10
IOU2(config-vlan)#name sales——命名为sales
IOU2(config-vlan)#exit——返回上一层
IOU2(config)#vlan 20
IOU2(config-vlan)#name engineers
IOU2(config)# do show vlan——查看交换机的vlan

Seven-arm routing of test applications

IOU2(config)#interface e0/2——进入e0/2接口
IOU2(config-if)#switchport mode access ——交换机选择接口模式(交换模式一般在交换机和PC机上应用)
IOU2(config-if)#switchport access vlan 10——将vlan 10划分进接口
IOU2(config-if)#no shutdown ——打开接口
IOU2(config-if)#exit
IOU2(config)#interface e0/3
IOU2(config-if)#no shutdown 
IOU2(config-if)#switchport mode access 
IOU2(config-if)#switchport access vlan 20
IOU2(config-if)#exit
IOU2(config)#do show vlan

Seven-arm routing of test applications
VLAN 10 on IOU3 also included e0 / 1 interface.

Step two
to communicate with each other so that the PC in both the first two switches placed on the same management domain.

IOU2(config)#interface e0/0
IOU2(config-if)#no shutdown 
IOU2(config-if)#switchport trunk encapsulation dot1q ——在进行封装(固定操作)
IOU2(config-if)#switchport mode trunk ——交换机选择中继模式(一般在交换机与交换机或者路由器)
IOU2(config-if)#exit  
IOU2(config)#vtp domain zzz   ——vtp的管理域命名为zzz 
Changing VTP domain name from NULL to zzz
IOU2(config)#vtp password 123——密码为123
Setting device VTP password to 123
IOU2(config)#vtp mode server ——选择服务器模式
Device mode already VTP Server for VLANS.
IOU2(config)#vtp pruning ——开启vtp的修剪
Pruning switched on

Also another switch on the same operation as
Seven-arm routing of test applications
Seven-arm routing of test applications
the version number of the two switches have the same description has been synchronized.
Step Three

IOU2(config)#do show vlan brief ——显示vlan 的简要信息

Seven-arm routing of test applications

The three PC, coupled with an IP address and gateway settings after trying to ping it.
Seven-arm routing of test applications
Currently only addresses under the same network segment to ping.
Route-arm: By default, the different vlan can not communicate with each other, in some cases, to catch different vlan user can access the external network with a gateway, then a single arm of an urgent need to use the route technology, a virtual physical interface into multiple interfaces into a plurality of sub-vlan gateway. After configuring route-arm communicate with each other among different vlan,.

IOU1(config)#interface e0/0
IOU1(config-if)#no shutdown ——先进到e0/0接口将其打开
IOU1(config-if)#exit
IOU1(config)#interface e0/0.10——进到虚拟子接口e0/0.10
IOU1(config-subif)#encapsulation dot1Q 10——给虚拟子接口配上上标签(802.1q 802.10 ISL)
IOU1(config-subif)#ip address 192.168.10.254 255.255.255.0
IOU1(config-subif)#exit
IOU1(config)#interface e0/0.20
IOU1(config-subif)#encapsulation dot1Q 20
IOU1(config-subif)#ip address 192.168.20.254 255.255.255.0
IOU1(config-subif)#no shutdown 
IOU1(config-subif)#exit
IOU1(config)#interface e0/0.10
IOU1(config-subif)#no shutdown 

Note:
Also remember to open the interface switches and routers connected to and into the trunk mode

IOU2(config)#int e0/1
IOU2(config-if)#no shutdown 
IOU2(config-if)#switchport trunk encapsulation dot1q 
IOU2(config-if)#switchport mode trunk 

Seven-arm routing of test applications








So now we have all the gateway IP addresses and hosts are removed, use DHCP way for each host to obtain an IP address

IOU1(config)#ip dhcp pool vlan10——选择DHCP,让vlan放到一个池中
IOU1(dhcp-config)#network 192.168.10.0 255.255.255.0——通告一个网段
IOU1(dhcp-config)#default-router 192.168.10.254——配上一个网关
IOU1(dhcp-config)#exit
IOU1(config)#ip dhcp pool vlan20
IOU1(dhcp-config)#network 192.168.20.1 255.255.255.0
IOU1(dhcp-config)#default-router 192.168.20.254
IOU4(config)#interface e0/0
IOU4(config-if)#ip add
IOU4(config-if)#ip address dh
IOU4(config-if)#ip address dhcp ——选择dhcp让其自动获取地址
IOU4(config-if)#
*Jul 12 15:53:57.621: %DHCP-6-ADDRESS_ASSIGN: Interface Ethernet0/0 assigned DHCP address 192.168.10.1, mask 255.255.255.0, hostname IOU4——自动获取地址的提示

Seven-arm routing of test applications
I can see a host can ping all network segment.
Seven-arm routing of test applications

Guess you like

Origin blog.51cto.com/14367225/2419854