码迷,mamicode.com
首页 > 其他好文 > 详细

ospf

时间:2018-10-25 19:35:13      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:The   配置ip地址   一个   bit   imp   ospf   默认路由   out   address   

Ospf第二天

配置IP地址
PC1 :IP地址 192.168.1.1
子网掩码 255.255.255.0
网关 192.168.1.254
PC2 :IP地址 192.168.2.1
子网掩码 255.255.255.0
网关 192.168.2.254
PC3 :IP地址 200.1.1.1
子网掩码 255.255.255.0
网关 200.1.1.254

R1:
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.12.1 255.255.255.0
R2:
interface GigabitEthernet0/0/0
ip address 192.168.12.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.23.2 255.255.255.0
R3:
interface GigabitEthernet0/0/0
ip address 192.168.23.3 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.34.3 255.255.255.0
R4:
interface GigabitEthernet0/0/0
ip address 192.168.34.4 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.45.4 255.255.255.0
R5:
interface GigabitEthernet0/0/0
ip address 192.168.45.5 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.2.254 255.255.255.0
interface GigabitEthernet0/0/2
ip address 100.1.56.5 255.255.255.0
R6:
interface GigabitEthernet0/0/0
ip address 100.1.56.6 255.255.255.0
interface GigabitEthernet0/0/1
ip address 200.1.1.254 255.255.255.0
配置ospf 以及特殊区域
R1:
ospf 1 router-id 1.1.1.1 将该设备 ospf 1 的名字设置为 1.1.1.1
area 0.0.0.12 加入区域名 为12
network 192.168.1.0 0.0.0.255 宣告1.0网段
network 192.168.12.0 0.0.0.255 宣告12.0网段
stub 特殊区域防止5、4类干扰
R2:
ospf 1 router-id 2.2.2.2 将该设备 ospf 1 的名字设置为 2.2.2.2
area 0.0.0.0 加入区域名 为0
network 192.168.23.0 0.0.0.255 宣告23.0网段
area 0.0.0.12 加入区域名 为12
network 192.168.12.0 0.0.0.255 宣告12.0网段
stub no-summary (完全末节区域) 不接受3/4/5类LSA;
允许接收1/2以及1个 特殊的表示默认路由的3类LSA (该3类是自动产生的)
R3:
ospf 1 router-id 3.3.3.3 将该设备 ospf 1 的名字设置为3.3.3.3
area 0.0.0.0 加入区域名 为0
network 192.168.23.0 0.0.0.255宣告23.0网段
network 192.168.34.0 0.0.0.255宣告34.0网段
R4:
ospf 1 router-id 4.4.4.4 将该设备 ospf 1 的名字设置为 4.4.4.4
area 0.0.0.0 加入区域名 为0
network 192.168.34.0 0.0.0.255 宣告34.0网段
area 0.0.0.45 加入区域名 为45
network 192.168.45.0 0.0.0.255 宣告45.0网段
nssa no-import-route 在ABR配置 在边界路由器进行转换
R5:
ospf 1 router-id 5.5.5.5 将该设备 ospf 1 的名字设置为5.5.5.5
import-route static 宣告静态
area 0.0.0.45 加入区域名 为45
network 192.168.2.0 0.0.0.255宣告2.0网段
network 192.168.45.0 0.0.0.255宣告45.0网段
nssa特殊区域 把7类转换成5类(必须在BDR自动转换5类)
如果想保护一个区域不受到外部链路的影响,并且还希望在该区域引入其它的外部路由,那么该区域
只能设置为NSSA

ip route-static 200.1.1.0 255.255.255.0 100.1.56.6 静态路由 进行吓一跳
R6:
ip route-static 192.168.1.0 255.255.255.0 100.1.56.5 静态路由 吓一跳指定1.0网段
验证:
1.PC1-PC2互通
2.PC1-PC3互通,PC2-PC3不能ping通

2.PC1-PC3互通,PC2-PC3不能ping通

ospf

标签:The   配置ip地址   一个   bit   imp   ospf   默认路由   out   address   

原文地址:http://blog.51cto.com/13934188/2308684

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!