ospf 1 silent-interface g0/0/0 //设置为静默接口,不外发hello,节省终端处理能力,避免路由泄露 int g0/0/1 stp edged-port enable // 设置为边缘接口,该接口快速进入转发,但还会向外发BPDU stp bpdu-filter enable //设置bpdu过滤,使边缘接口不处理、不发送BPDU int g0/0/2 stp root-protection //设置跟保护,对于使能根保护功能的指定端口,一旦使能根保护功能的指定端口收到优先级更高的BPDU时,端口状态将进入Discarding状态,不在转发报文 traffic-filter inbound acl 2000 //流量过滤 入方向 acl nunber 3000 rule 10 permit source 192.168.1.0 0.0.0.255 destination 10.0.0.0 0.0.0.255 destination-port eq 80(端口号=80) Protocol:指定协议,TCP、UDP、ICMP、IP等 eq = gt > lt< neg≠ range 指定范围 Destination-port:目的端口号 Source-port:源端口号 端口号:端口号或者协议对应的关键字,如telnet/www/dns acl number 2000 rule 10 permit source 202.110.10.0 0.0.0.255 rule 20 deny source 192.110.10.0 0.0.0.255 [r1-gigabitethernet0/0/0]Traffic-fliter inbound acl 2000 //在路由器0/0/0接口 应用入方向应用流量过滤 高级acl 配置允许源IP是10.0.0.0/24到目的IP是20.0.0.1的HTTP报文通过 acl number 3000 rule permit tcp source 10.0.0.0 0.0.0.255 destination 20.0.0.1 0.0.0.0 destination-port eq 80 [r1-gigabitethernet0/0/0]traffic-filter inbound acl 3000 策略路由 policy-based-route aaa permit node 10 //节点1 aaa是PBR名称 if-match acl 2000 //条件语句 apply 192.168.1.1 next-hope 100.0.0.1 //执行语句 ip policy-based-route aaa //在G0/0/0端口调用PBR aaa Vlan access允许一个vlan通过,接电脑、外网;trunk允许多个vlan,接设备 Acl number 2000 Rule deny source 183.16.1.1 0.0.0.0 destination E0 traffic-flter inbound acl 2000 简述OSPF分区域设计的优势有哪些? 1)减少对路由器内存和 CPU 的消耗。 2)同时区域间传送的路由信息减少,降低网络带宽占用。 3)在 ABR 进行路由聚合,减少路由震荡。 4)可以扩展支持更大规模网络。 |