网络部署项目(振兴杯)

振兴杯网络部署项目详解

 

实验拓扑

实验技巧:

  • 配置IP地址池

  • 配置L2S-A的二层交换机的划分vlan、hybird链路、端口速率。

  • 配置L3S-A和L3S-B两台三层交换机的聚合链路、hybird链路、配置VLAN的IP地址池、MSTP+VRRP、虚拟路由转发。

  • 配置两台三层交换机OSPF路由协议和选路、配置路由器RIP协议。

配置IP地址池

RT-A

int loopback 1 
    ip add 10.9.255.1 255.255.255.255
int G 0/3
    ip add 10.9.254.245 255.255.255.252
int G 0/4 
    ip add 10.9.254.250 255.255.255.252 
int G 0/5   
    ip add 10.9.254.2 255.255.255.248

RT-B

int  loopback 1 
    ip add 10.9.255.2 255.255.255.255
int G 0/3
    ip add 10.9.254.241 255.255.255.252
int G 0/4
    ip add 10.9.254.249 255.255.255.252 
int G 0/5 
    ip add 10.9.254.10 255.255.255.248

L3S-A

int loopback 1 
    ip add 10.9.255.3 255.255.255.255
    ipv6 add 2001:10:9:255::3/128
vlan 10;20;30;40;50;200;1000;4096
int vlan 10
    ipv6 add 2001:10:9:10::254/64
int vlan 200
    ip add 10.9.200.254 255.255.255.0 
int vlan 1000 
    ip add 10.9.254.1 255.255.255.248
int vlan 4096 
    ip add 10.9.254.253 255.255.255.252 
    ipv6 add 2001:10:9:254::253/64

L3S-B

int loopback 1 
    ip add 10.9.255.4 255.255.255.255
    ipv6 add 2001:10:9:255::4/128
vlan 10;20;30;40;50;200;1001;4096
int vlan 20
    ipv6 add 2001:10:9:20::254/64
int vlan 200
    ip add 10.9.200.253 255.255.255.0 
int vlan 1001 
    ip add 10.9.254.9 255.255.255.248
int vlan 4096 
    ip add 10.9.254.254 255.255.255.252 
    ipv6 add 2001:10:9:254::254/64

FW-A

int loopback1 
    ip add 10.9.255.5 255.255.255.255
​

FW-B

int loopback1 
    ip add 10.9.255.6 255.255.255.255
int e0/1
    ip add 10.9.254.246 255.255.255.252
int e0/2 
    ip add 10.9.254.242 255.255.255.252 
int e0/3
    ip add 211.9.8.5 255.255.255.248

L2S-A

vlan 10
    name XS
int E1/0/6
    sw mode access
    sw access vlan 10
vlan 20
    name CP
int E1/0/7
    sw mode access
    sw access vlan 20
vlan 30 
    name FW
int E1/0/8
    sw mode access
    sw access vlan 30
vlan 40
    name CW
int E1/0/9
    sw mode access
    sw access vlan 40
vlan 50
    name XXJS
int range E1/0/10-12
    sw mode access
    sw access vlan 50
vlan 200 
    name GL 
int vlan 200
    ip add 10.9.200.252 255.255.255.0

配置二层交换机

(一)、 合理控制局域内广播流量

  • 根据环境合理修剪交换机之间互联链路上允许透传的 VLAN。

  • 集团接入交换机与核心交换机之间的互连接口发送交换机管理 VLAN 的报 文时不携带标签,发送其它 VLAN 的报文时携带标签,要求禁止采用 trunk 链路类型。

  • 配置接入层交换机上物理端口收包 BUM 报文速率不能超过 2000packets/s,否则关闭端口,10 分钟后恢复端口。

# L2S-A
int E1/23
    sw mode hybird 
    sw hybird allowed vlan 10;20;30;40;50 tag
    sw hybird allowed vlan 200 untag
    sw hybird native vlan 200
​
int E1/24
    sw mode hybird 
    sw hybird allowed vlan 10;20;30;40;50 tag
    sw hybird allowed vlan 200 untag
    sw hybird native vlan 200
​
int E1/1
    flow control 
    rate-violation all 2000
    rate-violation control shutdown recovery 600
    switchport access vlan 10
​
int E1/2
    flow control 
    rate-violation all 2000
    rate-violation control shutdown recovery 600
    switchport access vlan 20

配置虚拟路由

(二)、 虚拟路由转发

请根据规划环境表使用相关技术将 L3S-B 模拟为 Internet 交换机, 实现内网业务路由表与 Internet 路由表隔离,Internet 路由表位于 VPN 实例名 称 Internet 内。

# L3S-A
ip vrf internet 
int vlan 4000
    ip vrf forwarding internet 
    ip add 211.9.8.6 255.255.255.248
​
int loopback 100
    ip vrf forwarding internet 
    ip add 202.100.100.100 255.255.255.255

配置三层交换机

(三)、 链路与协议的冗余备份

在 L3S-A 与 L3S-B 上运行并配置某种冗余容错协议,以实现多 VLAN 链路 以及协议上的冗余与容错,确保绝大部分业务在客户端上无感知运行。具体要求 如下:

  • 配置 keepalived 地址使用该 VLAN 中的第三个可用 IP、L3S-A 上使用业务 VLAN 中的第一个可用 IP、L3S-B 上使用业务 VLAN 中的第二个可 用 IP。配置 L3S-A 作为销售、产品、信息技术部门内主机的 ARP 协议处理,配 置 L3S-B 作为法务、财务、交换机管理等业务内主机的 ARP 协议处理,且互为 备份。

  • 配置协议上的可用功能,监视上行链路状态,当上行链路故障 时,L3S-A 与 L3S-B 在状态上可切换;而当链路故障恢复后,原主用状态设备 可恢复接管。

配置聚合链路

# L3S-A
port-group 1 
internet  range Eth1/22-23
port-group 1 mode passive
​
internet port-channel 1 
switchport mode trunk
​
# L3S-B
port-group 1 
internet  range Eth1/22-23
port-group 1 mode active 
​
internet port-channel 1 
switchport mode trunk

配置三层交换机

#L3S-A
Interface Ethernet1/0/21
 switchport mode hybrid
 switchport hybrid allowed vlan 10;20;30;40;50 tag
 switchport hybrid allowed vlan 200 untag
 switchport hybrid native vlan 200
!
Interface Ethernet1/0/22
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200 
 port-group 1 mode passive
!
Interface Ethernet1/0/23
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200 
 port-group 1 mode passive
!
Interface Ethernet1/0/24
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200;1000 
 switchport trunk native vlan 1000
 
 #L3S-B
 Interface Ethernet1/0/21
 switchport mode hybrid
 switchport hybrid allowed vlan 10;20;30;40;50 tag
 switchport hybrid allowed vlan 200 untag
 switchport hybrid native vlan 200
!
Interface Ethernet1/0/22
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200 
 port-group 1 mode active
!
Interface Ethernet1/0/23
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200 
 port-group 1 mode active
!
Interface Ethernet1/0/24
 switchport mode trunk
 switchport trunk allowed vlan 10;20;30;40;50;200;1001;4094 
 switchport trunk native vlan 1001

配置多生成树协议

#L2S-A
 spanning-tree enable
 spanning-tree mode mst
 spanning-tree mst configuration 
 instance 0 vlan 1-9;11-19;21-29;31-39;41-49;51-199;201-4096
 instance 10 vlan 10;20;50
 instance 20 vlan 30;40;200
​
#L3S-A
 spanning-tree enable
 spanning-tree mode mst
 spanning-tree mst configuration 
 instance 0 vlan 1-9;11-19;21-29;31-39;41-49;51-199;201-4096
 instance 10 vlan 10;20;50
 instance 20 vlan 30;40;200
​
spanning-tree
 spanning-tree mst 10 priority 4096
 spanning-tree mst 20 priority 8192
​
​
#L3S-B
 spanning-tree enable
 spanning-tree mode mst
 spanning-tree mst configuration 
 instance 0 vlan 1-9;11-19;21-29;31-39;41-49;51-199;201-4096
 instance 10 vlan 10;20;50
 instance 20 vlan 30;40;200
​
spanning-tree
 spanning-tree mst 10 priority 8192
 spanning-tree mst 20 priority 4096

配置VRRP

L3S-A

#配置vlan的IP
interface Vlan10
 ipv6 address 1:10:9:10::254/64
 ip address 10.9.10.1 255.255.255.0
 ipv6 dhcp server 1
!
interface Vlan20
 ip address 10.9.20.1 255.255.255.0
!
interface Vlan30
 ip address 10.9.30.1 255.255.255.0
!
interface Vlan40
 ip address 10.9.40.1 255.255.255.0
!
interface Vlan50
 ip address 10.9.50.1 255.255.255.0
!
interface Vlan200
 ip address 10.9.200.254 255.255.255.0
!         
interface Vlan1000
 ip address 10.9.254.1 255.255.255.248
​
#配置VIP地址
router vrrp 10
 virtual-ip 10.9.10.3
 interface Vlan10
 #advertisement-interval 3   协议通告间隔时间
 circuit-failover Vlan1000 150
 priority 200
!
router vrrp 20
 virtual-ip 10.9.20.3
 interface Vlan20
 circuit-failover Vlan1000 150
 priority 200
!
router vrrp 30
 virtual-ip 10.9.30.3
 interface Vlan30
 enable
!
router vrrp 40
 virtual-ip 10.9.40.3
 interface Vlan40
 enable
!
router vrrp 50
 virtual-ip 10.9.50.3
 interface Vlan50
 circuit-failover Vlan1000 150
 priority 200
 enable
!
router vrrp 200
 virtual-ip 10.9.200.3
 interfaceVlan200

L3S-B

#配置vlan的IP
​
interface Vlan10
 ip address 10.9.10.2 255.255.255.0
!
interface Vlan20
 no ipv6 nd suppress-ra
 ipv6 nd ra-lifetime 7200
 ip address 10.9.20.2 255.255.255.0
!
interface Vlan30
 ip address 10.9.30.2 255.255.255.0
!
interface Vlan40
 ip address 10.9.40.2 255.255.255.0
!
interface Vlan50
 ip address 10.9.50.2 255.255.255.0
 
 
#配置VIP地址
router vrrp 10
 virtual-ip 10.9.10.3
 interface Vlan10
 enable
!
router vrrp 20
 virtual-ip 10.9.20.3
 interface Vlan20
 enable
!
router vrrp 30
 virtual-ip 10.9.30.3
 interface Vlan30
 circuit-failover Vlan1001 150
 priority 200
!
router vrrp 40
 virtual-ip 10.9.40.3
 interface Vlan40
 circuit-failover Vlan1001 150
 priority 200
!
router vrrp 50
 virtual-ip 10.9.50.3
 interface Vlan50
 enable
!
router vrrp 200
 virtual-ip 10.9.200.3
 interface Vlan200
 circuit-failover Vlan1001 150
 priority 200
 enable

路由部分设计与优化

(一)、 路由协议设计

  • 要求在 L3S-A、L3S-B、RT-A、RT-B 互联设备与三层链路之间允许一 种基于链路状态算法的路由协议,自行考虑路由协议的规划与设计。

  • 要求在 FW-B、RT-A、RT-B 互联设备与三层链路之间运行某种基于距 离矢量算法的路由协议,自行考虑路由协议的规划与设计。

(二)、 路由协议优化

  • 配置与实现正常情况下,销售、产品、信息技术部门内主机访 问 Internet 的数据流量行走 L2S-A——L3S-A——RT-A——FW-B 的互联链路;法务、财务部门内主机访问 Internet 的数据流量行走 L2S-A——L3S-B— —RT-B——FW-B 的互联链路。

  • 配置与实现出现网络互联故障的情况下,比如 L3S-A、L3S-B、 RT-A、RT-B 之间任何一条三层链路或者某台设备出现故障的情况下(可通过认 为拔掉网线或者关掉设备模拟故障环境),内网主机仍然可以访问 Internet。

  • 配置与实现内网 VLAN 内不能出现路由协议相关的数据报文。 (可通过采用 Wireshark 抓包软件验证与测试)。

配置L3S-A

router ospf 1 \
 ospf router-id 1.1.1.1
 passive-interface Vlan10 #VLAN 内不能出现路由协议相关的数据报文。
 passive-interface Vlan20
 passive-interface Vlan30
 passive-interface Vlan40
 passive-interface Vlan50
 passive-interface Vlan200
 network 10.9.254.1 0.0.0.0 area 0
 network 10.9.254.0 0.0.0.3 area 0
 redistribute connected route-map 1
 
 ip prefix-list 1 seq 5 permit 10.9.10.0/24 ge 24 le 24
 ip prefix-list 1 seq 10 permit 10.9.20.0/24 ge 24 le 24
 ip prefix-list 1 seq 15 permit 10.9.200.0/24 ge 24 le 24
 
 route-map 1 permit 1
 match ip address prefix-list 1
 set metric 1
​

配置L3S-B

router ospf 1
 ospf router-id 2.2.2.2
 passive-interface Vlan10 # VLAN 内不能出现路由协议相关的数据报文。
 passive-interface Vlan20
 passive-interface Vlan30
 passive-interface Vlan40
 passive-interface Vlan50
 passive-interface Vlan200
 network 10.9.254.0 0.0.0.3 area 0
 network 10.9.254.9 0.0.0.0 area 0
 redistribute connected route-map 1
 
 ip prefix-list 1 seq 5 permit 10.9.30.0/24 ge 24 le 24
 ip prefix-list 1 seq 10 permit 10.9.40.0/24 ge 24 le 24
 ip prefix-list 1 seq 15 permit 10.9.200.0/24 ge 24 le 24
​
 route-map 1 permit 1
 match ip address prefix-list 1
 set metric 1

配置RT-A路由器

router rip
 version 2
 network 10.9.254.0 255.255.255.252
 no validate-update-source
!
router ospf 1
 network 10.9.254.0 255.255.255.248 area 0
 
 #预留部分
 interface GigaEthernet0/3
 ip address 10.9.254.245 255.255.255.252
 no ip directed-broadcast
 ip rip authentication md5     #(配置md5验证)
 ip rip md5-key 1 md5 123456
!
interface GigaEthernet0/4
 ip address 10.9.254.250 255.255.255.252
 no ip directed-broadcast
 ip rip authentication md5     
 ip rip md5-key 1 md5 123456

配置RT-A路由器

router rip
 version 2
 network 10.9.254.0 255.255.255.252
!
router ospf 1
 network 10.9.254.0 255.255.255.248 area 0
 
 #预留部分
 interface GigaEthernet0/3
 ip address 10.9.254.245 255.255.255.252
 no ip directed-broadcast
 ip rip authentication md5     #(配置md5验证)
 ip rip md5-key 1 md5 123456
!
interface GigaEthernet0/4
 ip address 10.9.254.250 255.255.255.252
 no ip directed-broadcast
 ip rip authentication md5
 ip rip md5-key 1 md5 123456

配置IPV6

SW-1(config)# service dhcpv6
SW-1(config)#ipv6 dhcp pool xs
SW-1(dhcpv6-xs-config)#network-address 2001:30:10::1 64 
SW-1(dhcpv6-xs-config)#exit
SW-1(config)#interface Vlan10
SW-1(config-if-vlan10)# ipv6 address 2001:30:10::254/64
SW-1(config-if-vlan10)# no ipv6 nd suppress-ra
SW-1(config-if-vlan10)# ipv6 nd managed-config-flag
SW-1(config-if-vlan10)# ipv6 nd other-config-flag
SW-1(config-if-vlan10)# ipv6 dhcp server xs
SW-1(config-if-vlan10)#exit
​
SW-2(config)#ipv6 enable 
SW-2(config)#interface Vlan20
SW-2(config-if-vlan20)# ipv6 address 2001:30:20::254/64
SW-2(config-if-vlan20)# no ipv6 nd suppress-ra
SW-2(config-if-vlan20)# ipv6 nd ra-lifetime 7200
SW-2(config-if-vlan20)#exit
SW-2(config)#
​
SW-1(config)#int tunnel 1 
SW-1(config-if-tunnel1)#tunnel source 10.30.254.253
SW-1(config-if-tunnel1)#tunnel destination 10.30.254.254
SW-1(config-if-tunnel1)#ipv6 address 2000::1/64
SW-1(config-if-tunnel1)#tunnel mode ipv6ip 
SW-1(config-if-tunnel1)#exit
SW-1(config)#ipv6 route 2001:30:20::0/64 tunnel 1
​
SW-2(config)#int tunnel 1
SW-2(config-if-tunnel1)#tunnel source 10.30.254.254
SW-2(config-if-tunnel1)#tunnel destination 10.30.254.253
SW-2(config-if-tunnel1)#ipv6 address 2000::2/64 
SW-2(config-if-tunnel1)#tunnel mode ipv6ip 
SW-2(config-if-tunnel1)#exit
SW-2(config)#ipv6 route 2001:30:10::0/64 tunnel 1

 

补充:

L3S-A配置DHCPV6有状态

  • 开启dhcpv6

  • 设置地址池的名称

  • 设置ipv6网段

  • 进入销售(vlan10)配置ipv6地址

  • no ipv6 nd suppress-sa

  • ipv6 nd managed-config-flag

  • ipv6 nd other-config-flag

  • ipv6 dhcp servrer xs

L3S-B配置IPv6无状态

  • 开启ipv6

  • 进入产品业务(vlan20)

  • 配置IPv6地址

  • no ipv6 nd-suppress-sa

  • ipv6 nd ra-lifetime 7200

 

posted @ 2021-09-10 11:50  isicman  阅读(459)  评论(0)    收藏  举报