选拔考试例题-eNSP
选拔考试例题-eNSP
网络拓扑:
要求说明:
- 按拓扑配置主机名和IP地址
- 总公司配置单臂路由使VLAN互通,子接口ID和VLAN ID一致,IP地址网络第一个可用地址,做相应的配置
- 分公司配置三层交换使VLAN间互通,VLANIF 的IP地址网络第一个可用地址,三层交换机使用VLANIF 100和R2通信,做相应配置
- R1、R2和3LSW 配置OSPF路由协议使全网互通
- 测试PC机之间的连通性
实验步骤
基础配置:
- 首先按照拓扑显示,为每台设备设置名称和IP
AR1:
system-view
sysname AR1
AR2:
system-view
sysname AR2
3LSW:
system-view
sysname 3LSW
SW1:
system-view
sysname SW1
SW2:
system-view
sysname SW2
- 按照题意可得知,每个VLAN的网关为此网段的第一个可用IP
PC1:
192.168.10.1
PC2:
192。168.20.1
PC3:
172.16.30.1
PC4:
172.16.40.1
总公司-单臂路由:
SW1:
vlan batch 10 20
int g0/0/11
port link-type access
port default vlan 10
int g0/0/12
port link-type access
port default vlan 20
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
AR1:
int g0/0/0.10
ip add 192.168.10.1 24 //配置网关
dot1q termination vid 10 //配置VLAN ID
arp broadcast enable //开启子接口
int g0/0/0.20
ip add 192.168.20.1 24
dot1q termination vid 20
arp broadcast enable
测试:
//PC1 PING PC2
PC>ping 192.168.20.2
Ping 192.168.20.2: 32 data bytes, Press Ctrl_C to break
From 192.168.20.2: bytes=32 seq=1 ttl=127 time=62 ms
From 192.168.20.2: bytes=32 seq=2 ttl=127 time=78 ms
From 192.168.20.2: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.20.2: bytes=32 seq=4 ttl=127 time=63 ms
From 192.168.20.2: bytes=32 seq=5 ttl=127 time=78 ms
--- 192.168.20.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/71/78 ms
分公司-三层VLAN间互通:
SW2:
vlan batch 30 40
int g0/0/3
port link-type access
port default vlan 30
int g0/0/4
port link-type access
port default vlan 40
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
3LSW:
vlan batch 30 40
int g0/0/2
port link-type trunk
port trunk allow-pass vlan all
int vlanif 30
ip add 172.16.30.1 24
int vlanif 40
ip add 172.16.40.1 24
测试:
//PC3 PING PC4
PC>ping 172.16.40.1
Ping 172.16.40.1: 32 data bytes, Press Ctrl_C to break
From 172.16.40.1: bytes=32 seq=1 ttl=255 time=47 ms
From 172.16.40.1: bytes=32 seq=2 ttl=255 time=47 ms
From 172.16.40.1: bytes=32 seq=3 ttl=255 time=47 ms
From 172.16.40.1: bytes=32 seq=4 ttl=255 time=31 ms
From 172.16.40.1: bytes=32 seq=5 ttl=255 time=31 ms
--- 172.16.40.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/40/47 ms
OSPF全网互通:
3LSW:
vlan batch 100
int vlanif 100
ip add 2.2.2.2 30
int g0/0/1
port link-type access
port default vlan 100
AR2:
int g0/0/0
ip add 2.2.2.1 30
测试:
//3LSW PING AR2
ping 2.2.2.1
PING 2.2.2.1: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.1: bytes=56 Sequence=1 ttl=255 time=80 ms
Reply from 2.2.2.1: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 2.2.2.1: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 2.2.2.1: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 2.2.2.1: bytes=56 Sequence=5 ttl=255 time=10 ms
--- 2.2.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/46/80 ms
以上两步是为了三层交换机与路由器进行通信,接下来进行OSPF配置,使全网互通
3LSW:
ospf
area 0
net 172.16.30.0 0.0.0.255 //宣告网络
net 172.16.40.0 0.0.0.255
net 2.2.2.0 0.0.0.3
AR2:
int g0/0/1
ip add 1.1.1.2 30
ospf
area 0
net 1.1.1.0 0.0.0.3
net 2.2.2.0 0.0.0.3
AR3:
int g0/0/1
ip add 1.1.1.1 30
ospf
area 0
net 1.1.1.0 0.0.0.3
测试:
//PC1 PING PC3
PC>ping 172.16.30.2
Ping 172.16.30.2: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 172.16.30.2: bytes=32 seq=2 ttl=125 time=109 ms
From 172.16.30.2: bytes=32 seq=3 ttl=125 time=125 ms
From 172.16.30.2: bytes=32 seq=4 ttl=125 time=94 ms
From 172.16.30.2: bytes=32 seq=5 ttl=125 time=62 ms
--- 172.16.30.2 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/97/125 ms
//PC4 PING PC1
PC>ping 192.168.10.2
Ping 192.168.10.2: 32 data bytes, Press Ctrl_C to break
From 192.168.10.2: bytes=32 seq=1 ttl=125 time=109 ms
From 192.168.10.2: bytes=32 seq=2 ttl=125 time=94 ms
From 192.168.10.2: bytes=32 seq=3 ttl=125 time=109 ms
From 192.168.10.2: bytes=32 seq=4 ttl=125 time=94 ms
From 192.168.10.2: bytes=32 seq=5 ttl=125 time=94 ms
--- 192.168.10.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 94/100/109 ms
实验总结:
在本次实验中主要考核单臂路由、三层交换机VLAN间通信和OSPF路由协议
实验文件下载 :网络设备配置与安全