总结:华为、H3C、锐捷三家交换机配置命令详解( 九 )


portant; word-wrap: break-word !important; font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; color: rgb(217, 33, 66); overflow-wrap: break-word !important;">b、IP和MAC地址绑定
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1//接口配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1进行绑定(MAC地址注重用小写)
portant; word-wrap: break-word !important; background-color: rgb(0, 0, 0); color: rgb(255, 255, 255);">portant; word-wrap: break-word !important; font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">8、三层路由功能(针对三层交换机)
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">(config)# ip routing//开启三层交换机的路由功能(config)# interface fastethernet 0/1 (config-if)# no switchport//开启端口的三层路由功能(这样就可以为某一端口配置IP)(config-if)# ip address 192.168.1.1 255.255.255.0(config-if)# no shutdown
portant; word-wrap: break-word !important; font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; background-color: rgb(0, 0, 0); color: rgb(255, 255, 255); overflow-wrap: break-word !important;">9、三层交换机路由协议
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1//配置静态路由
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">注:172.16.1.0 255.255.255.0//为目标网络的网络号及子网掩码172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">(config)# router rip //开启RIP协议进程(config-router)# network 172.16.1.0//申明本设备的直连网段信息(config-router)# version 2//开启RIP V2,可选为version 1(RIPV1)、version 2(RIPV2)(config-router)# no auto-summary//关闭路由信息的自动汇总功能(只有在RIPV2支持)(config)# router ospf//开启OSPF路由协议进程(针对1762,无需使用进程ID)(config)# router ospf 1//开启OSPF路由协议进程(针对2501,需要加OSPF进程ID)(config-router)# network 192.168.1.0 0.0.0.255 area 0 //申明直连网段信息,并分配区域号(area0为骨干区域)
portant; word-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-indent: 34px; widows: 1; overflow-wrap: break-word !important;">可以明显看出,三家命令大同小异,其实华为与H3C更加类似 。
标签:华为、H3C、锐捷三家交换机