路由器综合实验
2015-10-20 09:11
302 查看
路由综合实验技术原理
为了支持本设备能够运行多个路由协议进程,系统软件提供了路由信息从一个路由进程重分布到另一个路由器进程的功能。
实验步骤:1.pc与交换机间用直线连接;pc与路由、路由与路由之间用交叉线连接。2.再三层交换机划分2个vlan,运行ripv2协议;R2运行ospf协议3.在路由器R1上左侧配置RIPV2路由协议;右侧配置ospf协议4.在R1路由器进程中引入外部路由,进行路由分布5.将pc1、pc2主机默认网关分别设置为与直接网络设备接口ip地址6.验证pc1、pc2主机之间可以互相通信
SW0交换机配置:
Switch>en
Switch#config t
Enter configuration commands, one perline. End with CNTL/Z.
Switch(config)#host SW0
SW0(config)#vlan 2
SW0(config-vlan)#name v2
SW0(config-vlan)#exit
SW0(config)#int fa0/10
SW0(config-if)#switchport access vlan 2
SW0(config-if)#exit
SW0(config)#int vlan 1
SW0(config-if)#ip address 192.168.1.1255.255.255.0
SW0(config-if)#no shut
%LINK-5-CHANGED: Interface Vlan1, changedstate to up
%LINEPROTO-5-UPDOWN: Line protocol on InterfaceVlan1, changed state to up
SW0(config-if)#exit
SW0(config)#int vlan 2
SW0(config-if)#
%LINK-5-CHANGED: Interface Vlan2, changedstate to up
SW0(config-if)#ip address 192.168.2.1255.255.255.0
SW0(config-if)#no shut
SW0(config-if)#exit
SW0(config)#router rip
SW0(config-router)#network 192.168.1.0
SW0(config-router)#network 192.168.2.0
SW0(config-router)#version 2
SW0(config-router)#exit
SW0(config)#ip routing
R0配置
Router>en
Router#config t
Enter configuration commands, one perline. End with CNTL/Z.
Router(config)#host R0
R0(config)#int fa0/0
R0(config-if)#ip address 192.168.2.2255.255.255.0
R0(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R0(config-if)#exit
R0(config)#int fa0/1
R0(config-if)#ip address 192.168.3.1255.255.255.0
R0(config-if)#no shut
R0(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up
exit
R0(config)#exit
R0#
%SYS-5-CONFIG_I: Configured from console byconsole
R0#config t
Enter configuration commands, one perline. End with CNTL/Z.
R0(config)#router rip
R0(config-router)#network 192.168.2.0
R0(config-router)#version 2
R0(config-router)#exit
R0(config)#router ospf 1
R0(config-router)#network 192.168.3.00.0.0.255 area 0
R0(config-router)#exit
R1配置:
Router>en
Router#config t
Enter configuration commands, one perline. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa0/1
R1(config-if)#ip address 192.168.3.2255.255.255.0
R1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#int fa0/0
R1(config-if)#ip address 192.168.4.1 255.255.255.0
R1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.3.00.0.0.255 area 0
R1(config-router)#network 192.168.4.00.0.0.255
00:26:58: %OSPF-5-ADJCHG: Process 1, Nbr192.168.3.1 on FastEthernet0/1 from LOADING to FULL, Loading Done
area 0
R1(config-router)#network 192.168.4.00.0.0.255 area 0
R1(config-router)#exit
R1(config)#
测试:
ping 192.168.4.2 不通;
在交换机SW0上sh ip route只能看见两条直连路由。
在R0上配置:
R0#config t
Enter configuration commands, one perline. End with CNTL/Z.
R0(config)#router rip
R0(config-router)#redistribute ospf 1
R0(config-router)#exit
R0(config)#router ospf 1
R0(config-router)#redistribute rip subnets
R0(config-router)#exit
R0(config)#
在SW0上添加静态路由:SW0(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
就一切ok了。
为了支持本设备能够运行多个路由协议进程,系统软件提供了路由信息从一个路由进程重分布到另一个路由器进程的功能。
实验步骤:1.pc与交换机间用直线连接;pc与路由、路由与路由之间用交叉线连接。2.再三层交换机划分2个vlan,运行ripv2协议;R2运行ospf协议3.在路由器R1上左侧配置RIPV2路由协议;右侧配置ospf协议4.在R1路由器进程中引入外部路由,进行路由分布5.将pc1、pc2主机默认网关分别设置为与直接网络设备接口ip地址6.验证pc1、pc2主机之间可以互相通信
SW0交换机配置:
Switch>en
Switch#config t
Enter configuration commands, one perline. End with CNTL/Z.
Switch(config)#host SW0
SW0(config)#vlan 2
SW0(config-vlan)#name v2
SW0(config-vlan)#exit
SW0(config)#int fa0/10
SW0(config-if)#switchport access vlan 2
SW0(config-if)#exit
SW0(config)#int vlan 1
SW0(config-if)#ip address 192.168.1.1255.255.255.0
SW0(config-if)#no shut
%LINK-5-CHANGED: Interface Vlan1, changedstate to up
%LINEPROTO-5-UPDOWN: Line protocol on InterfaceVlan1, changed state to up
SW0(config-if)#exit
SW0(config)#int vlan 2
SW0(config-if)#
%LINK-5-CHANGED: Interface Vlan2, changedstate to up
SW0(config-if)#ip address 192.168.2.1255.255.255.0
SW0(config-if)#no shut
SW0(config-if)#exit
SW0(config)#router rip
SW0(config-router)#network 192.168.1.0
SW0(config-router)#network 192.168.2.0
SW0(config-router)#version 2
SW0(config-router)#exit
SW0(config)#ip routing
R0配置
Router>en
Router#config t
Enter configuration commands, one perline. End with CNTL/Z.
Router(config)#host R0
R0(config)#int fa0/0
R0(config-if)#ip address 192.168.2.2255.255.255.0
R0(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R0(config-if)#exit
R0(config)#int fa0/1
R0(config-if)#ip address 192.168.3.1255.255.255.0
R0(config-if)#no shut
R0(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up
exit
R0(config)#exit
R0#
%SYS-5-CONFIG_I: Configured from console byconsole
R0#config t
Enter configuration commands, one perline. End with CNTL/Z.
R0(config)#router rip
R0(config-router)#network 192.168.2.0
R0(config-router)#version 2
R0(config-router)#exit
R0(config)#router ospf 1
R0(config-router)#network 192.168.3.00.0.0.255 area 0
R0(config-router)#exit
R1配置:
Router>en
Router#config t
Enter configuration commands, one perline. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa0/1
R1(config-if)#ip address 192.168.3.2255.255.255.0
R1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#int fa0/0
R1(config-if)#ip address 192.168.4.1 255.255.255.0
R1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.3.00.0.0.255 area 0
R1(config-router)#network 192.168.4.00.0.0.255
00:26:58: %OSPF-5-ADJCHG: Process 1, Nbr192.168.3.1 on FastEthernet0/1 from LOADING to FULL, Loading Done
area 0
R1(config-router)#network 192.168.4.00.0.0.255 area 0
R1(config-router)#exit
R1(config)#
测试:
ping 192.168.4.2 不通;
在交换机SW0上sh ip route只能看见两条直连路由。
在R0上配置:
R0#config t
Enter configuration commands, one perline. End with CNTL/Z.
R0(config)#router rip
R0(config-router)#redistribute ospf 1
R0(config-router)#exit
R0(config)#router ospf 1
R0(config-router)#redistribute rip subnets
R0(config-router)#exit
R0(config)#
在SW0上添加静态路由:SW0(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
就一切ok了。
相关文章推荐
- 路由器ospf动态路由配置
- 静态路由实验
- 思科动态路由RIP实验
- Shell学习 输出日期 date
- 非科班出身的人学习编程不负责任指南
- Java邮箱正则表达式
- 层叠按钮,展开、收起(安卓)
- iOS开发-常用第三方开源框架
- win7进程中的svchost.exe占用CPU和内存很高的原因和解决窍门
- PHP中如何使用session实现保存用户登录信息
- 自考&团队的力量
- mac环境下配置jdk
- 数据抽取工具Kettle使用
- git rebase简介
- 原码, 反码, 补码 详解
- IOS开发笔记-02 图片浏览&Tom 猫-01.放大缩小 02.首尾式动画 03.位移形变
- ActionScript 3.0 学习(十二) AS3 模拟打地鼠小游戏
- iOS不同版本的新特性小结
- AppDelegate
- 重载中碰到的左值和右值问题