设为首页 收藏本站
查看: 706|回复: 1

[经验分享] 思科VTP+单臂路由+动态路由

[复制链接]

尚未签到

发表于 2017-10-26 11:32:03 | 显示全部楼层 |阅读模式
VTP+单臂路由+动态路由
2117921ff8377f84cbee8f41ec01c81f.png

配置R1
R1#
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int e0/1
R1(config-if)#no sh
R1(config-if)#int e0/1.1
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip add 20.1.1.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#exit
R1(config)#int e0/1.2
R1(config-subif)#encapsulation dot1Q 3
R1(config-subif)#ip address 30.1.1.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#exit
R1(config)#int e0/0
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 10.10.10.0
R1(config-router)#network 20.1.1.0  
R1(config-router)#network 30.1.1.0
R1(config-router)#exit
R1(config)#do sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                10.10.10.1      YES manual up                    up      
Ethernet0/1                unassigned      YES unset  up                    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 unset  administratively down down   
Ethernet0/3                unassigned      YES unset  administratively down down   
R1(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
R    50.0.0.0/8 [120/1] via 10.10.10.2, 00:00:21, Ethernet0/0
     20.0.0.0/24 is subnetted, 1 subnets
C       20.1.1.0 is directly connected, Ethernet0/1.1
R    40.0.0.0/8 [120/1] via 10.10.10.2, 00:00:21, Ethernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, Ethernet0/0
     30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, Ethernet0/1.2
R1(config)#
配置R2
R2#
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 [120/1] 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 [120/1] 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 unset  administratively down down
配置SW1
SW1#
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 Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0   
3    enet  100003     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 trcrf 101003     4472  1005   3276   -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0   
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0   


VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode 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 unset  administratively down down   
FastEthernet0/1            unassigned      YES unset  administratively down down   
FastEthernet1/0            unassigned      YES unset  up                    up      
FastEthernet1/1            unassigned      YES unset  up                    up      
FastEthernet1/2            unassigned      YES unset  up                    up      
FastEthernet1/3            unassigned      YES unset  up                    up      
FastEthernet1/4            unassigned      YES unset  up                    up      
FastEthernet1/5            unassigned      YES unset  up                    down   
FastEthernet1/6            unassigned      YES unset  up                    down   
FastEthernet1/7            unassigned      YES unset  up                    down   
FastEthernet1/8            unassigned      YES unset  up                    down   
FastEthernet1/9            unassigned      YES unset  up                    down   
FastEthernet1/10           unassigned      YES unset  up                    down   
FastEthernet1/11           unassigned      YES unset  up                    down   
FastEthernet1/12           unassigned      YES unset  up                    down   
FastEthernet1/13           unassigned      YES unset  up                    down   
FastEthernet1/14           unassigned      YES unset  up                    down   
FastEthernet1/15           unassigned      YES unset  up                    down   
Vlan1                  unassigned      YES unset  up                    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 Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0   
3    enet  100003     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 trcrf 101003     4472  1005   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#
配置SW2
SW2#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 Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0   
3    enet  100003     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 trcrf 101003     4472  1005   3276   -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0   
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0   

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode 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
5ccf964f3737619a104549edf5c8236a.png
e70e95595a5acb47d4f120d2e2ba37a3.png

509ebc4fdddf98d54e4c36eb3dff32b3.png


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-405962-1-1.html 上篇帖子: packet tracer 配置 终端服务器 最简单配置 下篇帖子: cisco配置交换机管理地址和默认网关
累计签到:35 天
连续签到:1 天
发表于 2017-10-28 15:54:57 | 显示全部楼层
学习了,谢谢啦

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表