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

单臂路由配置dhcp

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

今天给各位分享单臂路由配置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” 的相关文章

路由器ip绑定怎么生效

路由器ip绑定怎么生效

当朋友们看到这个文章时想必是想要了解路由器ip绑定怎么生效相关的知识,这里同时多从个角度为大家介绍路由器使用固定IP相应的内容。 本文内容目录一览: 1、如何在路由器上设置固定IP地址才能上网 2、路由器如何绑定ip地址 3、tplink如何绑定固定ip和物理地址 4、路由器ip怎么绑定...

宿舍路由器怎么分流量

宿舍路由器怎么分流量

今天和朋友们分享宿舍路由器怎么分流量相关的知识,相信大家通过本文介绍也能对宿舍分流器怎么连接路由器有自已的收获和理解。自己轻松搞问题。本文内容目录一览: 1、路由器怎么分配流量? 2、路由器怎么设置平分网速流量 3、如何用路由器分流量 路由器怎么分配流量? 一般路由器没有流量分配的功能,要...

拿手机路由器怎么设置

拿手机路由器怎么设置

有很多朋友不知道拿手机路由器怎么设置要如何操作,今天为大家整理了很多用手机怎样设置路由器相关的答案,组成一篇内容丰富的文章,希望能到您 本文内容目录一览: 1、怎样用手机设置路由器 步骤 2、手机如何设置路由器? 3、用手机怎么设置路由器 4、怎么在手机上设置路由器 怎样用手机设置路由...

电信怎么更改路由器名

电信怎么更改路由器名

针对电信怎么更改路由器名这个问题,本文将综合不同朋友对这个电信怎么更改路由器名称的知识为大家一起来解答,希望能帮到大家 本文内容目录一览: 1、怎么修改无线网名称 2、电信wifi用户名怎么改 3、电信上网的无线路由器怎么设置改名? 4、wifi路由器怎么修改名字? 怎么修改无线网名称...

桥接路由器怎么插

桥接路由器怎么插

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

弱电路由器怎么连接

弱电路由器怎么连接

本篇文章给大家谈谈弱电路由器怎么连接,以及弱电箱接路由器对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 本文内容目录一览: 1、弱电箱的路由器,怎么插网线 2、路由器怎么连接 3、弱电箱里路由模块出来接无线路由器怎么设置? 4、求方法!弱电箱内有线路由器通过网线如何连接无线路由器...