设为首页收藏本站language 语言切换
查看: 2332|回复: 10
收起左侧

[求助] dhcp分配

[复制链接]
发表于 2016-11-28 13:05:33 | 显示全部楼层 |阅读模式
3鸿鹄币
用交换机可以分配到ip,换用路由就无法获取ip了。想知道是怎么回事,劳烦大神了
1.jpg
2.jpg
3.jpg
4.jpg

最佳答案

查看完整内容

这是单臂路由,g0/0是不是用到了子接口。
发表于 2016-11-28 13:05:34 | 显示全部楼层
这是单臂路由,g0/0是不是用到了子接口。
沙发 2016-11-28 13:05:34 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-11-28 14:17:24 | 显示全部楼层
♂布兜★ 发表于 2016-11-28 13:37
这是单臂路由,g0/0是不是用到了子接口。

是用了子接口
板凳 2016-11-28 14:17:24 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-11-28 14:20:18 | 显示全部楼层
♂布兜★ 发表于 2016-11-28 13:37
这是单臂路由,g0/0是不是用到了子接口。

可我pc无法获取动态ip,是我的dhcp配置错了还是
地板 2016-11-28 14:20:18 回复 收起回复
回复

使用道具 举报

发表于 2016-11-28 14:36:34 | 显示全部楼层
这里要用到单臂路由、dhcp中继。
5# 2016-11-28 14:36:34 回复 收起回复
回复

使用道具 举报

发表于 2016-11-28 14:39:28 | 显示全部楼层
交换机配置
Switch#sh run
Building configuration...

Current configuration : 2193 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/4
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/5
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/7
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/8
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/11
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/15
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport mode trunk
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
end


路由器配置
Router(dhcp-config)#do sh run
Building configuration...

Current configuration : 1344 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
ip dhcp excluded-address 192.168.10.1 192.168.10.10
ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 192.168.30.1 192.168.30.10
!
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 2.2.2.2
ip dhcp pool 20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
dns-server 2.2.2.2
ip dhcp pool 30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 2.2.2.2
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15243BRK
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface GigabitEthernet0/0.3
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

评分

参与人数 1好评度 +1 收起 理由
林de + 1 很给力!

查看全部评分

6# 2016-11-28 14:39:28 回复 收起回复
回复

使用道具 举报

发表于 2016-11-28 15:04:53 | 显示全部楼层
本帖最后由 histlwk 于 2016-11-28 15:06 编辑

Router
en
conf t
ip dhcp pool p2
net 192.168.2.0 255.255.255.0
default-router 192.168.2.254
dns-ser 114.114.114.114
exit
ip dhcp pool p3
net 192.168.3.0 255.255.255.0
default-router 192.168.3.254
dns-ser 114.114.114.114
exit
ip dhcp pool p4
net 192.168.4.0 255.255.255.0
default-router 192.168.4.254
dns-ser 114.114.114.114
exit
int f0/0
no sh
ip add 192.168.100.100 255.255.255.0
int f0/0.2
encap dot1q 2
ip add 192.168.2.254 255.255.255.0
ip helper-add 192.168.100.100
no sh
exit
int f0/0.3
encap dot1q 3
ip add 192.168.3.254 255.255.255.0
ip helper-add 192.168.100.100
no sh
exit
int f0/0.4
encap dot1q 4
ip add 192.168.4.254 255.255.255.0
ip helper-add 192.168.100.100
no sh
exit
Switch
en
vl da
vl 2
vl 3
vl 4
exit
conf t
int f0/1
sw mo tr
exit
int f0/2
sw acc vl 2
exit
int f0/3
sw acc vl 3
exit
int f0/4
sw acc vl 4

exit

无标题.png

评分

参与人数 1好评度 +1 收起 理由
林de + 1 赞一个!

查看全部评分

7# 2016-11-28 15:04:53 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-11-28 15:07:53 | 显示全部楼层

恩,谢谢。可以了
8# 2016-11-28 15:07:53 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-11-28 15:08:02 | 显示全部楼层

恩,谢谢。可以了
9# 2016-11-28 15:08:02 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-11-28 15:08:16 | 显示全部楼层

恩,谢谢,可以
10# 2016-11-28 15:08:16 回复 收起回复
回复

使用道具 举报

发表于 2016-11-28 18:37:46 | 显示全部楼层
学习学习  顶一下
11# 2016-11-28 18:37:46 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-7 23:54 , Processed in 0.063860 second(s), 13 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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