HCIP中期实验

HCIP中期实验_第1张图片

需求
1、该拓扑为公司网络,其中包括公司总部、公司分部以及公司骨干网,不包含运营商公网部分。
2、设备名称均使用拓扑上名称改名,并且区分大小写。
3、整张拓扑均使用私网地址进行配置。
4、整张网络中,运行OSPF协议或者BGP协议的设备,其Router-id值为设备名数字号,例如R1的Router-id为1.1.1.1、
5、OSPF路由宣告部分选择接口宣告方式,例如192.168.100.1 0.0.0.0;BGP仅宣告用户网段。
6、IBGP部分使用环回建立邻居,EBGP部分使用直连链路建立邻居,所有运行BGP的设备都需要建立邻居。
7、R1、R2、R5、R6、R7、R8、R9、R10需要配置环回接口,环回接口IP为设备名数字号,掩码为32,例如R2的环回接口为2.2.2.2/32
8、所有PC的IP地址均手工配置。
公司分部:
1、PC5和PC6属于不同VLAN
2、SW4是一个二层交换机
3、SW3是一个三层交换机
4、R9是分部出口路由器
5、分部使用OSPF进程200达到分部网络全网可达
6、公司分部出口设备运行BGP协议连接骨干网络,AS号为100
7、因AS-PATH属性原因,总部与分部路由会学习不到,使用命令如(peer 10.10.10.10 allow-as-loop,仅在总部与分部设备上配置即可),将允许AS号重复。
公司总部:
1、交换机为二层交换机
2、PC1和PC2属于一个网段,PC3和PC4是一个网段
3、R3和R4分别是下方PC的网关路由器
4、为保障公司总部到骨干网络的连通性,公司总部使用双路由器双出口的方式接入骨干网
5、为保障公司总部网络内部具备负载,R1、R2、R3、R4设备均作为设备冗余,并使用全连接的方式进行路由选路
6、总部内网使用OSPF进程100达到全网可达,OSPF需要宣告环回。
7、公司总部双出口设备运行BGP协议连接骨干网络,AS号为100
8、因为R1和R2重发布时会出现次优路径,需要修改BGP路由优先级,使用命令(preference 140 255 255,仅在总部设备上配置即可),配置位置在iPv4-family unicast中。
公司骨干网:
1、为保障公司网络连通性,骨干网络考虑设备冗余操作,连接总部使用双路由器,骨干网络部分路由器之间使用双联路方式
2、骨干网设备运行OSPF协议达到骨干网全网可达,进程号为10。
3、骨干网设备运行BGP协议,AS号为200。使用全连接方式建邻。
优化:
1、为达到分流互备效果,公司总部业务部访问分部流量走R1,R2做备份;公司总部工程部访问分部流量走R2,R1做备份,并要求来回路径一致。
2、公司总部双出口流量均流向R5,R6做备份。来回路径一致。
3、OSPF重发布时,更改类型为Type-1
4、所有策略名称为policy-1
5、更改开销时,全部更改为10

R1


[V200R003C00]
#
 sysname R1
#
 board add 0/1 1GEC 
 board add 0/2 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.100.9 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.41 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 192.168.100.17 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 10.10.10.1 255.255.255.252 
#
interface GigabitEthernet2/0/0
 ip address 10.10.10.5 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
bgp 100
 router-id 1.1.1.1
 peer 2.2.2.2 as-number 100 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 10.10.10.2 as-number 200 
 peer 10.10.10.6 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  preference 140 255 255 
  network 192.168.1.0 
  network 192.168.2.0 
  peer 2.2.2.2 enable
  peer 10.10.10.2 enable
  peer 10.10.10.2 route-policy policy-1 export
  peer 10.10.10.2 allow-as-loop
  peer 10.10.10.6 enable
  peer 10.10.10.6 route-policy policy-1 export
  peer 10.10.10.6 allow-as-loop
#
ospf 100 router-id 1.1.1.1 
 import-route bgp type 1
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 192.168.100.9 0.0.0.0 
  network 192.168.100.17 0.0.0.0 
#
route-policy policy-1 permit node 10 
 if-match ip-prefix policy-1 
 apply cost 10 
#
route-policy policy-1 permit node 20 
#
ip ip-prefix policy-1 index 10 permit 192.168.2.0 24
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R2


[V200R003C00]
#
 sysname R2
#
 board add 0/1 1GEC 
 board add 0/2 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.100.13 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.42 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 192.168.100.5 255.255.255.252 
 ospf cost 10
#
interface GigabitEthernet1/0/0
 ip address 10.10.10.13 255.255.255.252 
#
interface GigabitEthernet2/0/0
 ip address 10.10.10.9 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.252 
#
bgp 100
 router-id 2.2.2.2
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 10.10.10.10 as-number 200 
 peer 10.10.10.14 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  preference 140 255 255 
  network 192.168.1.0 
  network 192.168.2.0 
  peer 1.1.1.1 enable
  peer 10.10.10.10 enable
  peer 10.10.10.10 route-policy policy-1 export
  peer 10.10.10.10 allow-as-loop
  peer 10.10.10.14 enable
  peer 10.10.10.14 route-policy policy-1 export
  peer 10.10.10.14 allow-as-loop
#
ospf 100 router-id 2.2.2.2 
 import-route bgp type 1
 area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 192.168.100.5 0.0.0.0 
  network 192.168.100.13 0.0.0.0 
#
route-policy policy-1 permit node 10 
 if-match ip-prefix policy-1 
 apply cost 10 
#
route-policy policy-1 permit node 20 
#
ip ip-prefix policy-1 index 10 permit 192.168.1.0 24
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R3


[V200R003C00]
#
 sysname R3
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.100.10 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.254 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.100.1 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 192.168.100.6 255.255.255.252 
 ospf cost 10
#
interface NULL0
#
ospf 100 router-id 3.3.3.3 
 area 0.0.0.0 
  network 192.168.1.254 0.0.0.0 
  network 192.168.100.1 0.0.0.0 
  network 192.168.100.6 0.0.0.0 
  network 192.168.100.10 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R4


[V200R003C00]
#
 sysname R4
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.100.14 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.2.254 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.100.2 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 192.168.100.18 255.255.255.252 
#
interface NULL0
#
ospf 100 router-id 4.4.4.4 
 area 0.0.0.0 
  network 192.168.2.254 0.0.0.0 
  network 192.168.100.2 0.0.0.0 
  network 192.168.100.14 0.0.0.0 
  network 192.168.100.18 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R5


[V200R003C00]
#
 sysname R5
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.2 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.10 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 10.10.10.21 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 10.10.10.17 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.255 
#
bgp 200
 router-id 5.5.5.5
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 7.7.7.7 as-number 200 
 peer 7.7.7.7 connect-interface LoopBack0
 peer 8.8.8.8 as-number 200 
 peer 8.8.8.8 connect-interface LoopBack0
 peer 10.10.10.1 as-number 100 
 peer 10.10.10.9 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  peer 6.6.6.6 enable
  peer 7.7.7.7 enable
  peer 7.7.7.7 next-hop-local 
  peer 8.8.8.8 enable
  peer 8.8.8.8 next-hop-local 
  peer 10.10.10.1 enable
  peer 10.10.10.9 enable
#
ospf 10 router-id 5.5.5.5 
 area 0.0.0.0 
  network 5.5.5.5 0.0.0.0 
  network 10.10.10.17 0.0.0.0 
  network 10.10.10.21 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R6


[V200R003C00]
#
 sysname R6
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.14 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.6 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 10.10.10.25 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 10.10.10.18 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.255 
#
bgp 200
 router-id 6.6.6.6
 peer 5.5.5.5 as-number 200 
 peer 5.5.5.5 connect-interface LoopBack0
 peer 7.7.7.7 as-number 200 
 peer 7.7.7.7 connect-interface LoopBack0
 peer 8.8.8.8 as-number 200 
 peer 8.8.8.8 connect-interface LoopBack0
 peer 10.10.10.5 as-number 100 
 peer 10.10.10.13 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  peer 5.5.5.5 enable
  peer 7.7.7.7 enable
  peer 7.7.7.7 next-hop-local 
  peer 8.8.8.8 enable
  peer 8.8.8.8 next-hop-local 
  peer 10.10.10.5 enable
  peer 10.10.10.5 route-policy policy-1 export
  peer 10.10.10.13 enable
  peer 10.10.10.13 route-policy policy-1 export
#
ospf 10 router-id 6.6.6.6 
 area 0.0.0.0 
  network 6.6.6.6 0.0.0.0 
  network 10.10.10.18 0.0.0.0 
  network 10.10.10.25 0.0.0.0 
#
route-policy policy-1 permit node 10 
 apply cost 10 
#
route-policy policy-1 permit node 20 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R7


[V200R003C00]
#
 sysname R7
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.22 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.26 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 10.10.10.29 255.255.255.252 
#
interface GigabitEthernet1/0/0
 ip address 10.10.10.33 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 7.7.7.7 255.255.255.255 
#
bgp 200
 router-id 7.7.7.7
 peer 5.5.5.5 as-number 200 
 peer 5.5.5.5 connect-interface LoopBack0
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 8.8.8.8 as-number 200 
 peer 8.8.8.8 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 5.5.5.5 enable
  peer 6.6.6.6 enable
  peer 8.8.8.8 enable
#
ospf 10 router-id 7.7.7.7 
 area 0.0.0.0 
  network 7.7.7.7 0.0.0.0 
  network 10.10.10.22 0.0.0.0 
  network 10.10.10.26 0.0.0.0 
  network 10.10.10.29 0.0.0.0 
  network 10.10.10.33 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R8


[V200R003C00]
#
 sysname R8
#
 board add 0/1 1GEC 
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.30 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.34 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 10.10.10.37 255.255.255.252 
#
interface GigabitEthernet1/0/0
#
interface NULL0
#
interface LoopBack0
 ip address 8.8.8.8 255.255.255.255 
#
bgp 200
 router-id 8.8.8.8
 peer 5.5.5.5 as-number 200 
 peer 5.5.5.5 connect-interface LoopBack0
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 7.7.7.7 as-number 200 
 peer 7.7.7.7 connect-interface LoopBack0
 peer 10.10.10.38 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  peer 5.5.5.5 enable
  peer 5.5.5.5 next-hop-local 
  peer 6.6.6.6 enable
  peer 6.6.6.6 next-hop-local 
  peer 7.7.7.7 enable
  peer 7.7.7.7 next-hop-local 
  peer 10.10.10.38 enable
#
ospf 10 router-id 8.8.8.8 
 area 0.0.0.0 
  network 8.8.8.8 0.0.0.0 
  network 10.10.10.30 0.0.0.0 
  network 10.10.10.34 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R9


[V200R003C00]
#
 sysname R9
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.38 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.200.2 255.255.255.252 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
bgp 100
 router-id 9.9.9.9
 peer 10.10.10.37 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  network 192.168.3.0 
  network 192.168.4.0 
  peer 10.10.10.37 enable
  peer 10.10.10.37 allow-as-loop
#
ospf 200 router-id 9.9.9.9 
 import-route bgp type 1
 area 0.0.0.0 
  network 192.168.200.2 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R10


[V200R003C00]
#
 sysname R10
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.200.1 255.255.255.252 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.1
 dot1q termination vid 10
 ip address 192.168.3.254 255.255.255.0 
 arp broadcast enable
#
interface GigabitEthernet0/0/1.2
 dot1q termination vid 20
 ip address 192.168.4.254 255.255.255.0 
 arp broadcast enable
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ospf 200 router-id 10.10.10.10 
 area 0.0.0.0 
  network 192.168.3.254 0.0.0.0 
  network 192.168.4.254 0.0.0.0 
  network 192.168.200.1 0.0.0.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

SW4


#
sysname SW4
#
vlan batch 10 20
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 10
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return

你可能感兴趣的:(智能路由器,网络,华为,网络协议)