dfsfd 发表于 2017-10-26 11:32:03

思科VTP+单臂路由+动态路由

VTP+单臂路由+动态路由
配置R1R1#R1#conf tEnter configuration commands, one per line.End with CNTL/Z.R1(config)#int e0/1R1(config-if)#no shR1(config-if)#int e0/1.1R1(config-subif)#encapsulation dot1Q 2R1(config-subif)#ip add 20.1.1.1 255.255.255.0R1(config-subif)#no shR1(config-subif)#exitR1(config)#int e0/1.2R1(config-subif)#encapsulation dot1Q 3R1(config-subif)#ip address 30.1.1.1 255.255.255.0R1(config-subif)#no shR1(config-subif)#exitR1(config)#int e0/0R1(config-if)#ip add 10.10.10.1 255.255.255.0R1(config-if)#no sh R1(config-if)#exitR1(config)#router ripR1(config-router)#network 10.10.10.0R1(config-router)#network 20.1.1.0R1(config-router)#network 30.1.1.0R1(config-router)#exitR1(config)#do sh ip int brInterface                  IP-Address      OK? Method Status                ProtocolEthernet0/0                10.10.10.1      YES manual up                  up      Ethernet0/1                unassigned      YES unsetup                  up      Ethernet0/1.1            20.1.1.1      YES manual up                  up      Ethernet0/1.2            30.1.1.1      YES manual up                  up      Ethernet0/2                unassigned      YES unsetadministratively down down    Ethernet0/3                unassigned      YES unsetadministratively down down    R1(config)#do sh ip routeCodes: C - connected, S - static, 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       i - IS-IS, su - IS-IS summary, 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 routeGateway of last resort is not setR    50.0.0.0/8 via 10.10.10.2, 00:00:21, Ethernet0/0   20.0.0.0/24 is subnetted, 1 subnetsC       20.1.1.0 is directly connected, Ethernet0/1.1R    40.0.0.0/8 via 10.10.10.2, 00:00:21, Ethernet0/0   10.0.0.0/24 is subnetted, 1 subnetsC       10.10.10.0 is directly connected, Ethernet0/0   30.0.0.0/24 is subnetted, 1 subnetsC       30.1.1.0 is directly connected, Ethernet0/1.2R1(config)#配置R2R2#
R2#conf t
Enter configuration commands, one per line.End with CNTL/Z.
R2(config)#int e0/0
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#int e0/1
R2(config-if)#ip add 40.1.1.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e0/2
R2(config-if)#ip add 50.1.1.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#netwo   
R2(config-router)#network 10.10.10.0
R2(config-router)#network 40.1.1.0
R2(config-router)#network 50.1.1.0
R2(config-router)#exit
R2(config)#do sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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

   50.0.0.0/24 is subnetted, 1 subnets
C       50.1.1.0 is directly connected, Ethernet0/2
R    20.0.0.0/8 via 10.10.10.1, 00:00:09, Ethernet0/0
   40.0.0.0/24 is subnetted, 1 subnets
C       40.1.1.0 is directly connected, Ethernet0/1
   10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, Ethernet0/0
R    30.0.0.0/8 via 10.10.10.1, 00:00:09, Ethernet0/0
R2(config)#do sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                10.10.10.2      YES manual up                  up      
Ethernet0/1                40.1.1.1      YES manual up                  up      
Ethernet0/2                50.1.1.1      YES manual up                  up      
Ethernet0/3                unassigned      YES unsetadministratively down down
配置SW1SW1#
SW1#vlan database
SW1(vlan)#vlan 2
VLAN 2 added:
    Name: VLAN0002
SW1(vlan)#vlan 3
VLAN 3 added:
    Name: VLAN0003
SW1(vlan)#vtp domain DY
Changing VTP domain name from NULL to DY
SW1(vlan)#vtp server
Device mode already VTP SERVER.
SW1(vlan)#vtp v2-mode
V2 mode enabled.
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#conf t
Enter configuration commands, one per line.End with CNTL/Z.
SW1(config)#
SW1(config)#interface range f1/2 -3

SW1(config-if-range)#switchport access vlan 2
SW1(config-if-range)#exit
SW1(config)#int f1/4
SW1(config-if)#switchport access vlan 3
SW1(config)#int range f1/0 -1

SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#exit
SW1(config)#do sh vlan-s

VLAN Name                           Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                        active    Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12
                                                Fa1/13, Fa1/14, Fa1/15
2    VLAN0002                         active    Fa1/2, Fa1/3
3    VLAN0003                         active    Fa1/4
1002 fddi-default                     active   
1003 trcrf-default                  active   
1004 fddinet-default                   active   
1005 trbrf-default                  active   

VLAN TypeSAID       MTU   Parent RingNo BridgeNo StpBrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet100001   1500-      -      -      -    -      1002   1003
2    enet100002   1500-      -      -      -    -      0      0   
3    enet100003   1500-      -      -      -    -      0      0   
1002 fddi101002   1500-      -      -      -    -      1      1003
1003 trcrf 101003   44721005   3276   -      -    srb      1      1002
1004 fdnet 101004   1500-      -      1      ibm-      0      0   
1005 trbrf 101005   4472-      -      15       ibm-      0      0   


VLAN TypeSAID       MTU   Parent RingNo BridgeNo StpBrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off
SW1(config)#do sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unsetadministratively down down   
FastEthernet0/1            unassigned      YES unsetadministratively down down   
FastEthernet1/0            unassigned      YES unsetup                  up      
FastEthernet1/1            unassigned      YES unsetup                  up      
FastEthernet1/2            unassigned      YES unsetup                  up      
FastEthernet1/3            unassigned      YES unsetup                  up      
FastEthernet1/4            unassigned      YES unsetup                  up      
FastEthernet1/5            unassigned      YES unsetup                  down   
FastEthernet1/6            unassigned      YES unsetup                  down   
FastEthernet1/7            unassigned      YES unsetup                  down   
FastEthernet1/8            unassigned      YES unsetup                  down   
FastEthernet1/9            unassigned      YES unsetup                  down   
FastEthernet1/10         unassigned      YES unsetup                  down   
FastEthernet1/11         unassigned      YES unsetup                  down   
FastEthernet1/12         unassigned      YES unsetup                  down   
FastEthernet1/13         unassigned      YES unsetup                  down   
FastEthernet1/14         unassigned      YES unsetup                  down   
FastEthernet1/15         unassigned      YES unsetup                  down   
Vlan1                  unassigned      YES unsetup                  up      
SW1#sh vtp status
VTP Version                      : 2
Configuration Revision            : 1
Maximum VLANs supported locally      : 256
Number of existing VLANs             : 7
VTP Operating Mode               : Server
VTP Domain Name                   : DY
VTP Pruning Mode                  : Disabled
VTP V2 Mode                     : Enabled
VTP Traps Generation               : Disabled
MD5 digest                      : 0xC7 0x48 0xE1 0x67 0xEE 0x6D 0x30 0x87
Configuration last modified by 0.0.0.0 at 3-1-02 00:45:34
Local updater ID is 0.0.0.0 (no valid interface found)
SW1#do sh vlan-switch
VLAN Name                           Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                        active    Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12
                                                Fa1/13, Fa1/14, Fa1/15
2    VLAN0002                         active    Fa1/2, Fa1/3
3    VLAN0003                         active    Fa1/4
1002 fddi-default                     active   
1003 trcrf-default                  active   
1004 fddinet-default                  active   
1005 trbrf-default                  active   

VLAN TypeSAID       MTU   Parent RingNo BridgeNo StpBrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet100001   1500-      -      -      -    -      1002   1003
2    enet100002   1500-      -      -      -    -      0      0   
3    enet100003   1500-      -      -      -    -      0      0   
1002 fddi101002   1500-      -      -      -    -      1      1003
1003 trcrf 101003   44721005   3276   -      -    srb      1      1002
1004 fdnet 101004   1500-      -      1      ibm-      0      0   
1005 trbrf 101005   4472-      -      15       ibm-      0      0   
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off
SW1#
配置SW2SW2#conf t
Enter configuration commands, one per line.End with CNTL/Z.
SW2(config)#int range f1/0 -15
SW2(config-if-range)#no sh
SW2(config-if-range)#exit
SW2(config)#exit
SW2#vlan database
SW2(vlan)#vtp domain DY
Changing VTP domain name from Dc to DY
SW2(vlan)#vtp client
Device mode already VTP CLIENT.
SW2(vlan)#vtp v2-mode
V2 mode enabled.
SW2(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
SW2#conf t
Enter configuration commands, one per line.End with CNTL/Z.
SW2(config)#int f1/0
SW2(config-if)#switchport mode trunk
SW2(config-if)#int f1/1
SW2(config-if)#switchport access vlan 2
SW2(config-if)#int f1/2
SW2(config-if)#switchport access vlan 3
SW2(config-if)#exit
SW2(config)#do sh vlan-s

VLAN Name                           Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                        active    Fa1/3, Fa1/4, Fa1/5, Fa1/6
                                                Fa1/7, Fa1/8, Fa1/9, Fa1/10
                                                Fa1/11, Fa1/12, Fa1/13, Fa1/14
                                                Fa1/15
2    VLAN0002                         active    Fa1/1
3    VLAN0003                         active    Fa1/2
1002 fddi-default                     active   
1003 trcrf-default                  active   
1004 fddinet-default                  active   
1005 trbrf-default                  active   

VLAN TypeSAID       MTU   Parent RingNo BridgeNo StpBrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet100001   1500-      -      -      -    -      1002   1003
2    enet100002   1500-      -      -      -    -      0      0   
3    enet100003   1500-      -      -      -    -      0      0   
1002 fddi101002   1500-      -      -      -    -      1      1003
1003 trcrf 101003   44721005   3276   -      -    srb      1      1002
1004 fdnet 101004   1500-      -      1      ibm-      0      0   
1005 trbrf 101005   4472-      -      15       ibm-      0      0   

VLAN TypeSAID       MTU   Parent RingNo BridgeNo StpBrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off
SW2(config)#do sh vtp s
VTP Version               : 2
Configuration Revision          : 1
Maximum VLANs supported locally    : 256
Number of existing VLANs         : 7
VTP Operating Mode             : Client
VTP Domain Name               : DY
VTP Pruning Mode            : Disabled
VTP V2 Mode               : Enabled
VTP Traps Generation         : Disabled
MD5 digest                  : 0xC7 0x48 0xE1 0x67 0xEE 0x6D 0x30 0x87
Configuration last modified by 0.0.0.0 at 3-1-02 00:45:34
SW2(config)#
用PC机互相ping对方的PC

明天会更好 发表于 2017-10-28 15:54:57

学习了,谢谢啦
页: [1]
查看完整版本: 思科VTP+单臂路由+动态路由