IPV4中有A、B、C、D、E五种类型
1)我们常用的就是A、B、C三类的地址
2)D、E两种属于保留地址或者是科研、特殊地点使用的IP
127 为保留本机地址
1-126 A类 开头为0000 0001
128-191 B类 开头为1000 0000
192-223 C 类 开头为1100 0000
一、基础内容
system-view #进入系统页面
system-name *** #给系统设置名称
quit #为退出一级
save #保存设备配置信息
tab键 #可以补齐命令
reboot #可以重启系统
DHCP enable #开启dhcp服务器
二、划分虚拟VLAN
1)VLAN 划分IP地址
interface Vlanif 1
ip address 192.168.1.1 24
删除命令方式:
undo ip address 192.168.1.1 24
划分单个VLAN: VLAN 10
批量划分VLAN:VLAN batch 20 to 30 (共 10 个)
划分多个VLAN: VLAN batch 10 20 30 40 50
将对应的接口加入到对应的 VLAN 中:
进入PC连接的相应端口:interface Eth 0/0/1
选择接口模式:port link-type access
分配到相应VLAN中:port default vlan 10
trunk 的配置
进入PC连接的相应端口:interface Eth 0/0/1
选择接口模式:port link-type trunk
分配到相应VLAN中:port trunk allow-pass vlan 10 20 30 (设置允许通过的VLAN)