示例:为基于类的语音、视频和数据流量转发配置多目标路由
此示例演示如何使用多拓扑路由 (TOPOLOG) 根据应用程序(语音或视频)选择拓扑路径。
要求
此示例要求Junos OS设备在提供商核心设备上运行 9.0 或更高版本。
概述
此示例表示网络在核心OSPF内部BGP (IBGP),但不运行MPLS。即使没有流量工程,语音流量也使用一组链路,视频流量也使用一组不同的链路。此流量可能也可以不以相同的 IP 地址作为发往。在某些情况下,两个应用都遍历同一链路。该解决方案使用基于一组基于或OSPF BGP的防火墙过滤器,通过指定链路指导不同的流量类型。路由器使用的配置集相当类似,从而降低了复杂性并改进了网络管理。
该OSPF拓扑定义为支持通过"每个"区域OSPF服务。拓扑的链路必须连续,与典型的相邻OSPF一致。每个路由拓扑中的 IBGP 路由会自动使用OSPF拓扑路由表进行协议下一跳路由解析。无需特殊路由解析配置。在此解决方案中,可通过相同链路配置多个拓扑。但是,除非为指定用于该服务的拓扑配置了链路,否则每个应用服务类中的信息流不能遍历链路。 图 1 显示了此案例的图表。用于路由语音拓扑的连续路径显示为点线,而用于路由视频拓扑的路径则显示为虚线。
有关拓扑中所有设备的完整配置集,请参阅 CLI 配置 。示例其余部分侧重于设备 CE1 和设备 PE1。
图 1 显示了示例拓扑。

配置
CLI快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以匹配网络配置,然后将命令复制并粘贴到 层次结构级别的 CLI [edit]
中。
设备 CE1
set interfaces fe-0/1/0 fastether-options loopback set interfaces fe-0/1/0 unit 0 family inet address 11.19.130.1/24 set interfaces fe-0/1/0 unit 0 family inet address 11.19.131.1/24 set interfaces fe-0/1/0 unit 0 family inet address 11.19.132.1/24 set interfaces fe-1/2/0 unit 1 description to-PE1 set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30 set interfaces lo0 unit 97 family inet address 10.255.165.97/32 primary set protocols bgp group ebgp type external set protocols bgp group ebgp local-address 10.0.0.1 set protocols bgp group ebgp export set_community set protocols bgp group ebgp export inject_directs set protocols bgp group ebgp peer-as 100 set protocols bgp group ebgp neighbor 10.0.0.2 set policy-options policy-statement inject_directs term a from protocol direct set policy-options policy-statement inject_directs term a from interface fe-0/1/0.0 set policy-options policy-statement inject_directs term a then next policy set policy-options policy-statement inject_directs term a then accept set policy-options policy-statement inject_directs term b then reject set policy-options policy-statement set_community term a from route-filter 11.19.130.0/24 exact set policy-options policy-statement set_community term a from route-filter 11.19.131.0/24 exact set policy-options policy-statement set_community term a then community add voice set policy-options policy-statement set_community term a then accept set policy-options policy-statement set_community term b from route-filter 11.19.132.0/24 exact set policy-options policy-statement set_community term b from route-filter 11.19.133.0/24 exact set policy-options policy-statement set_community term b then community add video set policy-options policy-statement set_community term b then accept set policy-options policy-statement set_community term default then accept set policy-options community video members target:50:50 set policy-options community voice members target:40:40 set routing-options autonomous-system 101
设备 CE2
set interfaces fe-0/1/1 fastether-options loopback set interfaces fe-0/1/1 unit 0 family inet address 11.19.140.1/24 set interfaces fe-0/1/1 unit 0 family inet address 11.19.141.1/24 set interfaces fe-0/1/1 unit 0 family inet address 11.19.142.1/24 set interfaces fe-1/2/0 unit 46 description to-PE2 set interfaces fe-1/2/0 unit 46 family inet address 10.0.0.46/30 set interfaces lo0 unit 20 family inet address 10.255.165.20/32 primary set protocols bgp group ebgp type external set protocols bgp group ebgp local-address 10.0.0.46 set protocols bgp group ebgp export set_community set protocols bgp group ebgp export inject_directs set protocols bgp group ebgp peer-as 100 set protocols bgp group ebgp neighbor 10.0.0.45 set policy-options policy-statement inject_directs term a from protocol direct set policy-options policy-statement inject_directs term a from interface fe-0/1/1.0 set policy-options policy-statement inject_directs term a then next policy set policy-options policy-statement inject_directs term a then accept set policy-options policy-statement inject_directs term b then reject set policy-options policy-statement set_community term a from route-filter 11.19.140.0/24 exact set policy-options policy-statement set_community term a from route-filter 11.19.141.0/24 exact set policy-options policy-statement set_community term a then community add voice set policy-options policy-statement set_community term a then accept set policy-options policy-statement set_community term b from route-filter 11.19.142.0/24 exact set policy-options policy-statement set_community term b from route-filter 11.19.143.0/24 exact set policy-options policy-statement set_community term b then community add video set policy-options policy-statement set_community term b then accept set policy-options policy-statement set_community term default then accept set policy-options community video members target:50:50 set policy-options community voice members target:40:40 set routing-options autonomous-system 102
设备 PE1
set interfaces fe-1/2/0 unit 2 description to-CE1 set interfaces fe-1/2/0 unit 2 family inet filter input ef_path set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30 set interfaces fe-1/2/1 unit 6 description to-P1 set interfaces fe-1/2/1 unit 6 family inet filter input ef_path set interfaces fe-1/2/1 unit 6 family inet address 10.0.0.6/30 set interfaces fe-1/2/2 unit 9 description to-P3 set interfaces fe-1/2/2 unit 9 family inet filter input ef_path set interfaces fe-1/2/2 unit 9 family inet address 10.0.0.9/30 set interfaces lo0 unit 93 family inet address 10.255.165.93/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.93 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp export nhs set protocols bgp group ibgp neighbor 10.255.165.111 set protocols bgp group ibgp neighbor 10.255.165.203 set protocols bgp group ibgp neighbor 10.255.165.113 set protocols bgp group ibgp neighbor 10.255.165.95 set protocols bgp group ibgp neighbor 10.255.165.99 set protocols bgp group ebgp type external set protocols bgp group ebgp local-address 10.0.0.2 set protocols bgp group ebgp family inet unicast topology voice community target:40:40 set protocols bgp group ebgp family inet unicast topology video community target:50:50 set protocols bgp group ebgp peer-as 101 set protocols bgp group ebgp neighbor 10.0.0.1 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/1.6 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.6 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.6 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/2.9 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/2.9 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/2.9 topology video set protocols ospf area 0.0.0.0 interface lo0.93 passive set policy-options policy-statement nhs then next-hop self set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 2 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 6 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 9 classifiers inet-precedence default
设备 PE2
set interfaces fe-1/2/0 unit 38 description to-P2 set interfaces fe-1/2/0 unit 38 family inet filter input ef_path set interfaces fe-1/2/0 unit 38 family inet address 10.0.0.38/30 set interfaces fe-1/2/1 unit 42 description to-P4 set interfaces fe-1/2/1 unit 42 family inet filter input ef_path set interfaces fe-1/2/1 unit 42 family inet address 10.0.0.42/30 set interfaces fe-1/2/2 unit 45 description to-CE2 set interfaces fe-1/2/2 unit 45 family inet filter input ef_path set interfaces fe-1/2/2 unit 45 family inet address 10.0.0.45/30 set interfaces lo0 unit 203 family inet address 10.255.165.203/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.203 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp export nhs set protocols bgp group ibgp neighbor 10.255.165.111 set protocols bgp group ibgp neighbor 10.255.165.93 set protocols bgp group ibgp neighbor 10.255.165.113 set protocols bgp group ibgp neighbor 10.255.165.95 set protocols bgp group ibgp neighbor 10.255.165.99 set protocols bgp group ebgp type external set protocols bgp group ebgp local-address 10.0.0.45 set protocols bgp group ebgp family inet unicast topology voice community target:40:40 set protocols bgp group ebgp family inet unicast topology video community target:50:50 set protocols bgp group ebgp peer-as 102 set protocols bgp group ebgp neighbor 10.0.0.46 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/0.38 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/0.38 topology video metric 200 set protocols ospf area 0.0.0.0 interface fe-1/2/0.38 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/1.42 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.42 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.42 topology video set protocols ospf area 0.0.0.0 interface lo0.203 passive set policy-options policy-statement nhs then next-hop self set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 38 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 42 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 45 classifiers inet-precedence default
设备 P1
set interfaces fe-1/2/0 unit 5 description to-PE1 set interfaces fe-1/2/0 unit 5 family inet filter input ef_path set interfaces fe-1/2/0 unit 5 family inet address 10.0.0.5/30 set interfaces fe-1/2/1 unit 13 description to-P3 set interfaces fe-1/2/1 unit 13 family inet filter input ef_path set interfaces fe-1/2/1 unit 13 family inet address 10.0.0.13/30 set interfaces fe-1/2/2 unit 17 description to-P4 set interfaces fe-1/2/2 unit 17 family inet filter input ef_path set interfaces fe-1/2/2 unit 17 family inet address 10.0.0.17/30 set interfaces fe-1/2/3 unit 33 description to-P2 set interfaces fe-1/2/3 unit 33 family inet filter input ef_path set interfaces fe-1/2/3 unit 33 family inet address 10.0.0.33/30 set interfaces lo0 unit 99 family inet address 10.255.165.99/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.99 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp neighbor 10.255.165.93 set protocols bgp group ibgp neighbor 10.255.165.111 set protocols bgp group ibgp neighbor 10.255.165.203 set protocols bgp group ibgp neighbor 10.255.165.95 set protocols bgp group ibgp neighbor 10.255.165.113 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/3.33 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/3.33 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/3.33 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/2.17 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/2.17 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/2.17 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.13 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.13 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.13 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.5 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/0.5 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/0.5 topology video disable set protocols ospf area 0.0.0.0 interface lo0.99 passive set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 5 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 13 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 17 classifiers inet-precedence default set class-of-service interfaces fe-1/2/3 unit 33 classifiers inet-precedence default
设备 P2
set interfaces fe-1/2/0 unit 22 description to-P3 set interfaces fe-1/2/0 unit 22 family inet filter input ef_path set interfaces fe-1/2/0 unit 22 family inet address 10.0.0.22/30 set interfaces fe-1/2/1 unit 25 description to-P4 set interfaces fe-1/2/1 unit 25 family inet filter input ef_path set interfaces fe-1/2/1 unit 25 family inet address 10.0.0.25/30 set interfaces fe-1/2/2 unit 34 description to-P1 set interfaces fe-1/2/2 unit 34 family inet filter input ef_path set interfaces fe-1/2/2 unit 34 family inet address 10.0.0.34/30 set interfaces fe-1/2/3 unit 37 description to-PE2 set interfaces fe-1/2/3 unit 37 family inet filter input ef_path set interfaces fe-1/2/3 unit 37 family inet address 10.0.0.37/30 set interfaces lo0 unit 113 family inet address 10.255.165.113/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.113 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp neighbor 10.255.165.93 set protocols bgp group ibgp neighbor 10.255.165.111 set protocols bgp group ibgp neighbor 10.255.165.203 set protocols bgp group ibgp neighbor 10.255.165.95 set protocols bgp group ibgp neighbor 10.255.165.99 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/2.34 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/2.34 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/2.34 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.22 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/0.22 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.22 topology video metric 20 set protocols ospf area 0.0.0.0 interface fe-1/2/1.25 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.25 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.25 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/3.37 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/3.37 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/3.37 topology video metric 200 set protocols ospf area 0.0.0.0 interface lo0.113 passive set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 22 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 25 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 34 classifiers inet-precedence default set class-of-service interfaces fe-1/2/3 unit 37 classifiers inet-precedence default
设备 P3
set interfaces fe-1/2/0 unit 10 description to-PE1 set interfaces fe-1/2/0 unit 10 family inet filter input ef_path set interfaces fe-1/2/0 unit 10 family inet address 10.0.0.10/30 set interfaces fe-1/2/1 unit 14 description to-P1 set interfaces fe-1/2/1 unit 14 family inet filter input ef_path set interfaces fe-1/2/1 unit 14 family inet address 10.0.0.14/30 set interfaces fe-1/2/2 unit 21 description to-P2 set interfaces fe-1/2/2 unit 21 family inet filter input ef_path set interfaces fe-1/2/2 unit 21 family inet address 10.0.0.21/30 set interfaces fe-1/2/3 unit 29 description to-P4 set interfaces fe-1/2/3 unit 29 family inet filter input ef_path set interfaces fe-1/2/3 unit 29 family inet address 10.0.0.29/30 set interfaces lo0 unit 111 family inet address 10.255.165.111/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.111 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp neighbor 10.255.165.93 set protocols bgp group ibgp neighbor 10.255.165.113 set protocols bgp group ibgp neighbor 10.255.165.203 set protocols bgp group ibgp neighbor 10.255.165.95 set protocols bgp group ibgp neighbor 10.255.165.99 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/3.29 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/3.29 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/3.29 topology video set protocols ospf area 0.0.0.0 interface fe-1/2/2.21 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/2.21 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/2.21 topology video metric 20 set protocols ospf area 0.0.0.0 interface fe-1/2/1.14 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.14 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.14 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.10 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/0.10 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.10 topology video set protocols ospf area 0.0.0.0 interface lo0.111 passive set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 10 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 14 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 21 classifiers inet-precedence default set class-of-service interfaces fe-1/2/3 unit 29 classifiers inet-precedence default
设备 P4
set interfaces fe-1/2/0 unit 18 description to-P1 set interfaces fe-1/2/0 unit 18 family inet filter input ef_path set interfaces fe-1/2/0 unit 18 family inet address 10.0.0.18/30 set interfaces fe-1/2/1 unit 26 description to-P2 set interfaces fe-1/2/1 unit 26 family inet filter input ef_path set interfaces fe-1/2/1 unit 26 family inet address 10.0.0.26/30 set interfaces fe-1/2/2 unit 30 description to-P3 set interfaces fe-1/2/2 unit 30 family inet filter input ef_path set interfaces fe-1/2/2 unit 30 family inet address 10.0.0.30/30 set interfaces fe-1/2/3 unit 41 description to-PE2 set interfaces fe-1/2/3 unit 41 family inet filter input ef_path set interfaces fe-1/2/3 unit 41 family inet address 10.0.0.41/30 set interfaces lo0 unit 95 family inet address 10.255.165.95/32 primary set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.165.95 set protocols bgp group ibgp family inet unicast topology voice community target:40:40 set protocols bgp group ibgp family inet unicast topology video community target:50:50 set protocols bgp group ibgp neighbor 10.255.165.93 set protocols bgp group ibgp neighbor 10.255.165.113 set protocols bgp group ibgp neighbor 10.255.165.203 set protocols bgp group ibgp neighbor 10.255.165.111 set protocols bgp group ibgp neighbor 10.255.165.99 set protocols ospf topology voice topology-id 126 set protocols ospf topology video topology-id 52 set protocols ospf area 0.0.0.0 interface fe-1/2/2.30 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/2.30 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/2.30 topology video set protocols ospf area 0.0.0.0 interface fe-1/2/0.18 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/0.18 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.18 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/0.18 topology video metric 20 set protocols ospf area 0.0.0.0 interface fe-1/2/1.26 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.26 topology voice disable set protocols ospf area 0.0.0.0 interface fe-1/2/1.26 topology video disable set protocols ospf area 0.0.0.0 interface fe-1/2/3.41 metric 10 set protocols ospf area 0.0.0.0 interface fe-1/2/3.41 topology voice set protocols ospf area 0.0.0.0 interface fe-1/2/3.41 topology video set protocols ospf area 0.0.0.0 interface lo0.95 passive set routing-options autonomous-system 100 set routing-options topologies family inet topology voice set routing-options topologies family inet topology video set firewall family inet filter ef_path term ef from forwarding-class expedited-forwarding set firewall family inet filter ef_path term ef then topology voice set firewall family inet filter ef_path term video from source-address 11.19.132.0/24 set firewall family inet filter ef_path term video from source-address 11.19.133.0/24 set firewall family inet filter ef_path term video from source-address 11.19.142.0/24 set firewall family inet filter ef_path term video from source-address 11.19.144.0/24 set firewall family inet filter ef_path term video then topology video set firewall family inet filter ef_path term default then accept set class-of-service interfaces fe-1/2/0 unit 18 classifiers inet-precedence default set class-of-service interfaces fe-1/2/1 unit 26 classifiers inet-precedence default set class-of-service interfaces fe-1/2/2 unit 30 classifiers inet-precedence default set class-of-service interfaces fe-1/2/3 unit 41 classifiers inet-precedence default
配置设备 CE1
逐步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航指南CLI,请参阅 CLI 用户指南 中的 在配置模式下Junos OS CLI 编辑器 。
要配置设备 CE1:
配置接口。
出于演示目的,此示例将以太网接口放入回环模式,并在此环路接口上配置了多个地址。然后,地址将公布给网络。
[edit interfaces] user@CE1# set fe-0/1/0 fastether-options loopback user@CE1# set fe-0/1/0 unit 0 family inet address 11.19.130.1/24 user@CE1# set fe-0/1/0 unit 0 family inet address 11.19.131.1/24 user@CE1# set fe-0/1/0 unit 0 family inet address 11.19.132.1/24 user@CE1# set fe-1/2/0 unit 1 description to-PE1 user@CE1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30 user@CE1# set lo0 unit 97 family inet address 10.255.165.97/32 primary
配置与BGP PE1 的外部路由 (EBGP) 连接。
[edit protocols bgp group ebgp] user@CE1# set type external user@CE1# set local-address 10.0.0.1 user@CE1# set peer-as 100 user@CE1# set neighbor 10.0.0.2
配置路由策略,用于公布在接口 fe-0/1/0 上配置的地址。
[edit policy-options policy-statement inject_directs] user@CE1# set term a from protocol direct user@CE1# set term a from interface fe-0/1/0.0 user@CE1# set term a then next policy user@CE1# set term a then accept user@CE1# set term b then reject
配置使用视频社区属性标记语音路由和视频社区属性的视频路由的路由策略。
[edit policy-options policy-statement set_community] user@CE1# set term a from route-filter 11.19.130.0/24 exact user@CE1# set term a from route-filter 11.19.131.0/24 exact user@CE1# set term a then community add voice user@CE1# set term a then accept user@CE1# set term b from route-filter 11.19.132.0/24 exact user@CE1# set term b from route-filter 11.19.133.0/24 exact user@CE1# set term b then community add video user@CE1# set term b then accept user@CE1# set term default then accept [edit policy-options community] user@CE1# set video members target:50:50 user@CE1# set voice members target:40:40
应用 set_community导出 策略,将直接路由从路由表导出到BGP。
应用 inject_directs 导出策略,以声明在接口 fe-0/1/0 上配置的地址。
[edit protocols bgp group ebgp] user@CE1# set export set_community user@CE1# set export inject_directs
配置自治系统 (AS) 编号。
[edit routing-options] user@CE1# set autonomous-system 101
结果
在配置模式下,输入 show interfaces
、 和 show protocols
命令以确认 show policy-options
您的 show routing-options
配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@CE1# show interfaces fe-0/1/0 { fastether-options { loopback; } unit 0 { family inet { address 11.19.130.1/24; address 11.19.131.1/24; address 11.19.132.1/24; } } } fe-1/2/0 { unit 1 { description to-PE1; family inet { address 10.0.0.1/30; } } } lo0 { unit 97 { family inet { address 10.255.165.97/32 { primary; } } } }
user@CE1# show protocols bgp { group ebgp { type external; local-address 10.0.0.1; export [ set_community inject_directs ]; peer-as 100; neighbor 10.0.0.2; } }
user@CE1# show policy-options policy-statement inject_directs { term a { from { protocol direct; interface fe-0/1/0.0; } then { next policy; accept; } } term b { then reject; } } policy-statement set_community { term a { from { route-filter 11.19.130.0/24 exact; route-filter 11.19.131.0/24 exact; } then { community add voice; accept; } } term b { from { route-filter 11.19.132.0/24 exact; route-filter 11.19.133.0/24 exact; } then { community add video; accept; } } term default { then accept; } } community video members target:50:50; community voice members target:40:40;
user@CE1# show routing-options autonomous-system 101;
如果完成设备配置,请在配置 模式下输入 commit 。
配置设备 PE1
逐步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航指南CLI,请参阅 CLI 用户指南 中的 在配置模式下Junos OS CLI 编辑器 。
要配置设备 PE1:
配置接口。
转发平面使用防火墙过滤器来指示应该使用哪些拓扑转表信息流。在这种情况下,您必须在与路由拓扑相关的所有接口上配置防火墙过滤器。通常,核心中OSPF拓扑配置具有输入防火墙过滤器的所有多拓扑结构接口。此外,入口接口(来自 客户边缘 设备的信息流进入 PE 设备以进入核心)时,已配置防火墙过滤器。设备 PE1 上的此配置显示应用到入口接口(连接到 客户边缘 设备的)和两个面向核心的接口(连接到设备 P1 和设备 P3)的防火墙过滤器。
[edit interfaces] user@PE1# set fe-1/2/0 unit 2 description to-CE1 user@PE1# set fe-1/2/0 unit 2 family inet filter input ef_path user@PE1# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30 user@PE1# set fe-1/2/1 unit 6 description to-P1 user@PE1# set fe-1/2/1 unit 6 family inet filter input ef_path user@PE1# set fe-1/2/1 unit 6 family inet address 10.0.0.6/30 user@PE1# set fe-1/2/2 unit 9 description to-P3 user@PE1# set fe-1/2/2 unit 9 family inet filter input ef_path user@PE1# set fe-1/2/2 unit 9 family inet address 10.0.0.9/30 user@PE1# set lo0 unit 93 family inet address 10.255.165.93/32 primary
配置自治系统 (AS) 编号。
[edit routing-options] user@PE1# set autonomous-system 100
配置BGP。
[edit protocols bgp group ibgp] user@PE1# set type internal user@PE1# set local-address 10.255.165.93 user@PE1# set neighbor 10.255.165.111 user@PE1# set neighbor 10.255.165.203 user@PE1# set neighbor 10.255.165.113 user@PE1# set neighbor 10.255.165.95 user@PE1# set neighbor 10.255.165.99 [edit protocols bgp group ebgp] user@PE1# set type external user@PE1# set local-address 10.0.0.2 user@PE1# set peer-as 101 user@PE1# set neighbor 10.0.0.1
配置下一跳跃自我路由策略,确保 IBGP 设备将设备 PE1 上的环路地址用作所有 IBGP 路由播发上的下一跳跃地址。
这样,设备 PE1 就用作 EBGP 路由的网关路由器。
[edit policy-options policy-statement nhs] user@PE1# set then next-hop self
将下一跳跃自我策略应用于 IBGP 会话。
[edit protocols bgp group ibgp] user@PE1# set export nhs
配置语音和视频拓扑,使您能够使用这些拓扑与 OSPF 和 BGP。
语音和视频名称是路由器的本地名称。名称不会传播到此路由器之外。但是,出于管理目的,在多组织环境中,可跨路由器采用一致的命名方案。
[edit routing-options topologies family inet] user@PE1# set topology voice user@PE1# set topology video
应用社区标记,通过配置路由拓扑名称和创建社区值BGP语音和视频拓扑。
另外Junos OS,多租户BGP基于路由中的社区BGP值。此配置确定了拓扑与一个或多个社区值之间的关联,并填充拓扑路由表。到达BGP具有匹配社区值的更新将复制到关联的拓扑路由表中。由您决定BGP拓扑的哪个社区值相关联。
此配置BGP社区值目标 :40:40 接收的更新要添加到拓扑路由表中 :voice.inet.0 (默认路由表 inet.0)。通过社区价值目标 :50:50 收到的更新将添加到拓扑路由表中 :video.inet.0 (默认路由表 inet.0)。
[edit protocols bgp group ibgp family inet unicast] user@PE1# set topology voice community target:40:40 user@PE1# set topology video community target:50:50 [edit protocols bgp group ebgp family inet unicast] user@PE1# set topology voice community target:40:40 user@PE1# set topology video community target:50:50
在特殊接口上启用OSPF多桌面功能。
仅在所需OSPF上启用多组织接口标记,如 图 1 所示。在面向设备 P1 的接口 fe-1/2/1.6 上,启用语音拓扑并禁用视频拓扑。在面向设备 P3 的接口 fe-1/2/2.9 上,启用视频拓扑并禁用语音拓扑。
当在 OSPF 下配置拓扑 ID 时,系统将自动在所有接口上启用OSPF。要禁用拓扑或添加度量值,必须添加显式配置。
出于可读性目的,每个拓扑都OSPF接口下配置,即使配置拓扑 ID 时也会发生此默认行为。在链路上配置更高的度量值,使链路比另一个可用链路更首选。
[edit protocols ospf ] user@PE1# set topology voice topology-id 126 user@PE1# set topology video topology-id 52 [edit protocols ospf area 0.0.0.0] user@PE1# set interface fe-1/2/1.6 metric 10 user@PE1# set interface fe-1/2/1.6 topology video disable user@PE1# set interface fe-1/2/1.6 topology voice user@PE1# set interface fe-1/2/2.9 metric 10 user@PE1# set interface fe-1/2/2.9 topology voice disable user@PE1# set interface fe-1/2/2.9 topology video user@PE1# set interface lo0.93 passive
配置防火墙过滤器。
配置路由拓扑之后,信息流必须通过防火墙过滤器使用路由拓扑转转表。对于信息流首先进入核心网络的基本路由拓扑,将输入防火墙过滤器应用于入口接口。此外,还会将防火墙过滤器添加到配置多OSPF接口。所有路由器都必须使用相同的防火墙过滤器将数据包与拓扑关联,以确保一致转发并避免路由环路或数据包丢失。
转发平面在信息流进入路由器并退出特定接口时,会处理信息流。要检查流量并使用指定的拓扑转转表来执行下一跃点查找,请在每个需要路由拓扑支持的接口上配置输入防火墙过滤器。使用常规防火墙过滤器识别数据包特征。
通常,为了提供应用级别的差异化,使用 DiffServ 代码点 (DSCP) 会更方便。存在防火墙过滤器匹配时,防火墙会指示路由查找使用特定拓扑转转表。数据包属性在 from 语句中标识,然后是一个 then 语句,表示拓扑转转表,用于转发下一跳查找。此配置会通知路由器哪些信息流使用路由拓扑转转表,哪些信息流使用默认转转表。名为 default 的最后一个术语指定默认转表的使用。
这些防火墙配置显示源地址和 DSP,用于对语音、视频和默认流量进行排序。DSCP 实用,因为您可以在新设备客户边缘设置它们,并且整个网络的信息保持完好无损。例如,此处服务等级(CoS)配置为加速信息流。当为不同的应用使用相同的 IP 地址时,DSCP 也切实可行。
[edit firewall family inet filter ef_path] user@PE1# set term ef from forwarding-class expedited-forwarding user@PE1# set term ef then topology voice user@PE1# set term video from source-address 11.19.132.0/24 user@PE1# set term video from source-address 11.19.133.0/24 user@PE1# set term video from source-address 11.19.142.0/24 user@PE1# set term video from source-address 11.19.144.0/24 user@PE1# set term video then topology video user@PE1# set term default then accept
在CoS上启用配置。
[edit class-of-service interfaces] user@PE1# set fe-1/2/0 unit 2 classifiers inet-precedence default user@PE1# set fe-1/2/1 unit 6 classifiers inet-precedence default user@PE1# set fe-1/2/2 unit 9 classifiers inet-precedence default
结果
在配置模式下,输入 show interfaces
、 show protocols
show policy-options
、 show routing-options
、 show firewall
和 命令,以确认您的show class-of-service
配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@PE1# show interfaces fe-1/2/0 { unit 2 { description to-CE1; family inet { filter { input ef_path; } address 10.0.0.2/30; } } } fe-1/2/1 { unit 6 { description to-P1; family inet { filter { input ef_path; } address 10.0.0.6/30; } } } fe-1/2/2 { unit 9 { description to-P3; family inet { filter { input ef_path; } address 10.0.0.9/30; } } } lo0 { unit 93 { family inet { address 10.255.165.93/32 { primary; } } } }
user@PE1# show protocols bgp { group ibgp { type internal; local-address 10.255.165.93; family inet { unicast { topology voice { community target:40:40; } topology video { community target:50:50; } } } export nhs; neighbor 10.255.165.111; neighbor 10.255.165.203; neighbor 10.255.165.113; neighbor 10.255.165.95; neighbor 10.255.165.99; } group ebgp { type external; local-address 10.0.0.2; family inet { unicast { topology voice { community target:40:40; } topology video { community target:50:50; } } } peer-as 101; neighbor 10.0.0.1; } } ospf { topology voice topology-id 126; topology video topology-id 52; area 0.0.0.0 { interface fe-1/2/1.6 { metric 10; topology video disable; topology voice; } interface fe-1/2/2.9 { metric 10; topology voice disable; topology video; } interface lo0.93 { passive; } } }
user@PE1# show policy-options policy-statement nhs { then { next-hop self; } }
user@PE1# show routing-options autonomous-system 100; topologies { family inet { topology voice; topology video; } }
user@PE1# show firewall family inet { filter ef_path { term ef { from { forwarding-class expedited-forwarding; } then topology voice; } term video { from { source-address { 11.19.132.0/24; 11.19.133.0/24; 11.19.142.0/24; 11.19.144.0/24; } } then topology video; } term default { then accept; } } }
user@PE1# show class-of-service interfaces { fe-1/2/0 { unit 2 { classifiers { inet-precedence default; } } unit 6 { classifiers { inet-precedence default; } } unit 9 { classifiers { inet-precedence default; } } } }
如果完成设备配置,请在配置 模式下输入 commit 。
验证
确认配置工作正常。
验证OSPF接口
目的
验证OSPF接口是否配置为属于一个或多个拓扑。
行动
在操作模式下,输入 show (ospf | ospf3) interface interface-name detail
命令。
user@PE1> show ospf interface fe-1/2/1.6 detail Interface State Area DR ID BDR ID Nbrs fe-1/2/1.6 DR 0.0.0.0 10.255.165.93 10.255.165.99 1 Type: LAN, Address: 10.0.0.6, Mask: 255.255.255.252, MTU: 1500, Cost: 10 DR addr: 10.0.0.6, BDR addr: 10.0.0.5, Priority: 128 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 10 Topology video (ID 52) -> Disabled, Cost: 10 Topology voice (ID 126) -> Cost: 10
意义
此输出显示语音拓扑已添加到设备 PE1 上的 fe-1/2/1.6 接口中。拓扑名称为语音,MT-ID 为 126。此接口上的视频拓扑已禁用。接口的成本为 10。
路由器发起和泛洪的路由器-LSA 包含特定接口的所有相关拓扑信息,例如 MT-ID 和指标。如果一个接口上未配置了OSPF的一部分,则路由器-LSA 不包含该接口的任何拓扑信息。OSPF邻设备可能也不支持多OSPF。也就是说,特定链路不用于计算OSPF的路由,除非链路两端的路由器将链路声明为拓扑的一部分。如果相邻 OSPF路由器中不支持多拓扑OSPF或未配置为支持此拓扑,则邻接方收到的 AS 中的拓扑信息将被忽略。
验证路由
目的
确保路由在预期的路由表中,并且预期社区已连接到路由。
行动
在操作模式下,在 show route detail
设备 PE1 上输入 命令。
user@PE1> show route 11.19.130.0/24 detail inet.0: 29 destinations, 30 routes (29 active, 0 holddown, 0 hidden) 11.19.130.0/24 (1 entry, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 812 Address: 0xb9f064c Next-hop reference count: 22 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.2, selected Session Id: 0x600004 State: <Active Ext> Local AS: 100 Peer AS: 101 Age: 3d 21:44:07 Task: BGP_101.10.0.0.1+51873 Announcement bits (3): 0-KRT 3-BGP_RT_Background 4-Resolve tree 3 AS path: 101 I Communities: target:40:40 Accepted Localpref: 100 Router ID: 10.255.165.97 Secondary Tables: :voice.inet.0 :voice.inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden) 11.19.130.0/24 (1 entry, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 812 Address: 0xb9f064c Next-hop reference count: 22 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.2, selected Session Id: 0x600004 State: <Secondary Active IndepResolution Ext> Local AS: 100 Peer AS: 101 Age: 3d 21:44:07 Task: BGP_101.10.0.0.1+51873 Announcement bits (2): 0-KRT 1-Resolve tree 1 AS path: 101 I Communities: target:40:40 Accepted Localpref: 100 Router ID: 10.255.165.97 Primary Routing Table inet.0
意义
此输出显示BGP值目标为:40:40 的路由 11.19.130.0/24。由于路由符合语音拓扑的标准,因此会同时添加到默认和语音拓扑路由表(inet.0 和 :voice.inet.0)。设备 PE1 通过 EBGP 从设备 CE1 学习路由,然后向 IBGP 注入路由。
检查解决BGP跃点
目的
检查协议下一跳跃和转发下一跳跃。
行动
在操作模式下,在 show route detail
设备 PE2 上输入 命令。
user@PE2> show route 11.19.130.0/24 detail inet.0: 29 destinations, 30 routes (29 active, 0 holddown, 0 hidden) 11.19.130.0/24 (1 entry, 1 announced) *BGP Preference: 170/-101 Next hop type: Indirect Address: 0xb9f0e04 Next-hop reference count: 12 Source: 10.255.165.93 Next hop type: Router, Next hop index: 262153 Next hop: 10.0.0.37 via fe-1/2/0.38 Session Id: 0x700004 Next hop: 10.0.0.41 via fe-1/2/1.42, selected Session Id: 0x700005 Protocol next hop: 10.255.165.93 Indirect next hop: bb8c000 262154 INH Session ID: 0x700007 State: <Active Int Ext> Local AS: 100 Peer AS: 100 Age: 3d 4:27:40 Metric2: 30 Task: BGP_100.10.255.165.93+179 Announcement bits (3): 0-KRT 3-BGP_RT_Background 4-Resolve tree 3 AS path: 101 I Communities: target:40:40 Accepted Localpref: 100 Router ID: 10.255.165.93 Secondary Tables: :voice.inet.0 :voice.inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden) 11.19.130.0/24 (1 entry, 1 announced) *BGP Preference: 170/-101 Next hop type: Indirect Address: 0xb9f0f34 Next-hop reference count: 6 Source: 10.255.165.93 Next hop type: Router, Next hop index: 1188 Next hop: 10.0.0.37 via fe-1/2/0.38, selected Session Id: 0x700004 Protocol next hop: 10.255.165.93 Indirect next hop: bb8c1d8 262177 INH Session ID: 0x700007 State: <Secondary Active IndepResolution Int Ext> Local AS: 100 Peer AS: 100 Age: 3d 2:00:20 Metric2: 30 Task: BGP_100.10.255.165.93+179 Announcement bits (2): 0-KRT 1-Resolve tree 1 AS path: 101 I Communities: target:40:40 Accepted Localpref: 100 Router ID: 10.255.165.93 Primary Routing Table inet.0
意义
典型的 IBGP 核心具有BGP协议下一跳跃的路由,使用底层路由器IGP解决。拓扑路由表中的 IBGP 路由具有协议下一跃点 IP 地址。默认情况下,同一拓扑路由表用于查找协议下一跃点 IP 地址并解析为转发下一跳跃。设备 PE2 的此输出显示与上BGP相同的路由:11.19.130.0/24。路由从不同的视角显示,即从设备 PE2 作为 IBGP 路由。同样,此 IBGP 路由会同时添加到 设备 PE2 上的 inet.0 和 :voice.inet.0 中。但是,尽管每个路由的下一跳跃具有相同的协议,但每个路由都有不同的下一跳跃(ge-0/0/3.0,而不是 ge-0/1/4.0)。此差异的原因是当协议下一跃点 IP 地址 10.255.165.93 解析时,它将使用相应的路由表(inet.0 或 :voice.inet.0)来查找协议下一跳跃。
检查协议下一跳跃
目的
检查协议下一跳跃和转发下一跳跃。
行动
在操作模式下,在 show route
设备 PE2 上输入 命令。
user@PE2> show route 10.255.165.93 inet.0: 29 destinations, 30 routes (29 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.255.165.93/32 *[OSPF/10] 3d 04:37:26, metric 30 > to 10.0.0.37 via fe-1/2/0.38 to 10.0.0.41 via fe-1/2/1.42 :voice.inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.255.165.93/32 *[OSPF/10] 3d 02:10:04, metric 30 > to 10.0.0.37 via fe-1/2/0.38 :video.inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.255.165.93/32 *[OSPF/10] 3d 02:03:16, metric 30 > to 10.0.0.41 via fe-1/2/1.42
意义
设备 PE2 的此输出显示 11.19.130.0/24(即 IP 地址 10.255.165.93)下一跳跃的协议,从而进一步演示 IBGP 路由 11.19.130.0/24 如何解析其协议下一跳跃。10.255.165.93 中的下一跃点转发与路由 11.19.130/24 中的 IBGP 转发下一跳跃匹配,如上一个示例所示。请注意,IP 地址 10.255.165.93 也位于路由表中 :video.inet.0。此地址是设备 PE1 的环路地址,因此位于所有三个路由表中。此示例还显示了进入设备 PE2 的信息流如何根据关联的拓扑从不同接口退出,发往 11.19.130.0/24。实际流量的标记方式为防火墙过滤器可指示信息流使用特定拓扑路由表。
验证OSPF邻居
目的
确保相邻设备上已启用预期的OSPF拓扑。
行动
在操作模式下,在 show ospf neighbor 10.0.0.21 extensive
设备 P2 上输入 命令。
user@P2> show ospf neighbor 10.0.0.21 extensive Address Interface State ID Pri Dead 10.0.0.21 fe-1/2/0.22 Full 10.255.165.111 128 39 Area 0.0.0.0, opt 0x52, DR 10.0.0.22, BDR 10.0.0.21 Up 3d 06:09:50, adjacent 3d 06:09:50 Topology default (ID 0) -> Bidirectional Topology video (ID 52) -> Bidirectional
意义
此设备 P2 输出显示OSPF邻居 PE2 (10.0.0.21),其中多组织OSPF默认和视频是多OSPF参与方。双向 标志表示 邻接方使用同一个多桌面或多OSPF ID 进行配置。
检查路由器 LSA
目的
检查启用视频和语音拓扑的链路。
行动
在操作模式下,在 show ospf database lsa-id 10.255.165.203 extensive
设备 P2 上输入 命令。
user@P2> show ospf database lsa-id 10.255.165.203 extensive OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Router 10.255.165.203 10.255.165.203 0x80000063 1552 0x22 0xdff3 80 bits 0x0, link count 3 id 10.255.165.203, data 255.255.255.255, Type Stub (3) Topology count: 2, Default metric: 0 Topology video (ID 52) -> Metric: 0 Topology voice (ID 126) -> Metric: 0 id 10.0.0.38, data 10.0.0.38, Type Transit (2) Topology count: 2, Default metric: 10 Topology video (ID 52) -> Metric: 200 Topology voice (ID 126) -> Metric: 10 id 10.0.0.42, data 10.0.0.42, Type Transit (2) Topology count: 1, Default metric: 10 Topology video (ID 52) -> Metric: 10 Topology default (ID 0) Type: Transit, Node ID: 10.0.0.42 Metric: 10, Bidirectional Type: Transit, Node ID: 10.0.0.38 Metric: 10, Bidirectional Topology video (ID 52) Type: Transit, Node ID: 10.0.0.42 Metric: 10, Bidirectional Type: Transit, Node ID: 10.0.0.38 Metric: 200, Bidirectional Topology voice (ID 126) Type: Transit, Node ID: 10.0.0.38 Metric: 10, Bidirectional Aging timer 00:34:08 Installed 00:25:49 ago, expires in 00:34:08, sent 00:25:47 ago Last changed 3d 01:45:51 ago, Change count: 10
意义
此设备 P2 输出显示设备 PE2 始发的路由器-LSA。除了默认拓扑之外,LSA 显示启用视频和语音拓扑的链路。
检查流量如何遍历网络
目的
确保已使用预期路径。
行动
在操作模式下,在 traceroute
设备 CE1 上输入 命令。
第一个示例输出显示通过语音拓扑从设备 CE1 到设置 DSCP 的设备 CE2 的 traceroute。路由通过 :voice.inet.0 解析。此 traceroute 路径遵循语音路径 CE1-PE1-P1-P2-PE2-CE2
user@CE1> traceroute 11.19.140.1 source 11.19.130.1 tos 160 traceroute to 11.19.140.1 (11.19.140.1) from 11.19.130.1, 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 2.015 ms 1.924 ms 1.770 ms 2 10.0.0.5 (10.0.0.5) 1.890 ms 1.010 ms 0.974 ms 3 10.0.0.34 (10.0.0.34) 0.986 ms 1.031 ms 0.973 ms 4 10.0.0.38 (10.0.0.38) 1.213 ms 1.065 ms 1.154 ms 5 11.19.140.1 (11.19.140.1) 1.696 ms 4.286 ms 1.332 ms
此输出显示未设置 DSP 的语音从设备 CE1 到设备 CE2 的 traceroute。路由通过 inet.0 解析,生成的路径不同于设置 DSCP 的上一个案例。此 traceroute 路径遵循默认路径 CE1-PE1-P4-PE2-CE2。
user@CE1> traceroute 11.19.140.1 source 11.19.130.1 traceroute to 11.19.140.1 (11.19.140.1) from 11.19.130.1, 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 1.654 ms 1.710 ms 1.703 ms 2 10.0.0.5 (10.0.0.5) 1.790 ms 1.045 ms 0.975 ms 3 10.0.0.18 (10.0.0.18) 0.989 ms 1.041 ms 0.983 ms 4 10.0.0.42 (10.0.0.42) 0.994 ms 1.036 ms 1.002 ms 5 11.19.140.1 (11.19.140.1) 1.329 ms 2.248 ms 2.225 ms
此输出显示从设备 CE1 到设备 CE2 的 traceroute,用于防火墙过滤器基于目标地址的视频流量。路由通过 :video.inet.0 解析 。此 traceroute 遵循视频路径 CE1-PE1-P3-P4-PE2-CE2。
user@CE1> traceroute 11.19.142.1 source 11.19.132.1 traceroute to 11.19.142.1 (11.19.142.1) from 11.19.132.1, 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 1.126 ms 1.300 ms 0.995 ms 2 10.0.0.10 (10.0.0.10) 0.981 ms 1.018 ms 0.991 ms 3 10.0.0.30 (10.0.0.30) 0.997 ms 1.886 ms 1.952 ms 4 10.0.0.42 (10.0.0.42) 1.800 ms 1.038 ms 0.980 ms 5 11.19.142.1 (11.19.142.1) 1.367 ms 1.352 ms 1.328 ms
此输出显示从设备 CE1 到设备 CE2 的 traceroute,用于设置 DSCP 的视频。DSCP 位将指示设备 PE1 使用拓扑表 :voice.inet.0。由于视频路由的语音路由表中没有条目,因此将丢弃信息流。
user@CE1> traceroute 11.19.142.1 source 11.19.132.1 tos 160 traceroute to 11.19.142.1 (11.19.142.1) from 11.19.132.1, 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 1.135 ms !N 1.007 ms !N 0.954 ms !N