大连理工大学网络综合实验常用命令总结
程序员文章站
2024-02-11 14:06:01
...
网络综合实验命令总结
VLAN划分
1. VLAN
- 创建VLAN
[Quidway] vlan vlan_id
- 向VLAN中添加交换机端口:
[Quidway-vlanvlan_id]port port_num [ to port_num ] & < 1-10 >
- 将端口添加到VLAN:
[Quidway-Ethernet0/2] port access vlan vlan-id
- 设计值端口的链路类型
[Quidway-Ethernet0/1] port link-type {access|trunk|hybrid}
路由协议配置
1. 静态路由配置
[Quidway] [undo] ip route-static ip-address { mask | masklen } { interface-type interface-name | nexthop-address } [ preference value ]
- 主要
2. RIP配置
[Quidway] rip
[Quidway-rip] network 0.0.0.0
3. OSPF配置
[Quidway] [undo] ospf
[Quidway-ospf] [undo] area area-id
[Quidway-ospf-area0] [undo] network ip-addr mask
4. 路由引入
rip
import direct/ospf/static
quit
ospf
import
PPP配置
1. PAP验证
- 验证方:
[Quidway-Serial0] ppp authentication-mode pap
[Quidway] local-user user class network
[Quidway-luser] service-type ppp
[Quidway-luser]password simple password
- 被验证方:
[Quidway-Serial0] ppp pap local-user username password simple password
配置后一定要在接口视图下重启接口,即执行命令“shut down”和“undo shutdown”
2. CHAP验证
- 验证方:
[RA-Serial0] ppp authentication-mode chap
[RA-Serial0] ppp chap user user-a
[Quidway] local-user user-b class network
[Quidway-luser] service-type ppp
[Quidway-luser]password simple password
- 被验证方:
[RB-Serial0] ppp chap user user-b
[Quidway] local-user user –a class network
[Quidway-luser] service-type ppp
[Quidway-luser]password simple password
防火墙配置
[Quidway] acl advanced 3001 match-order auto
[Quidway-acl-adv-3000] rule {deny|permit} ip source 202.0.2.2 0 destination any
[Quidway-acl-adv-3000] quit
[Quidway] int s0/0
[Quidway-Serial0] packet-filter acl-number { inbound | outbound }
推荐阅读