HCIP(综合实验)

一、实验拓补图

简介:本实验为了模拟运营商网络到企业网的路由,针对 BGP,OSPF,RIP等网络路由协议,详细运用各 自网络路由协议的特性,搭建如上拓扑图。 如图右侧为两家在同一地区的企业,各自分别接入当地移动运营商,来实现企业内部人员上网办公需求; 如图左侧为移动运营商跟其他运营商内部网络简单拓扑图,模拟真实的运营商网络架构。

二、实验需求

1.IP地址规划

设备编号 接口编号 IP 地址
R1 Ethernet 0/0/0、Ethernet 0/0/1、GE 0/0/0 192.168.100.254/24、192.168.110.254/24、10.1.13.1/30
R2 Ethernet 0/0/0、Ethernet 0/0/1、GE 0/0/0 172.16.200.254/24、172.16.210.254/24、10.1.26.1/30
R3 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.13.2/30、10.1.34.1/30、3.3.3.3/32
R4 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.34.2/30、10.1.45.1/30、4.4.4.4/32
R5 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.45.2/30、10.1.59.1/30、5.5.5.5/32
R6 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.26.2/30、10.1.67.1/30、6.6.6.6/32
R7 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.67.2/30、10.1.78.1/30、7.7.7.7/32
R8 GE 0/0/0、GE 0/0/1、Loopback 0 10.1.78.2/30、10.1.89.1/30、8.8.8.8/32
R9 GE 0/0/0、GE 0/0/1、GE 0/0/2、GE 0/0/3 10.1.59.2/30、10.1.89.2/30、10.1.109.1/30、10.1.179.1/30
R10 GE 0/0/0、GE 0/0/1、GE 0/0/2、GE 0/0/3 10.1.109.2/30、172.16.10.1/30、172.16.10.5/30、172.16.10.9/30
R11 GE 0/0/0、GE 0/0/1 172.16.10.2/30、172.16.10.13/30
R12 GE 0/0/0、GE 0/0/1 172.16.10.6/30、172.16.10.17/30
R13 GE 0/0/0、GE 0/0/1 172.16.10.10/30、172.16.10.21/30
R14 GE 0/0/0、Ethernet 0/0/0 172.16.10.14/30、172.16.220.254/24
R15 GE 0/0/0、Ethernet 0/0/0 172.16.10.18/30、172.16.230.254/24
R16 GE 0/0/0、Ethernet 0/0/0 172.16.10.22/30、172.16.240.254/24
R17 GE 0/0/0、GE 0/0/1、GE 0/0/2 10.1.179.2/30、192.168.10.1/30、192.168.10.5/30
R18 GE 0/0/0、GE 0/0/1 192.168.10.2/30、192.168.10.6/30
R19 GE 0/0/0、Serial 0/0/0、Serial 0/0/1 192.168.10.9/30、192.168.10.13/30、192.168.10.17/30
R20 Serial 0/0/0、Loopback 0 192.168.10.18/30、192.168.120.254/24
R21 GE 0/0/0、GE 0/0/1、GE 0/0/2 192.168.10.10/30、192.168.10.21/30、192.168.10.25/30
R22 GE 0/0/0、Loopback 0 192.168.10.22/30、192.168.130.254/24
R23 GE 0/0/0、Loopback 0 192.168.10.26/30、192.168.140.254/24
R24 Serial 1/0/0、Loopback 0 192.168.10.14/30、192.168.150.254/24
PC1 - 192.168.100.1/24
PC2 - 192.168.110.1/24
PC3 - 172.16.200.1/24
PC4 - 172.16.210.1/24
PC5 - 172.16.220.1/24
PC6 - 172.16.230.1/24
PC7 - 172.16.240.1/24

所有Router-ID值为设备编号的数字,例如R1的Router-ID为1.1.1.1。

2.上海A公司分站需求

1、R19与R20之间链路类型为HDLC;R19与R24之间链路类型为PPP,使用CHAP认证,R24为认证方。

2、R20、R22、R23、R24各自有一个环回用以模拟用户网段。保证路由器学习到的路由信息掩码为24。

3、R17、R18、R19、R20、R21、R24使用OSPF协议,进程号为100,实现全网可达。使用精准宣告方式。

4、R21、R23之间运行RIPv2协议,进程号为100。R21下放RIP缺省路由。因为RIP是主类宣告,会将其余网 段宣告进RIP网络,故使用路由策略禁止向R23通告其他直连网段路由信息(使用前缀列表抓取流量,过滤策略 进行路由过滤,name为policy)。

5、R21、R22之间使用静态路由协议,R22使用静态缺省路由指向R21,R21使用静态路由编写回程路由。

6、OSPF的Area 0中,开启区域认证(md5;key=1;password=123456);Area 2中修改为P2P接口类型加 速收敛,该区域配置为完全NSSA区域。

7、R21仅将R23和R22的环回网段重发布到OSPF网络中。(使用前缀列表抓取流量,路由策略实现路由过滤; name分别为policy-rip和policy-static)。

8、R17下放OSPF缺省路由。(强制性下放)。

3、上海B公司分站需求

1、PC5、PC6、PC7各自代表一个用户网段。掩码为24。

2、使用OSPF协议,进程号为200实现全网可达。使用精准宣告方式。

3、Area 0开启区域认证(md5;key=1;password=123456),并将本区域内部hello时间修改为3秒加速收 敛;所有非骨干区域配置为完全Stub区域,且将接口网络类型修改为P2P加快收敛。

4、连接用户的一侧使用静默接口优化OSPF网络。

5、R10下放OSPF缺省路由。(强制性下放)。

6、在R13上使用filter-policy技术拒绝学习到PC5及PC6所在网段路由信息以及R10下放的缺省路由,抓流 量使用前缀列表(name=policy;编号分别为10;20;30)。限制研发组访问同站点其他部门。

4、骨干网建设需求

A公司

1、使用BGP协议构建路由传递路径,AS 300内部使用路由反射器方式传递路由信息,R3为客户端。

2、AS内部使用环回建立BGP对等体关系,AS之间使用直连接口建立BGP对等体关系。

3、上海A公司分站仅R17设备运行BGP协议。

4、AS 300内部构建单区域OSPF网络,进程号为300传递环回路由信息。使用精准宣告方式。

B公司

1、使用BGP协议构建路由传递路径,AS 400内部使用联邦方式传递IBGP路由信息,R6和R7属于AS 64512, R8属于AS 64513。联邦EBGP对等体之间TTL值修改为最大。

2、AS内部使用环回建立BGP对等体关系,AS之间使用直连接口建立BGP对等体关系。

3、上海B公司分站仅R10设备运行BGP协议。

4、AS 400内部构建单区域OSPF网络,进程号为400传递环回路由信息。使用精准宣告方式。 路由传递

路由传递
A公司路由传递

1、R1使用network方式将PC1与PC2的网段路由信息发布到BGP中;因为该路由信息为A公司机房信息,不能传 递给B公司,故R1在传递路由时,给两条路由信息标记上社团属性100:100。

2、R17使用network方式将R20、R22、R23、R24身上的环路路由信息发布到BGP中;因为该路由信息为A公 司内部信息,不能传递给B公司,故R17在传递路由时,给四条路由信息标记上社团属性,且因为两个企业在工 程上有合作,故R22环回所表示的工程组和PC5所代表的工程组需要数据互通。即R22的环回路由社团属性为 100:200;其余路由社团属性为100:100。

3、所有策略名称为policy-com。若存在多个规则,则为policy-com-X,X为数字编号从1开始。社团属性 在本机发布时携带。

4、R3和R5再向R4传递BGP路由时,将下一跳修改为本地。

5、沿途所有启动BGP的设备开启社团属性传输机制。

6、因为A公司的分站和机房使用相同的AS号,由于EBGP水平分割机制的存在,导致无法正常接收路由信息。故 需要开启AS_Path重复功能。

B公司路由传递

1、R2使用路由引入的方式将路由信息导入到BGP中,仅导入PC侧路由信息,使用前缀列表和路由策略,策略名 称为policy-direct。因为该路由信息为B公司机房信息,不能传递给A公司,故R2在传递路由时,给两条路 由信息标记上社团属性200:200。

2、R10使用路由引入方式仅将PC5、PC6、PC7身上的路由信息发布到BGP中,使用前缀列表和路由策略,策略 名称为policy-ospf;因为该路由信息为B公司内部信息,不能传递给A公司,故R10在传递路由时,给四条路 由信息标记上社团属性,且因为两个企业在工程上有合作,故R22环回所表示的工程组和PC5所代表的工程组需 要数据互通。即PC5路由的社团属性为200:100;其余路由社团属性为200:200。

3、社团属性策略名称为policy-com。若存在多个规则,则为policy-com-X,X为数字编号从1开始。社团 属性向外传输时携带。

4、R6和R8再向R4传递BGP路由时,将下一跳修改为本地。

5、沿途所有启动BGP的设备开启社团属性传输机制。

6、因为A公司的分站和机房使用相同的AS号,由于EBGP水平分割机制的存在,导致无法正常接收路由信息。故 需要开启AS_Path重复功能。

限制BGP路由传递

1、在R9上使用社团属性过滤器,编号为1,允许社团属性为25:25、100:200和200:200的路由传递给R10, 策略名称为policy-com-1

2、在R9上使用社团属性过滤器,编号为2,允许社团属性为25:25、200:100和100:100的路由传递给R17, 策略名称为policy-com-2

3、使用AS_Pash过滤器,编号为1,限制R3将始发于AS 200和AS 2500的路由信息发布给R1。

4、使用AS_Pash过滤器,编号为1,限制R6将始发于AS 100和AS 2500的路由信息发布给R2。

5、为实现PC7公司B机房的数据通讯,在R13上手工编写静态路由实现通信。

三、具体配置

R6
复制代码
sysname R6
interface GigabitEthernet0/0/0
    ip address 10.1.26.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.67.1 255.255.255.252
interface LoopBack0
    ip address 6.6.6.6 255.255.255.255
bgp 64512
    router-id 6.6.6.6
    confederation id 400
    peer 7.7.7.7 as-number 64512
    peer 7.7.7.7 connect-interface LoopBack0
    peer 10.1.26.1 as-number 200
    ipv4-family unicast
        peer 7.7.7.7 enable
        peer 7.7.7.7 next-hop-local
        peer 7.7.7.7 advertise-community
        peer 10.1.26.1 enable
        peer 10.1.26.1 as-path-filter 1 export
        peer 10.1.26.1 advertise-community
ospf 400 router-id 6.6.6.6
    area 0.0.0.0
        network 6.6.6.6 0.0.0.0
        network 10.1.67.1 0.0.0.0
ip as-path-filter 1 deny _100$
ip as-path-filter 1 permit .*
R15
复制代码
sysname R15
interface GigabitEthernet0/0/0
    ip address 172.16.10.18 255.255.255.252
interface GigabitEthernet0/0/0
    ospf network-type p2p
ospf 200 router-id 15.15.15.15
    silent-interface Ethernet0/0/0
    area 0.0.0.2
        network 172.16.10.18 0.0.0.0
        network 172.16.230.254 0.0.0.0
        stub
R10
复制代码
sysname R10
interface GigabitEthernet0/0/0
    ip address 10.1.109.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 172.16.10.1 255.255.255.252
    ospf timer hello 3
interface GigabitEthernet0/0/2
    ip address 172.16.10.5 255.255.255.252
    ospf timer hello 3
interface GigabitEthernet0/0/3
    ip address 172.16.10.9 255.255.255.252
    ospf timer hello 3
bgp 200
    router-id 10.10.10.10
    peer 10.1.109.1 as-number 500
    ipv4-family unicast
        import-route ospf 200 route-policy policy-ospf
        peer 10.1.109.1 enable
        peer 10.1.109.1 route-policy policy-com export
        peer 10.1.109.1 advertise-community
        peer 10.1.109.1 allow-as-loop
ospf 200 router-id 10.10.10.10
    default-route-advertise always
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 172.16.10.1 0.0.0.0
        network 172.16.10.5 0.0.0.0
        network 172.16.10.9 0.0.0.0
route-policy policy-ospf permit node 10
    if-match ip-prefix policy-ospf
    if-match ip-prefix policy-com-1
    apply community 200:100
route-policy policy-com permit node 20
    if-match ip-prefix policy-com-2
    apply community 200:200
ip ip-prefix policy-ospf index 10 permit 172.16.220.0 24
ip ip-prefix policy-ospf index 20 permit 172.16.230.0 24
ip ip-prefix policy-ospf index 30 permit 172.16.240.0 24
ip ip-prefix policy-com-1 index 10 permit 172.16.220.0 24
ip ip-prefix policy-com-2 index 10 permit 172.16.230.0 24
ip ip-prefix policy-com-2 index 20 permit 172.16.240.0 24
R24
复制代码
sysname R24
aaa
    local-user huawei password cipher 123456
    local-user huawei service-type ppp
interface Serial1/0/0
    link-protocol ppp
    ppp authentication-mode chap
    ip address 192.168.10.14 255.255.255.252
interface LoopBack0
    ip address 192.168.150.254 255.255.255.0
    ospf network-type broadcast
ospf 100 router-id 24.24.24.24
    area 0.0.0.1
        network 192.168.10.14 0.0.0.0
        network 192.168.150.254 0.0.0.0
R18
复制代码
sysname R18
interface GigabitEthernet0/0/0    
    ip address 192.168.10.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 192.168.10.9 255.255.255.252
    ospf network-type p2p
ospf 100 router-id 18.18.18.18
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 192.168.10.2 0.0.0.0
    area 0.0.0.2
        network 192.168.10.9 0.0.0.0
        nssa no-summary
R11
复制代码
sysname R11
interface GigabitEthernet0/0/0
    ip address 172.16.10.2 255.255.255.252
    ospf timer hello 3
interface GigabitEthernet0/0/1
    ip address 172.16.10.13 255.255.255.252
    ospf network-type p2p
ospf 200 router-id 11.11.11.11
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 172.16.10.2 0.0.0.0
    area 0.0.0.1
        network 172.16.10.13 0.0.0.0
        stub no-summary
R1
复制代码
sysname R1
interface Ethernet0/0/0
    ip address 192.168.100.254 255.255.255.0
interface Ethernet0/0/1
    ip address 192.168.110.254 255.255.255.0
interface GigabitEthernet0/0/0
    ip address 10.1.13.1 255.255.255.252
bgp 100
    router-id 1.1.1.1
    peer 10.1.13.2 as-number 300
    ipv4-family unicast    
        network 192.168.100.0 route-policy policy-com
        network 192.168.110.0 route-policy policy-com
        peer 10.1.13.2 enable
        peer 10.1.13.2 advertise-community
        peer 10.1.13.2 allow-as-loop
route-policy policy-com permit node 10
    apply community 100:100
R2
复制代码
sysname R2
interface Ethernet0/0/0
    ip address 172.16.200.254 255.255.255.0
interface Ethernet0/0/1
    ip address 172.16.210.254 255.255.255.0
interface GigabitEthernet0/0/0
    ip address 10.1.26.1 255.255.255.252
bgp 200
    router-id 2.2.2.2
    peer 10.1.26.2 as-number 400
    ipv4-family unicast
        import-route direct route-policy policy-direct
        peer 10.1.26.2 enable
        peer 10.1.26.2 route-policy policy-com export
        peer 10.1.26.2 advertise-community
        peer 10.1.26.2 allow-as-loop
route-policy policy-direct permit node 10
    if-match ip-prefix policy-direct
    apply community 200:200
ip ip-prefix policy-direct index 10 permit 172.16.200.0 24
ip ip-prefix policy-direct index 20 permit 172.16.210.0 24
R4
复制代码
sysname R4
interface GigabitEthernet0/0/0
    ip address 10.1.34.2 255.255.255.252
interface GigabitEthernet0/0/1    
    ip address 10.1.45.1 255.255.255.252
interface LoopBack0
    ip address 4.4.4.4 255.255.255.255
bgp 300
    router-id 4.4.4.4
    peer 3.3.3.3 as-number 300
    peer 3.3.3.3 connect-interface LoopBack0
    peer 5.5.5.5 as-number 300
    peer 5.5.5.5 connect-interface LoopBack0
    ipv4-family unicast
        peer 3.3.3.3 enable
        peer 3.3.3.3 reflect-client
        peer 3.3.3.3 advertise-community
        peer 5.5.5.5 enable
        peer 5.5.5.5 advertise-community
ospf 300 router-id 4.4.4.4
    area 0.0.0.0
        network 4.4.4.4 0.0.0.0
        network 10.1.34.2 0.0.0.0
        network 10.1.45.1 0.0.0.0
R3
复制代码
sysname R3
interface GigabitEthernet0/0/0
    ip address 10.1.13.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.34.1 255.255.255.252
interface LoopBack0
    ip address 3.3.3.3 255.255.255.255
bgp 300
    router-id 3.3.3.3
    peer 4.4.4.4 as-number 300
    peer 4.4.4.4 connect-interface LoopBack0
    peer 10.1.13.1 as-number 100
    ipv4-family unicast
        peer 4.4.4.4 enable
        peer 4.4.4.4 next-hop-local
        peer 4.4.4.4 advertise-community
        peer 10.1.13.1 enable
        peer 10.1.13.1 as-path-filter 1 export
        peer 10.1.13.1 advertise-community
ospf 300 router-id 3.3.3.3
    area 0.0.0.0
        network 3.3.3.3 0.0.0.0
        network 10.1.34.1 0.0.0.0
ip as-path-filter 1 deny _200$
ip as-path-filter 1 permit .*
R12
复制代码
sysname R12
interface GigabitEthernet0/0/0
    ip address 172.16.10.6 255.255.255.252
    ospf timer hello 3
interface GigabitEthernet0/0/1
    ip address 172.16.10.17 255.255.255.252
    ospf network-type p2p
ospf 200 router-id 12.12.12.12
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 172.16.10.6 0.0.0.0
    area 0.0.0.2
        network 172.16.10.17 0.0.0.0
        stub no-summary
R23
复制代码
sysname R23
interface GigabitEthernet0/0/0
    ip address 192.168.10.26 255.255.255.252
interface LoopBack0
    ip address 192.168.140.254 255.255.255.0
rip 100
    version 2
    network 192.168.10.0
    network 192.168.140.0
R16
复制代码
sysname R16
interface Ethernet0/0/0
    ip address 172.16.240.254 255.255.255.0
interface GigabitEthernet0/0/0
    ip address 172.16.10.22 255.255.255.252
    ospf network-type p2p
ospf 200 router-id 16.16.16.16
    silent-interface Ethernet0/0/0
    area 0.0.0.3
        network 172.16.10.22 0.0.0.0
        network 172.16.240.254 0.0.0.0
        stub
R14
复制代码
sysname R14
interface Ethernet0/0/0
    ip address 172.16.220.254 255.255.255.0
interface GigabitEthernet0/0/0
    ip address 172.16.10.14 255.255.255.252
    ospf network-type p2p
ospf 200 router-id 14.14.14.14
    silent-interface Ethernet0/0/0
    area 0.0.0.1
        network 172.16.10.14 0.0.0.0
        network 172.16.220.254 0.0.0.0
        stub
R21
复制代码
sysname R21
interface GigabitEthernet0/0/0
    ip address 192.168.10.10 255.255.255.252
    ospf network-type p2p
interface GigabitEthernet0/0/1
    ip address 192.168.10.21 255.255.255.252
interface GigabitEthernet0/0/2
    ip address 192.168.10.25 255.255.255.252
ospf 100 router-id 21.21.21.21
    import-route static route-policy policy-static
    import-route rip 100 route-policy policy-rip
ospf 100 router-id 21.21.21.21    
    area 0.0.0.2
        network 192.168.10.10 0.0.0.0
        nssa
rip 100
    version 2
    default-route originate
    network 192.168.10.0
    filter-policy ip-prefix policy export GigabitEthernet0/0/2
route-policy policy-rip permit node 10
    if-match ip-prefix policy-rip
    if-match ip-prefix policy-static
ip ip-prefix policy index 10 deny 192.168.10.8 30
ip ip-prefix policy index 20 deny 192.168.10.20 30
ip ip-prefix policy index 30 permit 0.0.0.0 0 less-equal 32
ip ip-prefix policy-rip index 10 permit 192.168.140.0 24
ip ip-prefix policy-static index 10 permit 192.168.130.0 24
ip route-static 192.168.130.0 255.255.255.0 192.168.10.22
R5
复制代码
sysname R5
interface GigabitEthernet0/0/0
    ip address 10.1.45.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.59.1 255.255.255.252
interface LoopBack0
    ip address 5.5.5.5 255.255.255.255
bgp 300
    router-id 5.5.5.5
    peer 4.4.4.4 as-number 300
    peer 4.4.4.4 connect-interface LoopBack0
    peer 10.1.59.2 as-number 500
    ipv4-family unicast
        peer 4.4.4.4 enable
        peer 4.4.4.4 next-hop-local
        peer 4.4.4.4 advertise-community
        peer 10.1.59.2 enable
        peer 10.1.59.2 advertise-community
ospf 300 router-id 5.5.5.5
    area 0.0.0.0
        network 5.5.5.5 0.0.0.0
        network 10.1.45.2 0.0.0.0
R19
复制代码
sysname R19
interface Serial0/0/0
    link-protocol ppp
    ppp chap user huawei
interface Serial0/0/0
    ppp chap password cipher 123456
    ip address 192.168.10.13 255.255.255.252
interface Serial0/0/1
    link-protocol hdlc
    ip address 192.168.10.17 255.255.255.252
interface GigabitEthernet0/0/0
    ip address 192.168.10.6 255.255.255.252
ospf 100 router-id 19.19.19.19
    area 0.0.0.0
        authentication-mode md5 1 cipher
        network 192.168.10.6 0.0.0.0
        network 192.168.10.17 0.0.0.0
    area 0.0.0.1
        network 192.168.10.13 0.0.0.0
R22
复制代码
sysname R22
interface GigabitEthernet0/0/0
    ip address 192.168.10.22 255.255.255.252
interface LoopBack0
    ip address 192.168.130.254 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 192.168.10.21
R17
复制代码
sysname R17
interface GigabitEthernet0/0/0
    ip address 10.1.179.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 192.168.10.1 255.255.255.252
interface GigabitEthernet0/0/2
    ip address 192.168.10.5 255.255.255.252
bgp 100
    router-id 17.17.17.17
    peer 10.1.179.1 as-number 500
    ipv4-family unicast
        network 192.168.120.0 route-policy policy-com-1
        network 192.168.130.0 route-policy policy-com-2
        network 192.168.140.0 route-policy policy-com-1
        network 192.168.150.0 route-policy policy-com-1
        peer 10.1.179.1 enable
        peer 10.1.179.1 advertise-community
        peer 10.1.179.1 allow-as-loop
ospf 100 router-id 17.17.17.17
    default-route-advertise always
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 192.168.10.1 0.0.0.0
        network 192.168.10.5 0.0.0.0
route-policy policy-com-1 permit node 10
    apply community 100:100
    apply community 100:200
R20
复制代码
sysname R20
interface Serial0/0/0
    link-protocol hdlc
    ip address 192.168.10.18 255.255.255.252
interface Serial0/0/1
    link-protocol ppp
interface Serial0/0/2
    link-protocol ppp
interface LoopBack0
    ip address 192.168.120.254 255.255.255.0
    ospf network-type broadcast
ospf 100 router-id 20.20.20.20
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 192.168.10.18 0.0.0.0
        network 192.168.120.254 0.0.0.0
R8
复制代码
sysname R8
interface GigabitEthernet0/0/0
    ip address 10.1.78.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.89.1 255.255.255.252
interface LoopBack0
    ip address 8.8.8.8 255.255.255.255
bgp 64513
    router-id 8.8.8.8
    confederation id 400
    confederation peer-as 64512
    peer 7.7.7.7 as-number 64512
    peer 7.7.7.7 ebgp-max-hop 255
    peer 7.7.7.7 connect-interface LoopBack0
    peer 10.1.89.2 as-number 500
    ipv4-family unicast
        peer 7.7.7.7 enable
        peer 7.7.7.7 next-hop-local
        peer 7.7.7.7 advertise-community
        peer 10.1.89.2 enable
        peer 10.1.89.2 advertise-community
ospf 400 router-id 8.8.8.8
    area 0.0.0.0
        network 8.8.8.8 0.0.0.0
        network 10.1.78.2 0.0.0.0
R13
复制代码
sysname R13
interface GigabitEthernet0/0/0
    ip address 172.16.10.10 255.255.255.252
    ospf timer hello 3
interface GigabitEthernet0/0/1
    ip address 172.16.10.21 255.255.255.252
    ospf network-type p2p
ospf 200 router-id 13.13.13.13
    filter-policy ip-prefix policy import
    area 0.0.0.0
        authentication-mode md5 1 cipher 123456
        network 172.16.10.10 0.0.0.0
    area 0.0.0.3
        network 172.16.10.21 0.0.0.0
        stub no-summary
ip ip-prefix policy index 10 deny 172.16.220.0 24
ip ip-prefix policy index 20 deny 172.16.230.0 24
ip ip-prefix policy index 30 deny 0.0.0.0 0
ip ip-prefix policy index 40 permit 0.0.0.0 0 less-equal 32
ip route-static 172.16.200.0 255.255.255.0 172.16.10.9
ip route-static 172.16.210.0 255.255.255.0 172.16.10.9
R7
复制代码
sysname R7
interface GigabitEthernet0/0/0
    ip address 10.1.67.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.78.1 255.255.255.252
interface LoopBack0
    ip address 7.7.7.7 255.255.255.255
bgp 64512
    router-id 7.7.7.7    
    confederation id 400
    confederation peer-as 64513
    peer 6.6.6.6 as-number 64512
    peer 6.6.6.6 connect-interface LoopBack0
    peer 8.8.8.8 as-number 64513
    peer 8.8.8.8 ebgp-max-hop 255
    peer 8.8.8.8 connect-interface LoopBack0
    ipv4-family unicast
        peer 6.6.6.6 enable
        peer 6.6.6.6 advertise-community
        peer 8.8.8.8 enable
        peer 8.8.8.8 advertise-community
ospf 400 router-id 7.7.7.7
    area 0.0.0.0
        network 7.7.7.7 0.0.0.0
        network 10.1.67.2 0.0.0.0
        network 10.1.78.1 0.0.0.0
R9
复制代码
sysname R9
interface GigabitEthernet0/0/0
    ip address 10.1.59.2 255.255.255.252
interface GigabitEthernet0/0/1
    ip address 10.1.89.2 255.255.255.252
interface GigabitEthernet0/0/2
    ip address 10.1.109.1 255.255.255.252
interface GigabitEthernet0/0/3
    ip address 10.1.179.1 255.255.255.252
bgp 500
    router-id 9.9.9.9
    peer 10.1.59.1 as-number 300
    peer 10.1.89.1 as-number 400
    peer 10.1.109.2 as-number 200
    peer 10.1.179.2 as-number 100
    ipv4-family unicast
        peer 10.1.59.1 enable
        peer 10.1.59.1 advertise-community
        peer 10.1.89.1 enable
        peer 10.1.89.1 advertise-community
        peer 10.1.109.2 enable
        peer 10.1.109.2 route-policy policy-com-1 export
        peer 10.1.109.2 advertise-community
        peer 10.1.179.2 enable
        peer 10.1.179.2 route-policy policy-com-2 export
        peer 10.1.179.2 advertise-community
route-policy policy-com-1 permit node 10
if-match community-filter 1
if-match community-filter 2
ip community-filter 1 permit 100:200
ip community-filter 1 permit 200:200
ip community-filter 2 permit 200:100
ip community-filter 2 permit 100:100
相关推荐
宝山哥哥1 小时前
网络信息安全学习笔记1----------网络信息安全概述
网络·笔记·学习·安全·网络安全
Dsocc3 小时前
TCP 动态选路协议全面研究:OSPF、BGP 与 IS-IS 的比较与应用分析
网络·网络协议·tcp/ip
YC运维3 小时前
RIP实验以及核心原理
运维·网络·智能路由器
阿蒙Amon3 小时前
C#随机数生成全面详解:从基础到高级应用
服务器·网络·c#
tan77º5 小时前
【Linux网络编程】Socket - TCP
linux·网络·c++·tcp/ip
是阿建吖!8 小时前
【Linux | 网络】socket编程 - 使用UDP实现服务端向客户端提供简单的服务
linux·网络·udp
WZF-Sang8 小时前
计算机网络基础——1
网络·c++·git·学习·计算机网络·智能路由器
是阿建吖!11 小时前
【Linux | 网络】socket编程 - 使用TCP实现服务端向客户端提供简单的服务
linux·网络·tcp/ip
cui_win12 小时前
【网络】Linux 内核优化实战 - net.ipv4.tcp_dsack
linux·网络·tcp/ip