A部分:实验调试及验证

A.1部分 连接拓扑图

双交换单臂路由的实现_单臂

A.2部分:实验基本需求

1. 将S1、S2配置在一个VTP域内,VTP域名itaa。

2. S1为VTP SERVER,S2为VTP CLIENT。

3. 使用路由器模拟PC。

A.3部分:设备基本配置

S1:

Switch>enable

Switch#configure terminal

Switch(config)#no ip domain-lookup

Switch(config)#hostname S1

S1(config)#enable secret itaa

S1(config)#username S1 privilege 15 secret ccnp

S1(config)#banner motd#

Do not enter this Switch!!!

#

S1(config)#line console 0

S1(config-line)#logging synchronous

S1(config-line)#exec-timeout 0 0

S1(config-line)#password ccna

S1(config-line)#login

S1(config-line)#line vty 0 4

S1(config-line)#password ccie

S1(config-line)#login

S1(config-line)#service password-encryption

S1(config)#vlan 10

S1(config-vlan)#vlan 20

S1(config-vlan)#exit

S1(config)#vtp domain itaa

S1(config)#vtp mode server

S1(config)#interface f0/1

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 10

S1(config-if)#interface f0/2

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 10

S1(config-if)#interface f0/10

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk allowed vlan all

S1(config-if)#interface f0/11

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk allowed vlan all


S2:

Switch>enable

Switch#configure terminal

Switch(config)#no ip domain-lookup

Switch(config)#hostname S2

S2(config)#enable secret itaa

S2(config)#username S2 privilege 15 secret itaa

S2(config)#banner motd #

Do not enter this switch!!!

#

S2(config)#line con 0

S2(config-line)#logging synchronous

S2(config-line)#exec-timeout 0 0

S2(config-line)#password ccna

S2(config-line)#login

S2(config-line)#line vty 0 4

S2(config-line)#password ccie

S2(config-line)#login

S2(config-line)#service password-encryption

S2(config)#vtp mode client

S2(config)#interface f0/3

S2(config-if)#switchport mode access

S2(config-if)#switchport access vlan 20

S2(config-if)#interface f0/4

S2(config-if)#switchport mode access

S2(config-if)#switchport access vlan 20

S2(config-if)#interface f0/10

S2(config-if)#switchport mode trunk

S2(config-if)#switchport trunk allowed vlan all


R1:

Router>enable

Router#configure terminal

Router(config)#hostname R1

R1(config)#enable secret itaa

R1(config)#username R1 privilege 15 secret ccnp

R1(config)#banner motd #

Do not enter this router!!!

#

R1(config)#line console 0

R1(config-line)#logging synchronous

R1(config-line)#exec-timeout 0 0

R1(config-line)#password ccna

R1(config-line)#login

R1(config-line)#line vty 0 4

R1(config-line)#password ccie

R1(config-line)#login

R1(config-line)#service password-encryption

R1(config)#interface f0/1

R1(config-if)#no shutdown

R1(config-if)#interface f0/1.10

R1(config-subif)#ip address 10.1.1.254 255.255.255.0

R1(config-subif)#encapsulation dot1q 10

R1(config-subif)#interface f0/1.20

R1(config-subif)#ip address 20.1.1.254 255.255.255.0

R1(config-subif)#encapsulation dot1q 20


PC01:

Router>enable

Router#configure terminal

Router(config)#no ip domain-lookup

Router(config)#hostname PC01

PC01(config)#enable secret itaa

PC01(config)#username PC01 privilege 15 secret ccnp

PC01(config)#banner motd #

Do not enter this PC!!!

#

PC01(config)#line console 0

PC01(config)#logging synchronous

PC01(config)#exec-timeout 0 0

PC01(config)#password ccna

PC01(config)#login

PC01(config)#line vty 0 4

PC01(config)#password ccie

PC01(config)#login

PC01(config)#interface f0/1

PC01(config-if)#no shutdown

PC01(config-if)#description f0/1 is connected to S1 f0/1

PC01(config-if)#ip address 10.1.1.1 255.255.255.0

PC01(config-if)#exi

PC01(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.254


PC02:

Router>enable

Router#configure terminal

Router(config)#no ip domain-lookup

Router(config)#hostname PC02

PC02(config)#enable secret itaa

PC02(config)#username PC02 privilege 15 secret ccnp

PC02(config)#banner motd #

Do not enter this PC!!!

#

PC02(config)#line console 0

PC02(config)#logging synchronous

PC02(config)#exec-timeout 0 0

PC02(config)#password ccna

PC02(config)#login

PC02(config)#line vty 0 4

PC02(config)#password ccie

PC02(config)#login

PC02(config)#interface f0/1

PC02(config-if)#no shutdown

PC02(config-if)#description f0/1 is connected to S1 f0/2

PC02(config-if)#ip address 10.1.1.2 255.255.255.0

PC02(config-if)#exi

PC02(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.254


PC03:

Router>enable

Router#configure terminal

Router(config)#no ip domain-lookup

Router(config)#hostname PC03

PC03(config)#enable secret itaa

PC03(config)#username PC03 privilege 15 secret ccnp

PC03(config)#banner motd #

Do not enter this PC!!!

#

PC03(config)#line console 0

PC03(config)#logging synchronous

PC03(config)#exec-timeout 0 0

PC03(config)#password ccna

PC03(config)#login

PC03(config)#line vty 0 4

PC03(config)#password ccie

PC03(config)#login

PC03(config)#interface f0/1

PC03(config-if)#no shutdown

PC03(config-if)#description f0/1 is connected to S2 f0/3

PC03(config-if)#ip address 20.1.1.3 255.255.255.0

PC03(config-if)#exi

PC03(config)#ip route 0.0.0.0 0.0.0.0 20.1.1.254


PC04:

Router>enable

Router#configure terminal

Router(config)#no ip domain-lookup

Router(config)#hostname PC04

PC04(config)#enable secret itaa

PC04(config)#username PC04 privilege 15 secret ccnp

PC04(config)#banner motd #

Do not enter this PC!!!

#

PC04(config)#line console 0

PC04(config)#logging synchronous

PC04(config)#exec-timeout 0 0

PC04(config)#password ccna

PC04(config)#login

PC04(config)#line vty 0 4

PC04(config)#password ccie

PC04(config)#login

PC04(config)#interface f0/1

PC04(config-if)#no shutdown

PC04(config-if)#description f0/1 is connected to S2 f0/4

PC04(config-if)#ip address 20.1.1.4 255.255.255.0

PC04(config-if)#exit

PC04(config)#ip route 0.0.0.0 0.0.0.0 20.1.1.254

A.4部分:调试和验证过程

1. 查看S2的VLAN信息:

S2#show vlan


VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/5, Fa0/6

Fa0/7, Fa0/8, Fa0/9, Fa0/11

Fa0/12, Fa0/13, Fa0/14, Fa0/15

Fa0/16, Fa0/17, Fa0/18, Fa0/19

Fa0/20, Fa0/21, Fa0/22, Fa0/23

Fa0/24, Gig1/1, Gig1/2

10 VLAN0010 active

20 VLAN0020 active Fa0/3, Fa0/4

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup


VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

10 enet 100010 1500 - - - - - 0 0

20 enet 100020 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0


Remote SPAN VLANs

------------------------------------------------------------------------------



Primary Secondary Type Ports

------- --------- ----------------- ------------------------------------------

2. 查看S2的VTP信息:

S2#show vtp status

VTP Version : 2

Configuration Revision : 0

Maximum VLANs supported locally : 255

Number of existing VLANs : 7

VTP Operating Mode : Client

VTP Domain Name : itaa

VTP Pruning Mode : Disabled

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 digest : 0x57 0x81 0xFC 0x11 0x77 0x80 0xD2 0xB6

Configuration last modified by 0.0.0.0 at 3-1-93 00:01:10

3. SW1和SW2的VLAN信息已经同步了,下面查看路由器R1的路由表信息:

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route


Gateway of last resort is not set


10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, FastEthernet0/1.10

20.0.0.0/24 is subnetted, 1 subnets

C 20.1.1.0 is directly connected, FastEthernet0/1.20

R3上面也有了2条路由,路由上面也没有问题。

4. 下面开始测试:

PC01#ping 20.1.1.3


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 20.1.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 11/31/76 ms

B部分:实验结论

B.1部分:实验结论

1. VLAN之间的通信是实现3层上的通信。.