06 - 路由、ISP vlan

noteId: 2953C1AB5DE74244A56BB612D6A5E810 · 原始路径:/ALL/世赛题目(练习) - 笔记/考核/11月份考核(第一次考核)/广东第三届省赛 C模块 题目/C-模块/06 - 路由、ISP vlan.note

1、配置出口默认路由(HQ1、HQ2、BR1、DCFW):

这里选择使用出接口进行默认路由配置

· 使用出接口配置默认路由,会导致每一次访问新的IP前都需要进行一次ARP解析

· 使用下一跳IP地址配置默认路由,当选择的下一跳地址出现问题时,会导致连通性异常

BR1 配置:

endconf tip route 0.0.0.0 0.0.0.0 G0/0

HQ1、HQ2 配置:

endconf tip route 0.0.0.0 0.0.0.0 G0/1

DCFW(FW1) 配置:

· 配置 防火墙的默认路由前,先配置 ISP 的 G0/2、G1/0、G1/1、G0/1 接口 和 Vlan:

vlan 101exitvlan 102exitint vlan 101ip address 101.20.23.101int vlan 102ip address 102.20.23.102int ra g1/0-1sw mo acsw ac vlan 101int ra g0/1-2sw mo acsw ac vlan 102
endconf tpolicy-map global_policy class inspection_default  inspect icmp    //允许 ICMP 流量  exitexitroute Outside_CTCC 0.0.0.0 0.0.0.0 101.20.23.101 1route Outside_CUCC 0.0.0.0 0.0.0.0 102.20.23.102 2

2、配置 OSPF:

仅宣告交换机和路由器之间的链路到Area0

· DSW1:

ip routing    //开启三层交换机路由功能router ospf 1router-id 10.10.10.10network 192.168.11.0 0.0.0.7 area 0network 192.168.12.0 0.0.0.7 area 0exit

· DSW2:

ip routingrouter ospf 1router-id 11.11.11.11network 192.168.22.0 0.0.0.7 area 0network 192.168.21.0 0.0.0.7 area 0exit

· HQ1:

router ospf 1router-id 1.1.1.1network 192.168.11.0 0.0.0.7 area 0network 192.168.21.0 0.0.0.7 area 0exit

· HQ2:

router ospf 1router-id 2.2.2.2network 192.168.22.0 0.0.0.7 area 0network 192.168.12.0 0.0.0.7 area 0exit

配置不选举 DR/BDR:【 邻居之间】

DSW1:int ra g0/1-2ip ospf network point-to-pointDSW2:int ra g0/1-2ip ospf network point-to-pointHQ1:int ra g0/4-5ip ospf network point-to-pointHQ2:int ra g0/4-5ip ospf network point-to-point

3、配置重分发直连路由,仅匹配客户端的SVI接口(vlan接口):【在 DSW1、2上】

· DSW1:

endconf troute-map VLAN_LIST permit 10match interface vlan 1010exitrouter ospf 1redistribute connected route-map VLAN_LIST subnets //这段代码有三个作用(redistribute connected | route-map VLAN_List | subnets )redistribute connected:重分发直连路由;route-map VLAN_List:使用 route-map 定义的 VLAN_List 条目;subnets:重分发携带子网掩码。VLAN_List 为自定义的。

· DSW2:

endconf troute-map VLAN_LIST permit 10match interface vlan 1020exitrouter ospf 1redistribute connected route-map VLAN_LIST subnets

4、上引入默认路由:

HQ1、HQ2:

router ospf 1default-information originate

5、ipv6 OSPFv3

HQ1:

ipv6 unicast-routingint loop 100ipv6 ospf 1 area 0exit

BR1:

ipv6 unicast-routingipv6 ospf 1 area 0exit