z
红色线框内为公司A在不同地区的两个分部
黄色线框内为公司B在不同地区的两个分部
Server1、PC3、PC4为公司A的服务器,PC
Server2、PC1、PC2为公司B的服务器,PC
AR1、AR7、AR10为公司A的路由器(VPN1) ,AR2、AR6为公司B的路由器(VPN2),LSW1为公司B的三层交换机
AR3、AR4、AR5为运营商的网络
公司A和B都需要通过MPLS VPN隧道使得内网PC能够访问内网服务器
1:如图所示,
①运营商内部使用OSPF 进程100保证IGP互通,使用BGP和MPLS,LDP等协议帮助客户传送私网路由,AS号为100
② AR1,AR2,AR6,AR7都是内网网关路由器,请在内网中配置私网IP,公网中配置公网IP(图中标识了IP的请按照图中配置,其他的自行配置)
③ 公司A和B私网路由协议如图所示,数字代表进程,R3,R5接口使用的路由协议与所连接的客户网络中路由协议一致
2: ①PC1与PC2之间不得通信,请使用端口隔离技术
②为保证公司B的网络安全,请在LSW1上将PC1,PC2的MAC地址绑定成Sticky MAC,并设置保护动作为shutdown
3:如图所示请使用DHCP和DHCP Relay技术使AR7给PC3,PC4动态分配IP
4:在以上配置完成后,请保证公司A和B的PC都能够使用私网IP经过MPLS VPN隧道访问公司内部服务器
R3:
interface GigabitEthernet0/0/2
ip address 34.0.0.3 255.255.255.0interface LoopBack0
ip address 3.3.3.3 255.255.255.255ospf 100 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 34.0.0.3 0.0.0.0bgp 100
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack0
peer 5.5.5.5 as-number 100
peer 5.5.5.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 5.5.5.5 enable
peer 5.5.5.5 next-hop-local
R4:
interface GigabitEthernet0/0/0
ip address 34.0.0.4 255.255.255.0interface GigabitEthernet0/0/1
ip address 45.0.0.4 255.255.255.0interface LoopBack0
ip address 4.4.4.4 255.255.255.255ospf 100 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 34.0.0.4 0.0.0.0
network 45.0.0.4 0.0.0.0bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
peer 5.5.5.5 as-number 100
peer 5.5.5.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 5.5.5.5 enable
peer 5.5.5.5 next-hop-local
R5:
interface GigabitEthernet0/0/0
ip address 45.0.0.5 255.255.255.0interface LoopBack0
ip address 5.5.5.5 255.255.255.255ospf 100 router-id 5.5.5.5
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 45.0.0.5 0.0.0.0bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
ospf 100 测试是否邻居建立成功
bgp 100 测试邻居是否建立成功
Server 1 IP地址 :192.168.7.1 255 255 255 0
R1:
interface GigabitEthernet0/0/0
ip address 192.168.7.254 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.13.1 255.255.255.0ospf 10 router-id 1.1.1.1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
Sw1:
vlan batch 10 20
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
R2:
dhcp enable
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
ip address 192.168.1.254 255.255.255.0
arp broadcast enable
dhcp select interface
#
interface GigabitEthernet0/0/1.2
dot1q termination vid 20
ip address 192.168.2.254 255.255.255.0
arp broadcast enable
dhcp select interfaceospf 20 router-id 2.2.2.2
area 0.0.0.0
network 0.0.0.0 255.255.255.255
PC1:分配IP地址
PC2:分配IP地址
dhcp中继:R7 DHCP服务器 R8 DHCP中继
R7:
dhcp enable
#
ip pool 3
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
#
ip pool 4
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0isis 20
is-level level-2
network-entity 49.0001.0000.0000.0007.00interface GigabitEthernet0/0/0
ip address 192.168.57.7 255.255.255.0
isis enable 20
#
interface GigabitEthernet0/0/1
ip address 78.0.0.7 255.255.255.0
isis enable 20
dhcp select global
R8:
dhcp server group HW
dhcp-server 78.0.0.7 0isis 20
is-level level-2
network-entity 49.0001.0000.0000.0008.00interface GigabitEthernet0/0/0
ip address 78.0.0.8 255.255.255.0
isis enable 20
#
interface GigabitEthernet0/0/1
ip address 192.168.3.254 255.255.255.0
isis enable 20
dhcp select relay
dhcp relay server-select HW
#
interface GigabitEthernet0/0/2
ip address 192.168.4.254 255.255.255.0
isis enable 20
dhcp select relay
dhcp relay server-select HW
PC3:分配IP地址
PC4:分配IP地址
Server 2:IP地址 192.168.6.1/24
R6:
isis 10
is-level level-2
network-entity 49.0001.0000.0000.0006.00interface GigabitEthernet0/0/0
ip address 192.168.56.6 255.255.255.0
isis enable 10
#
interface GigabitEthernet0/0/1
ip address 192.168.6.254 255.255.255.0
isis enable 10
R3:mpls lsr-id 3.3.3.3
mpls
#
mpls ldpinterface GigabitEthernet0/0/2
ip address 34.0.0.3 255.255.255.0
mpls
mpls ldp
R4:
mpls lsr-id 4.4.4.4
mpls
#
mpls ldpinterface GigabitEthernet0/0/0
ip address 34.0.0.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
ip address 45.0.0.4 255.255.255.0
mpls
mpls ldp
R5:
mpls lsr-id 5.5.5.5
mpls
#
mpls ldpinterface GigabitEthernet0/0/0
ip address 34.0.0.4 255.255.255.0
mpls
mpls ldp
#interface GigabitEthernet0/0/0
ip address 45.0.0.5 255.255.255.0
mpls
mpls ldp
测试配置是否成功
R3:
ip -instance 1
ipv4-family
route-distinguisher 1:1
-target 1:1 export-extcommunity
-target 1:1 import-extcommunity
#
ip -instance 2
ipv4-family
route-distinguisher 2:2
-target 2:2 export-extcommunity-target 2:2 import-extcommunity
interface GigabitEthernet0/0/0
ip binding -instance 1
ip address 192.168.13.3 255.255.255.0
mpls
#
interface GigabitEthernet0/0/1
ip binding -instance 2
ip address 192.168.23.3 255.255.255.0
mplsospf 10 router-id 3.3.3.3 -instance 1
import-route bgp
area 0.0.0.0
network 192.168.13.0 0.0.0.255
#
ospf 20 router-id 3.3.3.3 -instance 2
import-route bgp
area 0.0.0.0
network 192.168.23.0 0.0.0.255bgp 100
ipv4-family v4
policy -target
peer 5.5.5.5 enable
#
ipv4-family -instance 1
import-route ospf 10
#
ipv4-family -instance 2
import-route ospf 20
R5:
ip -instance 1
ipv4-family
route-distinguisher 1:1
-target 1:1 export-extcommunity
-target 1:1 import-extcommunity
#
ip -instance 2
ipv4-family
route-distinguisher 2:2
-target 2:2 export-extcommunity
-target 2:2 import-extcommunityinterface GigabitEthernet0/0/1
ip binding -instance 2
ip address 192.168.56.5 255.255.255.0
isis enable 10
mpls
#
interface GigabitEthernet0/0/2
ip binding -instance 1
ip address 192.168.57.5 255.255.255.0
isis enable 20
mplsisis 10 -instance 2
is-level level-2
network-entity 49.0001.0000.0000.0005.00
import-route bgp
#
isis 20 -instance 1
is-level level-2
network-entity 49.0001.0000.0000.0005.00
import-route bgpbgp 100
ipv4-family v4
policy -target
peer 3.3.3.3 enable
#
ipv4-family -instance 1
import-route isis 20
#
ipv4-family -instance 2
import-route isis 10
测试是否成功
8、端口隔离(PC1、PC2)
LSW1:
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
port-security enable
port-security protect-action shutdown
port-security mac-address stickyinterface GigabitEthernet0/0/2
port link-type access
port default vlan 20
port-security enable
port-security protect-action shutdown
port-security mac-address sticky
实验拓扑链接:(14条消息) 实验拓扑:HCIP实验测试题-A.topo-网络基础文档类资源-CSDN文库