科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道VTP+STP+三层交换+HSRP

VTP+STP+三层交换+HSRP

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

路由器配置。

作者:中国IT实验室 来源:中国IT实验室 2009年6月17日

关键字: 网络管理 hsrp vtp

  • 评论
  • 分享微博
  • 分享邮件

路由器配置

VTP+STP+三层交换+HSRP


路由基本配置
en
conf t
no ip do lo
lin c 0
no exec-t
logg s
end

接口配置
conf t
int f0/0
ip add 1.1.1.1 255.255.255.0
no shu
int f1/0
ip add 2.2.2.1 255.255.255.0
no shu
int loopback 1
ip add 3.3.3.1 255.255.255.0
no shu
end
rip路由协议配置
conf t
router rip
ver 2
no auto
network 1.1.1.0
network 2.2.2.0
network 3.3.3.0
end

 

三层交换机S3A

conf t
no ip do lo
ho S3A
lin c 0
no exec-t
logg s
end


vlan data
vtp domain benet
vtp password 123456
vtp v2-mode
vtp pruning
vl 2
vl 3
vl 4
exit

conf t
int f0/0
no switchport
ip add 1.1.1.254 255.255.255.0
no shu
int vl 1
ip add 192.168.1.254 255.255.255.0
no shu
int vl 2
ip add 192.168.2.254 255.255.255.0
no shu
int vl 3
ip add 192.168.3.254 255.255.255.0
no shu
int vl 4
ip add 192.168.4.254 255.255.255.0
no shu
end

conf t
spanning-tree vlan 1 root primary
spanning-tree vlan 2 root secondary
spanning-tree vlan 3 root primary
spanning-tree vlan 4 root secondary
spanning-tree backbonefast
int f0/11
sw mo tr
int f0/12
sw mo tr
int f0/13
sw mo tr
int range f0/14 - 15
channel-group 1 mode on
int port-channel 1
sw mo tr
end

conf t
router rip
ver 2
no auto
network 1.1.1.0
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
end

conf t
int vl 1
standby 1 ip 192.168.1.1
standby 1 priority 180
standby 1 preempt
standby 1 track f0/0 50
int vl 2
standby 2 ip 192.168.2.1
standby 2 priority 150
int vl 3
standby 3 ip 192.168.3.1
standby 3 priority 180
standby 3 preempt
standby 3 track f0/0 50
int vl 4
standby 4 ip 192.168.4.1
standby 4 priority 150
end

 


三层交换机S3B
基本配置
conf t
no ip do lo
ho S3B
lin c 0
no exec-t
logg s
end

vtp与vlan的配置

vlan data
vtp domain benet
vtp password 123456
vtp v2-mode
vtp pruning
vl 2
vl 3
vl 4
exit

conf t
int f0/0
no switchport
ip add 2.2.2.254 255.255.255.0
no shu
int vl 1
ip add 192.168.1.253 255.255.255.0
no shu
int vl 2
ip add 192.168.2.253 255.255.255.0
no shu
int vl 3
ip add 192.168.3.253 255.255.255.0
no shu
int vl 4
ip add 192.168.4.253 255.255.255.0
no shu
end
conf t
spanning-tree vlan 1 root secondary
spanning-tree vlan 2 root primary
spanning-tree vlan 3 root secondary
spanning-tree vlan 4 root primary
spanning-tree backbonefast
int f0/11
sw mo tr
int f0/12
sw mo tr
int f0/13
sw mo tr
int range f0/14 - 15
channel-group 1 mode on
int port-channel 1
sw mo tr
end
conf t
router rip
ver 2
no auto
network 2.2.2.0
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
end

conf t
int vl 1
standby 1 ip 192.168.1.1
standby 1 priority 150
int vl 2
standby 2 ip 192.168.2.1
standby 2 priority 180
standby 2 preempt
standby 2 track f0/0 50
int vl 3
standby 3 ip 192.168.3.1
standby 3 priority 150
int vl 4
standby 4 ip 192.168.4.1
standby 4 priority 180
standby 4 preempt
standby 4 track f0/0 50
end

 

二层交换机S2A
conf t
no ip do lo
no ip routing
ho S2A
lin c 0
no exec-t
logg s
end
vlan data
vtp client
vtp domain benet
vtp password 123456
exit
conf t
int f0/14
sw mo tr
int f0/15
sw mo tr
end
conf t
int f0/1
spanning-tree portfast
exit
spanning-tree backbonefast
spanning-tree uplinkfast
end

二层交换机S2B
conf t
no ip do lo
no ip routing
ho S2B
lin c 0
no exec-t
logg s
end
vlan data
vtp client
vtp domain benet
vtp password 123456
exit
conf t
int f0/14
sw mo tr
int f0/15
sw mo tr
end
conf t
int f0/2
spanning-tree portfast
exit
spanning-tree backbonefast
spanning-tree uplinkfast
end

二层交换机S2C
conf t
no ip do lo
no ip routing
ho S2C
lin c 0
no exec-t
logg s
end
vlan data
vtp client
vtp domain benet
vtp password 123456
exit
conf t
int f0/14
sw mo tr
int f0/15
sw mo tr
end
conf t
int f0/3
spanning-tree portfast
exit
spanning-tree backbonefast
spanning-tree uplinkfast
end

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章