设为首页 收藏本站
查看: 899|回复: 0

[经验分享] 思科三层交换DHCP基本配置

[复制链接]

尚未签到

发表于 2017-11-9 09:42:12 | 显示全部楼层 |阅读模式
实验拓扑图
一台三层交换机和四台Server

2d8377f60262e5be09ef8b41dbb04c29.png
DHCP的基本配置

DHCP#
DHCP#VLAN DAtabase
DHCP(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
DHCP(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
DHCP(vlan)#vlan 30
VLAN 30 added:
    Name: VLAN0030
DHCP(vlan)#vlan 40
VLAN 40 added:
    Name: VLAN0040
DHCP(vlan)#exit
APPLY completed.
Exiting....
DHCP#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DHCP(config)#ip routing
DHCP(config)#int f0/1
DHCP(config-if)#switchport access vlan 10
DHCP(config-if)#int f0/2
DHCP(config-if)#switchport access vlan 20
DHCP(config-if)#int f0/3
DHCP(config-if)#switchport access vlan 30

DHCP(config-if)#int f0/4
DHCP(config-if)#switchport access vlan 40
DHCP(config-if)#exit
DHCP(config)#int vlan 10
DHCP(config-if)#ip address 10.0.0.10 255.0.0.0
DHCP(config-if)#no sh
DHCP(config-if)#int vlan 20
DHCP(config-if)#ip address 20.0.0.10 255.0.0.0
DHCP(config-if)#no sh
DHCP(config-if)#int vlan 30
DHCP(config-if)#ip address 30.0.0.10 255.0.0.0
DHCP(config-if)#no sh
DHCP(config-if)#int vlan 40
DHCP(config-if)#ip address 40.0.0.10 255.0.0.0
DHCP(config-if)#no sh
DHCP(config-if)#exit
DHCP(config)#ip dhcp pool v1
DHCP(dhcp-config)#network 10.0.0.0
DHCP(dhcp-config)#default-router 10.0.0.10
DHCP(dhcp-config)#dns-server 202.106.0.20
DHCP(dhcp-config)#lease 3
DHCP(dhcp-config)#exit     
DHCP(config)#ip dhcp excluded-address 10.0.0.1 10.0.0.20
DHCP(config)#ip dhcp pool v2
DHCP(dhcp-config)#network 20.0.0.0
DHCP(dhcp-config)#default-router 20.0.0.10
DHCP(dhcp-config)#dns
DHCP(dhcp-config)#dns-server 202.106.0.20
DHCP(dhcp-config)#le
DHCP(dhcp-config)#lease 3
DHCP(dhcp-config)#exit
DHCP(config)#ip dhcp excluded-address 20.0.0.1 20.0.0.20
DHCP(config)#ip dhcp pool v3
DHCP(dhcp-config)#network 30.0.0.0
DHCP(dhcp-config)#default-router 30.0.0.10
DHCP(dhcp-config)#dns-server 202.106.0.20
DHCP(dhcp-config)#lease 3
DHCP(dhcp-config)#exit
DHCP(config)#ip dhcp excluded-address 30.0.0.1 30.0.0.20
DHCP(config)#ip dhcp pool v4
DHCP(dhcp-config)#network 40.0.0.0
DHCP(dhcp-config)#default-router 40.0.0.10

DHCP(dhcp-config)#dns-server 202.106.0.20

DHCP(dhcp-config)#lease 3

DHCP(dhcp-config)#exit
DHCP(config)#ip dhcp excluded-address 40.0.0.1 40.0.0.20
DHCP(config)#exit
DHCP#sh ip int br
Interface                IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  up                    down   
FastEthernet0/1            unassigned      YES unset  up                    up      
FastEthernet0/2            unassigned      YES unset  up                    up      
FastEthernet0/3            unassigned      YES unset  up                    up      
FastEthernet0/4            unassigned      YES unset  up                    up      
FastEthernet0/5            unassigned      YES unset  up                    down   
FastEthernet0/6            unassigned      YES unset  up                    down   
FastEthernet0/7            unassigned      YES unset  up                    down   
FastEthernet0/8            unassigned      YES unset  up                    down   
FastEthernet0/9            unassigned      YES unset  up                    down   
FastEthernet0/10           unassigned       YES unset  up                    down   
FastEthernet0/11           unassigned       YES unset  up                    down   
FastEthernet0/12           unassigned       YES unset  up                    down   
FastEthernet0/13           unassigned       YES unset  up                    down   
FastEthernet0/14           unassigned       YES unset  up                    down   
FastEthernet0/15           unassigned       YES unset  up                    down   
FastEthernet1/0            unassigned      YES unset  administratively down        down   
Vlan1                      unassigned      YES unset  up                    down   
Vlan10                     10.0.0.10       YES manual up                    up      
Vlan20                     20.0.0.10       YES manual up                    up      
Vlan30                     30.0.0.10       YES manual up                    up      
Vlan40                     40.0.0.10       YES manual up                    up      
DHCP#sh ip route
DHCP#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/24 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Vlan20
     40.0.0.0/24 is subnetted, 1 subnets
C       40.0.0.0 is directly connected, Vlan40
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Vlan10
     30.0.0.0/24 is subnetted, 1 subnets
C       30.0.0.0 is directly connected, Vlan30
DHCP#sh vlan-s

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/0, Fa0/5, Fa0/6, Fa0/7
                                                Fa0/8, Fa0/9, Fa0/10, Fa0/11
                                                Fa0/12, Fa0/13, Fa0/14, Fa0/15
10   VLAN0010                         active    Fa0/1
20   VLAN0020                         active    Fa0/2
30   VLAN0030                         active    Fa0/3
40   VLAN0040                         active    Fa0/4
1002 fddi-default                     active   
1003 token-ring-default                 active   
1004 fddinet-default                   active   
1005 trnet-default                    active   

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
10   enet  100010     1500  -      -      -        -    -        0      0   
20   enet  100020     1500  -      -      -        -    -        0      0   
30   enet  100030     1500  -      -      -        -    -        0      0   
40   enet  100040     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        1      1003

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0   
1005 trnet 101005     1500  -      -      1        ibm  -        0      0   
DHCP#     
配置完成验证最后一台Server,
c51ceb73e582667e3e39ddff026a6d17.png
其他不一一验证了


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-406782-1-1.html 上篇帖子: Python Cisco ISE/ASA API 下篇帖子: CISCO处理本地文件系统的几个命令
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表