当前位置:首页 > wifi设置知识 > 正文内容

单臂路由配置dhcp

秋天2023年02月04日 11:40:15wifi设置知识215

今天给各位分享单臂路由配置dhcp的知识,其中也会对单臂路由配置代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站

本文内容目录一览:

熟悉路由的进, 关于单臂路由 CCNA,

S1配置Vlan VTP

S1(config)#vlan 10

S1(config-vlan)#exit

S1(config)#vlan 20

S1(config-vlan)#exit

S1(config)#vlan 30

S1(config-vlan)#exit

S1(config)#vlan 40

S1(config-vlan)#exit

S1(config)#vtp

S1(config)#vtp ?

domain    Set the name of the VTP administrative domain.

mode      Configure VTP device mode

password  Set the password for the VTP administrative domain

version   Set the adminstrative domain to VTP version

S1(config)#vtp do

S1(config)#vtp domain ?

WORD  The ascii name for the VTP administrative domain.

S1(config)#vtp domain ccna

Changing VTP domain name from NULL to ccna

S1(config)#vtp m s

Device mode already VTP SERVER.

S1(config)#vtp pass ccna

Setting device VLAN database password to ccna

S1(config)#

S1(config)#int r f 0/1 - 2

S1(config-if-range)#sw m t

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

S1(config-if-range)#sw m t

S1(config-if-range)#

===============================================================

S2上的vtp

S2(config)#vtp do ccna

Changing VTP domain name from NULL to ccna

S2(config)#vtp pass ccna

Setting device VLAN database password to ccna

S2(config)#vtp m c

Setting device to VTP CLIENT mode.

S2(config)#int f 0/2

S2(config-if)#sw m t

S2(config-if)#end

S2#

%SYS-5-CONFIG_I: Configured from console by console

S2#sh vlan

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/3, Fa0/4, Fa0/5

Fa0/6, Fa0/7, Fa0/8, Fa0/9

Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15, Fa0/16, Fa0/17

Fa0/18, Fa0/19, Fa0/20, Fa0/21

Fa0/22, Fa0/23, Fa0/24, Gig1/1

Gig1/2

10   VLAN0010                         active

20   VLAN0020                         active

30   VLAN0030                         active

40   VLAN0040                         active

1002 fddi-default                     act/unsup

1003 token-ring-default               act/unsup

1004 fddinet-default                  act/unsup

1005 trnet-default                    act/unsup

==========================================================

交换机上接口配置

S1#

S1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

S1(config)#int f 0/10

S1(config-if)#sw m a

S1(config-if)#sw a v 10

S1(config-if)#span po

%Warning: portfast should only be enabled on ports connected to a single

host. Connecting hubs, concentrators, switches, bridges, etc... to this

interface  when portfast is enabled, can cause temporary bridging loops.

Use with CAUTION

%Portfast has been configured on FastEthernet0/10 but will only

have effect when the interface is in a non-trunking mode.

S1(config-if)#int f 0/20 进入0/20接口

S1(config-if)#sw m a 接口模式为主机

S1(config-if)#sw a v 20划分到Vlan20

S1(config-if)#span po启用快速转换

%Warning: portfast should only be enabled on ports connected to a single

host. Connecting hubs, concentrators, switches, bridges, etc... to this

interface  when portfast is enabled, can cause temporary bridging loops.

Use with CAUTION

%Portfast has been configured on FastEthernet0/20 but will only

have effect when the interface is in a non-trunking mode.

S1(config-if)#

S1(config-if)#end

S1#

%SYS-5-CONFIG_I: Configured from console by console

S1#sh vlan b

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/3, Fa0/4, Fa0/5

Fa0/6, Fa0/7, Fa0/8, Fa0/9

Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/21, Fa0/22, Fa0/23

Fa0/24, Gig1/1, Gig1/2

10   VLAN0010                         active    Fa0/10

20   VLAN0020                         active    Fa0/20

30   VLAN0030                         active

40   VLAN0040                         active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

S1#

=====================================================

R1(config)#ip dh poo 2配置DHCP服务

R1(dhcp-config)#net 192.168.2.0 255.255.255.0 地址池

R1(dhcp-config)#de

R1(dhcp-config)#default-router 192.168.2.1 网关

R1(dhcp-config)#dns

R1(dhcp-config)#dns-server 61.134.1.4 DNS服务器

R1(dhcp-config)#exit

以此类推 sh run

!

ip dhcp pool 1

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 61.134.1.4

ip dhcp pool 2

network 192.168.2.0 255.255.255.0

default-router 192.168.2.1

dns-server 61.134.1.4

ip dhcp pool 3

network 192.168.3.0 255.255.255.0

default-router 192.168.3.1

dns-server 61.134.1.4

ip dhcp pool 4

network 192.168.4.0 255.255.255.0

default-router 192.168.4.1

dns-server 61.134.1.4

===================================================

R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#int f 0/1.10  进入子接口 1.10 后面10没有意思只不过我这是Vlan10的接口 所以我写10

%LINK-5-CHANGED: Interface FastEthernet0/1.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.10, changed state to up

R1(config-subif)#

R1(config-subif)#?

arp            Set arp type (arpa, probe, snap) or timeout

bandwidth      Set bandwidth informational parameter

delay          Specify interface throughput delay

description    Interface specific description

encapsulation  Set encapsulation type for an interface

exit           Exit from interface configuration mode

ip             Interface Internet Protocol config commands

ipv6           IPv6 interface subcommands

mtu            Set the interface Maximum Transmission Unit (MTU)

no             Negate a command or set its defaults

shutdown       Shutdown the selected interface

R1(config-subif)#en

R1(config-subif)#encapsulation d

R1(config-subif)#encapsulation dot1Q 10 中继模式  中继的Vlan10

R1(config-subif)#ip add 192.168.1.1 255.255.255.0

R1(config-subif)#

用电脑做单臂路由器要什么条件,同时要怎么设置

第一台电脑做DHCP服务器 用ROS或软路由软件控制/绑定第一块网卡

第二台电脑只做接受数据 不用设置 IP自动就可以

-------

VLAN是具有网管型二层交换机才有功能 路由器一般最多只有管理组的选用 这还是高级点的路由才有的功能 家用路由是没有管理组这个功能的

-----

单臂路由是网管型路由器 才有的功能 全部要由路由器的CONSOLE口对路由进行命令配置才能完成 也是要与二层交换机配套全用

cisco如何配置DHCP

1、随意选择路由器、交换机和多台主机。

2、用直线连接。

3、双击路由器,选择physical→cli,您将看到以下要配置的界面。

4、打开电脑,选择“桌面”—“IP配置”,然后选择DHCP。

5、最后,使用ping测试它,完成了。

在思科模拟器的路由器上怎么配置DHCP服务器?

1. 打开思科模拟器软件,找出一台2811类的路由器和两台2960类的交换机,4台PC电脑,并用正确的线缆将各个设备互相连接起来,如下图所示:

2.给所有设备都重新命名,路由器命名为r1,一交换机命名为sw1,另一交换机命名为sw2,如下图所示:

3. 先配置路由器r1先,配置命令为:

r1(config)#int f0/0

r1(config-if)#no sh

再配置路由器设备的远程登录和密码保护,配置命令为:

r1(config)#lin vty 0 4

r1(config-line)#login local

r1(config-line)#username admin password cisco

r1(config-line)#exit

r1(config)#enable secret cisco

r1(config)#service password-encrption   (此命令为加密所有口令)

如下图所示:

4.配置交换机sw1,配置命令是:

sw1(config)#int vlan 1

sw1(config-if)#ip add 192.168.1.2 255.255.255.0

sw1(config-if)#no sh

sw1(config-if)#ex

sw1(config)#ip default-gateway 192.168.1.1

再用相同方法配置sw2,如下图所示:

5. 配置vlan设定,在sw1上划分vlan 2,3,将相应端口加入其中,配置命令为:

sw1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

sw1(config)#vlan 2

sw1(config-vlan)#ex

sw1(config)#vlan 3

sw1(config-vlan)#ex

sw1(config)#int f0/4

sw1(config-if)#switchport mode access

sw1(config-if)#switchport access vlan 2

sw1(config-if)#int f0/5

sw1(config-if)#switchport mode access

sw1(config-if)#switchport access vlan 3

sw1(config-if)#ex

用相同方法在sw3上面划分vlan,并将相应的端口加入其中,如下图所示:

6.配置单臂路由,实现valn1,2,3之间的互访,配置sw1接口f0/1为主干链路,配置命令是:

sw1(config)#int f0/1

sw1(config-if)#switchport  mode  trunk

sw1(config-if)#no  sh

如下图所示:

7.在路由器r1上进行封装,配置命令如下图所示:

r1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

r1(config)#int f0/0

r1(config-if)#no shut

r1(config)#int f0/0.1

r1(config-subif)#encapsulation dot1Q 1

r1(config-subif)#ip add 192.168.1.1 255.255.255.0

r1(config-subif)#ex

r1(config)#int f0/0.2

r1(config-subif)#encapsulation dot1Q 2

r1(config-subif)#ip add 192.168.2.1 255.255.255.0

r1(config-subif)#ex

r1(config)#int f0/0.3

r1(config-subif)#encapsulation dot1Q 3

r1(config-subif)#ip add 192.168.3.1 255.255.255.0

r1(config-subif)#no sh

r1(config-subif)#ex

如下图所示:

8.配置DHCP服务器,即是配置路由器r1,配置命令是:

r1#enable

r1#conf t

r1(config)#ip dhcp excluded-address 192.168.2.1

r1(config)#ip dhcp pool vlan2

r1(dhcp-config)#net 192.168.2.0 255.255.255.0

r1(dhcp-config)#default-router 192.168.2.1

r1(dhcp-config)#dns-server 100.1.1.2

r1(config)#ip dhcp excluded-address 192.168.3.1

r1(config)#ip dhcp pool vlan3

r1(dhcp-config)#net 192.168.3.0 255.255.255.0

r1(dhcp-config)#dns-server 100.1.1.2

r1(dhcp-config)#ex

9. 现在PC之间可以自动获取IP地址和网关了,如下图所示:

三层交换机的DHCP配置

没用过思科的设备,命令都是大同小异,自己找下命令就行,首先先要把 dhcp 的 service 激活

,然后给你的interface 配置两个IP (主从)

ip address 11.1.1.1/24

ip address 11.1.2.1/24 secondary

然后就是配置DHCP SERVER上的 POOL 大致是这样 , 命令你自己在你设备上找,这是大概意思,

ip dhcp pool p1

network 11.1.1.0/24

default-router 11.1.1.1

range 11.1.1.2 11.1.1.200

dns-server 172.16.1.10

domain-name RG.COM

ip dhcp pool p2

network 11.1.2.0/24

default-router 11.1.2.1

range 11.1.2.2 11.1.2.150

dns-server 172.16.1.10

domain-name RG.com

下面的设备划了VLAN 给了IP 就可以了 不多说了 应该够了 ,,呵呵 要五星应该不过分,

关于单臂路由配置dhcp和单臂路由配置代码的介绍到此就结束了,不知道你找到你需要的信息了吗 ?如果想了解更多这方面的信息,记得收藏关注本站。

扫描二维码推送至手机访问。

版权声明:本文由路由设置网发布,如需转载请注明出处。

本文链接:https://www.shoulian.org/luyou/post/5536.html

“单臂路由配置dhcp” 的相关文章

新手应该怎么买路由器

新手应该怎么买路由器

针对新手应该怎么买路由器这个问题,本文将综合不同朋友对这个路由器怎么购买合适的知识为大家一起来解答,希望能帮到大家 本文内容目录一览: 1、什么样的路由器穿墙效果好?新手该如何给自家选购路由器? 2、怎么选择路由器? 3、无线路由器怎么选 4、哪个牌子的路由器比较好,应该怎么选择?...

神州路由器怎么配置密码

神州路由器怎么配置密码

今天和朋友们分享神州路由器怎么配置密码相关的知识,相信大家通过本文介绍也能对神州路由器怎么配置密码登录有自已的收获和理解。自己轻松搞问题。本文内容目录一览: 1、路由器怎么设置密码?它的用户名和密码又是什么呢? 2、路由器要怎么设置密码 3、路由器如何设置密码 4、无线路由器怎么设置密码...

怎么充值路由器密码错误

怎么充值路由器密码错误

本篇文章给大家谈谈怎么充值路由器密码错误,以及路由器账号密码输入错误对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 本文内容目录一览: 1、怎么重置无线路由器密码 2、无线路由器密码如何重置? 3、怎么重置路由器密码 4、连不上宽带说密码错误,怎么重置? 5、路由器怎么重置密...

连接俩路由器怎么接

连接俩路由器怎么接

今天给各位分享连接俩路由器怎么接的知识,其中也会对两个路由器怎么连接进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站 本文内容目录一览: 1、家庭如何连接设置两个路由器? 2、两台路由器怎么连接 3、两个路由器怎么连接 家庭如何连接设置两个路由器? 家庭连接设置两个路由器的方法如下...

怎么样使路由器

怎么样使路由器

今天给各位分享怎么样使路由器的知识,其中也会对怎么样使路由器网速变慢进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站 本文内容目录一览: 1、路由器怎么设置比较好 2、要怎么设置路由器 3、怎么设置路由器呢? 4、家用宽带路由器要怎么设置 5、如何设置路由器让wifi更稳定?...

路由器怎么摆放速度最快

路由器怎么摆放速度最快

有很多朋友不知道路由器怎么摆放速度最快要如何操作,今天为大家整理了很多路由器怎么摆放速度最快视频相关的答案,组成一篇内容丰富的文章,希望能到您 本文内容目录一览: 1、怎样放置路由器才能使网络变快? 2、路由器怎么摆放信号才会好?需要掌握哪些关键的知识要点? 3、路由器怎么调网速最快 4...