1 / 22

路由交换大作业

路由交换大作业. 网络拓扑. 网络拓扑. 接入层的具体要求如下:. 1 、如图所示,设置 教学楼 1 和 2 的两 PC 机的 IP 地址和默认网关。同理可设置 宿舍楼 1 和 2 的两 PC 机的 IP 地址和默认网关。 2 、在接入交换机 1 上 F0/2 、 F0/3 上配置端口安全,设置安全违例处理方式为 shutdown ,在 F0/2 限制接入主机数量为 3 ; 在 F0/3 上绑定其 MAC 地址为 00D0.58D0.9268 、 IP 地址为 192.168.3.22 。

durin
Télécharger la présentation

路由交换大作业

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 路由交换大作业

  2. 网络拓扑

  3. 网络拓扑

  4. 接入层的具体要求如下: 1、如图所示,设置教学楼1和2的两PC机的IP地址和默认网关。同理可设置宿舍楼1和2的两PC机的IP地址和默认网关。 2、在接入交换机1 上F0/2 、F0/3上配置端口安全,设置安全违例处理方式为shutdown,在F0/2限制接入主机数量为3; 在F0/3上绑定其MAC地址为00D0.58D0.9268、IP地址为192.168.3.22。 3、对接入交换机1,划分两个VLAN:VLAN2、VLAN3。 F0/2属于VLAN2, F0/3属于VLAN3,F0/1为TRUNK口。

  5. 接入层的具体要求如下: 同理: 4、在接入交换机2上F0/2 、F0/3上配置端口安全,设置安全违例处理方式为restrict,在F0/2上绑定其MAC地址为00D0.58D0.9268,在F0/3限制接入主机数量为3。 5、对接入交换机2,划分两个VLAN:VLAN4、VLAN5。 F0/2属于VLAN4, F0/3属于VLAN5,F0/1为TRUNK口。

  6. 汇聚层的具体要求如下: 6、在汇聚路由器的F0/0口做单臂路由,使教学楼1和教学楼2能互相连通。 7、在汇聚交换机1上分别将F0/1口划到VLAN 1,并创建VLAN4、VLAN5,设置它们的SVI,使得三层交换机使宿舍楼1和宿舍楼2能互相连通。

  7. 汇聚层的具体要求如下: 8、在汇聚路由器、核心路由器、汇聚交换机1、汇聚交换机2上运行OSPF(在同一area 0中),使得全网互通。 9、在汇聚交换机1、汇聚交换机1、汇聚交换机2核心路由器、上运行RIP,使得全网互通。

  8. 核心层具体要求如下: 10、核心路由器与出口路由器之间用S2/0串行连接,采用PPP链路协议进行通信,并且采用CHAP方式进行认证, 口令为123456 同理:采用PAP方式进行认证, 口令为abc 11、在核心路由器上做扩展ACL,只允许教学楼1和2的VLAN2 和VLAN3的用户可以访问数据中心 10.1.1.22的FTP服务,允许外网的用户可以访问数据中心的WWW服务,其余都不可访问。 同理:只允许宿舍楼1和2的VLAN4 和VLAN5的用户可以访问数据中心 10.1.1.22的FTP服务,只允许外网的用户可以访问数据中心的WWW服务,其余都不可访问。

  9. 出口处的具体要求如下: 12、在出口路由器上配置动态PAT, 实现局域网(192.168.2.0/24,192.168.3.0/24, 192.168.4.0/24, 10.1.0.0/16)访问外网。假定转换地址池为pl为: 202.121.241.10 202.121.241.20 同理:在出口路由器上配置动态PAT, 实现局域网(172.16.2.0/24,172.16.3.0/24, 172.16.4.0/24, 10.1.0.0/16)访问外网。假定转换地址池为为out: 202.121.241.20 202.121.241.40

  10. 以上要求中联系实际的需求说明 • 实现校园网网络连通 • 利用静态路由实现汇聚交换机和路由器与核心路由器间连通 • 利用rip实现内部汇聚交换机与核心路由器间连通 • 利用ospf实现汇聚路由器与核心路由器连通 • 通过设置单臂路由使教学楼1和教学楼2能互相连通 • 对学生宿舍楼和教学楼分别划分vlan • 在核心路由器上实现nat转换,使内部网络能访问internet • 设置标准acl规则:禁止外部用户访问内部网络 • 设置扩展acl规则:仅允许内部用户访问数据中心的80、21端口 • 在核心路由与出口路由间运用ppp协议配置

  11. 实验中运用的知识点汇总 • PC的配置,服务器的配置 • 端口安全 • 划分vlan,定义TRUNK • 三层交换机SVI • 单臂路由 • Rip • Ospf • 静态路由 • Pat转换 • 标准访问控制列表规则 • 扩展访问控制列表规则 • 广域网协议ppp:CHAP,PAP

  12. 实验配置参考 一、 PC、服务器终端的配置 1)PC配置 IP地址:192.168.2.22 网关:192.168.2.254 2)服务器配置 IP地址:10.1.1.22 网关:10.1.1.254

  13. 实验配置参考 二、接入层的配置 1)接入交换机1配置 划分vlan, 定义TRUNK Switch(config)#int fa0/2 Switch(config-if)#switchport access vlan Switch(config-if)#switchport access vlan 2 Switch(config)#int fa0/3 Switch(config-if)#switchport access vlan 3 Switch(config)#int fa0/1 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk allowed vlan all Switch(config-if)#exit

  14. 实验配置参考 二、接入层的配置 2)端口安全性 Switch (config)#int f0/1 Switch (config-if )# switchport port-security 启动端口安全性 Switch(config-if)# switchport port-security maximum 3 最大连接数 Switch(config-if)# switchport port-security violation {protect|restrict |shutdown} 安全违例 Switch(config-if)# switchport port-security mac-address 00D0.58D0.9268 ip-address 192.168.3.22地址绑定

  15. 实验配置参考 三、汇聚层 1)汇聚路由器配置 设置单臂路由 Router(config)#interface fa0/0.1配置 子接口 这是配置单臂路由的关键,这个接口是个 逻辑接口,并不是实际存在的物理接口,但是功能却和物理接口是一样的。 Router(config-subif)#encapsulation dot1q 2 为这个接口配置802.1Q协议,最后面的 2 是vlan 号,这也是关键部分    Router(config-subif)#ip address 192.168.2.254 255.255.255.0 为该接口划分ip地址。    Router(config-subif)#exit Router(config)#interface fa0/0.2 Router(config-subif)#encapsulation dot1q 3 Router(config-subif)#ip address 192.168.3.254 255.255.255.0 Router(config-subif)#end

  16. 实验配置参考 2)汇聚层交换机配置 为vlan4和vlan5设置svi Switch(config)#int vlan 4 Switch(config-if)#ip address 172.16.2.254 Switch(config)#int vlan 5 Switch(config-if)#ip address 172.16.3.254 设置trunk Switch(config)#int fa0/1 Switch(config-if)#switchport mode trunk 设置rip

  17. 实验配置参考 3)设置ospf Router(config)#router ospf 100 Router(config-router)#network 192.168.3.0 0.0.0.255 area 0 Router(config-router)#network 192.168.4.0 0.0.0.255 area 0 Router(config-router)#network 172.16.3.0 0.0.0.255 area 0 三层交换机中 Router(config-router)#network 172.16.2.0 0.0.0.255 area 0 三层交换机中 4)设置RIP Router(config)#router RIP Router(config-router)#network 192.168.3.0 Router(config-router)#network 192.168.4.0

  18. 实验配置参考 四、核心层 1) 设置nat转换,使内部用户能访问外部网络 核心路由器(nat)配置 Router(config)#int fa0/0 Router(config-if)#ip nat inside //将该接口标记为内部接口 Router(config)#int fa1/0 Router(config-if)#ip nat inside //将该接口标记为内部接口 Router(config)#int fa7/0 //将该接口标记为内部接口 Router(config-if)#ip nat inside Router(config)#int se2/0 Router(config-if)#ip nat outside //将该接口标记为外部接口 Router(config)#access-list 10 permit 192.168.4.0 0.0.0.255 Router(config)#access-list 10 permit 192.168.2.0 0.0.0.255 Router(config)#access-list 10 permit 192.168.3.0 0.0.0.255 Router(config)#access-list 10 permit 172.16.0.0 0.0.255.255

  19. 实验配置参考 Router(config)#access-list 10 permit 10.1.2.0 0.0.0.255 Router(config)#access-list 10 permit 10.1.1.0 0.0.0.255 //定义标准访问控制列表10只允许定义的地址能够被转换 Router(config)#ip nat pool pl 202.121.241.10 202.121.241.20 netmask 255.255.255.0 //定义名称为pl的地址池。 Router(config)#ip nat inside source list 10 pool out overload //将访问控制列表定义的地址和地址池关联这样就有前内部主机能够得到公网地址。

  20. 实验配置参考 四、核心层 2) 设置ACL 在核心路由器上做如下配置 设置扩展访问控制列表规则如下 Router(config)#ip access-list extended test Router(config-ext-nacl)#permit tcp any host 10.1.1.22 eq 80 Router(config-ext-nacl)#permit tcp 192.168.0.0 0.0.255.255 host 10.1.1.22 eq ftp Router(config-ext-nacl)#deny TCP any host 10.1.1.22 Router(config-ext-nacl)#permit ip any any Router(config)#int fa7/0 Router(config-if)#ip access-group test out

  21. 实验配置参考 3) 广域网协议ppp设置CHAP: 出口路由器配置 Router(config)#hostname R1 R1(config)#username R2 password zgl R1(config)#int se2/0 R1(config-if)#enca ppp R1(config-if)#ppp authentication chap 核心路由器配置 Router(config)#hostname R2 R2(config)#username R1 password zgl R2(config)#interface se2/0 R2(config-if)#enca ppp

  22. 核心路由器 hostname left encapsulation ppp ppp pap sent-username sspu password 0 123456 配置PAP实例 实验配置参考 Leftrouter Right router PSTN/ISDN 出口路由器 hostname right username sspu password 0 123456 int serial 0/0 Clock rate 64000 encapsulation ppp ppp authentication pap

More Related