h3c交换机静态路由配置
如果您在使用路由器时遇到了问题,不要惊慌。本文h3c交换机静态路由配置为您提供了解决方法和技巧,帮助您轻松解决路由器问题。
本文内容目录一览:
- 1、H3C怎么配置静态路由和OSPF使不同vlan不同网段的PC互通,求解
- 2、H3C-路由器、交换机配置(根据拓扑图给例详细命令步骤)
- 3、H3C路由器常用配置命令
- 4、H3C交换机配置DHCP,设置VLAN接口为全局地址池?
- 5、H3C5500交换机怎么配置路由?
H3C怎么配置静态路由和OSPF使不同vlan不同网段的PC互通,求解
假设左边的路由器为R1,右边的为R2,三层交换机为S1,右边的二层交换机为S2,左边的二层交换机为S3.
S2上:
建立vlan10
vlan20
选定第1口与路由器互联,并设置为trunk,允许vlan10和20通过。
R2上:
eth0/1连接S2的eth1/0/1,创建子接口(interface
ethernet0/1.1)并配置子接口的IP地址,这里采用的是单臂路由和S2互联,有多少个vlan就创建多少个子接口。
eth0/0连接R1,给接口配置IP地址,和R1的eth0/0分配同一个网段的地址,掩码最好为29-30位。创建ospf进程,建立区域0,并在区域0中间公布eth0/0所在接口的网段,同时输入命令import-route
direct(引入野镇毕直连路由)
S3上:
创建vlan10和vlan20
配置eth1/0/1为trunk,允许vlan10和20透传。与S1的eth1/0/1相连
S1上:
创建vlan10和vlan20,配置eth1/0/1为trunk,允许vlan10和20透传。
创建vlan10和20的三层虚接口(int
vlan
10)定义IP地址。旅姿
创建一个vlan100,配置一个IP地址,与R1进行互联,掩码同样29-30位,与R1的eth0/1在同一个网段。并且在eth1/0/24下配置:port
access
vlan
100
(这个vlan100可以不用配置,只是为了方便你理解)
全局下配置一条默认路由ip
route-static
0.0.0.0
0.0.0.0
XXX.XXX.XXX.XXX(这个下一跳地址就是给R1的eth0/1配置的IP地址)
R1上:
eth0/0连接R2,给接口配置IP地址,和R2的eth0/0分配同一个网段的地址,掩码最好为29-30位。创建ospf进程,建立区域0,并在区域0中间公布eth0/0所在接口的颂芹网段,同时输入命令import-route
direct(引入直连路由)
eth0/1连接S1的eth1/0/1,配置好IP地址即可,和对端在同一个网段内。
很详细了,加油吧。
H3C-路由器、交换机配置(根据拓扑图给例详细命令步骤)
交换机支持的命令:
交换机基本状态: switch: ;ROM状态,
路由器是rommonhostname ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态
交换机口令设置: switchenable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname ;设置拆猜交换机的笑拍主机名
switch(config)#enable secret xxx ;设置特权加密口令
switch(config)#enable password xxa ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;允许登录
switch(config-line)#password xx ;设置登录口令
xxswitch#exit ;返回命令
交换机VLAN设置:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入
vlan 2switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式
交换碰御羡机设置IP地址:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
2. 路由器支持的命令:
路由器显示命令:
router#show run ;显示配置信息
router#show interface ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload ;重新起动
路由器口令设置:
routerenable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作:
router#copy running-config startup-config ;保存配置
router#copy running-config tftp ;保存配置到tftp
router#copy startup-config tftp ;开机配置存到tftp
router#copy tftp flash: ;下传文件到flash
router#copy tftp startup-config;下载配置文件ROM状态:
Ctrl+Break ;进入ROM监控状态
rommonconfreg 0x2142 ;跳过配置文件
rommonconfreg 0x2102 ;恢复配置文件
rommonreset ;重新引导
rommoncopy xmodem: flash: ;从console传输文件
rommonIP_ADDRESS=10.65.1.2 ;设置路由器IP
rommonIP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommonTFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommonTFTP_FILE=c2600.bin ;指定下载的文件
rommontftpdnld ;从tftp下载
rommondir flash: ;查看闪存内容
rommonboot ;引导IOS
静态路由:
ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;
静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例
动态路由:
router(config)#ip routing ;启动路由转发
router(config)#router rip ;启动RIP路由协议。
router(config-router)#network ;设置发布路由
router(config-router)#negihbor ;点对点帧中继用。
H3C路由器常用配置命令
H3C路由器常用配置命令
H3C路由器怎么配置?配置基本命令有哪些?下面跟我一起来学习一下吧!
1、system-view 进入系统视图模式
2、sysname R1 为设备命名为R1
3、中没display ip routing-table 显示当前路由表
4、 language-mode Chinese|English 中英文切换
5、interface Ethernet 0/0 进入以太网端口视图
6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码
7、 undo shutdown 打开以太网端口
8、 shutdown 关闭以太网端口
9、 quit 退出当前视图模式凯培枝
10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由
11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由
H3C S3100 Switch
H3C S3600 Switch
H3C MSR 20-20 Router
##########################################################################################
1、调整超级终端的显示字号;
2、捕获超级终端操作命令行,以备日后查对;
3、 language-mode Chinese|English 中英文切换;
4、复制命令到超级终端命令行,粘贴到主盯敏机;
5、交换机清除配置 : reset save ; reboot ;
6、路由器、交换机配置时不能掉电,连通测试前一定要
检查网络的'连通性,不要犯最低级的错误。
7、192.168.1.1/24 等同 192.168.1.1 255.255.255.0;在配置交换机和路由器时, 192.168.1.1 255.255.255.0 可以写成:
192.168.1.1 24
8、设备命名规则:地名-设备名-系列号例:PingGu-R-S3600
H3C交换机的一些简单配置
2009-11-25 18:49
这里使用的H3C交换机是H126A,仅仅只做了最基本的配置以满足使用。
配置中可以通过display current-configura命令来显示当前使用的配置内容。
# 配置VLAN 1
system-view
System View: return to User View with Ctrl+Z.
[Sysname]vlan 1
[Sysname-vlan1] quit
[Sysname]management-vlan 1
[Sysname]interface Vlan-interface 1
[Sysname-Vlan-interface1] ip address 10.0.1.201 255.255.255.0
# 显示VLAN 接口1 的相关信息。
display ip interface Vlan-interface 1
# 创建VLAN(H3C不支持cisco的VTP,所以只能添加静态VLAN)
system-view
System View: return to User View with Ctrl+Z.
[H3C_TEST]vlan 99
[H3C_TEST-vlan99]name seicoffice
[H3C_TEST-vlan99]quit
# 把交换机的端端口划分到相应的Vlan中
[H3C_TEST]interface ethernet1/0/2 //进入端口模式
[H3C_TEST-Ethernet1/0/2]port link-type access //设置端口的类型为access
[H3C_TEST-Ethernet1/0/2]port access vlan 99//把当前端口划到vlan 99
[H3C_TEST]vlan 99
[H3C_TEST-vlan99]port ethernet1/0/1 to ethernet1/0/24//把以及网端口1/0/1到1/0/24划到vlan99
[H3C_TEST-vlan99]quit
[H3C_TEST-GigabitEthernet1/2/1]port trunk permit vlan 1 99 // {ID|All} 设置trunk端口允许通过的VLAN
-------------------------------------------------------------------------------------------------------
# 配置本地用户
system-view
System View: return to User View with Ctrl+Z.
[Sysname]local-user h3c
New local user added.
[Sysname-luser-h3c]service-type telnet level 3
[Sysname-luser-h3c]password simple h3c
# 配置欢迎信息
[H3C_TEST]header login %Welcome to login h3c!%
# 配置用户认证方式telnet(vty 0-4)
[H3C_TEST]user-interface vty 0 4
[H3C_TEST-ui-vty0-4]authentication-mode scheme
[H3C_TEST-ui-vty0-4]protocol inbound telnet
[H3C_TEST-ui-vty0-4]super authentication-mode super-password
[H3C_TEST-ui-vty0-4]quit
[H3C_TEST]super password level 3 simple h3c //用户登陆后提升权限的密码
# 配置Radius策略
[H3C_TEST]radius scheme radius1
New Radius scheme
[H3C_TEST-radius-radius1]primary authentication 10.0.1.253 1645
[H3C_TEST-radius-radius1]primary accounting 10.0.1.253 1646
[H3C_TEST-radius-radius1]secondary authentication 127.0.0.1 1645
[H3C_TEST-radius-radius1]secondary accounting 127.0.0.1 1646
[H3C_TEST-radius-radius1]timer 5
[H3C_TEST-radius-radius1]key authentication h3c
[H3C_TEST-radius-radius1]key accounting h3c
[H3C_TEST-radius-radius1]server-type extended
[H3C_TEST-radius-radius1]user-name-format without-domain
# 配置域
[H3C_TEST]domain h3c
[H3C_TEST-isp-h3c]authentication radius-scheme radius1 local
[H3C_TEST-isp-h3c]scheme radius-scheme radius1 local
[H3C_TEST]domain default enable h3c
# 配置在远程认证失败时,本地认证的key
[H3C_TEST]local-server nas-ip 127.0.0.1 key h3c ;
H3C交换机配置DHCP,设置VLAN接口为全局地址池?
1、Vlan划分、Vlan接口的IP地址配置及每个Vlan接口应用DHCP地址池。
2、lan划分、Vlan接口的IP地闹扰帆址配置及每个Vlan接口应用DHCP地址池。
3、配置DHCP地址液雹池,开启DHCP服务。
4、去往路由器设定Trunk接口李亮,设定Vlan包去路由器的默认静态路由。
5、在路由器上设定两种配置:配置路由子接口的IP地址和每个子接口终结Vlan的VID。开启环回口,模拟公网IP。
6、配置路由子接口的IP地址和每个子接口终结Vlan的VID。
H3C5500交换机怎么配置路由?
vlan从5500上启动,假设路由器的IP为192.168.1.1,路由器连接到G1/0/1接口,5500的VLAN1的IP是192.168.1.254,VLAN2的IP是192.168.2.254,一台机含祥虚器连接G1/0/2接口,宴迹该机器网关设置为192.168.2.254,5500上设谈燃置\x0d\x0asys\x0d\x0aint vlan 1\x0d\x0aip add 192.168.1.254 24\x0d\x0a\x0d\x0avlan 2\x0d\x0aint vlan 2\x0d\x0aip add 192.168.2.254 24\x0d\x0avlan 2\x0d\x0aport acc g1/0/2\x0d\x0aip route 0.0.0.0 0.0.0.0 192.168.1.1
尽管路由器和WIFI设置可能看起来很棘手,但只要按照步骤操作,您可以很容易地完成设置。