末节、完全末节区域

实验环境
末节、完全末节区域


实验环境的搭建
R1
conf t
int s1/0
ip add 172.16.1.1 255.255.255.252
no sh
int f0/0
ip add 192.168.1.1 255.255.255.0
no sh
int lo0
ip add 192.168.64.1 255.255.255.252
int lo1
ip add 192.168.80.1 255.255.255.252
int lo2
ip add 192.168.96.1 255.255.255.252
int lo3
ip add 192.168.112.1 255.255.255.252
exi
router ospf 1
net 192.168.64.0 0.0.0.3 a 1
net 192.168.80.0 0.0.0.3 a 1
net 192.168.96.0 0.0.0.3 a 1
net 192.168.112.0 0.0.0.3 a 1
net 192.168.1.0 0.0.0.255 a 0
exi
router rip
ve 2
no au
net 172.16.0.0



R2
conf t
int f0/0
no sh
ip add 192.168.1.2 255.255.255.0
int s1/0
no sh
ip add 192.168.224.1 255.255.255.252
exi
router ospf 1
net 192.168.1.0 0.0.0.255 a 0
net 192.168.224.0 0.0.0.3 a 2


R3
conf t
int s1/0
ip add 192.168.224.2 255.255.255.252
no sh
int f0/0
ip add 192.168.240.1 255.255.255.0
no sh
exi
router ospf 1
net 192.168.224.0 0.0.0.3 a 2
net 192.168.240.0 0.0.0.255 a 2

R4
conf t
int s1/0
ip add 172.16.1.2 255.255.255.252
no sh
int lo0
ip add 172.16.64.1 255.255.255.252
int lo1
ip add 172.16.80.1 255.255.255.252
int lo2
ip add 172.16.96.1 255.255.255.252
int lo3
ip add 172.16.112.1 255.255.255.252
exi
router rip
ve 2
no au
net 172.16.0.0
exi
ip route 0.0.0.0 0.0.0.0 s1/0

在R3上看路由

末节、完全末节区域



首先做末节区域
我们只要在要定义的末节区域的每个路由器上在路由配置模式下都输入
area 区域号 stub命令

R2
router ospf 1
area 2 stub

R3
router ospf 1
area 2 stub
再看路由
末节、完全末节区域


完全末节区域
完全末节区域是思科特有的功能,他可以阻止3,4,5类的LSA通告到区域
完全末节区域,我们在区域内的除了ABR路由器的每个路由器配置好
area 区域号 stub 然后再在ABR路由器上配置 area 区域号 stub no-summary



R2
router ospf 1
area 2 stub no-summary

R3
router ospf 1
area 2 stub

路由就好简单的

末节、完全末节区域



转载于:https://www.cnblogs.com/houzhiqing/archive/2011/11/28/5289448.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是 JavaScript 实现假期开始日期和结束日期之间相差多少天(周六、周日和法定节假日不算)的代码: ```javascript // 计算两个日期之间的天数(不包括周六、周日和节假日) function getDays(startDate, endDate) { // 节假日数组,需要根据实际情况进行修改 const holidays = [ '2022-01-01', '2022-01-02', '2022-01-03', '2022-02-01', '2022-02-02', '2022-02-03', '2022-02-04', '2022-02-05', '2022-02-06', '2022-02-07', '2022-04-02', '2022-04-03', '2022-04-04', '2022-04-30', '2022-05-01', '2022-05-02', '2022-06-03', '2022-06-04', '2022-06-05', '2022-09-10', '2022-09-11', '2022-09-12', '2022-10-01', '2022-10-02', '2022-10-03', '2022-10-04', '2022-10-05', '2022-10-06', '2022-10-07', ]; // 将输入的日期字符串转化为 Date 对象 const d1 = new Date(startDate); const d2 = new Date(endDate); // 计算两个日期之间相差的天数 const days = (d2 - d1) / (24 * 60 * 60 * 1000) + 1; // 计算开始日期和结束日期之间的周六、周日和节假日天数 let count = 0; for (let i = 0; i < days; i++) { const d = new Date(d1.getTime() + i * 24 * 60 * 60 * 1000); const dayOfWeek = d.getDay(); const dateString = formatDate(d); if (dayOfWeek === 0 || dayOfWeek === 6 || holidays.includes(dateString)) { count++; } } // 返回天数 return days - count; } // 格式化日期为字符串 function formatDate(date) { const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`; } ``` 上述代码中,`getDays` 函数接受两个日期字符串作为输入参数,然后计算两个日期之间的天数并返回。首先定义了一个节假日数组,其中包含了所有的法定节假日日期,需要根据实际情况进行修改。然后将输入的日期字符串转化为 `Date` 对象,并计算两个日期之间相差的天数。接着遍历开始日期和结束日期之间的所有日期,如果是周六、周日或者节假日,则将计数器加一。最后返回两个日期之间的天数,即总天数减去周六、周日和节假日天数。 注意,上述实现中假设所有的节假日都是不工作的,如果有的节假日需要工作,需要在节假日数组中将其排除。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值