大型网络项目CISCO路由器交换机配置详细文档

实验结果及分析见结尾处
实验拓朴图如下:



接入层交换机B1-F2-S1配置文档如下:

enable
configure terminal
hostname b1-f2-s1
line vty 0 15
password hebin1
login
exit
line console 0
password hebin2
login
exit
enable password hebin3
enable secret hebin4
interface vlan 1
ip address 10.16.34.3 255.255.255.0
no shutdown
exit
ip default-gateway 10.16.34.254
vtp domain ben-c1
vtp version 2
vtp pruning
vtp password cisco-vtp
interface range fastethernet 0/1 - 2
switchport mode trunk
no shutdown
exit
spanning-tree uplinkfast
interface f0/11
switchport mode access
spanning-tree portfast
end
vlan database
vlan 9 name b1-hl
vlan 12 name b1-f2
vlan 13 name b1-f3
vlan 14 name b1-f4
vlan 15 name b1-f5
vlan 16 name b1-f6
vlan 17 name b1-f7
exit
conf terminal
interface f0/12
switchport mode access
switchport access vlan 12
no shutdown
exit
interface f0/13
switchport mode access
switchport access vlan 13
no shutdown
exit
interface f0/14
switchport mode access
switchport access vlan 14
no shutdown
exit
interface f0/15
switchport mode access
switchport access vlan 15
no shutdown
exit
interface f0/16
switchport mode access
switchport access vlan 16
no shutdown
exit
interface f0/17
switchport mode access
switchport access vlan 17
no shutdown
end
conf t
vtp domain hebin
vtp domain ben-c1
vtp mode clIEnt
end
汇聚层交换机B1-D-S1配置文档如下:

enable
configure terminal
hostname b1-d-s1
line vty 0 15
password hebin1
login
exit
line console 0
password hebin5
login
exit
enable password hebin2
enable secret hebin3
end
configure terminal
interface vlan 1
ip address 10.16.34.1 255.255.255.0
no shutdown
exit
ip default-gateway 10.16.34.254
interface range fastethernet 0/1 - 2
switchport mode trunk
no shutdown
exit
interface range fastethernet 0/23 - 24
switchport mode trunk
channel-group 1 mode on
no shutdown
exit
interface f0/11
switchport mode access
spanning-tree portfast
no shutdown
end
conf t
spanning-tree vlan 1
spanning-tree vlan 1 root primary
spanning-tree vlan 9
spanning-tree vlan 9 root primary
spanning-tree vlan 12
spanning-tree vlan 12 root secondary
spanning-tree vlan 13
spanning-tree vlan 13 root secondary
spanning-tree vlan 14
spanning-tree vlan 14 root secondary
spanning-tree vlan 15
spanning-tree vlan 15 root secondary
spanning-tree vlan 16
spanning-tree vlan 16 root secondary
spanning-tree vlan 17
spanning-tree vlan 17 root secondary
vtp domain ben-c1
vtp mode server
vtp version 2
vtp pruning
vtp password cisco-vtp
end
conf t
interface range fastethernet 0/3 - 10
shutdown
exit
interface range fastethernet 0/12 - 22
shutdown
end

汇聚层交换机B1-D-S2配置技术文档下:

enable
configure terminal
hostname b1-d-s2
line vty 0 15
password hebin1
login
exit
line console 0
password hebin5
login
exit
enable password hebin2
enable secret hebin3
end
configure terminal
interface vlan 1
ip address 10.16.34.2 255.255.255.0
no shutdown
exit
ip default-gateway 10.16.34.254
interface range fastethernet 0/1 - 2
switchport mode trunk
no shutdown
exit
interface range fastethernet 0/23 - 24
switchport mode trunk
channel-group 1 mode on
no shutdown
exit
interface f0/11
switchport mode access
spanning-tree portfast
no shutdown
end
conf t
spanning-tree vlan 1
spanning-tree vlan 1 root secondary
spanning-tree vlan 9
spanning-tree vlan 9 root secondary
spanning-tree vlan 12
spanning-tree vlan 12 root primary
spanning-tree vlan 13
spanning-tree vlan 13 root primary
spanning-tree vlan 14
spanning-tree vlan 14 root primary
spanning-tree vlan 15
spanning-tree vlan 15 root primary
spanning-tree vlan 16
spanning-tree vlan 16 root primary
spanning-tree vlan 17
spanning-tree vlan 17 root primary
vtp domain ben-c1
vtp mode server
vtp version 2
vtp pruning
vtp password cisco-vtp
end
conf t
interface range fastethernet 0/3 - 10
shutdown
exit
interface range fastethernet 0/12 - 22
shutdown
end
路由器B1-D-S1-R配置文档如下:

enable

conf terminal
hostname b1-d-s1-r
line vty 0 4
password ciscoa
login
exit
line console 0
password ciscob
login
end
conf terminal
interface loopback 0
ip address 10.16.35.1 255.255.255.255
no shutdown
exit
interface ethernet 1/0
ip address 10.16.65.1 255.255.255.224
no shutdown
exit
interface fastethernet 0/0
ip address 10.16.34.252 255.255.255.0
no shutdown
exit
interface fastethernet 0/0.9
ip address 10.16.65.249 255.255.255.248
encapsulation dot1q 9
no shutdown
exit
interface fastethernet 0/0.12
ip address 10.16.98.252 255.255.255.0
encapsulation dot1q 12
no shutdown
exit
interface fastethernet 0/0.13
ip address 10.16.99.252 255.255.255.0
encapsulation dot1q 13
no shutdown
exit
interface fastethernet 0/0.14
ip address 10.16.100.252 255.255.255.0
encapsulation dot1q 14
no shutdown
exit
interface fastethernet 0/0.15
ip address 10.16.101.252 255.255.255.0
encapsulation dot1q 15
no shutdown
exit
interface fastethernet 0/0.16
ip address 10.16.102.252 255.255.255.0
encapsulation dot1q 16
no shutdown
exit
interface fastethernet 0/0.17
ip address 10.16.103.252 255.255.255.0
encapsulation dot1q 17
no shutdown
end
conf t
interface fastethernet 0/0
no ip redirects
standby 1 ip 10.16.34.254
standby 1 priority 150
standby 1 preempt
standby 1 track ethernet 1/0 100
exit
interface fastethernet 0/0.12
no ip redirects
standby 12 ip 10.16.98.254
standby 12 priority 120
exit
interface fastethernet 0/0.13
no ip redirects
standby 13 ip 10.16.99.254
standby 13 priority 120
exit
interface fastethernet 0/0.14
no ip redirects
standby 14 ip 10.16.100.254
standby 14 priority 120
exit
interface fastethernet 0/0.15
no ip redirects
standby 15 ip 10.16.101.254
standby 15 priority 120
exit

interface fastethernet 0/0.16
no ip redirects
standby 16 ip 10.16.102.254
standby 16 priority 120
exit
interface fastethernet 0/0.17
no ip redirects
standby 17 ip 10.16.103.254
standby 17 priority 120
end
conf t
line aux 0
password hebin
login
end
conf t
interface ethernet 1/1
ip address 10.16.65.33 255.255.255.224
no shutdown
end
conf terminal
router ospf 10
network 10.16.35.1 0.0.0.0 area 1
network 10.16.34.0 0.0.0.255 area 1
network 10.16.65.249 0.0.0.0 area 1
network 10.16.98.0 0.0.0.255 area 1
network 10.16.99.0 0.0.0.255 area 1
network 10.16.100.0 0.0.0.255 area 1
network 10.16.101.0 0.0.0.255 area 1
network 10.16.102.0 0.0.0.255 area 1
network 10.16.103.0 0.0.0.255 area 1
network 10.16.65.1 0.0.0.0 area 0
network 10.16.65.33 0.0.0.0 area 0
area 1 stub no-summary
end
conf terminal
interface ethernet 1/0
ip ospf priority 200
end
路由器B1-D-S2-R配置文档如下:

enable
conf terminal
hostname b1-d-s2-r
line vty 0 4
password ciscoa
login
exit
line console 0
password ciscob
login
end
conf terminal
interface loopback 0
ip address 10.16.35.2 255.255.255.255
no shutdown
exit
interface ethernet 1/0
ip address 10.16.65.2 255.255.255.224
no shutdown
exit
interface fastethernet 0/0
ip address 10.16.34.253 255.255.255.0
no shutdown
exit
interface fastethernet 0/0.9
ip address 10.16.65.250 255.255.255.248
encapsulation dot1q 9
no shutdown
exit
interface fastethernet 0/0.12
ip address 10.16.98.253 255.255.255.0
encapsulation dot1q 12
no shutdown
exit
interface fastethernet 0/0.13
ip address 10.16.99.253 255.255.255.0
encapsulation dot1q 13
no shutdown
exit
interface fastethernet 0/0.14
ip address 10.16.100.253 255.255.255.0
encapsulation dot1q 14
no shutdown
exit
interface fastethernet 0/0.15
ip address 10.16.101.253 255.255.255.0
encapsulation dot1q 15
no shutdown
exit
interface fastethernet 0/0.16
ip address 10.16.102.253 255.255.255.0
encapsulation dot1q 16
no shutdown
exit
interface fastethernet 0/0.17
ip address 10.16.103.253 255.255.255.0
encapsulation dot1q 17
no shutdown
end
conf t
interface fastethernet 0/0
no ip redirects
standby 1 ip 10.16.34.254
standby 1 priority 120
exit
interface fastethernet 0/0.12
no ip redirects
standby 12 ip 10.16.98.254
standby 12 priority 150
standby 12 preempt
standby 12 track ethernet 1/0 100
exit
interface fastethernet 0/0.13
no ip redirects
standby 13 ip 10.16.99.254
standby 13 priority 150
standby 13 preempt
standby 13 track ethernet 1/0 100
exit
interface fastethernet 0/0.14
no ip redirects
standby 14 ip 10.16.100.254
standby 14 priority 150
standby 14 preempt
standby 14 track ethernet 1/0 100
exit
interface fastethernet 0/0.15

no ip redirects
standby 15 ip 10.16.101.254
standby 15 priority 150
standby 15 preempt
standby 15 track ethernet 1/0 100
exit
interface fastethernet 0/0.16
no ip redirects
standby 16 ip 10.16.102.254
standby 16 priority 150
standby 16 preempt
standby 16 track ethernet 1/0 100
exit
interface fastethernet 0/0.17
no ip redirects
standby 17 ip 10.16.103.254
standby 17 priority 150
standby 17 preempt
standby 17 track ethernet 1/0 100
end
conf t
line aux 0
password hebin
login
end
conf t
interface ethernet 1/1
ip address 10.16.65.34 255.255.255.224
no shutdown
end
conf terminal
router ospf 20
network 10.16.35.2 0.0.0.0 area 1
network 10.16.34.0 0.0.0.255 area 1
network 10.16.65.250 0.0.0.0 area 1
network 10.16.98.0 0.0.0.255 area 1
network 10.16.99.0 0.0.0.255 area 1
network 10.16.100.0 0.0.0.255 area 1
network 10.16.101.0 0.0.0.255 area 1
network 10.16.102.0 0.0.0.255 area 1
network 10.16.103.0 0.0.0.255 area 1
network 10.16.65.2 0.0.0.0 area 0
network 10.16.65.34 0.0.0.0 area 0
area 1 stub no-summary
end
conf terminal
interface ethernet 1/1
ip ospf priority 100
end
实验总结:

* 当把两个路由器的配置文档导入后,发现两个R的所有子接口的IP都丢失了,后又对两个R的所有子接口单独重新导入一次IP,这时IP没有丢失,原因不明,有可能IOS出现问题,暂不研究;
* 当配置全导入OK后,两台路由器的路由表均有直连的子接口及学习到的OSPF路由;
* 在最上一台switch上能PING通上面三台交换机的管理IP以及两台router的physical、 loopback接口以及所有subif-interface,但除左边路由器的下面E1/0口PING不通外(可能是网线有问题吧,查看该接口,发现前是UP,后PROTOCOL是DOWN,未查明原因);
* 在最上面接入层交换机的F0/12、F0/17各接入一台PC机,两台PC能相互PING成功;
* 当把左边交换机F0/1拨掉,或把右边交换机F0/1拨掉时,发现两台PC还是PING成功的,说明是STP的功劳;
* 当把左边路由器的F0/0拨掉,或把右边路由器的F0/0拨掉时,两台PC能相互PING成功,说明是HSRP的功劳;
* 当把左边交换机的F0/1拨掉以及把右边路由器的F0/0拨掉时,两台PC能相互PING成功,说明此时STP及HSRP均有功劳;
* 当把右边交换机的F0/1拨掉以及把左边路由器的F0/0拨掉时,两台PC能相互PING成功,说明此时STP及HSRP均有功劳;
* 在底下交换机上配置一个VLAN12,把F0/12加入到VLAN12,再将另一台PC接入F0/12,再到右边路由器的E1/0上做子接口E1/0.1,地址为172.16.1.1/24并将其封装为dot1q 12,将这台PC IP设为172.16.1.2/24,此时根据理论知识,这台PC应该是可以PING 接入层交换机F0/12口的VLAN12 PC成功的,由时时间关系,该步没有做成功,但在BOSON中是可以成功的!
原文见:http://www.pcjqw.com/show.aspx?page=1&id=3887&cid=11


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.