ToB企服应用市场:ToB评测及商务社交产业平台

标题: 华为_组建底子的接入、汇聚、核心架构网络_设置案例 [打印本页]

作者: 卖不甜枣    时间: 2024-6-14 21:18
标题: 华为_组建底子的接入、汇聚、核心架构网络_设置案例
目次
1.拓扑图
2.先容
3.设置
(1)接入层交换机设置
(2)汇聚层交换机设置
(3)核心层交换机设置
(4)PC设置
4.测试
(1)DHCP测试
(2)验证互通性


1.拓扑图


2.先容

通过设置交换机DHCP,实现电脑自动获取ip地址和网关,划分多个VLAN,最终实现PC跨VLAN通信。
3.设置

(1)接入层交换机设置

JR1:
   设置VLAN
  #
vlan batch 10 20
  #
  
设置接口
  #
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 20
  JR2:
   与JR1设置同理 ,不同的是创建的VLAN分别是30 40
  (2)汇聚层交换机设置

HJ1:
   (1)设置DHCP服务
  #
dhcp enable
ip pool for_vlan10
 gateway-list 192.168.10.1
 network 192.168.10.0 mask 255.255.255.0
 dns-list 8.8.8.8
#
ip pool for_vlan20
 gateway-list 192.168.20.1
 network 192.168.20.0 mask 255.255.255.0
 dns-list 8.8.8.8
  #
  
  (2)创建VLAN和VlANif接口ip
  #
vlan batch 10 20 100
#
interface Vlanif10
 ip address 192.168.10.1 255.255.255.0
 dhcp select global
#
interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
 dhcp select global
#
interface Vlanif100
 ip address 10.1.1.2 255.255.255.0
  #
  
(3)设置接口范例,划分vlan
  #
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 100
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20
  #
  
  (4)设置路由
  #
ip route-static 192.168.30.0 255.255.255.0 10.1.1.1
ip route-static 192.168.40.0 255.255.255.0 10.1.1.1
  #
  HJ2:
   (1)设置DHCP服务
  #
dhcp enable
#
ip pool for_vlan30
 gateway-list 192.168.30.1
 network 192.168.30.0 mask 255.255.255.0
 dns-list 8.8.8.8
#
ip pool for_vlan40
 gateway-list 192.168.40.1
 network 192.168.40.0 mask 255.255.255.0
 dns-list 8.8.8.8
#
  
  (2)创建VLAN和VlANif接口ip
  #
vlan batch 30 40 200
#
interface Vlanif30
 ip address 192.168.30.1 255.255.255.0
 dhcp select global
#
interface Vlanif40
 ip address 192.168.40.1 255.255.255.0
 dhcp select global
#
interface Vlanif200
 ip address 10.2.1.2 255.255.255.0
#
  
  (3)设置接口范例,划分vlan
  #
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 200
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 30 40
#
  
  (4)设置路由
  #
ip route-static 192.168.10.0 255.255.255.0 10.2.1.1
ip route-static 192.168.20.0 255.255.255.0 10.2.1.1
#
  (3)核心层交换机设置

HX1:
   (1)设置VLAN和vlanif接口
  #
vlan batch 100 200
  #
interface Vlanif100
 ip address 10.1.1.1 255.255.255.0
#
interface Vlanif200
 ip address 10.2.1.1 255.255.255.0
  #
  
  (2)设置接口
  #
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 100
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 200
  #
  
  (3)设置路由
  #
ip route-static 192.168.10.0 255.255.255.0 10.1.1.2
ip route-static 192.168.20.0 255.255.255.0 10.1.1.2
ip route-static 192.168.30.0 255.255.255.0 10.2.1.2
ip route-static 192.168.40.0 255.255.255.0 10.2.1.2
  #
  (4)PC设置

 选择DHCP,勾选自动获取DNS服务器地址

PC2、3、4设置与PC1相同即可。 
4.测试

(1)DHCP测试


可以看到PC获取到了IP和网关等信息。 
PC2、3、4分别获取到的地址为:
192.168.20.254/24         192.168.30.254/24         192.168.40.254/24
(2)验证互通性

PC间互ping:

经验证每台PC间都可相互ping通,这里就不一一展示了 !

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4