https://blog.csdn.net/annita2019/article/details/112339381
本文档详细介绍了新租赁写字楼的网络规划,包括为财务部分配192.168.0.140/27网段,确保服务器IP不变,并按部门划分VLAN,如管理层、行政部、市场部等,每个VLAN配置了相应的IP范围和子掩码。同时,配置了核心交换机和路由器的VLAN、DHCP服务,确保各部门的网络连接和地址分配。
一、实验环境
公司最近新租赁了写字楼,领导要求一定要好好规划网络,整理IP地址
二、实验需求
1、财务部有几台服务器,IP地址不能变,分别是:
192.168.0.143
192.168.0.144
192.168.0.145
192.168.0.146
因此,我们需要给财务找个网段,把上面的IP包含进去,但是范围还不能太大。研究之后决定给财务:192.168.0.140/27 这个网段。
实际就是:
财务部IP范围:192.168.0.129 到 192.168.0.158 子掩码是:255.255.255.224 网关:192.168.0.140
2、按照部门划分vlan,除了财务部20台终端左右,其他部门最多不超过50台。
三、SW核心交换机vlan配置
创建需要的vlan
un in en vlan batch 11 12 13 14 15 16 99 q
将接口划分到相应的vlan
interface GigabitEthernet0/0/1 port link-type access port default vlan 11 q interface GigabitEthernet0/0/2 port link-type access port default vlan 12 q interface GigabitEthernet0/0/3 port link-type access port default vlan 13 q interface GigabitEthernet0/0/4 port link-type access port default vlan 14 q interface GigabitEthernet0/0/5 port link-type access port default vlan 15 q interface GigabitEthernet0/0/6 port link-type access port default vlan 16 q interface GigabitEthernet0/0/24 port link-type access port default vlan 99 q
配置vlanIP
interface Vlanif11 #财务网段,不能变 ip address 192.168.0.1 255.255.255.0 q interface Vlanif12 ip address 192.168.12.1 255.255.255.192 q interface Vlanif13 ip address 192.168.13.1 255.255.255.192 q interface Vlanif14 ip address 192.168.14.1 255.255.255.192 q interface Vlanif15 ip address 192.168.15.1 255.255.255.192 q interface Vlanif16 ip address 192.168.16.1 255.255.255.192 q interface Vlanif99 #上行链路 ip address 192.168.99.99 255.255.255.192 q
配置完,可以用下面的命令查看确认。
dis ip in b
四、R1路由器DHCP配置
开启DHCP
[R1]un in en dhcp enable interface GigabitEthernet0/0/2 ip address 192.168.99.254 255.255.255.0 dhcp select global q
加入回执路由
ip route-static 0.0.0.0 0 192.168.99.99
创建各个vlan的地址池
vlan99不用创建,vlan99我们不开启DHCP
ip pool vlan11 #财务网段,不能变 gateway-list 192.168.0.129 network 192.168.0.129 mask 255.255.255.224 dns-list 114.114.114.114 q ip pool vlan12 gateway-list 192.168.12.1 network 192.168.12.0 mask 255.255.255.192 dns-list 114.114.114.114 q ip pool vlan13 gateway-list 192.168.13.1 network 192.168.3.0 mask 255.255.255.192 dns-list 114.114.114.114 q ip pool vlan14 gateway-list 192.168.14.1 network 192.168.4.0 mask 255.255.255.192 dns-list 114.114.114.114 q ip pool vlan15 gateway-list 192.168.15.1 network 192.168.5.0 mask 255.255.255.192 dns-list 114.114.114.114 q ip pool vlan116 gateway-list 192.168.16.1 network 192.168.6.0 mask 255.255.255.192 dns-list 114.114.114.114 q
配置完可以使用下面的命令查看一下有没有问题。
dis ip pool
五、SW1核心交换机上配置DHCP中继
dhcp enable interface Vlanif11 dhcp select relay dhcp relay server-ip 192.168.99.254 q interface Vlanif12 dhcp select relay dhcp relay server-ip 192.168.99.254 q interface Vlanif13 dhcp select relay dhcp relay server-ip 192.168.99.254 q interface Vlanif14 dhcp select relay dhcp relay server-ip 192.168.99.254 q interface Vlanif15 dhcp select relay dhcp relay server-ip 192.168.99.254 q interface Vlanif16 dhcp select relay dhcp relay server-ip 192.168.99.254 q
标签:ip,192.168,局域网,255.255,交换机,interface,dhcp,三层,port From: https://www.cnblogs.com/HondaHsu/p/18531812