交换机配置
华为交换机的IP地址分配为从大到小进行分配,思科交换机的IP地址分配为从小到大进行分配。
H3C的跟华为一样,锐捷的跟思科的一样。
1、划分VLAN和接口
第一步:创建VLAN
vlan batch 10 20 30 40 //创建VLAN 10 20 30 40
第二步:把接口划入到VLAN
interface g0/0/1 //进入到接口
port link-type access //接口类型为接入
port default vlan 10 //接口属于vlan10
interface g0/0/2
port link-type access
port default vlan 20
interface g0/0/4
port link-type access
port default vlan 30
interface g0/0/5
port link-type access
port default vlan 40
2、DHCP
基于全局的DHCP
dhcp enable //全局开启DHCP
interface Vlanif 10 //进入到管理接口vlanif10
ip address 192.168.1.1 24 //配置IP地址
quit //退出
Ip pool sb //创建IP地址池名字叫sb
Network 192.168.1.0 mast 24 //准备好了IP地址和子网掩码
Gate-way list 192.168.1.1 //网关是192.168.1.1
Dns-server 114.114.114.114 223.5.5.5 //主DNS和备用DNS
基于接口的DHCP
dhcp enable //全局开启DHCP
interface Vlanif 20 //进入到管理接口vlanif10
ip address 192.168.2.1 24 //配置IP地址
dhcp select interface //DHCP的模式为基于接口
dhcp server dns-list 114.114.114.114 //设置DNS
quit //退出
3、静态路由
静态路由的配置
ip route-static 0.0.0.0 0.0.0.0 10.1.1.1
ip route-static 172.16.1.0 24 10.1.1.2
ip route-static 172.16.2.0 24 10.1.1.2
ip route-static 192.168.1.0 24 10.1.1.2
ip route-static 192.168.2.0 24 10.1.1.2
1、PPPoE
电信公司为了方便收费,在以太网里面跑PPP协议。
2、NAT
3、静态路由
4、NAT server
网站:http://shibowl.top
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----