H3CNE实验系列

1、H3CNE实验系列 | 交换机、路由器基本命令

# 交换机 IP 地址
[H3C]int vlan 1
[H3C-Vlan-interface1]ip add 192.168.1.1 24
[H3C-Vlan-interface1]undo ip add 192.168.1.1 24

# 创建 VLAN
[H3C]vlan 10
[H3C]undo vlan 10

# 向 VLAN 添加一个、多个端口
[H3C-vlan10]port e 1/0/1
[H3C-vlan10]port e 1/0/5 to e 1/0/7
[H3C-vlan10]port e 1/0/8 to e 1/0/9 e 1/0/11 to e 1/0/12

# 显示 VLAN 信息
[H3C]dis vlan

# 设置以太网端口的链路类型为 TRUNK
[H3C-Ethernet1/0/1]port link-type trunk
[H3C-Ethernet1/0/1]port trunk permit vlan all
[H3C-Ethernet1/0/1]port trunk pvid vlan 1

# 设置以太网端口的链路类型为 ACCESS
[H3C-Ethernet1/0/1]port link-type access
[H3C-Ethernet1/0/1]port access vlan 10
[H3C-Ethernet1/0/1]undo port access vlan

# 配置 Loopback 环回接口
[H3C]int loopback 0
[H3C-Lookback0]ip add 10.1.1.1 24

# 静态路由
[H3C]ip route 192.168.3.0 255.255.255.0 s 1/0
[H3C]undo ip route 192.168.3.0 255.255.255.0 s 1/0

# 默认路由
[H3C]ip route 0.0.0.0 0.0.0.0 s 1/0

2、H3CNE实验系列 | 缺省路由和静态路由

你可能感兴趣的:(网络)