共性总结:
题目要求:
1、ISP区域,每台路由器需要指定一个环回口地址,所有设备之间互联使用/30网段,server1服务器区域是有10台服务器,使用10.1.1.0/24网段进行划分。LSW1是一台OLT设备,连接家庭1、家庭2、站点3。
2、家庭用户需要使用拨号的方式连接入网,在LSW1上面合理设置外层VLAN100标签,使得拨号使用QINQ的方式到达MSE路由器。MSE为家庭路由器动态下发IP地址。IP地址网段为11.1.1.0/24。家庭1路由器使用DHCP方式为终端分配IP地址。家庭2使用静态IP地址方式互联。
3、园区网里面包含20个VLAN用户,其中PC4属于VLAN100,PC5属于VLAN200,LSW3和LSW4是三层交换机,实现流量负载分担。AR5和MSE-2使用专线的方式互联,IP网段为12.1.1.0/30。内网网段自行选择。
4、站点1,2,3部分互联。站点3连接到ISP的LSW1上,静态IP地址为13.1.1.0/30。站点2连接到PON网络,PON网络使用VLAN100透传站点2链路,静态IP地址为13.1.1.4/30。站点1使用专线连接到ISP,静态IP地址为13.1.1.8/30。站点123需要实现内网通信,共有6个部门,PC6-PC11分别属于对应部门,需要的地址数量如下:25,27,37,22,15,7。网络内部使用192.168.1.0/24进行划分。站点123可以相互通信。
思路:
#
sysname CR1
#
undo info-center enable
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 10.1.1.17 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.1.1.21 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.1.1.25 255.255.255.252
#
interface GigabitEthernet0/0/3
ip address 10.1.1.1 255.255.255.240
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.17 0.0.0.0
network 10.1.1.21 0.0.0.0
network 10.1.1.25 0.0.0.0
network 10.1.1.1 0.0.0.0
#
#该接口不再发送hello报文,定义到Server1的OSPF边界
ospf 1
silent-interface GigabitEthernet 0/0/3
#
#
sysname CR2
#
undo info-center enable
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 10.1.1.18 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.1.1.29 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.1.1.33 255.255.255.252
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.18 0.0.0.0
network 10.1.1.29 0.0.0.0
network 10.1.1.33 0.0.0.0
#
#
sysname MSE-1
#
undo info-center enable
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 10.1.1.22 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.1.1.30 255.255.255.252
#
#以下4步是为家庭用户拨号入网的PPPOE-SERVER配置
#家庭用户的拨号使用灵活的QINQ方式到达MSE路由器
#
interface Virtual-Template1
ip address 11.1.1.1 255.255.255.0
ppp authentication-mode chap
remote address pool pppoe
#
ip pool pppoe
network 11.1.1.0 mask 255.255.255.0
#
aaa
local-user 123 password cipher password
local-user 123 service-type ppp
local-user 456 password cipher password
local-user 456 service-type ppp
#
interface GigabitEthernet0/0/2.100
pppoe-server bind Virtual-Template 1
qinq termination pe-vid 100 ce-vid 41
arp broadcast enable
#
#以下1步是与站点3的连接,子接口与trunk接口的方式
#
interface GigabitEthernet0/0/2.200
dot1q termination vid 200
ip address 13.1.1.1 255.255.255.252
arp broadcast enable
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.1.22 0.0.0.0
network 10.1.1.30 0.0.0.0
network 11.1.1.1 0.0.0.0
network 13.1.1.1 0.0.0.0
#
#该接口不再发送hello报文,定义到家庭区域OSPF的边界
ospf 1
silent-interface Virtual-Template1
#
#
sysname MSE-2
#
undo info-center enable
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 10.1.1.26 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.1.1.34 255.255.255.252
#
#与园区网的互联
#
interface GigabitEthernet0/0/2
ip address 12.1.1.1 255.255.255.252
#
#与PON-站点2的互联
##MSE-2的物理口对LSW7的access接口
interface GigabitEthernet2/0/0
ip address 13.1.1.5 255.255.255.252
#
#与站点1的互联
#
interface GigabitEthernet3/0/0
ip address 13.1.1.9 255.255.255.252
#
interface GigabitEthernet4/0/0
#
interface NULL0
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.1.1.26 0.0.0.0
network 10.1.1.34 0.0.0.0
network 12.1.1.1 0.0.0.0
network 13.1.1.5 0.0.0.0
network 13.1.1.9 0.0.0.0
#
#该接口不再发送hello报文,定义到园区OSPF的边界
ospf 1
silent-interface GigabitEthernet 0/0/2
#
#
sysname SW1
#
undo info-center enable
#
vlan batch 100 200
#
#与MSE-1的连接,子接口与trunk接口的方式
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
#灵活的qinq
#以下2步是家庭用户的拨号使用QINQ的方式到达MSE路由器
#
interface GigabitEthernet0/0/2
qinq vlan-translation enable
port vlan-stacking vlan 41 stack-vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet0/0/3
qinq vlan-translation enable
port hybrid untagged vlan 100
port vlan-stacking vlan 41 stack-vlan 100
#
#与站点3的连接,物理口与access接口的方式
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 200
#
网段:10.1.1.0/28
能通CR1-g0/0/3:10.1.1.1
题目要求:
2、家庭用户需要使用拨号的方式连接入网,在LSW1上面合理设置外层VLAN100标签,使得拨号使用QINQ的方式到达MSE路由器。MSE为家庭路由器动态下发IP地址。IP地址网段为11.1.1.0/24。家庭1路由器使用DHCP方式为终端分配IP地址。家庭2使用静态IP地址方式互联。
思路:
不做修改。
#
sysname AR1
#
undo info-center enable
#
#以下3步是DHCP配置
#
dhcp enable
#
ip pool 1
network 192.168.1.0 mask 255.255.255.0
gateway-list 192.168.1.1
#
#物理口对华为默认的Hybrid(特殊的access)
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
dhcp select global
#
#以下4步是用户拨号PPPOE-CLIENT的配置
#在拨号路由器上面创建拨号接口、定义封装的协议是ppp
#定义客户端发起连接所使用的认证方式为CHAP,并且携带用户名和密码进行认证
#定义IP地址获取的方式为PPP协商获得
#创建自身的拨号名字以及定义拨号组信息
#将dialer接口可以当作NAT的出口和路由的逃出接口
#
interface Dialer1
link-protocol ppp
ppp chap user 123
ppp chap password cipher password
ip address ppp-negotiate
dialer user 321312
dialer bundle 100
nat outbound 2000
#
#关联拨号接口到以太网接口,家庭用户的拨号使用灵活QINQ的方式到达MSE路由器,所以用子接口带上标签
interface GigabitEthernet0/0/0.41
pppoe-client dial-bundle-number 100
dot1q termination vid 41
arp broadcast enable
#
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 Dialer1
#
DHCP成功,能ping通网关(AR1-g0/0/1:192.168.1.1)。
DHCP成功,能ping通网关(AR1-g0/0/1:192.168.1.1)。
#
sysname AR2
#
undo info-center enable
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
#
#以下4步是用户拨号PPPOE-CLIENT的配置
#
interface Dialer1
link-protocol ppp
ppp chap user 456
ppp chap password cipher password
ip address ppp-negotiate
dialer user 321312
dialer bundle 100
nat outbound 2000
#
interface GigabitEthernet0/0/0.41
pppoe-client dial-bundle-number 100
dot1q termination vid 41
arp broadcast enable
#
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 Dialer1
#
能ping通网关(AR2-g0/0/1:192.168.1.1)。
题目要求:
3、园区网里面包含20个VLAN用户,其中PC4属于VLAN100,PC5属于VLAN200,LSW3和LSW4是三层交换机,实现流量负载分担。AR5和MSE-2使用专线的方式互联,IP网段为12.1.1.0/30。内网网段自行选择。
思路:
#
sysname SW5
#
undo info-center enable
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 200
#
#
sysname SW3
#
undo info-center enable
#
vlan batch 35 100 200
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
#
#VRRP配置
#PC4的VLAN100优先走左侧的LSW3
interface Vlanif100
ip address 192.168.1.2 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.1
vrrp vrid 1 priority 150
#
interface Vlanif200
ip address 192.168.2.2 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.1
#
#三层交换机配地址,使用vlan 35与同层路由器物理口互联,与路由器起OSPF动态路由
interface Vlanif35
ip address 35.1.1.3 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 35
#
ospf 1 router-id 3.3.3.3
silent-interface Vlanif100
silent-interface Vlanif200
area 0.0.0.0
network 35.1.1.3 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
#
sysname SW4
#
undo info-center enable
#
vlan batch 45 100 200
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
#
#VRRP配置
#
interface Vlanif100
ip address 192.168.1.3 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.1
#
#PC5的VLAN200优先走左侧的LSW4
interface Vlanif200
ip address 192.168.2.3 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.1
vrrp vrid 2 priority 150
#
#三层交换机配地址,使用vlan 45与同层路由器子接口互联,与路由器起OSPF动态路由
interface Vlanif45
ip address 45.1.1.4 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 45
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 45.1.1.4 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
查看vrrp信息
display vrrp interface vlan 100
display vrrp interface vlan 200
#
sysname AR5
#
undo info-center enable
#
#物理口对LSW3的access接口
interface GigabitEthernet0/0/1
ip address 35.1.1.5 255.255.255.0
#
#字接口对LSW4的trunk接口
interface GigabitEthernet0/0/2.45
dot1q termination vid 45
ip address 45.1.1.5 255.255.255.0
arp broadcast enable
#
acl number 2000
rule permit source any
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.252
nat outbound 2000
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 12.1.1.1
#
#OSPF动态通告缺省路由,在网关路由器AR5通告进外网路由器MSE-2的缺省路由(内网的其他三层设备都可同步该路由)
#AR5出外网的g0/0/0不放进OSPF中
ospf 1 router-id 5.5.5.5
default-route-advertise
area 0.0.0.0
network 35.1.1.5 0.0.0.0
network 45.1.1.5 0.0.0.0
#
到虚拟网关能通。
到虚拟网关能通。
题目要求:
4、站点1,2,3部分互联。站点3连接到ISP的LSW1上,静态IP地址为13.1.1.0/30。站点2连接到PON网络,PON网络使用VLAN100透传站点2链路,静态IP地址为13.1.1.4/30。站点1使用专线连接到ISP,静态IP地址为13.1.1.8/30。站点123需要实现内网通信,共有6个部门,PC6-PC11分别属于对应部门,需要的地址数量如下:25,27,37,22,15,7。网络内部使用192.168.1.0/24进行划分。站点123可以相互通信。
思路:
#
sysname SW11
#
undo info-center enable
#
vlan batch 40 50
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 40 50
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 50
#
#
sysname SW12
#
undo info-center enable
#
vlan batch 60
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 60
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 60
#
#
sysname SW10
#
undo info-center enable
#
vlan batch 40 50 60
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 40 50 60
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40 50
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 60
#
#
sysname R6
#
undo info-center enable
#
interface GigabitEthernet0/0/0.40
dot1q termination vid 40
ip address 192.168.1.129 255.255.255.224
arp broadcast enable
#
interface GigabitEthernet0/0/0.50
dot1q termination vid 50
ip address 192.168.1.161 255.255.255.224
arp broadcast enable
#
interface GigabitEthernet0/0/0.60
dot1q termination vid 60
ip address 192.168.1.193 255.255.255.240
arp broadcast enable
#
#和MSE-2的互联
#
interface GigabitEthernet0/0/1
ip address 13.1.1.10 255.255.255.252
#
#以下4步完成与站点3(R4)、站点2(R5)的VPN(GRE隧道)配置
#source和destination为物理口,ip address为GRE逻辑互联口
interface Tunnel0/0/0
tunnel-protocol gre
source 13.1.1.10
destination 13.1.1.2
ip address 192.168.1.214 255.255.255.252
#
interface Tunnel0/0/1
tunnel-protocol gre
source 13.1.1.10
destination 13.1.1.6
ip address 192.168.1.217 255.255.255.252
#
#R6出外网的g0/0/1不放进OSPF中
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 192.168.1.129 0.0.0.0
network 192.168.1.161 0.0.0.0
network 192.168.1.193 0.0.0.0
network 192.168.1.214 0.0.0.0
network 192.168.1.217 0.0.0.0
#
#目的网段为GRE另一端出站的物理互联网段,下一跳为本端出站的物理互联
ip route-static 13.1.1.0 255.255.255.252 GigabitEthernet0/0/1 13.1.1.9
ip route-static 13.1.1.4 255.255.255.252 GigabitEthernet0/0/1 13.1.1.9
#
192.168.1.128/27,255.255.255.224
192.168.1.160/27,255.255.255.224
192.168.1.192/28,255.255.255.240
#
sysname R5
#
undo info-center enable
#
#R5的物理口对LSW8的access接口
interface GigabitEthernet0/0/0
ip address 13.1.1.6 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.192
#
#以下4步完成与站点3(R4)、站点1(R6)的VPN(GRE隧道)配置
#source和destination为物理口,ip address为GRE逻辑互联口
interface Tunnel0/0/0
tunnel-protocol gre
source 13.1.1.6
destination 13.1.1.2
ip address 192.168.1.210 255.255.255.252
#
interface Tunnel0/0/1
tunnel-protocol gre
source 13.1.1.6
destination 13.1.1.10
ip address 192.168.1.218 255.255.255.252
#
#R5出外网的g0/0/0不放进OSPF中
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 192.168.1.1 0.0.0.0
network 192.168.1.210 0.0.0.0
network 192.168.1.218 0.0.0.0
#
#目的网段为GRE另一端出站的物理互联网段,下一跳为本端出站的物理互联
ip route-static 13.1.1.0 255.255.255.252 GigabitEthernet0/0/0 13.1.1.5
ip route-static 13.1.1.8 255.255.255.252 GigabitEthernet0/0/0 13.1.1.5
#
#
sysname SW8
#
undo info-center enable
#
vlan batch 100
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
#R5的物理口对LSW8的access接口
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
#
#
sysname SW7
#
undo info-center enable
#
vlan batch 100
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
#MSE-2的物理口对LSW7的access接口
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
#
192.168.1.0/26,255.255.255.192
#
sysname SW9
#
undo info-center enable
#
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 access
port default vlan 10
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
#
#
sysname R4
#
undo info-center enable
#
#R4的物理口对LSW1的access接口
interface GigabitEthernet0/0/0
ip address 13.1.1.2 255.255.255.252
#
interface GigabitEthernet0/0/1.10
dot1q termination vid 10
ip address 192.168.1.97 255.255.255.224
arp broadcast enable
#
interface GigabitEthernet0/0/1.20
dot1q termination vid 20
ip address 192.168.1.65 255.255.255.224
arp broadcast enable
#
#以下4步完成与站点2(R5)、站点1(R6)的VPN(GRE隧道)配置
#source和destination为物理口,ip address为GRE逻辑互联口
interface Tunnel0/0/0
tunnel-protocol gre
source 13.1.1.2
destination 13.1.1.6
ip address 192.168.1.209 255.255.255.252
#
interface Tunnel0/0/1
tunnel-protocol gre
source 13.1.1.2
destination 13.1.1.10
ip address 192.168.1.213 255.255.255.252
#
#R4出外网的g0/0/0不放进OSPF中
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 192.168.1.97 0.0.0.0
network 192.168.1.65 0.0.0.0
network 192.168.1.209 0.0.0.0
network 192.168.1.213 0.0.0.0
#
#目的网段为GRE另一端出站的物理互联网段,下一跳为本端出站的物理互联
ip route-static 13.1.1.4 255.255.255.252 GigabitEthernet0/0/0 13.1.1.1
ip route-static 13.1.1.8 255.255.255.252 GigabitEthernet0/0/0 13.1.1.1
#
192.168.1.96/27,255.255.255.224
192.168.1.64/27,255.255.255.224