R&S_HCIP综合实验

一、实验拓扑

R&S_HCIP综合实验_第1张图片

二、实验需求

IP地址自行规划

Site1需求:

1、PC1和PC3属于VLAN10,PC2和PC4属于VLAN20

2、SW1与sw2的互连接口启用eth-trunk,使用lacp协议,最大带宽为2G。

3、SW1、sw2、sw3、sw4运行MSTP,SW1为vlan10的root, SW2为vlan20的root

4、pc1到pc4的网关需要能提供冗余,需要使用bfd动态检查上连链接状态,实现自动切换。

AS6500需求:

1、AS65000底层IGP协议为isis,区域为level2,需要保证各路由器的loopback0接口互通。

2、R1与R4使用loobpack0建立IGBP邻居关系.

AS65001需求:

1、SW5为二层交换机,PC5与PC6需要不同vlan,需要保证两台PC能互访(不能使用vlanif接口)

2、R4与R5之间的串行链路需要启用ppp chap认证,R4为认证端。

MPLS_需求:

1、总的需求为Site1的pc能访问site2的PC,需要使用mpls_来实现

2、R1与SW1/SW2之间运行OSPF协议

3、R4与R5之间运行BGP协议,R4属于AS65000,R5属于AS65001,可选用ISIS实现。

4、R1与R4直接建立v4邻居关系

5、PC5能访问site1里面的所有PC, 但PC6不能访问。

三、实验思路

1. 规划IP地址

2. 先交换后路由,再完成应用部署

3. 按区域部署先做总部再分部

4. 全网可达再实现策略【ACL】

 四、实验配置

1、ISP(AS65000需求)

        AS65000底层IGP协议为isis,区域为level2,需要保证各路由器的loopback0接口互通。

R1:

isis 10
 is-level level-2
 network-entity 49.0001.0000.0000.0001.00

interface GigabitEthernet2/0/0
 ip address 12.0.0.1 255.255.255.0 
 isis enable 10

interface GigabitEthernet2/0/1
 ip address 13.0.0.1 255.255.255.0 
 isis enable 10

interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
 isis enable 10

bgp 65000
 peer 4.4.4.4 as-number 65000 
 peer 4.4.4.4 connect-interface LoopBack0

 peer 4.4.4.4 next-hop-local

R2:

isis 10
 is-level level-2
 network-entity 49.0001.0000.0000.0002.00

interface GigabitEthernet0/0/0
 ip address 12.0.0.2 255.255.255.0 
 isis enable 10

interface GigabitEthernet0/0/1
 ip address 24.0.0.2 255.255.255.0 
 isis enable 10

interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
 isis enable 10

R3:

isis 10
 is-level level-2
 network-entity 49.0001.0000.0000.0003.00

interface GigabitEthernet0/0/0
 ip address 13.0.0.3 255.255.255.0 
 isis enable 10

interface GigabitEthernet0/0/1
 ip address 34.0.0.3 255.255.255.0 
 isis enable 10

interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
 isis enable 10

R4:

isis 10
 is-level level-2
 network-entity 49.0001.0000.0000.0004.00

interface GigabitEthernet0/0/0
 ip address 34.0.0.4 255.255.255.0 
 isis enable 10

interface GigabitEthernet0/0/1
 ip address 24.0.0.4 255.255.255.0 
 isis enable 10

interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
 isis enable 10

bgp 65000
 peer 1.1.1.1 as-number 65000 
 peer 1.1.1.1 connect-interface LoopBack0

 peer 1.1.1.1 next-hop-local 

验证:isis 10 邻居建立是否成功

R&S_HCIP综合实验_第2张图片

 R&S_HCIP综合实验_第3张图片

验证;BGP邻居是否建立成功

R&S_HCIP综合实验_第4张图片

 

2、Site1:

1、MSTP、链路聚合、DHCP

SW1:

vlan batch 10 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/6
 eth-trunk 1
interface GigabitEthernet0/0/7
 eth-trunk 1
interface GigabitEthernet0/0/8
 eth-trunk 1

stp instance 10 root primary
stp instance 20 root secondary

stp region-configuration
 region-name 1
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
 max active-linknumber 2

bfd

q

bfd 1 bind peer-ip 192.168.10.253 source-ip 192.168.10.254 auto
 commit

interface Vlanif10
 ip address 192.168.10.254 255.255.255.0
 vrrp vrid 1 virtual-ip 192.168.10.250
 vrrp vrid 1 priority 200
 vrrp vrid 1 track bfd-session session-name 1
 dhcp select interface
 dhcp server excluded-ip-address 192.168.10.250 192.168.10.253

interface Vlanif20
 ip address 192.168.20.254 255.255.255.0
 vrrp vrid 2 virtual-ip 192.168.20.250
 dhcp select interface
 dhcp server excluded-ip-address 192.168.20.250 192.168.20.253

SW2:

vlan batch 10 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/6
 eth-trunk 1
#
interface GigabitEthernet0/0/7
 eth-trunk 1
#
interface GigabitEthernet0/0/8
 eth-trunk 1

stp instance 20 root primary
stp instance 10 root secondary

stp region-configuration
 region-name 1
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
 max active-linknumber 2
 

bfd

q

bfd 1 bind peer-ip 192.168.10.254 source-ip 192.168.10.253 auto
 commit

interface Vlanif10
 ip address 192.168.10.253 255.255.255.0
 vrrp vrid 1 virtual-ip 192.168.10.250
 vrrp vrid 1 track bfd-session session-name 1
 dhcp select interface
 dhcp server excluded-ip-address 192.168.10.250 192.168.10.252
 dhcp server excluded-ip-address 192.168.10.254

interface Vlanif20
 ip address 192.168.20.253 255.255.255.0
 vrrp vrid 2 virtual-ip 192.168.20.250
 vrrp vrid 2 priority 200
 dhcp select interface
 dhcp server excluded-ip-address 192.168.20.250 192.168.20.252
 dhcp server excluded-ip-address 192.168.20.254

SW3:

vlan batch 10 20

stp region-configuration
 region-name 1
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Ethernet0/0/1
 port link-type access
 port default vlan 10
interface Ethernet0/0/2
 port link-type access
 port default vlan 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20
 stp instance 10 cost 50000        //阻塞stp instance 10的G0/0/2

SW4:

vlan batch 10 20

stp region-configuration
 region-name 1
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Ethernet0/0/1
 port link-type access
 port default vlan 10
interface Ethernet0/0/2
 port link-type access
 port default vlan 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20
 stp instance 20 cost 50000        //阻塞stp instance 20的G0/0/2

验证:

MSTP:dis stp brief(Site1的交换机。SW3是G0/0/2堵塞,SW4是G0/0/1堵塞)

DHCP:ipconfig(四台PC都获取地址)

VRRP:

R&S_HCIP综合实验_第5张图片

 R&S_HCIP综合实验_第6张图片

 VRRP和BFD联动:(注意图片BFD-session state: UP)

R&S_HCIP综合实验_第7张图片

R&S_HCIP综合实验_第8张图片

3、ISP和Site1(MPLS_VPN)

R1:

ip -instance 1
 ipv4-family
  route-distinguisher 1:1
  -target 1:1 export-extcommunity
  -target 1:1 import-extcommunity

mpls lsr-id 1.1.1.1
mpls
mpls ldp

interface GigabitEthernet0/0/0
 ip binding -instance 1
 ip address 192.168.11.1 255.255.255.0 
 mpls
interface GigabitEthernet0/0/1
 ip binding -instance 1
 ip address 192.168.12.1 255.255.255.0 
 mpls
interface GigabitEthernet2/0/0
 mpls
 mpls ldp
interface GigabitEthernet2/0/1
 mpls
 mpls ldp

bgp 65000

 ipv4-family v4
  policy -target
  peer 4.4.4.4 enable

 ipv4-family -instance 1 
  import-route ospf 10

ospf 10 router-id 1.1.1.1 -instance 1
 import-route bgp
 area 0.0.0.0 
  network 192.168.11.0 0.0.0.255 
  network 192.168.12.0 0.0.0.255 

R2:

mpls lsr-id 2.2.2.2
mpls
mpls ldp

interface GigabitEthernet0/0/0
 mpls
 mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

R3:

mpls lsr-id 3.3.3.3
mpls
mpls ldp

interface GigabitEthernet0/0/0
 mpls
 mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

R4:

mpls lsr-id 4.4.4.4
mpls
mpls ldp

interface GigabitEthernet0/0/0
 mpls
 mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

interface Serial2/0/0
 mpls

SW1:

vlan batch 11

interface GigabitEthernet0/0/23
 port link-type access
 port default vlan 11

interface Vlanif11
 ip address 192.168.11.2 255.255.255.0

ospf 10 router-id 11.1.1.1
 area 0.0.0.0
  network 0.0.0.0 255.255.255.255

SW2:

vlan batch 12

interface GigabitEthernet0/0/23
 port link-type access
 port default vlan 12

interface Vlanif12
 ip address 192.168.12.2 255.255.255.0

ospf 10 router-id 12.1.1.1
 area 0.0.0.0
  network 0.0.0.0 255.255.255.255

验证:R1、SW1、SW2、建立ospf邻居

R&S_HCIP综合实验_第9张图片

MPLS :

R&S_HCIP综合实验_第10张图片

 

4、Site2

R5:

dhcp enable

interface GigabitEthernet0/0/0.5
 dot1q termination vid 5
 ip address 192.168.5.254 255.255.255.0 
 arp broadcast enable
 dhcp select interface

interface GigabitEthernet0/0/0.6
 dot1q termination vid 6
 ip address 192.168.6.254 255.255.255.0 
 arp broadcast enable
 dhcp select interface

acl number 3000  
 rule 5 deny ip source 192.168.6.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 
 rule 10 deny ip source 192.168.6.0 0.0.0.255 destination 192.168.10.0 0.0.0.255

interface GigabitEthernet0/0/0
 traffic-filter inbound acl 3000

SW5:

vlan batch 5  6

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 5 to 6
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 5
 port-isolate enable group 1
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 6
 port-isolate enable group 1

验证:DHCP-----ipconfigPC5、PC6获取地址

PC6访问不了Site1PC

R&S_HCIP综合实验_第11张图片

 

5、ISP和Site2

R4:

ip -instance 1
 ipv4-family
  route-distinguisher 1:1
  -target 1:1 export-extcommunity
  -target 1:1 import-extcommunity

interface Serial2/0/0
 link-protocol ppp
 ppp authentication-mode chap 
 ip binding -instance 1
 ip address 10.1.1.4 255.255.255.0 
 

bgp 65000

 ipv4-family v4
  policy -target
  peer 1.1.1.1 enable
 ipv4-family -instance 1 
  peer 10.1.1.5 as-number 65001 

R5:

bgp 65001
 peer 10.1.1.4 as-number 65000 
  network 192.168.5.0 
  network 192.168.6.0

 

interface Serial2/0/0
 ppp chap user 1
 ppp chap password cipher %$%$t"e+L5{(^7L_,v0.46OE,(s,%$%$
 ip address 10.1.1.5 255.255.255.0 

验证:R4和R5建立BGP邻居

R&S_HCIP综合实验_第12张图片

 R4S20/0/0和R5S2/0/0认证是否成功

R&S_HCIP综合实验_第13张图片

6、最终验证

R&S_HCIP综合实验_第14张图片

 R&S_HCIP综合实验_第15张图片

 

你可能感兴趣的:(网络)