思科路由器OSPF配置实例

模拟软件:GNS3

拓扑图:

PC1> ip:192.168.1.2

mask: 255.255.255.0

gateway: 192.168.1.1

PC2> ip:192.168.2.2

mask:255.255.255.0

gateway:192.168.2.1

R1> f0/0 ip:192.168.1.1/24

f0/1 ip:192.168.3.1/24

R2> f0/0 ip:192.168.3.2/24

f0/1 ip:192.168.2.1/24

配置如下:

PC1:

pc1>ip 192.168.1.2 255.255.255.0 192.168.1.1

PC2:

pc2>ip 192.168.2.2 255.255.255.0 192.168.2.1

R1:

R1>en

R1#conf t

R1(config)#int f0/0

R1(config-if)#ip add 192.168.1.1 255.255.255.0

R1(config-if)#no shut

R1(config)#exit

R1(config)#int f0/1

R1(config-if)#ip add 192.168.3.1 255.255.255.0

R1(config-if)#no shut

R1(config)#exit

R1(config)#router ospf 100

R1(config-router)#net 192.168.1.0 0.0.0.255 area 1

R1(config-router)#net 192.168.3.0 0.0.0.255 area 1

R1(config-router)#exit

R2:

R2>en

R2#conf t

R2(config)#int f0/0

R2(config-if)#ip add 192.168.3.2 255.255.255.0

R2(config-if)#no shut

R2(config)#exit

R2(config-if)#int f0/1

R2(config-if)#ip add 192.168.2.1 255.255.255.0

R2(config-if)#no shut

R2(config-if)#exit

R2(config)#router ospf 100

R2(config-router)#net 192.168.3.0 0.0.0.255 area 1

R2(config-router)#net 192.168.2.0 0.0.0.255 area 1

R2(config-router)#exit

以上PC1 ping通 PC2 就可以了。

时间: 2024-08-03 22:43:11

思科路由器OSPF配置实例的相关文章

Cisco思科路由器HSRP配置和排障那些事儿~~

首先亮出必备命令来: 配置HSRP的成员: Router(config-if)#standby 备份组号 ip 备份组虚拟IP地址 配置HSRP优先级: Router(config-if)#standby 备份组号 priority 优先级级别 配置端口跟踪:活跃路由器上配置 Router(config-if)#standby 备份组号 track 跟踪接口 配置HSRP占先权:备份路由器上配置 Router(config-if)#standby 备份组号 preempt 查看HSRP信息: S

Cisco-HSRP 热备份路由器协议-配置实例

同样的,首先做一些理论的扫盲.最起码要知道自己在配什么东西才行. 简介 HSRP(Hot StandbyRouter Protocol 热备份路由器协议)是Cisco的专有协议.HSRP把多台路由器组成一个"热备份组",形成一个虚拟路由器.这个组内只有一个路由器是Active(活动)的,并由它来转发数据包,如果活动路由器发生了故障,备份路由器将成为活动路由器.从网络内的主机来看,网关并没有改变. HSRP的工作过程 HSRP路由器利用Hello包来互相监听各自的存在.当路由器长时间没有

OSPF配置实例

配置ospf使得pc1和pc2能互通接口的基本配置 R1:R1(config)#int f0/0R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#no shutdownR1(config)#int s1/0R1(config-if)#ip address 172.16.0.1 255.255.255.252R1(config-if)#clock rate 64000R1(config-if)#no shutdown

思科路由器基本配置

en--进入特权模式 config t --进入全局配置模式 wr(或者)--保存配置(不然断电后之前配置失效) 1.设置进入路由器控制台密码 全局配置模式下输入: line console 0---进入'0'接口 password 123--设置密码为123 login--将控制台接口设置为允许登录 2.设置进入特权模式口令及加密口令 全局配置模式下输入: enable password 12--设置特权密码 enable secret 123--设置特权加密口令 3.查看除启用加密口令外的所

在思科路由器上配置SSH登录

用户那里对网络安全性进行检查,要求对核心设备采用SSH登录,之前设备采用telnet登录,用户名和密码明文传输,不符合安全性检查要求.其实SSH登录配置很简单,主要分以下几步:1.配置域名SD_Core_R7600(config)#ip domain-name SDCore2.生成SSH KeySD_Core_R7600(config)#crypto key generate rsa The name for the keys will be: SD_Core_R7600.SDCoreChoos

思科路由器 DHCP配置

R1配置DHCP服务,另PC0和PC1能通过DHCP获取IP R1配置: Router(config)#interface fastEthernet 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit Router(config)#ip dhcp excluded-address 192.168.1.1   --------排

思科路由器DHCP配置(GNS3模拟)

网络拓扑图如下: R1配置如下: R1#en R1#conf t R1(config)#interface fastEthernet 0/0 R1(config-if)#ip address 192.168.1.254 255.255.255.0 R1(config-if)#no shut R1(config-if)#exit R1(config)#ip dhcp pool net1 R1(dhcp-config)#network 192.168.1.0 R1(dhcp-config)#dns-

在思科路由器上配置AAA认证

一.实验拓扑 二.地址表 三.AAA配置过程 1.在R1配置本地用户名并为console配置本地AAA认证和VTY连接认证 R1(config)#username admin1 password admin1 R1(config)# aaa new-model R1(config)#aaa authentication login default local R1(config)#line console 0 R1(config-line)#login authentication defaul

美国思科路由器预置监控后门被中国铲除

微软,思科,硬盘厂家,美国棱镜门监控影子无处不在.不知道思科提供给美国的产品和提供给中国的产品是不是有一样的后门. 2012年,中国中央政府采购中心的名单上共有60款思科产品,而这一数字在2014年采购名单中骤降为零. 美国思科公司的信息产品在中国市场具有极高的占有率,其路由器产品几乎参与了中国所有基础信息网络和重要信息系统的重大项目建设.而一直以来,包括路由器在内的思科信息产品存在严重安全漏洞的报告屡屡被披露.近十年来,仅CVE网站公开发布的有关思科产品的漏洞就多达1300余个,其中,路由器的