> 首页 > 生活 > 百科 > 如何配置单臂路由

如何配置单臂路由

来源:网络 作者:佚名 时间:03-27 手机版

1、首先要具备CiscoPacketTracer模拟器,如果没有可以到百度搜索下载安装即可。

2、要绘制单臂路由的拓扑图。

3、接下来给交换机配置Vlan,分别配置Vlan10命名为caiwu,Vlan20命名为jishu。

4、将相应pc连接的端口加入相应的Vlan中,并且设置接口为access模式,设置f01为Trunk模式。

5、Switch设置好,就设置Route。

6、交换机与路由器的配置现在已经配置好,可以观察到图中的每个接口的

怎样在路由器上做单臂路由

1、设备组网:2台电脑分别属于VLAN10和VLAN20,一台华为AR2220路由器和一台S5700交换机。

2、配置两台PC的IP地址。PC1为下图。

2、PC2为下图。

3、在交换机中进行如下配置:1).连接两台PC机的端口配置为access模式,且分别属于对应的VLAN;2).连接路由器的端口配置为trunk模式,且允许PC机的VLAN通过。

命令:

创建VLAN10和VLAN20:vlan batch 10 20

GE 0/0/2:

interface GigabitEthernet 0/0/2

port link-type access

port default vlan 10

quit

GE 0/0/3:

interface GigabitEthernet 0/0/3

port link-type access

port default vlan 20

quit

GE 0/0/1:

interface GigabitEthernet 0/0/1

port link-type trunk

port trunk allow-pass vlan 10 20

4、在路由器中将一个物理接口配置两个逻辑子接口,两个子接口都开启802.1q,且分别属于不同的VLAN。

命令:

子接口1:

interface GigabitEthernet 0/0/1.1

dot1q termination vid 10

ip address 10.0.10.1 255.255.255.0

arp broadcast enable

quit

子接口2:

interface GigabitEthernet 0/0/1.2

dot1q termination vid 20

ip address 10.0.20.1 255.255.255.0

arp broadcast enable

quit

5、当配置完成后,可以分别在PC1和PC2检查相互之间可以进行通信。

求教单臂路由器设置

路由器的安装和设置如下:
1.首先连接路由器宽带猫和电脑之间的线路
2.线路连接完毕后,打开浏览器输入路由器的管理地址和管理密码然后进入路由器后台(具体路由器的登录地址和登录密码可以参考说明书或者是路由器背面的标签)
3.登录后台后选择快速设置,输入从网络服务商申请到的账号和密码,输入完成后直接下一步;
4.设置wifi密码,尽量字母数字组合比较复杂一点不容易被蹭网。
5.输入完成后确认一下,然后重新启动路由器即可生效。

单臂路由的配置实例

实验设备:一台CISCO路由器(R1),一台三层交换机(S1),两台PC机( pc2和pc3)
PC的配置如下:
pc2的IP:192.168.2.10 网关:192.168.2.1
pc3的IP:192.168.3.10 网关:192.168.3.1
交换机S1的配置如下:
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 2 name test01
VLAN 2 added:
Name: test01
Switch(vlan)#vlan 3 name test02
VLAN 3 added:
Name: test02 →设置好vlan ,这里只简单设置两个。
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fa0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fa0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fa0/1
Switch(config-if)#switchport trunk encapsulation dot1q (2960等交换机只支持802.1q协议,这里忽略)
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)#exit
Switch(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#write memory
Building configuration...
[OK]
下面来重点,配置单臂路由:
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z. .................进入全局配置模式
Router(config)#interface fa0/0 ................进入和交换机连接的那个接口
Router(config-if)#no shutdown ................激活该端口
Router(config-if)#exit ……………返回到全局配置模式
Router(config)#interface fa0/0.1 ...........配置 子接口 这是配置单臂路由的关键,这个接口是个 逻辑接口,并不是实际存在的物理接口,但是功能却和物理接口是一样的。
Router(config-subif)#encapsulation dot1q 2 .......为这个接口配置802.1Q协议,最后面的 2 是vlan 号,这也是关键部分
Router(config-subif)#ip address 192.168.2.1 255.255.255.0 .........为该接口划分ip地址。
Router(config-subif)#exit
Router(config)#interface fa0/0.2 .....同样,进入第2个子接口,进行配置
Router(config-subif)#encapsulation dot1q 3 .........配置802.1Q协议
Router(config-subif)#ip address 192.168.3.1 255.255.255.0 ......划分ip地址和子网掩码
Router(config-subif)#end
%SYS-5-CONFIG_I: Configured from console by console ..........完成配置
下面是测试结果:
经过分别对两台机子互相ping的测试,可以发现能够ping通,说明实验成功。
实验手册
实验名称:单臂路由实验
目标:通过一个路由器进行多个VLAN互联
环境:1. 交换机为二层交换机,支持VLAN划分;2. 路由器只有1个Ethernet接口
实施:采用单臂路由,即在路由器上设置多个逻辑子接口,每个子接口对应于一个VLAN。由于物理路由接口只有一个,各子接口的数据在物理链路上传递要进行标记封装。Cisco设备支持ISL和802.1q协议。华为设备只支持802.1q。

单臂路由的基本配置,求详细的配置过程

前面配置名字就不说了,在f0/0端口上建立子接口,并分别赋予vlan标记以及设置网关。

int f0/0.10

encapulation dot1q 10

ip add 192.168.10.1 255.255.255.0

int f0/0.20

encapulation dot1q 20

ip add 192.168.20.1 255.255.255.0

int f0/0.30

encapulation dot1q 30

ip add 192.168.30.1 255.255.255.0

然后就是配置交换机,12口设置trunk允许vlan10、20、30通过,连接电脑的端口设置access口并允许相应的vlan

电脑配置地址,ok!

单臂路由的配置

单臂路由(一个路同器端口上两个以上的VLAN)+静态路由

先在左边交换机上配置两个VLAN10和VLAN20,将10、11端口配置给VLAN10,将20、21端口配置给VLAN20

PC0的IP为192.68.10.10 255.255.255.255.0

PC1的IP为192.68.10.11 255.255.255.255.0

PC2的IP为192.68.20.20 255.255.255.255.0

PC3的IP为192.68.20.21 255.255.255.255.0

Switch(config)#interface f 0/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#no shutdown(设置交换机的0/1口为trunk,与路由器相连的设备)

Router(config)#interface fastEthernet 0/0(要先进0/0)

Router(config-if)#no shutdown(开启0/0端口)

Router(config-if)#interface fastEthernet 0/0.1(再进0/0.1)

Router(config-subif)#encapsulation  dot1Q 10(0.1子接口封装VLAN10)

Router(config-subif)#ip address 192.168.10.1 255.255.255.0(设置0.1端口IP地址)

Router(config-subif)#int f 0/0.2

Router(config-subif)#encapsulation  dot1Q 20(0.2子接口封装VLAN20)

Router(config-subif)#ip address 192.168.20.1 255.255.255.0(设置0.2端口IP地址)

第一个路由器

Router(config)#interface serial 2/0

Router(config-if)#ip address 192.168.30.1 255.255.255.0

Router(config-if)#no shuntdown(进入SERIAL2/0端口,配置IP地址并开启)

Router(config-if)#clock rate 4800(设置DCE端的时钟频率为4800 ?可查频率值)

第二个路由器

PC3的IP为192.68.20.21 255.255.255.255.0

Router(config)#interface serial 2/0

Router(config-if)#ip address 192.168.30.2 255.255.255.0

Router(config-if)#no shuntdown(进入SERIAL2/0端口,配置IP地址并开启)

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 192.168.40.1 255.255.255.0

Router(config-if)#no shuntdown(进入fastEthernet 0/0端口,配置IP地址并开启)

分别配置第一个和第二个路由器的表态路由表

(1)Router(config)#ip route 192.168.40.0 255.255.255.0 192.168.30.2

(2)Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.30.1

(2)Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.30.1

单臂路由交换机配置

华为模拟单臂路由组图:

单臂路由

主机A属于vlan2,IP地址192.168.2.1,网关192.168.2.254;主机B属于vlan3,IP地址192.168.3.1,网关192.168.3.254;

将交换机和路由器之间的链路配置为Trunk链路,并且在路由器上创建子接口以支持VLAN路由。

1.RTA配置:

2、交换机配置:

如何配置单臂路由

环境要求:一台核心路由器,一台汇聚层交换机,两台接入层交换机(可根据实际需要增减),四台PC机(可根据实际情况增加)。
缺点:单臂路由容易引起路由器的f0/0口的干道过载,从而引起网络延迟大和单点故障时没有冗余线路。
具体配置:
VLAN10的PC机网关指向10.0.0.3;VLAN20的PC机网关指向10.0.1.3。
R1配置:
Router>en
Router#conf t
Router(config)#host R1
R1(config)#int f 0/0
R1(config-if)#no ip add 关闭IP
R1(config-if)#duplex full 使用全双工
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f 0/0.1 创建子接口
R1(config-subif)#encapsulation dot1Q 10 用dot1Q封装转发给VLAN10
R1(config-subif)#ip add 10.0.0.3 255.255.255.0 为子接口配置IP,必需与VLAN10在同一网段。
R1(config-subif)#no shut
R1(config-subif)#exit
R1(config)#int f 0/0.2 创建子接口
R1(config-subif)#encapsulation dot1Q 20 用dot1Q封装转发给VLAN20
R1(config-subif)#ip add 10.0.1.3 255.255.255.0 为子接口配置IP,必需与VLAN20同一网段。
R1(config-subif)#no shut
R1(config-subif)#exit
SW1配置:
Switcha>EN
Switcha#conf t
Switcha(config)#host SW1
SW1(config)#int e 0/1
SW1(config-if)#switchport mode trunk 端口下设置端口工作模式为干道模式
SW1(config-if)#duplex full 设置全又工模式
SW1(config-if)#no shut
SW1(config-if)#exit
SW1(config)#int e 0/2
SW1(config-if)#switchport mode trunk 端口下设置端口工作模式为干道模式
SW1(config-if)#duplex full 设置全又工模式
SW1(config-if)#no shut
SW1(config-if)#exit
SW1(config)#int e 0/3
SW1(config-if)#switchport mode trunk 端口下设置端口工作模式为干道模式
SW1(config-if)#duplex full 设置全又工模式
SW1(config-if)#no shut
SW1(config-if)#exit
SW2、SW3的配置:
Switcha>en
Switcha#conf t
Switcha(config)#host SW2
SW2(config)#exit
SW2#vlan database 进入VLAN模式
SW2(vlan)#vlan 10 创建VLAN10
SW2(vlan)#vlan 20 创建VLAN20
SW2(vlan)#exit
SW2#conf t
SW2(config)#int e 0/1
SW2(config-if)#switchport mode trunk 端口下设置端口工作模式为干道模式
SW2(config-if)#duplex full 设置全双工
SW2(config-if)#no shut
SW2(config-if)#exit
SW2(config)#int e 0/2
SW2(config-if)#switchport mode access 设置端口模式为access
SW2(config-if)#switchport access vlan 20 端口划入VLAN20
SW2(config-if)#duplex full 设置全双工
SW2(config-if)#no shut
SW2(config-if)#exit
SW2(config)#int e 0/3
SW2(config-if)#switchport mode access 设置端口模式为access
SW2(config-if)#switchport access vlan 10 端口划入VLAN10
SW2(config-if)#duplex full 设置全双工
SW2(config-if)#no shut
SW2(config-if)#exit
检测命令:
在10.0.0.1的PC机上开始菜单里运行ping 10.0.1.2;能ping通就正常了。

华为[ENSP]VLAN间路由的配置(单臂路由、多臂路由的配置)

实验二拓扑图如下:

一、配置PC1、PC2

二、配置LSW和R1

交换机配置

vlan batch 100 200

interface GigabitEthernet0/0/1
port link-type access
port default vlan 200

interface GigabitEthernet0/0/2
port link-type access
port default vlan 100

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 100 200

路由器配置

interface Ethernet0/0/0.100
dot1q termination vid 100
ip address 192.168.10.1 255.255.255.0
arp broadcast enable

interface Ethernet0/0/0.200
dot1q termination vid 200
ip address 192.168.20.1 255.255.255.0

华为路由器单臂路由配置该怎么做

方法/步骤

首先利用华为模拟器eNSP来设计逻辑网络拓朴图,有一台路由器AR1220,一台二层交换机S3700,二台PC主机。其之间用线缆连接并作好标注。

在华为模拟器eNSP中打开终端配置交换机S3700,配置内容截图如下

system-view

sysname SW1          //设置交换机名字为SW1

vlan batch 2 3              //连续创建vlan 2  3

interface Ethernet 0/0/1

port link-type access          //设置端口类型为access

port default vlan 2          //将接口划分到vlan 2

quit

interface Ethernet 0/0/2

port link-type access

port default vlan 3

quit

interface Ethernet 0/0/3

port link-type trunk            //设置端口类型为trunk

port trunk allow-pass vlan 2 3  //华为交换机默认不支持其他vlan通过,除去vlan 1,允许trunk端口通过vlan 2 3

[SW1-Ethernet0/0/3]         //按CTRL+Z返回用户视图

system-view

display vlan       //显示vlan

display interface brief      //显示接口概

save

在打开终端配置路由器AR1220,配置内容截图如下

system-view

sysname R1       //设置路由器名字R1

display interface brief    //显示接口概要

interface GigabitEthernet 0/0/0.1

dot1q termination vid 2       //封装dot1q协议,该子接口对应vlan 2

ip address 192.168.2.254 24     //设置子接口IP地址和子网掩码

arp broadcast enable            //开启子接口的ARP广播

quit

interface GigabitEthernet 0/0/0.2

dot1q termination vid 3

ip address 192.168.3.254 24

arp broadcast enable

quit

display ip interface brief          //显示接口IP的简要状态信息

ping 192.168.2.2

ping 192.168.3.3

quit

save

4

分别在PC1和PC2用ping命令测试连通性,对方收到报文后会反馈时间等信息,如图

相关推荐:

如何配置单臂路由

哪种双拼最好

如何配置odbc数据源

哪种水草最好养活不烂

如何配置mail服务器

礼服搭配技巧有哪些

哪种水果含果胶较多

如何配置1.4的碳酸氢钠溶液

标签: [db:标签]

声明:《如何配置单臂路由》一文由排行榜大全(佚名 )网友供稿,版权归原作者本人所有,转载请注明出处。如果您对文章有异议,可在反馈入口提交处理!

最近更新

  • 如何配置单臂路由

    1、首先要具备CiscoPacketTracer模拟器,如果没有可以到百度搜索下载安装即可。2、要绘制单臂路由的拓扑图。3、接下来给交换机配置Vlan,分别配...

    百科 日期:2023-03-27

  • 哪种双拼最好

    双拼是一种建立在拼音输入法基础上的输入方法,可视为全拼的一种改进,它通过将汉语拼音中每个含多个字母的声母或韵母各自映射到某个按键上,使得...

    百科 日期:2023-03-27

  • 苹果iPhone X/XS/XS Max获YouTube HDR原生支持

    9月27日消息苹果的iPhone X、iPhone XS、iPhone XS Max都获得了原生的HDR支持,但是这一功能此前在YouTube上可谓是无用武之地。现在据AppleIn...

    数码 日期:2023-03-27

  • 如何配置odbc数据源

    配置odbc数据源步骤:1、首先启动服务管理器,选择所有程序中的MicrosoftSQLSever;2、在MicrosoftSQLSever中选择服务管理器,然后启动数据库服务器...

    百科 日期:2023-03-27

  • 微软正开发测试Windows Insider App新应用

    9月27日消息在Ignite 2018大会的第三天,微软宣布正在为Windows Insiders测试会员开发一款新应用。该应用程序将作为Windows Insiders Program...

    数码 日期:2023-03-27

  • 哪种水草最好养活不烂

    1、苦草:俗称面条草、龙须草、扁担草,是水生草本植物。具匍匐茎,叶基生,叶片狭长如带状,叶片长度随水位深浅而有差别,叶片碧绿半透明状,婷婷玉立于...

    百科 日期:2023-03-27

  • 如何配置mail服务器

    步骤如下:1、首先点击开始控制面板,添加或删除windows组件,选择dns服务;2、再选择smtp和nntp服务,单击pop3服务,进行相应的安装;3、配置dns服务,在d...

    百科 日期:2023-03-27

  • 礼服搭配技巧有哪些

    1、饰品:可选择珍珠、祖母绿、K金以及铂金等质感较强的配饰,还可选择人造宝晚礼服。2、鞋:通常都是配高跟细袢的凉鞋或装饰性比较强、和礼服比...

    百科 日期:2023-03-27

百科排行榜精选

邮箱不能为空
留下您的宝贵意见