4、5类LSA案例

该文详细描述了如何通过配置OSPF单区域和多区域,以及在路由器上设置静态路由,实现PC1和PC3之间的网络连通性。配置步骤包括接口IP地址设定,OSPF进程创建与区域划分,以及引入外部路由等,最终通过PC1pingPC3的测试验证连通性。
摘要由CSDN通过智能技术生成

拓扑

 

需求

  实现PC1和PC3互联互通

配置步骤

  1)配置接口信息

   - 配置PC的IP地址

   - 配置路由器的接口 

  2)配置OSPF单区域

  - 创建ospf进程,定义router-id

  - 指定相应区域

  - 宣告网段进入ospf 

  3)配置OSPF多区域

  4)  R6配置去往PC3的静态路由

  5)R7上配置去往PC1、PC2的静态路由

  6)R6上在OSPF进程下引入外部路由

  7) 业务连通性测试

  -  pc1 ping pc3进行连通性测试

 配置命令

第一步:配置PC接口IP地址
第二步:配置路由器接口IP地址
第三步:配置OSPF:
R1配置:
interface GigabitEthernet0/0/0
 ip address 192.168.12.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.254 255.255.255.0 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.12 
  network 192.168.1.0 0.0.0.255 
  network 192.168.12.0 0.0.0.255 
  
R2配置:
interface GigabitEthernet0/0/0
 ip address 192.168.23.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.12.2 255.255.255.0 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 192.168.23.0 0.0.0.255 
 area 0.0.0.12 
  network 192.168.12.0 0.0.0.255 
  
R3配置:
#
interface GigabitEthernet0/0/0
 ip address 192.168.34.3 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.23.3 255.255.255.0 
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 192.168.23.0 0.0.0.255 
  network 192.168.34.0 0.0.0.255 

R4配置:
#
interface GigabitEthernet0/0/0
 ip address 192.168.45.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.34.4 255.255.255.0 
#
ospf 1 router-id 4.4.4.4 
 area 0.0.0.0 
  network 192.168.34.0 0.0.0.255 
  network 192.168.45.0 0.0.0.255 

 
R5配置:
interface GigabitEthernet0/0/0
 ip address 192.168.56.5 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.45.5 255.255.255.0 
#
ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 192.168.45.0 0.0.0.255 
 area 0.0.0.56 
  network 192.168.56.0 0.0.0.255 

R6配置
#
interface GigabitEthernet0/0/1
 ip address 192.168.56.6 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.2.254 255.255.255.0 
#
ospf 1 router-id 6.6.6.6 
 area 0.0.0.56 
  network 192.168.2.0 0.0.0.255 
  network 192.168.56.0 0.0.0.255 
  
  
第四步:R6配置去往PC3的静态路由
R6配置
#
interface GigabitEthernet0/0/0
 ip address 192.168.67.6 255.255.255.0 
#
ip route-static 192.168.3.0  24  192.168.67.7
 
 
第五步:R7配置去往PC1/PC2的静态路由
R7配置
interface GigabitEthernet0/0/0
 ip address 192.168.67.7 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.3.254 255.255.255.0 
#
ip route-static 192.168.0.0  16  192.168.67.6
 

第六步:R6上在OSPF进程下引入静态路由
R6配置
ospf 1 router-id 6.6.6.6 
import-route static


第七步:验证与测试
PC1可以访问PC3
 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值