jiaoxue#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
192.168.0.0/30 is subnetted, 1 subnets
O 192.168.0.0 [110/2] via 192.168.255.9, 01:01:34, FastEthernet0/1
O 192.168.7.0/24 [110/4] via 192.168.255.9, 01:01:24, FastEthernet0/1
C 192.168.11.0/24 is directly connected, Vlan11
C 192.168.12.0/24 is directly connected, Vlan12
C 192.168.13.0/24 is directly connected, Vlan13
C 192.168.14.0/24 is directly connected, Vlan14
C 192.168.15.0/24 is directly connected, Vlan15
C 192.168.16.0/24 is directly connected, Vlan16
O 192.168.18.0/24 [110/3] via 192.168.255.9, 01:01:24, FastEthernet0/1
O 192.168.19.0/24 [110/3] via 192.168.255.9, 01:01:24, FastEthernet0/1
O 192.168.20.0/24 [110/3] via 192.168.255.9, 01:01:24, FastEthernet0/1
192.168.254.0/29 is subnetted, 2 subnets
C 192.168.254.0 is directly connected, Vlan1
O 192.168.254.8 [110/3] via 192.168.255.9, 00:22:51, FastEthernet0/1
192.168.255.0/30 is subnetted, 4 subnets
O 192.168.255.0 [110/3] via 192.168.255.9, 01:01:24, FastEthernet0/1
O 192.168.255.4 [110/2] via 192.168.255.9, 01:01:34, FastEthernet0/1
C 192.168.255.8 is directly connected, FastEthernet0/1
O 192.168.255.12 [110/2] via 192.168.255.9, 01:01:34, FastEthernet0/1
jiaoxue#
bangong>en
Password:
Password:
bangong#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
192.168.0.0/30 is subnetted, 1 subnets
O 192.168.0.0 [110/2] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.7.0/24 [110/4] via 192.168.255.13, 01:02:38, FastEthernet0/1
O 192.168.11.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.12.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.13.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.14.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.15.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.16.0/24 [110/3] via 192.168.255.13, 01:02:48, FastEthernet0/1
C 192.168.18.0/24 is directly connected, Vlan18
C 192.168.19.0/24 is directly connected, Vlan19
C 192.168.20.0/24 is directly connected, Vlan20
192.168.254.0/29 is subnetted, 2 subnets
O 192.168.254.0 [110/3] via 192.168.255.13, 00:26:41, FastEthernet0/1
C 192.168.254.8 is directly connected, Vlan1
192.168.255.0/30 is subnetted, 4 subnets
O 192.168.255.0 [110/3] via 192.168.255.13, 01:02:38, FastEthernet0/1
O 192.168.255.4 [110/2] via 192.168.255.13, 01:02:48, FastEthernet0/1
O 192.168.255.8 [110/2] via 192.168.255.13, 01:02:48, FastEthernet0/1
C 192.168.255.12 is directly connected, FastEthernet0/1
bangong#
hexin#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
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, FastEthernet0/4
O 192.168.7.0/24 [110/3] via 192.168.255.5, 01:03:36, FastEthernet0/1
O 192.168.11.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.12.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.13.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.14.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.15.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.16.0/24 [110/2] via 192.168.255.10, 01:03:46, FastEthernet0/2
O 192.168.18.0/24 [110/2] via 192.168.255.14, 01:03:36, FastEthernet0/3
O 192.168.19.0/24 [110/2] via 192.168.255.14, 01:03:36, FastEthernet0/3
O 192.168.20.0/24 [110/2] via 192.168.255.14, 01:03:36, FastEthernet0/3
192.168.254.0/29 is subnetted, 2 subnets
O 192.168.254.0 [110/2] via 192.168.255.10, 00:27:34, FastEthernet0/2
O 192.168.254.8 [110/2] via 192.168.255.14, 00:25:02, FastEthernet0/3
192.168.255.0/30 is subnetted, 4 subnets
O 192.168.255.0 [110/2] via 192.168.255.5, 01:03:36, FastEthernet0/1
C 192.168.255.4 is directly connected, FastEthernet0/1
C 192.168.255.8 is directly connected, FastEthernet0/2
C 192.168.255.12 is directly connected, FastEthernet0/3
hexin#
s5 s6 配置与s4类似此处省略
R1 R2 只需配置好每个端口ip然后配置ospf协议,端口ip和路由协议配置与核心交换机类似此处省略。
总结
1.题目要求可扩展的局域网组建
实验过程用了vtp
vtp是思科私有协议,若扩展使用别的厂商设备如华为就达不到可扩展性的要求
其实完全可以自己手工划分下vlan,使用vtp只是为了方便
2.使用三层交换的时候记得两条条命令
ip routing
和
no shut
我在配置了ospf协议后彼此之间学习不到路由信息
郁闷了半天才发现忘了ip routing 来启用三层交换的路由功能
补充:
毕业设计的实验目的达到了,
但是实际应用过程中还需要添加不少东西
比如说远程telnet管理
现添加如下
配置交换路由的密码(每个交换机都做此配置,密码为net)
en
config
enable pass net
line vty 0 4
pass net
login
配置汇聚和接入层交换机的管理地址(根据上表,不同交换机配置不同ip,配置类似只写一条代替)
config
int vlan 1
ip add 192.168.254.2 255.255.255.0
no shut
ip default-gateway 192.168.254.1
在教学楼和办公楼交换机上做一条ospf路由
使在两边的任意电脑都可以ping通任意交换机的管理地址
router ospf 1
jiaoxue(config-router)#network 192.168.254.0 0.0.0.255 area 0
教学楼汇聚交换机的管理地址254.1作为教学楼接入交换机的default-gateway
办公楼汇聚交换机的管理地址254.9作为办公楼接入交换机的default-gateway
s3未配置default-gateway,用来与s1,s2做对比。
在s1下的pc机上ping s3的管理地址不通,ping s2通。
给交换机配置管理接口地址(一般是vlan1的地址)和default gateway后
才可以在不同的vlan下的pc机上telnet管理交换机。
之所以配置交换机的default-gateway,是把交换机当做一台pc机,它也需要有自己的网关地址。