侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

CCNP(BCMSN)实验:DHCP中继代理——类型1

2023-04-06 星期四 / 0 评论 / 0 点赞 / 71 阅读 / 2672 字

注意事项:在SW1和R1上启个路由协议实验过程:第一步:sw1上的配置sw1(config)#int f2/1sw1(config-if)#no switchport sw1(config-if)#i

.


注意事项:在SW1和R1上启个路由协议

实验过程:
第一步:sw1上的配置

sw1(config)#int f2/1
sw1(config-if)#no switchport
sw1(config-if)#ip add 1.1.1.1 255.255.255.0

sw1(config)#ip dhcp pool VLAN1
sw1(dhcp-config)#network 192.168.1.0 255.255.255.0
sw1(dhcp-config)#default-router 192.168.1.254
sw1(config)#ip dhcp excluded-address 192.168.1.254
sw1(config)#ip dhcp excluded-address 172.16.1.254
sw1(config)#ip dhcp pool VLAN2
sw1(dhcp-config)#network 172.16.1.0 255.255.255.0
sw1(dhcp-config)#default-router 172.16.1.254
//给我们的服务器配置两个地址池

第二步:R1上的配置

R1(config)#int e0/1
R1(config-if)#ip add 1.1.1.2 255.255.255.0
R1(config-if)#du fu
R1(config-if)#no sh

R1(config-if)#int e0/2
R1(config-if)#no sh
R1(config-if)#du fu
R1(config-if)#int e0/2.1
R1(config-subif)#en dot1Q 100
R1(config-subif)#ip add 192.168.1.254 255.255.255.0
R1(config-subif)#ip helper-address 1.1.1.1
R1(config-subif)#int e0/2.2
R1(config-subif)#en do 200
R1(config-subif)#ip add 172.16.1.254 255.255.255.0
R1(config-subif)#ip helper-address 1.1.1.1

第三步:sw2上的配置

sw2(config)#int f2/1
sw2(config-if)#sw mo tr
sw2(config-if)#sw trunk encapsulation dot1q
sw2(config-if)#no sh

sw2#vlan database
sw2(vlan)#vlan 100 name VALN1
VLAN 100 added:
Name: VALN1
sw2(vlan)#vlan 200 name VLAN2
VLAN 200 added:
Name: VLAN2
sw2(vlan)#exi
APPLY completed.
Exiting....

sw2(config)#int f2/2
sw2(config-if)#sw mo acc
sw2(config-if)#sw acc vlan 100
sw2(config-if)#int f2/3
sw2(config-if)#sw mo acc
sw2(config-if)#sw acc vlan 200

第四步:用路由器充当pc
R2(config)#int e0/2
R2(config-if)#ip add dhcp
R2(config-if)#du fu
R2(config-if)#no sh
R2(config)#no ip routing
R2(config)#ip default-gateway 192.168.1.254

R3(config)#int e0/2
R3(config-if)#du fu
R3(config-if)#ip add dhcp
R3(config-if)#no sh
R3(config)#ip default-gateway 172.16.1.254

第五步:测试

.

广告 广告

评论区